Commit 12ecf022a555be2133f75f9e3bd4794c26bbdd8b

Authored by DESKTOP-QHAFKU5\iceling
1 parent 8710c85a

查询剩余可预约人数参数修改,界面调整与bug修改

pages/user/my_service/appment_main.js
... ... @@ -49,12 +49,11 @@ Page({
49 49 check_text: function() {
50 50 var th = this;
51 51 var is_textea = th.data.is_textea;
52   - if (is_textea == 0) {
53   - th.setData({
54   - is_textea: 1,
55   - beautician: 0
56   - })
57   - }
  52 + th.setData({
  53 + is_textea: 1,
  54 + beautician: 0
  55 + })
  56 +
58 57 },
59 58 onclickstore: function() {
60 59 var th = this;
... ... @@ -140,11 +139,11 @@ Page({
140 139 'content-type': 'application/json'
141 140 }, // 设置请求的 header
142 141 success: function(res) {
  142 + th.setData({
  143 + is_sub: 0
  144 + })
143 145 if (res.data.code == 0) {
144   - th.setData({
145   - is_success: 1,
146   - is_sub: 0
147   - })
  146 + getApp().my_warnning("预约成功", 0, th);
148 147 var store_name = th.data.store_name; //预约门店
149 148 var number = res.data.data.Number;
150 149 var temp_url = "/api/wx/open/app/user/templatMessageSend"; //模版接口
... ... @@ -443,7 +442,7 @@ Page({
443 442 var url = "/api/weshop/marketing/reservation/can/reservation/count";
444 443 var beauticianID = th.data.beauticianID; //美容师id
445 444 var projectID = th.data.itemId; //服务id
446   - var seekTime = th.data.time.substring(0, 10); //预约日期
  445 + var seekTime = th.data.time; //预约日期
447 446 var storageId = th.data.storageId; //门店id
448 447 var storeId = a.stoid; //商家id
449 448 getApp().request.promiseGet(url, {
... ... @@ -478,24 +477,24 @@ Page({
478 477 th.query_project();
479 478 },
480 479 //获取单个服务项目信息
481   - query_project:function(){
  480 + query_project: function() {
482 481 var th = this;
483   - var url = "/api/weshop/marketing/reservation/sm/page";//获取服务项目接口
484   - var project_id = th.data.project_id;//服务项目id
485   - getApp().request.promiseGet(url,{
486   - data:{
487   - storeId:a.stoid,
488   - userId:d.user_id,
489   - projectId: project_id
490   - }
491   - }).then(res=>{
492   - if(res.data.code==0){
493   - th.setData({
494   - validay: res.data.data.pageData[0].Validay
495   - })
496   - }else{
497   - getApp().my_warnning(res.data.msg,0,th);
498   - }
  482 + var url = "/api/weshop/marketing/reservation/sm/page"; //获取服务项目接口
  483 + var project_id = th.data.project_id; //服务项目id
  484 + getApp().request.promiseGet(url, {
  485 + data: {
  486 + storeId: a.stoid,
  487 + userId: d.user_id,
  488 + projectId: project_id
  489 + }
  490 + }).then(res => {
  491 + if (res.data.code == 0) {
  492 + th.setData({
  493 + validay: res.data.data.pageData[0].Validay
  494 + })
  495 + } else {
  496 + getApp().my_warnning(res.data.msg, 0, th);
  497 + }
499 498 })
500 499 }
501 500 })
502 501 \ No newline at end of file
... ...
pages/user/my_service/appment_main.wxml
... ... @@ -69,7 +69,7 @@
69 69 <view>注</view>
70 70 </view>
71 71 <view class="flex fs26" bindtap="">
72   - <block wx:if="{{is_textea && store==0}}">
  72 + <block wx:if="{{is_textea==1 && store==0}}">
73 73 <textarea class="textarea color" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100">
74 74 </textarea>
75 75 </block>
... ... @@ -93,12 +93,12 @@
93 93 </button>
94 94 </form>
95 95 </view>
96   - <block wx:if="{{is_success}}">
  96 + <!-- <block wx:if="{{false}}">
97 97 <view class="subSuccess fs36">
98 98 <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image>
99 99 <view>预约成功</view>
100 100 </view>
101   - </block>
  101 + </block> -->
102 102 </view>
103 103  
104 104 </view>
... ...
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.msg, 0, th);
  168 + getApp().my_warnning(res.data.data, 0, th);
169 169 setTimeout(function() {
170 170 wx.navigateBack({
171 171 //返回
... ... @@ -290,9 +290,11 @@ Page({
290 290 }
291 291 }).then(res => {
292 292 if (res.data.code == 0) {
  293 + if (res.data.data[0].GroupHour!=undefined){
293 294 if (res.data.data[0].GroupHour.length > 11) {
294 295 getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
295 296 }
  297 + }
296 298 var hours = th.data.hours;
297 299  
298 300 var time_list = res.data.data;
... ... @@ -323,6 +325,10 @@ Page({
323 325 }
324 326 }
325 327 }
  328 + }else{
  329 + for(var i = 0 ;i<time.length;i++){
  330 + new_time[i]="";
  331 + }
326 332 }
327 333 th.setData({
328 334 time_list: new_time,
... ...
pages/user/my_service/beauty_deta.wxss
... ... @@ -32,7 +32,7 @@
32 32 border-radius: 50%;
33 33 float: right;
34 34 margin: 0rpx 15rpx;
35   - border: 2rpx solid red;
  35 + /* border: 2rpx solid red; */
36 36 }
37 37  
38 38 .introduce {
... ...
pages/user/my_service/hist_service.js
... ... @@ -147,11 +147,5 @@ Page({
147 147 })
148 148 }
149 149 })
150   - },
151   - /**
152   - * 用户点击右上角分享
153   - */
154   - onShareAppMessage: function() {
155   -
156 150 }
157 151 })
158 152 \ No newline at end of file
... ...
pages/user/my_service/i_service.js
... ... @@ -45,6 +45,7 @@ Page({
45 45 * 生命周期函数--监听页面显示
46 46 */
47 47 onShow: function() {
  48 + var th = this;
48 49 var nav_b = th.selectComponent("#nav_b"); //组件的id
49 50 nav_b.close_box();
50 51 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
... ...
pages/user/my_service/tment_details.wxml
1 1 <view class="container" wx:for="{{tment_details}}" wx:if="{{index<1}}">
2 2 <!-- 预约人的属性 -->
3   - <view class="Subscriber">
  3 + <view class="Subscriber padding">
4 4 <!-- 状态栏 -->
5 5 <view class="statusBar fs32 flex-vertical-between lf">
6 6 <view>预约状态:</view>
... ... @@ -76,7 +76,7 @@
76 76 </view>
77 77  
78 78 <!-- 温馨提示内容 -->
79   - <view class="Tips fs30 lf rel">
  79 + <view class="Tips fs30 lf rel padding">
80 80 <!-- 棒槌 -->
81 81 <view class="Stickl abs"></view>
82 82 <view class="Stickl Stickr abs"></view>
... ... @@ -88,8 +88,7 @@
88 88 <view>2.如有任何问题可致电咨询;</view>
89 89 <view>3.如需退约,需提前取消。</view>
90 90 </view>
91   -
92   - <!-- submit栏 -->
  91 + <!-- submit栏 -->
93 92 <view class="subs flex-vertical-between fs32">
94 93 <!-- 左边栏 -->
95 94 <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}">
... ... @@ -113,9 +112,11 @@
113 112 </navigator>
114 113  
115 114 </view>
  115 +
116 116 </view>
  117 +
117 118 <!-- 制作一个圆球导航 -->
118 119 <nav_b></nav_b>
119 120 <!-- 弹出框扫描 -->
120 121 <qr_code id="qc_com"></qr_code>
121   -<warn id="warn"></warn>
122 122 \ No newline at end of file
  123 +<warn id="warn"></warn>
... ...
pages/user/my_service/tment_details.wxss
1 1 page {
2 2 width: 100%;
3   - height: 100%;
4 3 background-color: rgb(238, 238, 238);
5 4 }
6 5  
... ... @@ -34,13 +33,15 @@ page {
34 33 /* 公用 */
35 34  
36 35 .container {
37   - padding: 0rpx 20rpx;
38 36 padding-bottom:40rpx;
39 37 }
40 38  
  39 +.padding{
  40 + margin: 0rpx 20rpx;
  41 +}
  42 +
41 43 .Subscriber {
42 44 overflow: hidden;
43   - width: 100%;
44 45 margin-top: 25rpx;
45 46 background-color: rgb(255, 255, 255);
46 47 border-radius: 10rpx;
... ... @@ -78,11 +79,12 @@ page {
78 79 }
79 80  
80 81 .subs {
81   - padding: 0rpx 5rpx;
82   - margin-bottom: 20rpx;
  82 + width: 710rpx;
  83 + padding: 0rpx 20rpx;
83 84 position: fixed;
84   - width: 705rpx;
85   - bottom:85rpx;
  85 + bottom:0rpx;
  86 + background-color: rgb(255,255,255);
  87 + height: 140rpx;
86 88 }
87 89  
88 90 .sub {
... ...
pages/user/my_service/tment_eval.js
... ... @@ -104,7 +104,7 @@ Page({
104 104 }).then(res => {
105 105 if (res.data.code == 0) {
106 106 var data = res.data.data.pageData;
107   - var arrangeTime = data[0].ArrangeTime.substring(0, 11);
  107 + var arrangeTime = data[0].ArrangeTime;
108 108 th.setData({
109 109 beautician: data[0],
110 110 arrangeTime: arrangeTime
... ... @@ -140,10 +140,14 @@ Page({
140 140 evaluate_save: function() {
141 141 var th = this;
142 142 var stars = th.data.stars_index; //评价星级
  143 + var proposal = th.data.proposal;
143 144 //判断是否评级
144 145 if (stars < 0) {
145 146 getApp().my_warnning("请进行评分", 0, th);
146 147 return false;
  148 + } else if (proposal==""){
  149 + getApp().my_warnning("给点建议呗", 0, th);
  150 + return false;
147 151 }
148 152 var labels = th.data.labels; //星级标签数组
149 153 var evaLabList = []; //用户选择的评价标签
... ... @@ -182,7 +186,7 @@ Page({
182 186 wx.redirectTo({
183 187 url: "/pages/user/my_service/tment_order_list"
184 188 });
185   - }, 800);
  189 + }, 1500);
186 190 } else {
187 191 getApp().my_warnning(res.data.msg, 0, th);
188 192 }
... ...
pages/user/my_service/tment_eval.wxml
... ... @@ -7,7 +7,10 @@
7 7  
8 8 <!-- 姓名 -->
9 9 <view class="flex-level item">
10   - <view class="itemlf fs32">美容师:</view>
  10 + <view class="itemlf flex-vertical-between">
  11 + <view class="fs32">美容师</view>
  12 + <view> :</view>
  13 + </view>
11 14 <view class="itemlr fs30 ellipsis-1 {{is_evaluate==0?'datetime':''}}">{{beautician.BeauticianName}}</view>
12 15 </view>
13 16  
... ... @@ -38,16 +41,16 @@
38 41 </view>
39 42 <view class="tea_labs">
40 43 <view class="flex-center fs26">
41   - <block wx:if="{{is_evaluate==0}}">
42   - <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
43   - <!-- 提示已输入多少数字 -->
44   - <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
45   - </textarea>
  44 + <block wx:if="{{is_evaluate==0}}">
  45 + <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
  46 + <!-- 提示已输入多少数字 -->
  47 + <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
  48 + </textarea>
46 49 </block>
47 50 <block wx:else>
48   - <view wx:if="{{proposal!=''}}" class="textarea">
49   - {{proposal}}
50   - </view>
  51 + <view wx:if="{{proposal!=''}}" class="textarea">
  52 + {{proposal}}
  53 + </view>
51 54 </block>
52 55 </view>
53 56  
... ... @@ -59,11 +62,11 @@
59 62 </view>
60 63 <view wx:if="{{labels.length>0 && is_evaluate==1}}" class="{{labels.length==1 || labels.length==2?'flex-center':''}}" style="width:100%;">
61 64 <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 + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  66 + <view class="ellipsis-1">{{item.LabelName}}</view>
  67 + </view>
65 68  
66   - </view>
  69 + </view>
67 70 </view>
68 71  
69 72 </view>
... ...
pages/user/my_service/tment_order_list.wxml
... ... @@ -69,7 +69,7 @@
69 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>
70 70 </view>
71 71 </view>
72   - <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}}">
73 73 <view class="line"></view>
74 74 <view class="exactly_text">到底了</view>
75 75 <view class="line"></view>
... ...