Commit c4d2545b223332cf5ef189bcf7ec5354a890da96
1 parent
2fac44da
提示成功图片修改,美容师改为预约美容师,添加导航栏
Showing
16 changed files
with
115 additions
and
76 deletions
components/nav_b/nav_b.js
components/nav_b/nav_b.wxss
pages/user/my_service/appment_main.js
... | ... | @@ -146,7 +146,7 @@ Page({ |
146 | 146 | is_sub: 0 |
147 | 147 | }) |
148 | 148 | if (res.data.code == 0) { |
149 | - getApp().my_warnning("预约成功", 0, th); | |
149 | + getApp().my_warnning("预约成功", 1, th); | |
150 | 150 | var store_name = th.data.store_name; //预约门店 |
151 | 151 | var number = res.data.data.Number; |
152 | 152 | var temp_url = "/api/wx/open/app/user/templatMessageSend"; //模版接口 | ... | ... |
pages/user/my_service/beauty_deta.js
... | ... | @@ -165,7 +165,7 @@ Page({ |
165 | 165 | }, // 设置请求的 header |
166 | 166 | success: function(res) { |
167 | 167 | if (res.data.code == 0) { |
168 | - getApp().my_warnning(res.data.data, 0, th); | |
168 | + getApp().my_warnning(res.data.data, 1, th); | |
169 | 169 | setTimeout(function() { |
170 | 170 | wx.navigateBack({ |
171 | 171 | //返回 | ... | ... |
pages/user/my_service/hist_service.json
pages/user/my_service/hist_service.wxml
... | ... | @@ -26,15 +26,19 @@ |
26 | 26 | <view> |
27 | 27 | <view class="flex fs28"> |
28 | 28 | <view class="itemName ellipsis-1">{{item.ServiceName==''?'匿名':item.ServiceName}}</view> |
29 | - <view>(美容师:</view> | |
29 | + <block wx:if="{{item.State==1 || item.State==4}}"> | |
30 | + <view>(服务美容师:</view> | |
31 | + </block> | |
32 | + <block wx:else> | |
33 | + <view>(预约美容师:</view> | |
34 | + </block> | |
30 | 35 | <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view> |
31 | 36 | ) |
32 | 37 | </view> |
33 | - <view class="fs24">{{item.BillDate!=''?item.BillDate:item.ArrangeTime}}</view> | |
38 | + <view class="fs24">{{item.ArrangeTime}}</view> | |
34 | 39 | </view> |
35 | 40 | <!-- right --> |
36 | 41 | <view class="serState fs32"> |
37 | - <view wx:if="{{item.State==0}}">未服务</view> | |
38 | 42 | <view wx:if="{{item.State==1}}">已服务</view> |
39 | 43 | <view wx:if="{{item.State==2}}">已过期</view> |
40 | 44 | <view wx:if="{{item.State==3}}">已取消</view> |
... | ... | @@ -51,7 +55,7 @@ |
51 | 55 | </view> |
52 | 56 | </view> |
53 | 57 | <view wx:if="{{hist_List.length<1 && startTime!=''}}" class="flex-center fs26 slot"> |
54 | -<view>该时间段无预约记录</view> | |
58 | + <view>该时间段无预约记录</view> | |
55 | 59 | </view> |
56 | 60 | <!-- 无历史服务 --> |
57 | 61 | <view class="empty_order" wx:if="{{hist_List.length<1 && is_service_read && startTime==''}}"> | ... | ... |
pages/user/my_service/i_service.wxml
1 | 1 | <!-- 背景图片 --> |
2 | 2 | <view catchtap="close"> |
3 | 3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> |
4 | - <navigator class="History fs26" url="/pages/user/my_service/hist_service">历史服务</navigator> | |
4 | + <navigator class="History fs26" url="/pages/user/my_service/hist_service">历史预约</navigator> | |
5 | 5 | </view> |
6 | 6 | |
7 | 7 | <!-- 预约内容 --> | ... | ... |
pages/user/my_service/tment_details.js
... | ... | @@ -50,7 +50,7 @@ Page({ |
50 | 50 | success: function(res) { |
51 | 51 | my_confirm.open_cancel(0); |
52 | 52 | if (res.data.code == 0) { |
53 | - getApp().my_warnning("取消成功", 0, th); | |
53 | + getApp().my_warnning("取消成功", 1, th); | |
54 | 54 | var start = 'tment_details[' + 0 + '].State'; |
55 | 55 | th.setData({ |
56 | 56 | [start]: 3 | ... | ... |
pages/user/my_service/tment_details.wxml
... | ... | @@ -45,9 +45,12 @@ |
45 | 45 | <!-- 美容师 --> |
46 | 46 | <view class="flex-vertical bmt ai-bas"> |
47 | 47 | <view class="name flex-vertical-between"> |
48 | - <view>美</view> | |
49 | - <view>容</view> | |
50 | - <view>师:</view> | |
48 | + <block wx:if="{{item.State==1 || item.State==4}}"> | |
49 | + <view>服务美容师:</view> | |
50 | + </block> | |
51 | + <block wx:else> | |
52 | + <view>预约美容师:</view> | |
53 | + </block> | |
51 | 54 | </view> |
52 | 55 | <view class="ellipsis-1 value">{{item.BeauticianName}}</view> |
53 | 56 | </view> |
... | ... | @@ -88,7 +91,7 @@ |
88 | 91 | <view>2.如有任何问题可致电咨询;</view> |
89 | 92 | <view>3.如需退约,需提前取消。</view> |
90 | 93 | </view> |
91 | - <!-- submit栏 --> | |
94 | + <!-- submit栏 --> | |
92 | 95 | <view class="subs flex-vertical-between fs32"> |
93 | 96 | <!-- 左边栏 --> |
94 | 97 | <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> |
... | ... | @@ -114,10 +117,10 @@ |
114 | 117 | </view> |
115 | 118 | |
116 | 119 | </view> |
117 | - | |
120 | + | |
118 | 121 | <!-- 制作一个圆球导航 --> |
119 | 122 | <nav_b id="nav_b"></nav_b> |
120 | 123 | <my_confirm id="my_confirm"></my_confirm> |
121 | 124 | <!-- 弹出框扫描 --> |
122 | 125 | <qr_code id="qc_com"></qr_code> |
123 | 126 | -<warn id="warn"></warn> |
127 | +<warn id="warn"></warn> | |
124 | 128 | \ No newline at end of file | ... | ... |
pages/user/my_service/tment_details.wxss
pages/user/my_service/tment_eval.wxml
... | ... | @@ -8,26 +8,26 @@ |
8 | 8 | <!-- 姓名 --> |
9 | 9 | <view class="flex-level item"> |
10 | 10 | <view class="itemlf flex-level-right"> |
11 | - <view class="fs32">美容师:</view> | |
11 | + <view class="fs32">服务美容师:</view> | |
12 | 12 | </view> |
13 | 13 | <view class="itemlr fs30 ellipsis-1">{{beautician.BeauticianName}}</view> |
14 | 14 | </view> |
15 | 15 | |
16 | 16 | <!-- 项目 --> |
17 | 17 | <view class="flex-center item"> |
18 | - <view class="itemlf fs32">服务项目:</view> | |
18 | + <view class="itemlf fs32 flex-level-right">服务项目:</view> | |
19 | 19 | <view class="itemlr fs30 ellipsis-1">{{beautician.StorageName}}</view> |
20 | 20 | </view> |
21 | 21 | |
22 | 22 | <!-- 时间 --> |
23 | 23 | <view class="flex-center item"> |
24 | - <view class="itemlf fs32">服务时间:</view> | |
24 | + <view class="itemlf fs32 flex-level-right">服务时间:</view> | |
25 | 25 | <view class="itemlr fs30">{{arrangeTime}}</view> |
26 | 26 | </view> |
27 | 27 | |
28 | 28 | <!-- 评价时间 --> |
29 | 29 | <view class="flex-center" wx:if="{{is_evaluate==1}}"> |
30 | - <view class="itemlf fs32">评价时间:</view> | |
30 | + <view class="itemlf fs32 flex-level-right">评价时间:</view> | |
31 | 31 | <view class="itemlr fs30">{{EvaluateDatetime}}</view> |
32 | 32 | </view> |
33 | 33 | ... | ... |
pages/user/my_service/tment_eval.wxss
pages/user/my_service/tment_order_list.js
... | ... | @@ -39,7 +39,7 @@ Page({ |
39 | 39 | * 生命周期函数--监听页面加载 |
40 | 40 | */ |
41 | 41 | onLoad: function(options) { |
42 | - | |
42 | + | |
43 | 43 | }, |
44 | 44 | changeTab: function(e) { |
45 | 45 | var th = this; |
... | ... | @@ -122,45 +122,57 @@ Page({ |
122 | 122 | //取消预约 |
123 | 123 | cancel_tment: function(e) { |
124 | 124 | var th = this; |
125 | - var index = e.currentTarget.dataset.index; | |
126 | - var states = th.data.states; | |
127 | - var order_list = th.data.tm_order_list; | |
128 | - var number = order_list[index].Number; | |
129 | - var json = { | |
130 | - "number": number, | |
131 | - "storeId": a.stoid, | |
132 | - "states": 3 | |
133 | - }; | |
134 | - var data = JSON.stringify(json); | |
135 | - var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | |
136 | - wx.request({ | |
137 | - url: url, | |
138 | - data: data, | |
139 | - method: 'put', | |
140 | - header: { | |
141 | - 'content-type': 'application/json' | |
142 | - }, // 设置请求的 header | |
143 | - success: function(res) { | |
144 | - if (res.data.code == 0) { | |
145 | - getApp().my_warnning("取消成功", 0, th); | |
146 | - var id = th.data.activeCategoryId; | |
147 | - if (id == 1) { | |
148 | - order_list.splice(index, 1); | |
149 | - th.setData({ | |
150 | - tm_order_list: order_list | |
151 | - }) | |
152 | - } else { | |
153 | - var start = 'tm_order_list[' + index + '].State'; | |
154 | - th.setData({ | |
155 | - [start]: 3 | |
156 | - }) | |
125 | + var th = this; | |
126 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
127 | + my_confirm.open( | |
128 | + "确定取消?", | |
129 | + "取消", | |
130 | + "确定", | |
131 | + function() { | |
132 | + my_confirm.open_cancel(0); | |
133 | + }, | |
134 | + function() { | |
135 | + my_confirm.open_cancel(0); | |
136 | + var index = e.currentTarget.dataset.index; | |
137 | + var states = th.data.states; | |
138 | + var order_list = th.data.tm_order_list; | |
139 | + var number = order_list[index].Number; | |
140 | + var json = { | |
141 | + "number": number, | |
142 | + "storeId": a.stoid, | |
143 | + "states": 3 | |
144 | + }; | |
145 | + var data = JSON.stringify(json); | |
146 | + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | |
147 | + wx.request({ | |
148 | + url: url, | |
149 | + data: data, | |
150 | + method: 'put', | |
151 | + header: { | |
152 | + 'content-type': 'application/json' | |
153 | + }, // 设置请求的 header | |
154 | + success: function(res) { | |
155 | + if (res.data.code == 0) { | |
156 | + getApp().my_warnning("取消成功", 1, th); | |
157 | + var id = th.data.activeCategoryId; | |
158 | + if (id == 1) { | |
159 | + order_list.splice(index, 1); | |
160 | + th.setData({ | |
161 | + tm_order_list: order_list | |
162 | + }) | |
163 | + } else { | |
164 | + var start = 'tm_order_list[' + index + '].State'; | |
165 | + th.setData({ | |
166 | + [start]: 3 | |
167 | + }) | |
168 | + } | |
169 | + wx.stopPullDownRefresh(); //停止下拉刷新 | |
170 | + } else { | |
171 | + getApp().my_warnning(res.data.msg, 0, th); | |
172 | + } | |
157 | 173 | } |
158 | - wx.stopPullDownRefresh(); //停止下拉刷新 | |
159 | - } else { | |
160 | - getApp().my_warnning(res.data.msg, 0, th); | |
161 | - } | |
162 | - } | |
163 | - }) | |
174 | + }) | |
175 | + }) | |
164 | 176 | |
165 | 177 | }, |
166 | 178 | //图片失败,默认图片 |
... | ... | @@ -179,11 +191,11 @@ Page({ |
179 | 191 | onShow: function() { |
180 | 192 | var th = this; |
181 | 193 | th.setData({ |
182 | - curpage:1, | |
183 | - total:0, | |
184 | - ismore:0, | |
185 | - is_read:0, | |
186 | - tm_order_list:[] | |
194 | + curpage: 1, | |
195 | + total: 0, | |
196 | + ismore: 0, | |
197 | + is_read: 0, | |
198 | + tm_order_list: [] | |
187 | 199 | }) |
188 | 200 | th.query_orderList(); |
189 | 201 | }, |
... | ... | @@ -201,5 +213,11 @@ Page({ |
201 | 213 | }) |
202 | 214 | th.query_orderList(); |
203 | 215 | }, |
216 | + //关闭导航 | |
217 | + close: function() { | |
218 | + var th = this; | |
219 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | |
220 | + nav_b.close_box(); | |
221 | + } | |
204 | 222 | |
205 | 223 | }) |
206 | 224 | \ No newline at end of file | ... | ... |
pages/user/my_service/tment_order_list.json
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 | "navigationBarTitleText": "我的预约", |
3 | 3 | "usingComponents": { |
4 | 4 | "qr_code": "/components/qr_code/qr_code", |
5 | - "warn": "/components/long_warn/long_warn" | |
5 | + "warn": "/components/long_warn/long_warn", | |
6 | + "my_confirm": "/components/my_confirm/my_confirm", | |
7 | + "nav_b": "/components/nav_b/nav_b" | |
6 | 8 | } |
7 | 9 | } |
8 | 10 | \ No newline at end of file | ... | ... |
pages/user/my_service/tment_order_list.wxml
1 | -<view class="container"> | |
1 | +<view class="container" catchtap="close"> | |
2 | 2 | <!-- 导航栏 --> |
3 | 3 | <view class="type-navbar padding flex-vertical fs30"> |
4 | 4 | <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}"> |
... | ... | @@ -32,23 +32,30 @@ |
32 | 32 | <!-- 项目内容 --> |
33 | 33 | <view class="details"> |
34 | 34 | <view class="item flex-vertical base"> |
35 | - <view class="itemname">预约门店:</view> | |
35 | + <view class="itemname flex-level-right">预约门店:</view> | |
36 | 36 | <view class="itemvalue ellipsis-1">{{item.StorageName}}</view> |
37 | 37 | </view> |
38 | 38 | <view class="item flex-vertical base"> |
39 | - <view class="itemname">预约项目:</view> | |
39 | + <view class="itemname flex-level-right">预约项目:</view> | |
40 | 40 | <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view> |
41 | 41 | </view> |
42 | 42 | <view class="item flex-vertical base"> |
43 | - <view class="itemname">美容师:</view> | |
43 | + <block wx:if="{{item.State==1 || item.State==4}}"> | |
44 | + <view class="itemname flex-level-right">服务美容师: | |
45 | + </view> | |
46 | + </block> | |
47 | + <block wx:else> | |
48 | + <view class="itemname flex-level-right">预约美容师: | |
49 | + </view> | |
50 | + </block> | |
44 | 51 | <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view> |
45 | 52 | </view> |
46 | 53 | <view class="item flex-vertical base"> |
47 | - <view class="itemname">预约时间:</view> | |
54 | + <view class="itemname flex-level-right">预约时间:</view> | |
48 | 55 | <view>{{item.ArrangeTime}}</view> |
49 | 56 | </view> |
50 | 57 | <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}"> |
51 | - <view class="itemname">服务时间:</view> | |
58 | + <view class="itemname flex-level-right">服务时间:</view> | |
52 | 59 | <view>{{item.WriteTime}}</view> |
53 | 60 | </view> |
54 | 61 | </view> |
... | ... | @@ -78,7 +85,7 @@ |
78 | 85 | </view> |
79 | 86 | |
80 | 87 | <!-- 无预约订单 --> |
81 | -<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}"> | |
88 | +<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}" catchtap="close"> | |
82 | 89 | <view class="flex-level"> |
83 | 90 | <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image> |
84 | 91 | </view> |
... | ... | @@ -89,6 +96,9 @@ |
89 | 96 | </navigator> |
90 | 97 | </view> |
91 | 98 | </view> |
99 | +<my_confirm id="my_confirm"></my_confirm> | |
100 | +<!-- 制作一个圆球导航 --> | |
101 | +<nav_b id="nav_b"></nav_b> | |
92 | 102 | <!-- 弹出框扫描 --> |
93 | 103 | <qr_code id="qc_com"></qr_code> |
94 | 104 | <warn id="warn"></warn> |
95 | 105 | \ No newline at end of file | ... | ... |