Showing
7 changed files
with
64 additions
and
4 deletions
| @@ -130,6 +130,9 @@ | @@ -130,6 +130,9 @@ | ||
| 130 | "provider": "wx56c8f077de74b07c" | 130 | "provider": "wx56c8f077de74b07c" |
| 131 | } | 131 | } |
| 132 | }, | 132 | }, |
| 133 | + "navigateToMiniProgramAppIdList": [ | ||
| 134 | + "wx8abaf00ee8c3202e" | ||
| 135 | + ], | ||
| 133 | "permission": { | 136 | "permission": { |
| 134 | "scope.userLocation": { | 137 | "scope.userLocation": { |
| 135 | "desc": "你的位置信息用于获得离你最近的餐厅" | 138 | "desc": "你的位置信息用于获得离你最近的餐厅" |
| @@ -55,6 +55,21 @@ | @@ -55,6 +55,21 @@ | ||
| 55 | </view> | 55 | </view> |
| 56 | </view> | 56 | </view> |
| 57 | </formids> | 57 | </formids> |
| 58 | + <!-- | ||
| 59 | + <navigator | ||
| 60 | + target="miniProgram" | ||
| 61 | + open-type="navigate" | ||
| 62 | + app-id="wx8abaf00ee8c3202e" | ||
| 63 | + extra-data="{{extraData}}" | ||
| 64 | + version="release"> | ||
| 65 | + <view class="item flex-lr"> | ||
| 66 | + <view class="left">吐个槽</view> | ||
| 67 | + <view class="right"> | ||
| 68 | + <image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image> | ||
| 69 | + </view> | ||
| 70 | + </view> | ||
| 71 | + </navigator> | ||
| 72 | + --> | ||
| 58 | </view> | 73 | </view> |
| 59 | </view> | 74 | </view> |
| 60 | <fb></fb> | 75 | <fb></fb> |
| @@ -104,7 +104,18 @@ function rpc(host = '', act, data = {}, fouce = false, header = {}, silence = tr | @@ -104,7 +104,18 @@ function rpc(host = '', act, data = {}, fouce = false, header = {}, silence = tr | ||
| 104 | } | 104 | } |
| 105 | if (RMT.check(cache_key)) return RMT.get(cache_key) | 105 | if (RMT.check(cache_key)) return RMT.get(cache_key) |
| 106 | RMT.set(cache_key) | 106 | RMT.set(cache_key) |
| 107 | - return new Promise((success, fail) => { | 107 | + return new Promise(async(success, fail) => { |
| 108 | + if(api.msgSecCheck){//数据安全检查 | ||
| 109 | + try{ | ||
| 110 | + await msgSecCheck(host,data) | ||
| 111 | + }catch (e){ | ||
| 112 | + wx.showToast({ | ||
| 113 | + title:'内容含有违法违规内容', | ||
| 114 | + icon:'none' | ||
| 115 | + }) | ||
| 116 | + return fail() | ||
| 117 | + } | ||
| 118 | + } | ||
| 108 | let openid = wx.getStorageSync('customer_openid'); | 119 | let openid = wx.getStorageSync('customer_openid'); |
| 109 | let formids = wx.getStorageSync('formids'); | 120 | let formids = wx.getStorageSync('formids'); |
| 110 | if (formids) { | 121 | if (formids) { |
| @@ -248,5 +259,30 @@ function cache(key, val = -99999, timeout = -1) { | @@ -248,5 +259,30 @@ function cache(key, val = -99999, timeout = -1) { | ||
| 248 | return -99999 | 259 | return -99999 |
| 249 | } | 260 | } |
| 250 | } | 261 | } |
| 251 | - | 262 | +function msgSecCheck(host,params){ |
| 263 | + let content=JSON.stringify(params); | ||
| 264 | + return new Promise(function(success,fail){ | ||
| 265 | + wx.request({ | ||
| 266 | + url: host + 'App.Wechat.MsgSecCheck', | ||
| 267 | + method: 'POST', | ||
| 268 | + data: {content:content}, | ||
| 269 | + header: { | ||
| 270 | + 'content-type': 'application/x-www-form-urlencoded' | ||
| 271 | + }, | ||
| 272 | + success: res => { | ||
| 273 | + if(res.data.data.errcode==0){ | ||
| 274 | + success() | ||
| 275 | + }else{ | ||
| 276 | + fail() | ||
| 277 | + } | ||
| 278 | + }, | ||
| 279 | + fail: res => { | ||
| 280 | + fail() | ||
| 281 | + }, | ||
| 282 | + complete:res=>{ | ||
| 283 | + wx.hideLoading(); | ||
| 284 | + } | ||
| 285 | + }) | ||
| 286 | + }) | ||
| 287 | +} | ||
| 252 | export default __api(); | 288 | export default __api(); |
| @@ -6,6 +6,7 @@ export default { | @@ -6,6 +6,7 @@ export default { | ||
| 6 | timeout: 2000, //接口超时时间,默认2s | 6 | timeout: 2000, //接口超时时间,默认2s |
| 7 | host: '', //默认空使用04服务器,测试填写 'https://xt05.colorcun.com:10006/?s=' | 7 | host: '', //默认空使用04服务器,测试填写 'https://xt05.colorcun.com:10006/?s=' |
| 8 | alias: 'App.TestManagement.TestReal', //真实接口名称,默认为空 | 8 | alias: 'App.TestManagement.TestReal', //真实接口名称,默认为空 |
| 9 | + msgSecCheck:true, //进行内容安全检查 | ||
| 9 | }, | 10 | }, |
| 10 | 11 | ||
| 11 | //预订信息详情 | 12 | //预订信息详情 |
| @@ -210,6 +211,7 @@ export default { | @@ -210,6 +211,7 @@ export default { | ||
| 210 | 'App.Invitation.SetInvitationInfo':{ | 211 | 'App.Invitation.SetInvitationInfo':{ |
| 211 | silence: false, | 212 | silence: false, |
| 212 | openid:'openid', | 213 | openid:'openid', |
| 214 | + msgSecCheck:true, | ||
| 213 | }, | 215 | }, |
| 214 | 216 | ||
| 215 | //邀请函详情 | 217 | //邀请函详情 |
| @@ -260,6 +262,7 @@ export default { | @@ -260,6 +262,7 @@ export default { | ||
| 260 | 'App.Customer.SetCustomerInfo':{ | 262 | 'App.Customer.SetCustomerInfo':{ |
| 261 | openid:'openid', | 263 | openid:'openid', |
| 262 | silence:false, | 264 | silence:false, |
| 265 | + msgSecCheck:true, | ||
| 263 | }, | 266 | }, |
| 264 | 267 | ||
| 265 | //根据openid获取用的常用信息 | 268 | //根据openid获取用的常用信息 |
-
Please register or login to post a comment