【update】 我的-扫码报名
This commit is contained in:
@@ -98,6 +98,30 @@ Page({
|
||||
})
|
||||
})
|
||||
},
|
||||
// 扫码报名
|
||||
scanCodeApplication () {
|
||||
wx.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: [],
|
||||
success: (result) => {
|
||||
console.log(result,'saoma result');
|
||||
if (result.result.indexOf("signupdraftteamentrance") > -1) { // 证明是签到二维码
|
||||
let draftId = result.result.split("=")[1] // Id
|
||||
// 成功扫码的回调result
|
||||
wx.navigateTo({
|
||||
url: `../signUpDraftTeamEntrance/signUpDraftTeamEntrance?id=${draftId}`,
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '此二维码不是报名码',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 我的资料
|
||||
mineData() {
|
||||
isLogin(() => {
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
</view>
|
||||
<image src="../../assets/images/more.png"></image>
|
||||
</view>
|
||||
<view class="list-item" bindtap="scanCodeApplication">
|
||||
<view class="item-title">
|
||||
<image src="../../assets/images/sign.png"></image>
|
||||
<text>扫码报名</text>
|
||||
</view>
|
||||
<image src="../../assets/images/more.png"></image>
|
||||
</view>
|
||||
<!-- <view class="list-item" bindtap="mineData">
|
||||
<view class="item-title">
|
||||
<image src="../../assets/images/data.png"></image>
|
||||
|
||||
@@ -40,7 +40,7 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
let url = decodeURIComponent(options.q)
|
||||
let id = url.split('=')[1]
|
||||
let id = url.split('=')[1] || options.id
|
||||
// 用于测试代码
|
||||
// id = '1746776208124739585'
|
||||
this.setData({ id })
|
||||
@@ -98,4 +98,4 @@ Page({
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user