|
@@ -17,16 +17,19 @@ Page({
|
|
|
orderAmount: '',
|
|
|
num: '',
|
|
|
appusername: '',
|
|
|
- appuserheadimg: ''
|
|
|
+ appuserheadimg: '',
|
|
|
+ from: '' // 从哪个页面进入的页面
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
+ console.log(options, 'options');
|
|
|
this.getGoodsList()
|
|
|
this.getAccountNmberFn()
|
|
|
this.setData({
|
|
|
+ from: options.from,
|
|
|
appusername: app.globalData.userInfo.userName.length > 4 ? app.globalData.userInfo.userName.substring(0,4) : app.globalData.userInfo.userName,
|
|
|
appuserheadimg: app.globalData.userInfo.headImg
|
|
|
})
|
|
@@ -127,9 +130,13 @@ Page({
|
|
|
cancelColor: '#666',
|
|
|
success (modalRes) {
|
|
|
if (modalRes.confirm) {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/appointment/appointment'
|
|
|
- })
|
|
|
+ if (that.data.from == 'appointment') {
|
|
|
+ wx.navigateBack()
|
|
|
+ } else {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/appointment/appointment?from=buy'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -149,10 +156,5 @@ Page({
|
|
|
showCancel: false
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- handleAppointment () {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/appointment/appointment',
|
|
|
- })
|
|
|
}
|
|
|
})
|