进出日志后台查询;小程序端进门;导出表格时日期转换
This commit is contained in:
@@ -25,19 +25,22 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
let scene = options.scene
|
||||
if (!scene) {
|
||||
wx.navigateBack()
|
||||
return
|
||||
}
|
||||
scene = decodeURIComponent(scene) // %26 == &
|
||||
if (scene.indexOf('&') == -1) {
|
||||
wx.navigateBack()
|
||||
console.log("entrance -> options", typeof (options), options)
|
||||
let scene = options.scene ? decodeURIComponent(options.scene) : undefined // %3B == ; %26 == &
|
||||
console.log("scene", options.scene, scene)
|
||||
if (!scene || scene.indexOf(';') == -1) {
|
||||
wx.showModal({
|
||||
title: '出错啦',
|
||||
content: '参数不正确' + JSON.stringify(options),
|
||||
showCancel: false,
|
||||
complete: (res) => {
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let gateId = scene.split('&')[1]
|
||||
let gateId = scene.split(';')[1]
|
||||
this.setData({
|
||||
gateId: gateId,
|
||||
});
|
||||
@@ -109,6 +112,13 @@ Page({
|
||||
})();
|
||||
},
|
||||
|
||||
enterGate: function () {
|
||||
(async () => {
|
||||
let enterGate = await gateService.enterGate(this.data.gateId, "IN")
|
||||
console.log("enterGate", enterGate)
|
||||
})();
|
||||
},
|
||||
|
||||
navigateBack: function () {
|
||||
wx.navigateBack()
|
||||
}
|
||||
|
Reference in New Issue
Block a user