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,7 +146,7 @@ Page({ | ||
146 | is_sub: 0 | 146 | is_sub: 0 |
147 | }) | 147 | }) |
148 | if (res.data.code == 0) { | 148 | if (res.data.code == 0) { |
149 | - getApp().my_warnning("预约成功", 0, th); | 149 | + getApp().my_warnning("预约成功", 1, th); |
150 | var store_name = th.data.store_name; //预约门店 | 150 | var store_name = th.data.store_name; //预约门店 |
151 | var number = res.data.data.Number; | 151 | var number = res.data.data.Number; |
152 | var temp_url = "/api/wx/open/app/user/templatMessageSend"; //模版接口 | 152 | var temp_url = "/api/wx/open/app/user/templatMessageSend"; //模版接口 |
pages/user/my_service/beauty_deta.js
@@ -165,7 +165,7 @@ Page({ | @@ -165,7 +165,7 @@ Page({ | ||
165 | }, // 设置请求的 header | 165 | }, // 设置请求的 header |
166 | success: function(res) { | 166 | success: function(res) { |
167 | if (res.data.code == 0) { | 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 | setTimeout(function() { | 169 | setTimeout(function() { |
170 | wx.navigateBack({ | 170 | wx.navigateBack({ |
171 | //返回 | 171 | //返回 |
pages/user/my_service/hist_service.json
1 | { | 1 | { |
2 | - "navigationBarTitleText": "历史服务", | 2 | + "navigationBarTitleText": "历史预约", |
3 | "usingComponents": { | 3 | "usingComponents": { |
4 | "timePicker": "/components/timePicker/timePicker", | 4 | "timePicker": "/components/timePicker/timePicker", |
5 | "warn": "/components/long_warn/long_warn" | 5 | "warn": "/components/long_warn/long_warn" |
pages/user/my_service/hist_service.wxml
@@ -26,15 +26,19 @@ | @@ -26,15 +26,19 @@ | ||
26 | <view> | 26 | <view> |
27 | <view class="flex fs28"> | 27 | <view class="flex fs28"> |
28 | <view class="itemName ellipsis-1">{{item.ServiceName==''?'匿名':item.ServiceName}}</view> | 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 | <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view> | 35 | <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view> |
31 | ) | 36 | ) |
32 | </view> | 37 | </view> |
33 | - <view class="fs24">{{item.BillDate!=''?item.BillDate:item.ArrangeTime}}</view> | 38 | + <view class="fs24">{{item.ArrangeTime}}</view> |
34 | </view> | 39 | </view> |
35 | <!-- right --> | 40 | <!-- right --> |
36 | <view class="serState fs32"> | 41 | <view class="serState fs32"> |
37 | - <view wx:if="{{item.State==0}}">未服务</view> | ||
38 | <view wx:if="{{item.State==1}}">已服务</view> | 42 | <view wx:if="{{item.State==1}}">已服务</view> |
39 | <view wx:if="{{item.State==2}}">已过期</view> | 43 | <view wx:if="{{item.State==2}}">已过期</view> |
40 | <view wx:if="{{item.State==3}}">已取消</view> | 44 | <view wx:if="{{item.State==3}}">已取消</view> |
@@ -51,7 +55,7 @@ | @@ -51,7 +55,7 @@ | ||
51 | </view> | 55 | </view> |
52 | </view> | 56 | </view> |
53 | <view wx:if="{{hist_List.length<1 && startTime!=''}}" class="flex-center fs26 slot"> | 57 | <view wx:if="{{hist_List.length<1 && startTime!=''}}" class="flex-center fs26 slot"> |
54 | -<view>该时间段无预约记录</view> | 58 | + <view>该时间段无预约记录</view> |
55 | </view> | 59 | </view> |
56 | <!-- 无历史服务 --> | 60 | <!-- 无历史服务 --> |
57 | <view class="empty_order" wx:if="{{hist_List.length<1 && is_service_read && startTime==''}}"> | 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 | <view catchtap="close"> | 2 | <view catchtap="close"> |
3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> | 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 | </view> | 5 | </view> |
6 | 6 | ||
7 | <!-- 预约内容 --> | 7 | <!-- 预约内容 --> |
pages/user/my_service/tment_details.js
@@ -50,7 +50,7 @@ Page({ | @@ -50,7 +50,7 @@ Page({ | ||
50 | success: function(res) { | 50 | success: function(res) { |
51 | my_confirm.open_cancel(0); | 51 | my_confirm.open_cancel(0); |
52 | if (res.data.code == 0) { | 52 | if (res.data.code == 0) { |
53 | - getApp().my_warnning("取消成功", 0, th); | 53 | + getApp().my_warnning("取消成功", 1, th); |
54 | var start = 'tment_details[' + 0 + '].State'; | 54 | var start = 'tment_details[' + 0 + '].State'; |
55 | th.setData({ | 55 | th.setData({ |
56 | [start]: 3 | 56 | [start]: 3 |
pages/user/my_service/tment_details.wxml
@@ -45,9 +45,12 @@ | @@ -45,9 +45,12 @@ | ||
45 | <!-- 美容师 --> | 45 | <!-- 美容师 --> |
46 | <view class="flex-vertical bmt ai-bas"> | 46 | <view class="flex-vertical bmt ai-bas"> |
47 | <view class="name flex-vertical-between"> | 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 | </view> | 54 | </view> |
52 | <view class="ellipsis-1 value">{{item.BeauticianName}}</view> | 55 | <view class="ellipsis-1 value">{{item.BeauticianName}}</view> |
53 | </view> | 56 | </view> |
@@ -88,7 +91,7 @@ | @@ -88,7 +91,7 @@ | ||
88 | <view>2.如有任何问题可致电咨询;</view> | 91 | <view>2.如有任何问题可致电咨询;</view> |
89 | <view>3.如需退约,需提前取消。</view> | 92 | <view>3.如需退约,需提前取消。</view> |
90 | </view> | 93 | </view> |
91 | - <!-- submit栏 --> | 94 | + <!-- submit栏 --> |
92 | <view class="subs flex-vertical-between fs32"> | 95 | <view class="subs flex-vertical-between fs32"> |
93 | <!-- 左边栏 --> | 96 | <!-- 左边栏 --> |
94 | <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> | 97 | <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> |
@@ -114,10 +117,10 @@ | @@ -114,10 +117,10 @@ | ||
114 | </view> | 117 | </view> |
115 | 118 | ||
116 | </view> | 119 | </view> |
117 | - | 120 | + |
118 | <!-- 制作一个圆球导航 --> | 121 | <!-- 制作一个圆球导航 --> |
119 | <nav_b id="nav_b"></nav_b> | 122 | <nav_b id="nav_b"></nav_b> |
120 | <my_confirm id="my_confirm"></my_confirm> | 123 | <my_confirm id="my_confirm"></my_confirm> |
121 | <!-- 弹出框扫描 --> | 124 | <!-- 弹出框扫描 --> |
122 | <qr_code id="qc_com"></qr_code> | 125 | <qr_code id="qc_com"></qr_code> |
123 | -<warn id="warn"></warn> | 126 | -<warn id="warn"></warn> |
127 | +<warn id="warn"></warn> | ||
124 | \ No newline at end of file | 128 | \ No newline at end of file |
pages/user/my_service/tment_details.wxss
@@ -22,12 +22,12 @@ page { | @@ -22,12 +22,12 @@ page { | ||
22 | } | 22 | } |
23 | 23 | ||
24 | .name { | 24 | .name { |
25 | - width: 130rpx; | 25 | + width: 160rpx; |
26 | margin-right: 25rpx; | 26 | margin-right: 25rpx; |
27 | } | 27 | } |
28 | 28 | ||
29 | .value { | 29 | .value { |
30 | - max-width: 400rpx; | 30 | + max-width: 390rpx; |
31 | } | 31 | } |
32 | 32 | ||
33 | /* 公用 */ | 33 | /* 公用 */ |
pages/user/my_service/tment_eval.wxml
@@ -8,26 +8,26 @@ | @@ -8,26 +8,26 @@ | ||
8 | <!-- 姓名 --> | 8 | <!-- 姓名 --> |
9 | <view class="flex-level item"> | 9 | <view class="flex-level item"> |
10 | <view class="itemlf flex-level-right"> | 10 | <view class="itemlf flex-level-right"> |
11 | - <view class="fs32">美容师:</view> | 11 | + <view class="fs32">服务美容师:</view> |
12 | </view> | 12 | </view> |
13 | <view class="itemlr fs30 ellipsis-1">{{beautician.BeauticianName}}</view> | 13 | <view class="itemlr fs30 ellipsis-1">{{beautician.BeauticianName}}</view> |
14 | </view> | 14 | </view> |
15 | 15 | ||
16 | <!-- 项目 --> | 16 | <!-- 项目 --> |
17 | <view class="flex-center item"> | 17 | <view class="flex-center item"> |
18 | - <view class="itemlf fs32">服务项目:</view> | 18 | + <view class="itemlf fs32 flex-level-right">服务项目:</view> |
19 | <view class="itemlr fs30 ellipsis-1">{{beautician.StorageName}}</view> | 19 | <view class="itemlr fs30 ellipsis-1">{{beautician.StorageName}}</view> |
20 | </view> | 20 | </view> |
21 | 21 | ||
22 | <!-- 时间 --> | 22 | <!-- 时间 --> |
23 | <view class="flex-center item"> | 23 | <view class="flex-center item"> |
24 | - <view class="itemlf fs32">服务时间:</view> | 24 | + <view class="itemlf fs32 flex-level-right">服务时间:</view> |
25 | <view class="itemlr fs30">{{arrangeTime}}</view> | 25 | <view class="itemlr fs30">{{arrangeTime}}</view> |
26 | </view> | 26 | </view> |
27 | 27 | ||
28 | <!-- 评价时间 --> | 28 | <!-- 评价时间 --> |
29 | <view class="flex-center" wx:if="{{is_evaluate==1}}"> | 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 | <view class="itemlr fs30">{{EvaluateDatetime}}</view> | 31 | <view class="itemlr fs30">{{EvaluateDatetime}}</view> |
32 | </view> | 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,7 +39,7 @@ Page({ | ||
39 | * 生命周期函数--监听页面加载 | 39 | * 生命周期函数--监听页面加载 |
40 | */ | 40 | */ |
41 | onLoad: function(options) { | 41 | onLoad: function(options) { |
42 | - | 42 | + |
43 | }, | 43 | }, |
44 | changeTab: function(e) { | 44 | changeTab: function(e) { |
45 | var th = this; | 45 | var th = this; |
@@ -122,45 +122,57 @@ Page({ | @@ -122,45 +122,57 @@ Page({ | ||
122 | //取消预约 | 122 | //取消预约 |
123 | cancel_tment: function(e) { | 123 | cancel_tment: function(e) { |
124 | var th = this; | 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,11 +191,11 @@ Page({ | ||
179 | onShow: function() { | 191 | onShow: function() { |
180 | var th = this; | 192 | var th = this; |
181 | th.setData({ | 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 | th.query_orderList(); | 200 | th.query_orderList(); |
189 | }, | 201 | }, |
@@ -201,5 +213,11 @@ Page({ | @@ -201,5 +213,11 @@ Page({ | ||
201 | }) | 213 | }) |
202 | th.query_orderList(); | 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 | \ No newline at end of file | 224 | \ No newline at end of file |
pages/user/my_service/tment_order_list.json
@@ -2,6 +2,8 @@ | @@ -2,6 +2,8 @@ | ||
2 | "navigationBarTitleText": "我的预约", | 2 | "navigationBarTitleText": "我的预约", |
3 | "usingComponents": { | 3 | "usingComponents": { |
4 | "qr_code": "/components/qr_code/qr_code", | 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 | \ No newline at end of file | 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 | <view class="type-navbar padding flex-vertical fs30"> | 3 | <view class="type-navbar padding flex-vertical fs30"> |
4 | <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}"> | 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,23 +32,30 @@ | ||
32 | <!-- 项目内容 --> | 32 | <!-- 项目内容 --> |
33 | <view class="details"> | 33 | <view class="details"> |
34 | <view class="item flex-vertical base"> | 34 | <view class="item flex-vertical base"> |
35 | - <view class="itemname">预约门店:</view> | 35 | + <view class="itemname flex-level-right">预约门店:</view> |
36 | <view class="itemvalue ellipsis-1">{{item.StorageName}}</view> | 36 | <view class="itemvalue ellipsis-1">{{item.StorageName}}</view> |
37 | </view> | 37 | </view> |
38 | <view class="item flex-vertical base"> | 38 | <view class="item flex-vertical base"> |
39 | - <view class="itemname">预约项目:</view> | 39 | + <view class="itemname flex-level-right">预约项目:</view> |
40 | <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view> | 40 | <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view> |
41 | </view> | 41 | </view> |
42 | <view class="item flex-vertical base"> | 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 | <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view> | 51 | <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view> |
45 | </view> | 52 | </view> |
46 | <view class="item flex-vertical base"> | 53 | <view class="item flex-vertical base"> |
47 | - <view class="itemname">预约时间:</view> | 54 | + <view class="itemname flex-level-right">预约时间:</view> |
48 | <view>{{item.ArrangeTime}}</view> | 55 | <view>{{item.ArrangeTime}}</view> |
49 | </view> | 56 | </view> |
50 | <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}"> | 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 | <view>{{item.WriteTime}}</view> | 59 | <view>{{item.WriteTime}}</view> |
53 | </view> | 60 | </view> |
54 | </view> | 61 | </view> |
@@ -78,7 +85,7 @@ | @@ -78,7 +85,7 @@ | ||
78 | </view> | 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 | <view class="flex-level"> | 89 | <view class="flex-level"> |
83 | <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image> | 90 | <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image> |
84 | </view> | 91 | </view> |
@@ -89,6 +96,9 @@ | @@ -89,6 +96,9 @@ | ||
89 | </navigator> | 96 | </navigator> |
90 | </view> | 97 | </view> |
91 | </view> | 98 | </view> |
99 | +<my_confirm id="my_confirm"></my_confirm> | ||
100 | +<!-- 制作一个圆球导航 --> | ||
101 | +<nav_b id="nav_b"></nav_b> | ||
92 | <!-- 弹出框扫描 --> | 102 | <!-- 弹出框扫描 --> |
93 | <qr_code id="qc_com"></qr_code> | 103 | <qr_code id="qc_com"></qr_code> |
94 | <warn id="warn"></warn> | 104 | <warn id="warn"></warn> |
95 | \ No newline at end of file | 105 | \ No newline at end of file |