Commit 73b6863c by 陈玉桐

test

parent fc366c28
...@@ -158,6 +158,18 @@ export default { ...@@ -158,6 +158,18 @@ export default {
this.nonceStr = response.data.nonceStr this.nonceStr = response.data.nonceStr
this.signature = response.data.signature this.signature = response.data.signature
this.timestamp = response.data.timestamp this.timestamp = response.data.timestamp
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: this.appId, // 必填,公众号的唯一标识
timestamp: this.timestamp, // 必填,生成签名的时间戳
nonceStr: this.nonceStr, // 必填,生成签名的随机串
signature: this.signature,// 必填,签名
jsApiList: ['chooseImage'] // 必填,需要使用的JS接口列表
})
wx.ready(function(){
})
wx.error(function(res){})
}) })
this.loadingShow = true this.loadingShow = true
...@@ -206,6 +218,7 @@ export default { ...@@ -206,6 +218,7 @@ export default {
}, },
upload() { upload() {
if(this.enrollStatus==1){//已报名 if(this.enrollStatus==1){//已报名
}else{ }else{
this.applyDialogShow = true this.applyDialogShow = true
} }
...@@ -219,20 +232,6 @@ export default { ...@@ -219,20 +232,6 @@ export default {
selectPic() { selectPic() {
let me = this let me = this
if(me.enrollStatus==1){//已报名 if(me.enrollStatus==1){//已报名
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: me.appId, // 必填,公众号的唯一标识
timestamp: me.timestamp, // 必填,生成签名的时间戳
nonceStr: me.nonceStr, // 必填,生成签名的随机串
signature: me.signature,// 必填,签名
jsApiList: ['chooseImage'] // 必填,需要使用的JS接口列表
})
wx.ready(function(){
wx.checkJsApi({
jsApiList: [
'chooseImage',
],
success: function (res) {
wx.chooseImage({ wx.chooseImage({
count: 1, // 默认9 count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
...@@ -241,10 +240,6 @@ export default { ...@@ -241,10 +240,6 @@ export default {
me.uploadPic = res.localIds[0] // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 me.uploadPic = res.localIds[0] // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
} }
}); });
}
})
})
wx.error(function(res){})
}else{ }else{
this.applyDialogShow = true this.applyDialogShow = true
} }
......
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