You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
2.8 KiB
126 lines
2.8 KiB
// pages/serve/serve.js
|
|
const app = getApp()
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
this.setData({
|
|
statusHeight: app.globalData.deviceInfo.statusHeight,
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight,
|
|
});
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
},
|
|
toEventAdd(){
|
|
wx.navigateTo({
|
|
url: '/subpages/eventAdd/add/add',
|
|
})
|
|
},
|
|
toPage(e){
|
|
console.log(e);
|
|
if(e.currentTarget.dataset.url && e.currentTarget.dataset.url != '/subpages/OCRCard/pages/index/index' && e.currentTarget.dataset.url != '/subpages/index/checkOutConfirm/index/index'){
|
|
if(e.currentTarget.dataset.url === '/pages/serve/serve'){
|
|
wx.switchTab({
|
|
url: '/pages/serve/serve',
|
|
})
|
|
}
|
|
wx.navigateTo({
|
|
url: e.currentTarget.dataset.url,
|
|
})
|
|
}else if(e.currentTarget.dataset.url === '/subpages/OCRCard/pages/index/index'){
|
|
if(!this.data.bindPhone){
|
|
if(this.data.userInfo.idCard){
|
|
wx.navigateTo({
|
|
url: `/subpages/index/checkInUser/checkInUser?idCard=${this.data.userInfo.idCard}&name=${this.data.userInfo.name}&phone=${this.data.userInfo.phone}`,
|
|
})
|
|
}else{
|
|
wx.navigateTo({
|
|
url: `/subpages/OCRCard/pages/index/index`,
|
|
})
|
|
}
|
|
}else{
|
|
wx.navigateTo({
|
|
url: '/pages/register/register',
|
|
})
|
|
}
|
|
}else if(e.currentTarget.dataset.url === '/subpages/index/checkOutConfirm/index/index'){
|
|
if(!this.data.bindPhone){
|
|
if(this.data.userInfo.idCard){
|
|
wx.navigateTo({
|
|
url: `/subpages/index/checkOutConfirm/index/index`,
|
|
})
|
|
}else{
|
|
wx.navigateTo({
|
|
url: `/subpages/OCRCard/pages/index/index?type=out`,
|
|
})
|
|
}
|
|
}else{
|
|
wx.navigateTo({
|
|
url: '/pages/register/register',
|
|
})
|
|
}
|
|
}
|
|
},
|
|
toBsPage(){
|
|
wx.navigateTo({
|
|
url: '/subpages/bsPage/bsPage/bsPage',
|
|
})
|
|
}
|
|
})
|