Commit 8d422c61 by 陈玉桐

fix

parent 4597513a
...@@ -115,6 +115,12 @@ export default { ...@@ -115,6 +115,12 @@ export default {
applyDialogShow: false, applyDialogShow: false,
createDialogShow: false, createDialogShow: false,
appId: '', // 必填,公众号的唯一标识
timestamp: '', // 必填,生成签名的时间戳
nonceStr: '', // 必填,生成签名的随机串
signature: '',// 必填,签名
} }
}, },
components: { components: {
...@@ -130,16 +136,20 @@ export default { ...@@ -130,16 +136,20 @@ export default {
// this.isX = true; // this.isX = true;
// } // }
// } // }
// let _url = document.location.href.split('#')[0] let _url = document.location.href.split('#')[0]
// request({ request({
// url: '/api/MarketingToolApi/Wechat/getSignPackage', url: '/api/MarketingToolApi/Wechat/getSignPackage',
// method: 'get', method: 'post',
// params: { data: {
// url : _url url : _url,
// } token: localStorage.getItem("token")
// }).then(response => { }
// console.log(response) }).then(response => {
// }) this.appId = response.data.appId
this.nonceStr = response.data.nonceStr
this.signature = response.data.signature
this.timestamp = response.data.timestamp
})
this.loadingShow = true this.loadingShow = true
request({ request({
...@@ -189,12 +199,12 @@ export default { ...@@ -189,12 +199,12 @@ export default {
selectPic() { selectPic() {
if(this.enrollStatus==1){//已报名 if(this.enrollStatus==1){//已报名
wx.config({ wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: '', // 必填,公众号的唯一标识 appId: this.appId, // 必填,公众号的唯一标识
timestamp: '', // 必填,生成签名的时间戳 timestamp: this.timestamp, // 必填,生成签名的时间戳
nonceStr: '', // 必填,生成签名的随机串 nonceStr: this.nonceStr, // 必填,生成签名的随机串
signature: '',// 必填,签名 signature: this.signature,// 必填,签名
jsApiList: [] // 必填,需要使用的JS接口列表 jsApiList: ['chooseImage'] // 必填,需要使用的JS接口列表
}) })
wx.ready(function(){ wx.ready(function(){
wx.checkJsApi({ wx.checkJsApi({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment