Showing
8 changed files
with
43 additions
and
11 deletions
| @@ -48,7 +48,6 @@ Page({ | @@ -48,7 +48,6 @@ Page({ | ||
| 48 | this.setData({ | 48 | this.setData({ |
| 49 | opt: options | 49 | opt: options |
| 50 | }) | 50 | }) |
| 51 | - | ||
| 52 | this.getDateBox = this.selectComponent("#getDate"); | 51 | this.getDateBox = this.selectComponent("#getDate"); |
| 53 | this.getOftenNote() | 52 | this.getOftenNote() |
| 54 | this.getSellerInfo() | 53 | this.getSellerInfo() |
| @@ -726,13 +725,17 @@ Page({ | @@ -726,13 +725,17 @@ Page({ | ||
| 726 | onShow() { | 725 | onShow() { |
| 727 | var pages = getCurrentPages() | 726 | var pages = getCurrentPages() |
| 728 | var currPage = pages[pages.length - 1] | 727 | var currPage = pages[pages.length - 1] |
| 729 | - let PageTid = currPage.data.PageTid || '' | ||
| 730 | - if (PageTid) { | 728 | + let PageTid = currPage.data.PageTid; |
| 729 | + if (PageTid && PageTid.length>0) { | ||
| 731 | console.log('PageTid', PageTid); | 730 | console.log('PageTid', PageTid); |
| 732 | this.setData({ | 731 | this.setData({ |
| 733 | PageTid, | 732 | PageTid, |
| 734 | 'detail.table_photo': PageTid, | 733 | 'detail.table_photo': PageTid, |
| 735 | }) | 734 | }) |
| 735 | + }else{ | ||
| 736 | + this.setData({ | ||
| 737 | + 'detail.table_photo': this.data.detail.table_photo, | ||
| 738 | + }) | ||
| 736 | } | 739 | } |
| 737 | }, | 740 | }, |
| 738 | //转订单中时间戳为日期格式 | 741 | //转订单中时间戳为日期格式 |
| @@ -8,6 +8,7 @@ Page({ | @@ -8,6 +8,7 @@ Page({ | ||
| 8 | */ | 8 | */ |
| 9 | data: { | 9 | data: { |
| 10 | opt: {}, | 10 | opt: {}, |
| 11 | + barHeight:'', | ||
| 11 | homeList: [], | 12 | homeList: [], |
| 12 | allfloorList: [], | 13 | allfloorList: [], |
| 13 | allfloorList: [], | 14 | allfloorList: [], |
| @@ -26,6 +27,20 @@ Page({ | @@ -26,6 +27,20 @@ Page({ | ||
| 26 | objpush: JSON.parse(options.table_photo) | 27 | objpush: JSON.parse(options.table_photo) |
| 27 | }) | 28 | }) |
| 28 | this.getMealSectionByDayFun() | 29 | this.getMealSectionByDayFun() |
| 30 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 31 | + let reg = /ios/i; | ||
| 32 | + let pt = 20; //导航状态栏上内边距 | ||
| 33 | + let h = 44; //导航状态栏高度 | ||
| 34 | + if (reg.test(systemInfo.system)) { | ||
| 35 | + pt = systemInfo.statusBarHeight; | ||
| 36 | + h = 44; | ||
| 37 | + } else { | ||
| 38 | + pt = systemInfo.statusBarHeight; | ||
| 39 | + h = 48; | ||
| 40 | + } | ||
| 41 | + this.setData({ | ||
| 42 | + barHeight: pt + h, | ||
| 43 | + }) | ||
| 29 | }, | 44 | }, |
| 30 | // 点击确定 | 45 | // 点击确定 |
| 31 | editTable() { | 46 | editTable() { |
| @@ -215,10 +230,10 @@ Page({ | @@ -215,10 +230,10 @@ Page({ | ||
| 215 | }) | 230 | }) |
| 216 | let list = [] | 231 | let list = [] |
| 217 | if (items.name === "全部") { | 232 | if (items.name === "全部") { |
| 218 | - this.getReversList(); | ||
| 219 | this.setData({ | 233 | this.setData({ |
| 220 | homeList: [], | 234 | homeList: [], |
| 221 | }) | 235 | }) |
| 236 | + this.getMealSectionByDayFun(); | ||
| 222 | } else { | 237 | } else { |
| 223 | let allfloorList = this.data.allfloorList; | 238 | let allfloorList = this.data.allfloorList; |
| 224 | let obj = allfloorList.filter(i => { | 239 | let obj = allfloorList.filter(i => { |
| 1 | <!--pack-book/pages/reservation/moreTable.wxml--> | 1 | <!--pack-book/pages/reservation/moreTable.wxml--> |
| 2 | <nav id="nav" backgroundColor="#199095" color="#fefefe">选择桌位</nav> | 2 | <nav id="nav" backgroundColor="#199095" color="#fefefe">选择桌位</nav> |
| 3 | -<view class="topWrap"> | 3 | +<view class="topWrap" style="top: {{barHeight}}px;"> |
| 4 | <view class="tables"> | 4 | <view class="tables"> |
| 5 | <view bind:tap="floorClick" data-item="{{item}}" class="tablesItems {{activeIndex==item.id?'activeLi':''}}" wx:for="{{floorList}}" wx:key="index"> | 5 | <view bind:tap="floorClick" data-item="{{item}}" class="tablesItems {{activeIndex==item.id?'activeLi':''}}" wx:for="{{floorList}}" wx:key="index"> |
| 6 | <view class="names font32r">{{item.name}}</view> | 6 | <view class="names font32r">{{item.name}}</view> |
| @@ -11,6 +11,7 @@ Page({ | @@ -11,6 +11,7 @@ Page({ | ||
| 11 | */ | 11 | */ |
| 12 | data: { | 12 | data: { |
| 13 | threeText: '今天', //今天、明天、后天 | 13 | threeText: '今天', //今天、明天、后天 |
| 14 | + barHeight:'', | ||
| 14 | date: '', | 15 | date: '', |
| 15 | date1: '', | 16 | date1: '', |
| 16 | week: '', | 17 | week: '', |
| @@ -45,14 +46,14 @@ Page({ | @@ -45,14 +46,14 @@ Page({ | ||
| 45 | onLoad(options) { | 46 | onLoad(options) { |
| 46 | console.log('options---', options); | 47 | console.log('options---', options); |
| 47 | let obj = {} | 48 | let obj = {} |
| 48 | - if (options) { | 49 | + if (options.seller_id) util.cache('sellerid', options.seller_id) |
| 50 | + if (options.seller_id && options.manager_id && options.seller_openid) { | ||
| 49 | obj = { | 51 | obj = { |
| 50 | seller_id: options.seller_id, | 52 | seller_id: options.seller_id, |
| 51 | manager_id: options.manager_id, | 53 | manager_id: options.manager_id, |
| 52 | seller_openid: options.seller_openid, | 54 | seller_openid: options.seller_openid, |
| 53 | } | 55 | } |
| 54 | util.cache('enter_params', obj) | 56 | util.cache('enter_params', obj) |
| 55 | - if (options.seller_id) util.cache('sellerid', options.seller_id) | ||
| 56 | } | 57 | } |
| 57 | this.getDateBox = this.selectComponent("#getDate"); | 58 | this.getDateBox = this.selectComponent("#getDate"); |
| 58 | this.getBook = this.selectComponent("#getBook"); | 59 | this.getBook = this.selectComponent("#getBook"); |
| @@ -62,6 +63,20 @@ Page({ | @@ -62,6 +63,20 @@ Page({ | ||
| 62 | let role_name = res.data.seller_user.role_name; | 63 | let role_name = res.data.seller_user.role_name; |
| 63 | util.cache('roleName', role_name) | 64 | util.cache('roleName', role_name) |
| 64 | }) | 65 | }) |
| 66 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 67 | + let reg = /ios/i; | ||
| 68 | + let pt = 20; //导航状态栏上内边距 | ||
| 69 | + let h = 44; //导航状态栏高度 | ||
| 70 | + if (reg.test(systemInfo.system)) { | ||
| 71 | + pt = systemInfo.statusBarHeight; | ||
| 72 | + h = 44; | ||
| 73 | + } else { | ||
| 74 | + pt = systemInfo.statusBarHeight; | ||
| 75 | + h = 48; | ||
| 76 | + } | ||
| 77 | + this.setData({ | ||
| 78 | + barHeight: pt + h, | ||
| 79 | + }) | ||
| 65 | }, | 80 | }, |
| 66 | /** | 81 | /** |
| 67 | * 生命周期函数--监听页面显示 | 82 | * 生命周期函数--监听页面显示 |
| 1 | <!--pack-book/pages/reservation/reservation.wxml--> | 1 | <!--pack-book/pages/reservation/reservation.wxml--> |
| 2 | <nav id="nav" backgroundColor="#199095" color="#fefefe">预订本</nav> | 2 | <nav id="nav" backgroundColor="#199095" color="#fefefe">预订本</nav> |
| 3 | -<view class="topWrap"> | 3 | +<view class="topWrap" style="top: {{barHeight}}px;"> |
| 4 | <view class="dateInfo" bind:tap="showDateModal"> | 4 | <view class="dateInfo" bind:tap="showDateModal"> |
| 5 | <view class="threeDays font40r">{{threeText}}</view> | 5 | <view class="threeDays font40r">{{threeText}}</view> |
| 6 | <view class="dateText font32r">{{date}}</view> | 6 | <view class="dateText font32r">{{date}}</view> |
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| 21 | </view> | 21 | </view> |
| 22 | -<view class="mainCenter"> | 22 | +<view class="mainCenter" style="padding-top: {{barHeight+40}}px;;"> |
| 23 | <view data-item="{{item}}" data-index="{{index}}" bind:tap="getTapHandler" class="itemsBox {{item.show?'checked':''}} {{(item.reserveLock == '1' || item.lockstitch) ? 'lockstitchBox':''}} {{item.reserveList?'orderInfo':''}} {{item.banquetList && item.banquetList.length>0?'banquetsInfo':''}}" wx:for="{{homeList}}" wx:key="{{item.id}}"> | 23 | <view data-item="{{item}}" data-index="{{index}}" bind:tap="getTapHandler" class="itemsBox {{item.show?'checked':''}} {{(item.reserveLock == '1' || item.lockstitch) ? 'lockstitchBox':''}} {{item.reserveList?'orderInfo':''}} {{item.banquetList && item.banquetList.length>0?'banquetsInfo':''}}" wx:for="{{homeList}}" wx:key="{{item.id}}"> |
| 24 | <view class="wordName font32r">{{ item.name }}</view> | 24 | <view class="wordName font32r">{{ item.name }}</view> |
| 25 | <block wx:if="{{item.reserveList}}"> | 25 | <block wx:if="{{item.reserveList}}"> |
| 1 | /* pack-book/pages/reservation/reservation.wxss */ | 1 | /* pack-book/pages/reservation/reservation.wxss */ |
| 2 | .topWrap { | 2 | .topWrap { |
| 3 | position: fixed; | 3 | position: fixed; |
| 4 | - top: 176rpx; | ||
| 5 | left: 0; | 4 | left: 0; |
| 6 | background: #fff; | 5 | background: #fff; |
| 7 | padding: 10rpx 20rpx 18rpx 20rpx; | 6 | padding: 10rpx 20rpx 18rpx 20rpx; |
-
Please register or login to post a comment