nantai-erp-wechat-mobile/driver/pages/add/addResult.js

87 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2024-10-31 21:29:57 +08:00
// driver/pages/add/addResult.js
Page({
/**
* 页面的初始数据
*/
data: {
id: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const id = options.id || ''
if (id) {
this.setData({
id
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
// 返回首页
goHome: function () {
wx.navigateTo({
url: '/driver/pages/add/add',
})
},
// 查看详情
goDetail: function () {
const id = this.data.id
if (id) {
wx.navigateTo({
url: `/driver/pages/detail/detail?id=${id}`
})
} else {
wx.navigateTo({
url: `/driver/pages/record/record`
})
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})