qa-education-exam-weapp/pages/index/index.js

64 lines
1.4 KiB
JavaScript

const app = getApp()
import Dialog from '@vant/weapp/dialog/dialog';
Page({
data: {
userSignShow: false
},
toOnline: function (events) {
this.isAuthentication('/pages/exam/online/online')
},
toPhoto: function (events) {
wx.navigateTo({
url: '/pages/photo/collection',
})
},
toSign: function (events) {
wx.navigateTo({
url: '/pages/sign/sign',
})
},
toImitate: function (events) {
this.isAuthentication('/pages/exam/imitate/imitate')
// wx.navigateTo({
// url: '/pages/exam/imitate/imitate',
// // events: events,
// // success: (result) => {},
// // fail: (res) => {},
// // complete: (res) => {},
// })
},
isAuthentication: function (url) {
wx.navigateTo({
url: url,
})
// 首次照片采集
// let user = app.globalData.userInfo
// if (user.AUTHENTICATION == '1') {
// wx.navigateTo({
// url: url,
// })
// } else {
// Dialog.confirm({
// message: '需要先进行照片采集',
// selector: '#myDialog',
// })
// .then(() => {
// wx.navigateTo({
// url: '/pages/photo/collection',
// })
// })
// .catch(() => {
// });
// }
},
toRecord: function (events) {
this.isAuthentication('/pages/exam/record/record')
// wx.navigateTo({
// url: '/pages/exam/record/record',
// })
}
})