[最新更新]
This commit is contained in:
76
pages/empower/writeOff/writeOff.js
Normal file
76
pages/empower/writeOff/writeOff.js
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
popupShow : false,
|
||||
code : '',
|
||||
vouchers : [],
|
||||
layIndex : 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
code: options.scene
|
||||
})
|
||||
this.codesInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 核销列表
|
||||
*/
|
||||
codesInfo() {
|
||||
wx.$api.empower.codes({
|
||||
code: this.data.code
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
vouchers: res.data
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 报名信息弹出关闭
|
||||
*/
|
||||
usersHide() {
|
||||
this.setData({
|
||||
popupShow: false
|
||||
})
|
||||
},
|
||||
|
||||
// 显示确认弹出层
|
||||
onShowLay(e){
|
||||
let index = e.currentTarget.dataset.index
|
||||
this.setData({
|
||||
layIndex : index,
|
||||
popupShow: true
|
||||
})
|
||||
},
|
||||
|
||||
// 签到
|
||||
onSign(e){
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.$api.empower.sign({
|
||||
item_id: id
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
popupShow: false
|
||||
})
|
||||
this.codesInfo();
|
||||
}).catch(err => { })
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user