Commit f9b94d29 by 严立

LL - 我的预约导航栏返回

parent 573bd2f4
...@@ -12,6 +12,7 @@ Page({ ...@@ -12,6 +12,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
option: {},
isDoing: false, isDoing: false,
pageNo: 1, pageNo: 1,
// 导航栏相关属性 // 导航栏相关属性
...@@ -72,6 +73,7 @@ Page({ ...@@ -72,6 +73,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
let type = options.tab ? 1 * options.tab : 0 let type = options.tab ? 1 * options.tab : 0
this.setData({ this.setData({
option: options,
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度 height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
active: type active: type
}) })
...@@ -356,4 +358,16 @@ Page({ ...@@ -356,4 +358,16 @@ Page({
}, },
// 导航栏返回事件。
onNavBack: function () {
if (this.data.option.fromPage) {
wx.switchTab({
url: '/pages/mine/home/home',
})
} else {
wx.navigateBack({
'delta': 1
})
}
},
}) })
\ No newline at end of file
<!--pages/myAppointment/myAppointment.wxml--> <!--pages/myAppointment/myAppointment.wxml-->
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" <navigation class="navigation" titleText="我的预约" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}" bind:navBack="onNavBack"></navigation>
scrollHeight="{{navigationScroll}}"></navigation>
<view class="container all"> <view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;"> <view class="myActivity-container" style="min-height:{{height}}px;">
<view class="myAppointment-nav"> <view class="myAppointment-nav">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment