Commit 73b6863c by 陈玉桐

test

parent fc366c28
......@@ -158,6 +158,18 @@ export default {
this.nonceStr = response.data.nonceStr
this.signature = response.data.signature
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
......@@ -206,6 +218,7 @@ export default {
},
upload() {
if(this.enrollStatus==1){//已报名
}else{
this.applyDialogShow = true
}
......@@ -219,32 +232,14 @@ export default {
selectPic() {
let me = this
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({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
me.uploadPic = res.localIds[0] // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
}
});
}
})
})
wx.error(function(res){})
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
me.uploadPic = res.localIds[0] // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
}
});
}else{
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