blsm-mp-wx 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/blsm-mp-wx/version.rb +1 -1
- data/lib/blsm-mp-wx.rb +6 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d532da95333cb9b16e81c75aa30ded8535a6e4e5
|
4
|
+
data.tar.gz: 3122e86cdde819a1d7de049046ad5e1ab5b287ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea4c084a5cf429a75916462f6d91d6550f90bb15bebb12148453bdc07adba244f2101a0bf1697169afb38f451d70248648a5ca293c3c4b3daa76a9d5586936ba
|
7
|
+
data.tar.gz: 2c515815789144da68cb6685b99a20d4e1a80136dbe3917ef68fe05108e961312db169a75e48bca2d5b2e3ec761812ff202afbf9d67e7cdbf9545caf47ff7941
|
data/Gemfile.lock
CHANGED
data/lib/blsm-mp-wx/version.rb
CHANGED
data/lib/blsm-mp-wx.rb
CHANGED
@@ -20,7 +20,7 @@ module BlsmMpWx
|
|
20
20
|
attr_accessor :APP_ID
|
21
21
|
attr_accessor :APP_ID_2
|
22
22
|
|
23
|
-
MP_MSG_TYPES = %w(new_order balance score_change distribute custom split_order order todo) #微信公众号消息类型
|
23
|
+
# MP_MSG_TYPES = %w(new_order balance score_change account_change distribute custom split_order order todo) #微信公众号消息类型
|
24
24
|
|
25
25
|
#根据app_id获取access_token
|
26
26
|
#系统会根据当前的access_token即过期时间,自动更新并返回
|
@@ -218,30 +218,30 @@ module BlsmMpWx
|
|
218
218
|
# new_order => content: {touser:'openid',order_id:''} 系统自动优先使用模板消息发送通知
|
219
219
|
# balance => content: {touser:'openid',clearing_id} 系统自动优先使用模板消息发送通知
|
220
220
|
# score_change => content: {touser:'',change:5,total:25,content:'邀请他人。。。。'}
|
221
|
-
def create_msg(app_id=nil, openid, content, msg_name)
|
221
|
+
def create_msg(app_id=nil, openid, content, msg_name, template_msg=false)
|
222
222
|
app_id ||= self.APP_ID
|
223
223
|
return nil unless openid
|
224
224
|
return nil unless content[:touser]==openid
|
225
|
-
return nil unless MP_MSG_TYPES.include?(msg_name)
|
225
|
+
# return nil unless MP_MSG_TYPES.include?(msg_name)
|
226
226
|
VdMpMsg.create({
|
227
227
|
app_id: app_id,
|
228
228
|
openid: openid,
|
229
229
|
content: content.to_json,
|
230
230
|
msg_name: msg_name,
|
231
|
-
template_msg:
|
231
|
+
template_msg: template_msg,
|
232
232
|
status: 'none'
|
233
233
|
})
|
234
234
|
end
|
235
235
|
|
236
236
|
|
237
|
-
def create_msg!(app_id=nil, openid, content, msg_name)
|
237
|
+
def create_msg!(app_id=nil, openid, content, msg_name, template_msg=false)
|
238
238
|
app_id ||= self.APP_ID
|
239
239
|
VdMpMsg.create!({
|
240
240
|
app_id: app_id,
|
241
241
|
openid: openid,
|
242
242
|
content: content.to_json,
|
243
243
|
msg_name: msg_name,
|
244
|
-
template_msg:
|
244
|
+
template_msg: template_msg,
|
245
245
|
status: 'none'
|
246
246
|
})
|
247
247
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blsm-mp-wx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saxer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.9'
|
139
|
-
description: 包括access_token、js_api_ticket的获取,发送消息,模板消息,生成二维码,获取用户信息等。
|
139
|
+
description: "包括access_token、js_api_ticket的获取,发送消息,模板消息,生成二维码,获取用户信息等。"
|
140
140
|
email:
|
141
141
|
- 15201280641@qq.com
|
142
142
|
executables: []
|
@@ -178,8 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.4.
|
181
|
+
rubygems_version: 2.4.3
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
|
-
summary: 首趣微店微信公众号基本模块
|
184
|
+
summary: "首趣微店微信公众号基本模块"
|
185
185
|
test_files: []
|