Commit 8d422c61 by 陈玉桐

fix

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