Commit 8d4b0b5f0b4dd27fd38cff99fcaa71602516c990
1 parent
da1876a7
修改选择时间当天小于当前时间不可选,历史服务bug修改,新增查看评价
Showing
15 changed files
with
173 additions
and
73 deletions
pages/user/my_service/appment_main.js
@@ -382,8 +382,12 @@ Page({ | @@ -382,8 +382,12 @@ Page({ | ||
382 | //美容师预约跳转页面 | 382 | //美容师预约跳转页面 |
383 | nav_bea: function() { | 383 | nav_bea: function() { |
384 | var th = this; | 384 | var th = this; |
385 | + th.setData({ | ||
386 | + is_textea: 0 | ||
387 | + }) | ||
385 | var storageId = th.data.storageId; //线下门店id | 388 | var storageId = th.data.storageId; //线下门店id |
386 | var itemId = th.data.itemId; //服务id | 389 | var itemId = th.data.itemId; //服务id |
390 | + var project_id = th.data.project_id; | ||
387 | if (storageId == "") { | 391 | if (storageId == "") { |
388 | getApp().my_warnning("请选择服务门店", 0, th); | 392 | getApp().my_warnning("请选择服务门店", 0, th); |
389 | } else { | 393 | } else { |
pages/user/my_service/beauty_deta.js
@@ -12,7 +12,7 @@ Page({ | @@ -12,7 +12,7 @@ Page({ | ||
12 | inurl: a.url, //接口网址 | 12 | inurl: a.url, //接口网址 |
13 | iurl: a.imghost, | 13 | iurl: a.imghost, |
14 | url: "", //选择选择时间后返回的页面 | 14 | url: "", //选择选择时间后返回的页面 |
15 | - defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg", | 15 | + defimgurl: "/miniapp/images/no-head.jpg", |
16 | seekTime: "", //当前服务预约选择的时间 | 16 | seekTime: "", //当前服务预约选择的时间 |
17 | time_list: [], //可预约时间 | 17 | time_list: [], //可预约时间 |
18 | name: "", //美容师姓名 | 18 | name: "", //美容师姓名 |
@@ -30,6 +30,7 @@ Page({ | @@ -30,6 +30,7 @@ Page({ | ||
30 | iscos: 0, //是否是从美容师列表过来的 | 30 | iscos: 0, //是否是从美容师列表过来的 |
31 | hours: "", //获取当前时分秒 | 31 | hours: "", //获取当前时分秒 |
32 | projectId: "", //项目id | 32 | projectId: "", //项目id |
33 | + StaffName: "", //美容师名称 | ||
33 | }, | 34 | }, |
34 | 35 | ||
35 | /** | 36 | /** |
@@ -38,14 +39,16 @@ Page({ | @@ -38,14 +39,16 @@ Page({ | ||
38 | onLoad: function(options) { | 39 | onLoad: function(options) { |
39 | var th = this; | 40 | var th = this; |
40 | var myDate = new Date(); | 41 | var myDate = new Date(); |
41 | - var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) | 42 | + var minutes = myDate.getMinutes(); //获取当前分钟数(0-59) |
43 | + var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23) | ||
42 | var beautician_id = options.BeauticianID; | 44 | var beautician_id = options.BeauticianID; |
43 | th.setData({ | 45 | th.setData({ |
44 | beautician_id: beautician_id, | 46 | beautician_id: beautician_id, |
45 | itemId: options.itemId, | 47 | itemId: options.itemId, |
46 | modify: options.modify, | 48 | modify: options.modify, |
47 | - hours: date, | ||
48 | - projectId: options.projectId | 49 | + hours: hours, |
50 | + projectId: options.projectId, | ||
51 | + StaffName: options.StaffName | ||
49 | }) | 52 | }) |
50 | if (options.url != undefined) { | 53 | if (options.url != undefined) { |
51 | th.setData({ | 54 | th.setData({ |
@@ -69,7 +72,17 @@ Page({ | @@ -69,7 +72,17 @@ Page({ | ||
69 | * 生命周期函数--监听页面显示 | 72 | * 生命周期函数--监听页面显示 |
70 | */ | 73 | */ |
71 | onShow: function() { | 74 | onShow: function() { |
75 | + var th = this; | ||
76 | + //获取当前时间 | ||
77 | + var myDate = new Date(); | ||
78 | + // var date = myDate.getHours(); //获取当前小时数(0-23); | ||
79 | + let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)" | ||
80 | + let date = str.substring(0, 8); // '10:55:24' | ||
72 | 81 | ||
82 | + // console.log("当前时间", date); | ||
83 | + th.setData({ | ||
84 | + hours: date | ||
85 | + }); | ||
73 | }, | 86 | }, |
74 | 87 | ||
75 | //图片失败,默认图片 | 88 | //图片失败,默认图片 |
@@ -78,7 +91,7 @@ Page({ | @@ -78,7 +91,7 @@ Page({ | ||
78 | var _Img = e.target.dataset.img; | 91 | var _Img = e.target.dataset.img; |
79 | if (_Img != undefined) { | 92 | if (_Img != undefined) { |
80 | var _errObj = {}; | 93 | var _errObj = {}; |
81 | - _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; | 94 | + _errObj[_errImg] = "/miniapp/images/no-head.jpg"; |
82 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 95 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
83 | } | 96 | } |
84 | }, | 97 | }, |
@@ -174,6 +187,8 @@ Page({ | @@ -174,6 +187,8 @@ Page({ | ||
174 | prevPage.setData({ | 187 | prevPage.setData({ |
175 | //直接给上一个页面赋值 | 188 | //直接给上一个页面赋值 |
176 | time: time, | 189 | time: time, |
190 | + beautician_name: th.data.StaffName, | ||
191 | + beauticianID: th.data.beautician_id | ||
177 | }); | 192 | }); |
178 | wx.navigateBack({ | 193 | wx.navigateBack({ |
179 | //返回 | 194 | //返回 |
@@ -183,7 +198,7 @@ Page({ | @@ -183,7 +198,7 @@ Page({ | ||
183 | var prevPage = pages[pages.length - 2]; //上一页面 | 198 | var prevPage = pages[pages.length - 2]; //上一页面 |
184 | prevPage.setData({ | 199 | prevPage.setData({ |
185 | //直接给上一个页面赋值 | 200 | //直接给上一个页面赋值 |
186 | - time: time, | 201 | + time: time |
187 | }); | 202 | }); |
188 | wx.navigateBack({ | 203 | wx.navigateBack({ |
189 | //返回 | 204 | //返回 |
@@ -264,44 +279,59 @@ Page({ | @@ -264,44 +279,59 @@ Page({ | ||
264 | var SeekTime = th.data.aweeks[date_id].time; | 279 | var SeekTime = th.data.aweeks[date_id].time; |
265 | var val = th.data.aweeks[date_id].val; | 280 | var val = th.data.aweeks[date_id].val; |
266 | 281 | ||
267 | - var url = "/api/weshop/marketing/reservation/staff/time/list"; | ||
268 | - getApp().request.promiseGet(url, { | ||
269 | - data: { | ||
270 | - projectId: projectId, | ||
271 | - beauticianId: th.data.beautician_id, | ||
272 | - serviceId: th.data.itemId, | ||
273 | - seekTime: SeekTime, | ||
274 | - storeId: a.stoid, | 282 | + var url = "/api/weshop/marketing/reservation/staff/time/list"; |
283 | + getApp().request.promiseGet(url, { | ||
284 | + data: { | ||
285 | + projectId: projectId, | ||
286 | + beauticianId: th.data.beautician_id, | ||
287 | + serviceId: th.data.itemId, | ||
288 | + seekTime: SeekTime, | ||
289 | + storeId: a.stoid, | ||
290 | + } | ||
291 | + }).then(res => { | ||
292 | + if (res.data.code == 0) { | ||
293 | + if (res.data.data[0].GroupHour.length > 11) { | ||
294 | + getApp().my_warnning(res.data.data[0].GroupHour, 0, th); | ||
275 | } | 295 | } |
276 | - }).then(res => { | ||
277 | - if (res.data.code == 0) { | ||
278 | - console.log("也饿饿饿饿饿饿" + res.data.data[0].GroupHour); | ||
279 | - if (res.data.data[0].GroupHour.length > 11) { | ||
280 | - getApp().my_warnning(res.data.data[0].GroupHour, 0, th); | ||
281 | - } | ||
282 | - var time_list = res.data.data; | ||
283 | - var time = th.data.time; | ||
284 | - var new_time = []; | ||
285 | - if (time_list != null) { | ||
286 | - for (var i = 0; i < time.length; i++) { | ||
287 | - for (var ii = 0; ii < time_list.length; ii++) { | ||
288 | - if (time[i] == time_list[ii].GroupHour.substring(0, 5)) { | ||
289 | - new_time[i] = time_list[ii].GroupHour.substring(0, 5); | ||
290 | - break; | ||
291 | - } else { | ||
292 | - new_time[i] = ""; | ||
293 | - } | 296 | + var hours = th.data.hours; |
297 | + | ||
298 | + var time_list = res.data.data; | ||
299 | + var time = th.data.time; | ||
300 | + var date_id = th | ||
301 | + var new_time = []; | ||
302 | + var date = th.data.hours; | ||
303 | + | ||
304 | + //不等于空就是有可以预约的时间 | ||
305 | + if (time_list != null) { | ||
306 | + //循环固定和可预约的时间 | ||
307 | + for (var i = 0; i < time.length; i++) { | ||
308 | + for (var ii = 0; ii < time_list.length; ii++) { | ||
309 | + //判断固定的时间和可以预约的时间 | ||
310 | + if (time[i] == time_list[ii].GroupHour.substring(0, 5)) { | ||
311 | + var date_id = th.data.date_id; | ||
312 | + if (date >= time_list[ii].GroupHour.substring(0, 2) && date_id == 0) { | ||
313 | + new_time[i] = ""; | ||
314 | + break; | ||
315 | + } else { | ||
316 | + new_time[i] = time_list[ii].GroupHour.substring(0, 5); | ||
317 | + break; | ||
294 | } | 318 | } |
319 | + | ||
320 | + | ||
321 | + } else { | ||
322 | + new_time[i] = ""; | ||
295 | } | 323 | } |
296 | } | 324 | } |
297 | - th.setData({ | ||
298 | - time_list: new_time | ||
299 | - }) | ||
300 | - } else { | ||
301 | - getApp().my_warnning(res.data.msg, 0, th); | 325 | + } |
302 | } | 326 | } |
303 | - }) | ||
304 | - | 327 | + th.setData({ |
328 | + time_list: new_time, | ||
329 | + }) | ||
330 | + } else { | ||
331 | + getApp().my_warnning(res.data.msg, 0, th); | ||
332 | + } | ||
333 | + }) | ||
334 | + | ||
305 | }, | 335 | }, |
306 | //更改预约时间 | 336 | //更改预约时间 |
307 | change_time: function() { | 337 | change_time: function() { |
pages/user/my_service/cosmetology_list.js
@@ -9,7 +9,7 @@ Page({ | @@ -9,7 +9,7 @@ Page({ | ||
9 | * 页面的初始数据 | 9 | * 页面的初始数据 |
10 | */ | 10 | */ |
11 | data: { | 11 | data: { |
12 | - defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg", | 12 | + defimgurl: "/miniapp/images/no-head.jpg", |
13 | iurl: a.imghost, | 13 | iurl: a.imghost, |
14 | cosmetology_list: [], //美容师列表 | 14 | cosmetology_list: [], //美容师列表 |
15 | is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版 | 15 | is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版 |
pages/user/my_service/cosmetology_list.wxml
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | </view> | 34 | </view> |
35 | 35 | ||
36 | <!-- 预约状态 --> | 36 | <!-- 预约状态 --> |
37 | - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.Id}}&itemId={{itemId}}&iscos=1&modify=0"> | 37 | + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.Id}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}"> |
38 | <view class="fs24">预约</view> | 38 | <view class="fs24">预约</view> |
39 | </navigator> | 39 | </navigator> |
40 | </view> | 40 | </view> |
pages/user/my_service/hist_service.js
@@ -92,6 +92,7 @@ Page({ | @@ -92,6 +92,7 @@ Page({ | ||
92 | his_reset: function() { | 92 | his_reset: function() { |
93 | var th = this; | 93 | var th = this; |
94 | var is_reset = th.data.is_reset; | 94 | var is_reset = th.data.is_reset; |
95 | + console.log("22"+is_reset); | ||
95 | if (is_reset==0){ | 96 | if (is_reset==0){ |
96 | th.setData({ | 97 | th.setData({ |
97 | hist_List: [], | 98 | hist_List: [], |
@@ -99,8 +100,8 @@ Page({ | @@ -99,8 +100,8 @@ Page({ | ||
99 | is_service_read: 0, | 100 | is_service_read: 0, |
100 | is_screen: 1, | 101 | is_screen: 1, |
101 | is_reset:1, | 102 | is_reset:1, |
102 | - beginDate: "", | ||
103 | - endDate: "", | 103 | + startTime: "", |
104 | + endTime: "", | ||
104 | }) | 105 | }) |
105 | th.query_hist(); | 106 | th.query_hist(); |
106 | } | 107 | } |
pages/user/my_service/hist_service.wxml
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <!-- left --> | 25 | <!-- left --> |
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.StorageName==''?'匿名':item.StorageName}}</view> |
29 | <view>(美容师:</view> | 29 | <view>(美容师:</view> |
30 | <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view> | 30 | <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view> |
31 | ) | 31 | ) |
pages/user/my_service/hist_service.wxss
@@ -48,12 +48,12 @@ page { | @@ -48,12 +48,12 @@ page { | ||
48 | } | 48 | } |
49 | 49 | ||
50 | .itemName { | 50 | .itemName { |
51 | - margin-right: 5rpx; | ||
52 | - max-width: 200rpx; | 51 | + margin-right: 10rpx; |
52 | + width: 130rpx; | ||
53 | } | 53 | } |
54 | 54 | ||
55 | .itemUsna { | 55 | .itemUsna { |
56 | - max-width: 200rpx; | 56 | + max-width: 150rpx; |
57 | } | 57 | } |
58 | 58 | ||
59 | .serState { | 59 | .serState { |
pages/user/my_service/i_service.js
@@ -98,7 +98,7 @@ Page({ | @@ -98,7 +98,7 @@ Page({ | ||
98 | var project_id = e.currentTarget.dataset.project_id; | 98 | var project_id = e.currentTarget.dataset.project_id; |
99 | var ind = e.currentTarget.dataset.ind; | 99 | var ind = e.currentTarget.dataset.ind; |
100 | var item = this.data.service_List[ind]; | 100 | var item = this.data.service_List[ind]; |
101 | - var ewm = th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|"; | 101 | + var ewm = "^"+th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|"; |
102 | var tt = th.format_time(1); | 102 | var tt = th.format_time(1); |
103 | ewm = ewm + tt; | 103 | ewm = ewm + tt; |
104 | th.data.qr_code_object.val = ewm; | 104 | th.data.qr_code_object.val = ewm; |
pages/user/my_service/tment_details.wxml
@@ -13,12 +13,12 @@ | @@ -13,12 +13,12 @@ | ||
13 | <view class="fs30"> | 13 | <view class="fs30"> |
14 | <view class="items lf"> | 14 | <view class="items lf"> |
15 | <!-- 预约订单 --> | 15 | <!-- 预约订单 --> |
16 | - <view class="flex-vertical bmt"> | 16 | + <view class="flex-vertical bmt" bindtap="code_show" data-order_sn="{{number}}"> |
17 | <view class="flex-vertical"> | 17 | <view class="flex-vertical"> |
18 | <view class="name">预约订单:</view> | 18 | <view class="name">预约订单:</view> |
19 | <view class="ellipsis-1 value">{{number}}</view> | 19 | <view class="ellipsis-1 value">{{number}}</view> |
20 | </view> | 20 | </view> |
21 | - <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{number}}"></image> | 21 | + <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code"></image> |
22 | </view> | 22 | </view> |
23 | 23 | ||
24 | <!-- 预约门店 --> | 24 | <!-- 预约门店 --> |
pages/user/my_service/tment_details.wxss
@@ -35,7 +35,7 @@ page { | @@ -35,7 +35,7 @@ page { | ||
35 | 35 | ||
36 | .container { | 36 | .container { |
37 | padding: 0rpx 20rpx; | 37 | padding: 0rpx 20rpx; |
38 | - padding-bottom:85rpx; | 38 | + padding-bottom:15rpx; |
39 | } | 39 | } |
40 | 40 | ||
41 | .Subscriber { | 41 | .Subscriber { |
@@ -82,7 +82,7 @@ page { | @@ -82,7 +82,7 @@ page { | ||
82 | margin-bottom: 20rpx; | 82 | margin-bottom: 20rpx; |
83 | position: fixed; | 83 | position: fixed; |
84 | width: 705rpx; | 84 | width: 705rpx; |
85 | - bottom:20rpx; | 85 | + bottom:60rpx; |
86 | } | 86 | } |
87 | 87 | ||
88 | .sub { | 88 | .sub { |
pages/user/my_service/tment_eval.js
@@ -11,7 +11,7 @@ Page({ | @@ -11,7 +11,7 @@ Page({ | ||
11 | data: { | 11 | data: { |
12 | url: a.url, //接口网址 | 12 | url: a.url, //接口网址 |
13 | iurl: a.imghost, | 13 | iurl: a.imghost, |
14 | - defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg", | 14 | + defimgurl: "/miniapp/images/no-head.jpg", |
15 | stars_index: -1, //当前点击的星星下标 | 15 | stars_index: -1, //当前点击的星星下标 |
16 | labels: [], //星级标签数组 | 16 | labels: [], //星级标签数组 |
17 | sub_evaluate: 0, //是否评价成功 | 17 | sub_evaluate: 0, //是否评价成功 |
@@ -21,10 +21,14 @@ Page({ | @@ -21,10 +21,14 @@ Page({ | ||
21 | beautician: "", //美容师信息 | 21 | beautician: "", //美容师信息 |
22 | fromType: "服务评价", //评价来源 | 22 | fromType: "服务评价", //评价来源 |
23 | arrangeTime: "", //服务日期 | 23 | arrangeTime: "", //服务日期 |
24 | + is_evaluate:0,//是否评价 | ||
25 | + EvaluateDatetime:"",//评价时间 | ||
24 | }, | 26 | }, |
25 | //点击星级 | 27 | //点击星级 |
26 | check_stars: function(e) { | 28 | check_stars: function(e) { |
27 | var th = this; | 29 | var th = this; |
30 | + var is_evaluate = th.data.is_evaluate;//0可点击 | ||
31 | + if (is_evaluate==0){ | ||
28 | var index = e.currentTarget.dataset.index; | 32 | var index = e.currentTarget.dataset.index; |
29 | var stars_index = th.data.stars_index; | 33 | var stars_index = th.data.stars_index; |
30 | if (index != stars_index) { | 34 | if (index != stars_index) { |
@@ -48,6 +52,7 @@ Page({ | @@ -48,6 +52,7 @@ Page({ | ||
48 | stars_index: index | 52 | stars_index: index |
49 | }) | 53 | }) |
50 | } | 54 | } |
55 | + } | ||
51 | }, | 56 | }, |
52 | //输入评价意见和建议 | 57 | //输入评价意见和建议 |
53 | input_proposal: function(e) { | 58 | input_proposal: function(e) { |
@@ -70,6 +75,8 @@ Page({ | @@ -70,6 +75,8 @@ Page({ | ||
70 | //选择标签 | 75 | //选择标签 |
71 | check_label: function(e) { | 76 | check_label: function(e) { |
72 | var th = this; | 77 | var th = this; |
78 | + var evaluate = th.data.is_evaluate;//0为未评价,未评价才可点击标签 | ||
79 | + if (evaluate==0){ | ||
73 | var index = e.currentTarget.dataset.index; | 80 | var index = e.currentTarget.dataset.index; |
74 | var label_id = th.data.labels[index].check; | 81 | var label_id = th.data.labels[index].check; |
75 | var labels = 'labels[' + index + '].check'; | 82 | var labels = 'labels[' + index + '].check'; |
@@ -81,6 +88,7 @@ Page({ | @@ -81,6 +88,7 @@ Page({ | ||
81 | th.setData({ | 88 | th.setData({ |
82 | [labels]: label_id | 89 | [labels]: label_id |
83 | }) | 90 | }) |
91 | + } | ||
84 | }, | 92 | }, |
85 | //查询美容师信息 | 93 | //查询美容师信息 |
86 | query_bea: function() { | 94 | query_bea: function() { |
@@ -106,6 +114,28 @@ Page({ | @@ -106,6 +114,28 @@ Page({ | ||
106 | } | 114 | } |
107 | }) | 115 | }) |
108 | }, | 116 | }, |
117 | + //获取预约评价 | ||
118 | + evaluate_get: function() { | ||
119 | + var th = this; | ||
120 | + var url = "/api/weshop/evaluation/evaluate/get"; | ||
121 | + getApp().request.promiseGet(url,{ | ||
122 | + data: { | ||
123 | + number: th.data.number, | ||
124 | + storeId: a.stoid | ||
125 | + } | ||
126 | + }).then(res => { | ||
127 | + if(res.data.code == 0){ | ||
128 | + th.setData({ | ||
129 | + stars_index: res.data.data.Star, | ||
130 | + labels: res.data.data.EvaluationList, | ||
131 | + proposal: res.data.data.Remark, | ||
132 | + EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0,19) | ||
133 | + }) | ||
134 | + }else{ | ||
135 | + getApp().my_warnning(res.data.msg,0,th); | ||
136 | + } | ||
137 | + }) | ||
138 | + }, | ||
109 | //提交评价 | 139 | //提交评价 |
110 | evaluate_save: function() { | 140 | evaluate_save: function() { |
111 | var th = this; | 141 | var th = this; |
@@ -123,7 +153,7 @@ Page({ | @@ -123,7 +153,7 @@ Page({ | ||
123 | evaLabList.push(labels[i].LabelName); | 153 | evaLabList.push(labels[i].LabelName); |
124 | } | 154 | } |
125 | } | 155 | } |
126 | - var url = th.data.url + "/api/weshop/evaluation/evaluate/save"; | 156 | + var url = th.data.url + "/api/weshop/evaluation/evaluate/insert"; |
127 | var posNo = th.data.number; //收银单号 | 157 | var posNo = th.data.number; //收银单号 |
128 | var proposal = th.data.proposal; //用户建议内容 | 158 | var proposal = th.data.proposal; //用户建议内容 |
129 | var fromType = th.data.fromType; //评价来源 | 159 | var fromType = th.data.fromType; //评价来源 |
@@ -161,12 +191,12 @@ Page({ | @@ -161,12 +191,12 @@ Page({ | ||
161 | 191 | ||
162 | }, | 192 | }, |
163 | //图片失败,默认图片 | 193 | //图片失败,默认图片 |
164 | - bind_bnerr1: function (e) { | 194 | + bind_bnerr1: function(e) { |
165 | var _errImg = e.target.dataset.errorimg; | 195 | var _errImg = e.target.dataset.errorimg; |
166 | var _Img = e.target.dataset.img; | 196 | var _Img = e.target.dataset.img; |
167 | if (_Img != undefined) { | 197 | if (_Img != undefined) { |
168 | var _errObj = {}; | 198 | var _errObj = {}; |
169 | - _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; | 199 | + _errObj[_errImg] = "/miniapp/images/no-head.jpg"; |
170 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 200 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
171 | } | 201 | } |
172 | }, | 202 | }, |
@@ -174,9 +204,11 @@ Page({ | @@ -174,9 +204,11 @@ Page({ | ||
174 | * 生命周期函数--监听页面加载 | 204 | * 生命周期函数--监听页面加载 |
175 | */ | 205 | */ |
176 | onLoad: function(options) { | 206 | onLoad: function(options) { |
207 | + console.log("为呃呃呃" + options.evaluate); | ||
177 | var th = this; | 208 | var th = this; |
178 | th.setData({ | 209 | th.setData({ |
179 | - number: options.Number | 210 | + number: options.Number, |
211 | + is_evaluate: options.evaluate | ||
180 | }) | 212 | }) |
181 | th.query_bea(); | 213 | th.query_bea(); |
182 | }, | 214 | }, |
@@ -185,6 +217,10 @@ Page({ | @@ -185,6 +217,10 @@ Page({ | ||
185 | * 生命周期函数--监听页面显示 | 217 | * 生命周期函数--监听页面显示 |
186 | */ | 218 | */ |
187 | onShow: function() { | 219 | onShow: function() { |
188 | - | 220 | + var th = this; |
221 | + var is_evaluate = th.data.is_evaluate; | ||
222 | + if (is_evaluate==1){ | ||
223 | + th.evaluate_get(); | ||
224 | + } | ||
189 | }, | 225 | }, |
190 | }) | 226 | }) |
191 | \ No newline at end of file | 227 | \ No newline at end of file |
pages/user/my_service/tment_eval.wxml
@@ -8,20 +8,27 @@ | @@ -8,20 +8,27 @@ | ||
8 | <!-- 姓名 --> | 8 | <!-- 姓名 --> |
9 | <view class="flex-level item"> | 9 | <view class="flex-level item"> |
10 | <view class="itemlf fs32">美容师:</view> | 10 | <view class="itemlf fs32">美容师:</view> |
11 | - <view class="itemlr fs30 ellipsis-1">{{beautician.BeauticianName}}</view> | 11 | + <view class="itemlr fs30 ellipsis-1 {{is_evaluate==0?'datetime':''}}">{{beautician.BeauticianName}}</view> |
12 | </view> | 12 | </view> |
13 | 13 | ||
14 | <!-- 项目 --> | 14 | <!-- 项目 --> |
15 | <view class="flex-center item"> | 15 | <view class="flex-center item"> |
16 | <view class="itemlf fs32">服务项目:</view> | 16 | <view class="itemlf fs32">服务项目:</view> |
17 | - <view class="itemlr fs30 ellipsis-1">{{beautician.StorageName}}</view> | 17 | + <view class="itemlr fs30 ellipsis-1 {{is_evaluate==0?'datetime':''}}">{{beautician.StorageName}}</view> |
18 | </view> | 18 | </view> |
19 | 19 | ||
20 | <!-- 时间 --> | 20 | <!-- 时间 --> |
21 | - <view class="flex-center"> | 21 | + <view class="flex-center item"> |
22 | <view class="itemlf fs32">服务时间:</view> | 22 | <view class="itemlf fs32">服务时间:</view> |
23 | - <view class="itemlr fs30">{{arrangeTime}}</view> | 23 | + <view class="itemlr fs30 {{is_evaluate==0?'datetime':''}}">{{arrangeTime}}</view> |
24 | + </view> | ||
25 | + | ||
26 | + <!-- 评价时间 --> | ||
27 | + <view class="flex-center" wx:if="{{is_evaluate==1}}"> | ||
28 | + <view class="itemlf fs32">评价时间:</view> | ||
29 | + <view class="itemlr fs30">{{EvaluateDatetime}}</view> | ||
24 | </view> | 30 | </view> |
31 | + | ||
25 | <!-- 设置虚线 --> | 32 | <!-- 设置虚线 --> |
26 | 33 | ||
27 | <view class="flex-center"> | 34 | <view class="flex-center"> |
@@ -31,25 +38,41 @@ | @@ -31,25 +38,41 @@ | ||
31 | </view> | 38 | </view> |
32 | <view class="tea_labs"> | 39 | <view class="tea_labs"> |
33 | <view class="flex-center fs26"> | 40 | <view class="flex-center fs26"> |
34 | - <textarea class="rel" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}"> | 41 | + <block wx:if="{{is_evaluate==0}}"> |
42 | + <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}"> | ||
35 | <!-- 提示已输入多少数字 --> | 43 | <!-- 提示已输入多少数字 --> |
36 | - <view class="proposal abs">{{proposal.length}}/{{proposal_size}}</view> | 44 | + <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view> |
37 | </textarea> | 45 | </textarea> |
46 | + </block> | ||
47 | + <block wx:else> | ||
48 | + <view wx:if="{{proposal!=''}}" class="textarea"> | ||
49 | + {{proposal}} | ||
50 | + </view> | ||
51 | + </block> | ||
38 | </view> | 52 | </view> |
39 | 53 | ||
40 | - <view wx:if="{{labels.length>0}}" class="labels flex fs24 ellipsis-3"> | 54 | + <view wx:if="{{labels.length>0 && is_evaluate==0}}" class="labels flex fs24 ellipsis-3"> |
41 | <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key"> | 55 | <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key"> |
42 | <view class="ellipsis-1">{{item.LabelName}}</view> | 56 | <view class="ellipsis-1">{{item.LabelName}}</view> |
43 | </view> | 57 | </view> |
44 | 58 | ||
45 | </view> | 59 | </view> |
60 | + <view wx:if="{{labels.length>0 && is_evaluate==1}}" class="{{labels.length==1 || labels.length==2?'flex-center':''}}" style="width:100%;"> | ||
61 | + <view class="labels flex fs24 ellipsis-3"> | ||
62 | + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key"> | ||
63 | + <view class="ellipsis-1">{{item.LabelName}}</view> | ||
64 | + </view> | ||
65 | + | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + | ||
46 | </view> | 69 | </view> |
47 | 70 | ||
48 | - <view class="feedback flex-center fs28"> | 71 | + <view wx:if="{{is_evaluate==0}}" class="feedback flex-center fs28"> |
49 | <view>满意的话请打五星噢,谢谢您的支持!</view> | 72 | <view>满意的话请打五星噢,谢谢您的支持!</view> |
50 | </view> | 73 | </view> |
51 | 74 | ||
52 | - <navigator class="Subs fs32 flex-center" bindtap="evaluate_save"> | 75 | + <navigator wx:if="{{is_evaluate==0}}" class="Subs fs32 flex-center" bindtap="evaluate_save"> |
53 | <view class="Submission flex-center"> | 76 | <view class="Submission flex-center"> |
54 | <view>确认提交</view> | 77 | <view>确认提交</view> |
55 | </view> | 78 | </view> |
pages/user/my_service/tment_eval.wxss
@@ -22,9 +22,8 @@ | @@ -22,9 +22,8 @@ | ||
22 | } | 22 | } |
23 | 23 | ||
24 | .itemlr { | 24 | .itemlr { |
25 | - width: 190rpx; | 25 | + width: 360rpx; |
26 | } | 26 | } |
27 | - | ||
28 | .starss { | 27 | .starss { |
29 | margin-top: 15rpx; | 28 | margin-top: 15rpx; |
30 | border-top: 3rpx dashed rgb(203, 203, 203); | 29 | border-top: 3rpx dashed rgb(203, 203, 203); |
@@ -37,9 +36,12 @@ | @@ -37,9 +36,12 @@ | ||
37 | height: 50rpx; | 36 | height: 50rpx; |
38 | margin-right: 20rpx; | 37 | margin-right: 20rpx; |
39 | } | 38 | } |
40 | - | 39 | +.datetime{ |
40 | + width:190rpx; | ||
41 | +} | ||
41 | .tea_labs { | 42 | .tea_labs { |
42 | padding: 0rpx 56rpx; | 43 | padding: 0rpx 56rpx; |
44 | + margin-top:20rpx; | ||
43 | } | 45 | } |
44 | 46 | ||
45 | .proposal { | 47 | .proposal { |
@@ -48,7 +50,7 @@ | @@ -48,7 +50,7 @@ | ||
48 | color: rgb(152, 152, 152); | 50 | color: rgb(152, 152, 152); |
49 | } | 51 | } |
50 | 52 | ||
51 | -textarea { | 53 | +.textarea { |
52 | width: 100%; | 54 | width: 100%; |
53 | height: 200rpx; | 55 | height: 200rpx; |
54 | margin-top: 70rpx; | 56 | margin-top: 70rpx; |
pages/user/my_service/tment_order_list.js
@@ -71,6 +71,9 @@ Page({ | @@ -71,6 +71,9 @@ Page({ | ||
71 | qc_com.open(obj) | 71 | qc_com.open(obj) |
72 | }, | 72 | }, |
73 | query_orderList: function() { | 73 | query_orderList: function() { |
74 | + wx.showLoading({ | ||
75 | + title: '加载中', | ||
76 | + }) | ||
74 | var th = this; | 77 | var th = this; |
75 | var url = "/api/weshop/marketing/reservation/reservation/page"; | 78 | var url = "/api/weshop/marketing/reservation/reservation/page"; |
76 | 79 |
pages/user/my_service/tment_order_list.wxml
@@ -64,8 +64,9 @@ | @@ -64,8 +64,9 @@ | ||
64 | <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator> | 64 | <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator> |
65 | </block> | 65 | </block> |
66 | <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator> | 66 | <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator> |
67 | - <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}" class="important Unimportance flex-level">发表评价</navigator> | ||
68 | - <navigator wx:if="{{item.State==2 || item.State==3 || item.State==4}}" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator> | 67 | + <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}" class="important Unimportance flex-level">发表评价</navigator> |
68 | + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator> | ||
69 | + <navigator wx:if="{{item.State==4}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}" class="important Unimportance flex-level">查看评价</navigator> | ||
69 | </view> | 70 | </view> |
70 | </view> | 71 | </view> |
71 | <view class="exactly flex-center fs26" wx:if="{{ismore & tm_order_list.length>3}}"> | 72 | <view class="exactly flex-center fs26" wx:if="{{ismore & tm_order_list.length>3}}"> |