Commit 50e7e2a7244ef72fb9d76498aff23efbb1c4d16c

Authored by vking
1 parent c777508e

内容安全检查

... ... @@ -130,6 +130,9 @@
"provider": "wx56c8f077de74b07c"
}
},
"navigateToMiniProgramAppIdList": [
"wx8abaf00ee8c3202e"
],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息用于获得离你最近的餐厅"
... ...
... ... @@ -277,7 +277,7 @@ Page({
...this.data.options,
},'./review')
})
})
}).catch(()=>{})
},
chooseImage(){
wx.chooseImage({
... ...
... ... @@ -10,6 +10,9 @@ Page({
data: {
hasSellerBook:false,
hasManagerInvitation:false,
extraData:{
id:55214,
}
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -55,6 +55,21 @@
</view>
</view>
</formids>
<!--
<navigator
target="miniProgram"
open-type="navigate"
app-id="wx8abaf00ee8c3202e"
extra-data="{{extraData}}"
version="release">
<view class="item flex-lr">
<view class="left">吐个槽</view>
<view class="right">
<image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
</view>
</view>
</navigator>
-->
</view>
</view>
<fb></fb>
... ...
... ... @@ -79,7 +79,7 @@ Page({
}
}
wx.navigateBack()
})
}).catch(()=>{})
},
changeInput(e) {
console.log(e)
... ...
... ... @@ -104,7 +104,18 @@ function rpc(host = '', act, data = {}, fouce = false, header = {}, silence = tr
}
if (RMT.check(cache_key)) return RMT.get(cache_key)
RMT.set(cache_key)
return new Promise((success, fail) => {
return new Promise(async(success, fail) => {
if(api.msgSecCheck){//数据安全检查
try{
await msgSecCheck(host,data)
}catch (e){
wx.showToast({
title:'内容含有违法违规内容',
icon:'none'
})
return fail()
}
}
let openid = wx.getStorageSync('customer_openid');
let formids = wx.getStorageSync('formids');
if (formids) {
... ... @@ -248,5 +259,30 @@ function cache(key, val = -99999, timeout = -1) {
return -99999
}
}
function msgSecCheck(host,params){
let content=JSON.stringify(params);
return new Promise(function(success,fail){
wx.request({
url: host + 'App.Wechat.MsgSecCheck',
method: 'POST',
data: {content:content},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
if(res.data.data.errcode==0){
success()
}else{
fail()
}
},
fail: res => {
fail()
},
complete:res=>{
wx.hideLoading();
}
})
})
}
export default __api();
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@ export default {
timeout: 2000, //接口超时时间,默认2s
host: '', //默认空使用04服务器,测试填写 'https://xt05.colorcun.com:10006/?s='
alias: 'App.TestManagement.TestReal', //真实接口名称,默认为空
msgSecCheck:true, //进行内容安全检查
},
//预订信息详情
... ... @@ -210,6 +211,7 @@ export default {
'App.Invitation.SetInvitationInfo':{
silence: false,
openid:'openid',
msgSecCheck:true,
},
//邀请函详情
... ... @@ -260,6 +262,7 @@ export default {
'App.Customer.SetCustomerInfo':{
openid:'openid',
silence:false,
msgSecCheck:true,
},
//根据openid获取用的常用信息
... ...