Commit ddb4664f11481208bd81598aa6f8a5221e662178
1 parent
ae806349
预约主界面新增模板发送,textea层次过高
Showing
13 changed files
with
192 additions
and
99 deletions
pages/user/my_service/appment_main.js
| ... | ... | @@ -41,6 +41,20 @@ Page({ |
| 41 | 41 | lat: "", //纬度坐标 |
| 42 | 42 | lon: "", //经度坐标 |
| 43 | 43 | is_gps: 1, //是否开启gps |
| 44 | + validay: "", //服务项目有效期 | |
| 45 | + is_sub: 0, //判断是否重复提交 | |
| 46 | + is_textea: 1, //备注是否是可输入 | |
| 47 | + }, | |
| 48 | + //控制备注输入 | |
| 49 | + check_text: function() { | |
| 50 | + var th = this; | |
| 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 | + } | |
| 44 | 58 | }, |
| 45 | 59 | onclickstore: function() { |
| 46 | 60 | var th = this; |
| ... | ... | @@ -48,14 +62,11 @@ Page({ |
| 48 | 62 | if (store) { |
| 49 | 63 | th.setData({ |
| 50 | 64 | store: 0, |
| 51 | - placeholder: "填写备注" | |
| 52 | 65 | }) |
| 53 | - wx.hideLoading(); | |
| 54 | 66 | } else { |
| 55 | 67 | th.setData({ |
| 56 | 68 | beautician: 0, |
| 57 | 69 | store: 1, |
| 58 | - placeholder: "" | |
| 59 | 70 | }) |
| 60 | 71 | if (th.data.store_list.length < 1) { |
| 61 | 72 | wx.showLoading({ |
| ... | ... | @@ -73,11 +84,13 @@ Page({ |
| 73 | 84 | }) |
| 74 | 85 | }, |
| 75 | 86 | //提交预约 |
| 76 | - sub_success: function() { | |
| 87 | + sub_success: function(e) { | |
| 77 | 88 | var th = this; |
| 89 | + var formid = e.detail.formId; //发送预约成功模版信息 | |
| 78 | 90 | var store = th.data.store_name; //门店名称 |
| 79 | 91 | var bea_name = th.data.beautician_name; //美容师名称 |
| 80 | 92 | var time = th.data.time; //预约时间 |
| 93 | + var is_sub = th.data.is_sub; //是否重复提交 | |
| 81 | 94 | //提交预约前的判断 |
| 82 | 95 | if (store == "") { |
| 83 | 96 | getApp().my_warnning("请选择服务门店", 0, th); |
| ... | ... | @@ -89,53 +102,101 @@ Page({ |
| 89 | 102 | getApp().my_warnning("请选择预约时间", 0, th); |
| 90 | 103 | return false; |
| 91 | 104 | } else { |
| 92 | - var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 | |
| 93 | - var serviceId = th.data.itemId; //服务id | |
| 94 | - var beauticianID = th.data.beauticianID; //美容师id | |
| 95 | - var buyType = th.data.buyType; //服务项目类型 | |
| 96 | - var storeId = a.stoid; //商家id | |
| 97 | - var storageId = th.data.storageId; //门店id | |
| 98 | - var userId = d.user_id; //用户id | |
| 99 | - var remarks = th.data.remarks; //用户备注 | |
| 100 | - var project_id = th.data.project_id; //项目id | |
| 101 | - | |
| 102 | - var json = { | |
| 103 | - "arrangeTime": time, | |
| 104 | - "beauticianId": beauticianID, | |
| 105 | - "buyType": buyType, | |
| 106 | - "effectiveDay": "", | |
| 107 | - "number": "", | |
| 108 | - "projectId": project_id, | |
| 109 | - "remark": remarks, | |
| 110 | - "serviceId": serviceId, | |
| 111 | - "states": 0, | |
| 112 | - "storageId": storageId, | |
| 113 | - "storeId": storeId, | |
| 114 | - "userId": userId | |
| 115 | - } | |
| 116 | - var data = JSON.stringify(json); | |
| 117 | - wx.request({ | |
| 118 | - url: url, | |
| 119 | - data: json, | |
| 120 | - method: 'post', | |
| 121 | - header: { | |
| 122 | - 'content-type': 'application/json' | |
| 123 | - }, // 设置请求的 header | |
| 124 | - success: function(res) { | |
| 125 | - if (res.data.code == 0) { | |
| 126 | - th.setData({ | |
| 127 | - is_success: 1 | |
| 128 | - }) | |
| 129 | - setTimeout(function() { | |
| 130 | - wx.redirectTo({ | |
| 131 | - url: "/pages/user/my_service/tment_order_list" | |
| 132 | - }); | |
| 133 | - }, 800); | |
| 134 | - } else { | |
| 135 | - getApp().my_warnning(res.data.msg, 0, th); | |
| 136 | - } | |
| 105 | + if (is_sub == 0) { | |
| 106 | + th.setData({ | |
| 107 | + is_sub: 1 | |
| 108 | + }) | |
| 109 | + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 | |
| 110 | + var serviceId = th.data.itemId; //服务id | |
| 111 | + var beauticianID = th.data.beauticianID; //美容师id | |
| 112 | + var buyType = th.data.buyType; //服务项目类型 | |
| 113 | + var storeId = a.stoid; //商家id | |
| 114 | + var storageId = th.data.storageId; //门店id | |
| 115 | + var userId = d.user_id; //用户id | |
| 116 | + var remarks = th.data.remarks; //用户备注 | |
| 117 | + var project_id = th.data.project_id; //项目id | |
| 118 | + var validay = th.data.validay; | |
| 119 | + var json = { | |
| 120 | + "arrangeTime": time, | |
| 121 | + "beauticianId": beauticianID, | |
| 122 | + "buyType": buyType, | |
| 123 | + "effectiveDay": "", | |
| 124 | + "number": "", | |
| 125 | + "projectId": project_id, | |
| 126 | + "remark": remarks, | |
| 127 | + "serviceId": serviceId, | |
| 128 | + "states": 0, | |
| 129 | + "storageId": storageId, | |
| 130 | + "storeId": storeId, | |
| 131 | + "userId": userId, | |
| 132 | + "validay": validay | |
| 137 | 133 | } |
| 138 | - }) | |
| 134 | + var data = JSON.stringify(json); | |
| 135 | + wx.request({ | |
| 136 | + url: url, | |
| 137 | + data: json, | |
| 138 | + method: 'post', | |
| 139 | + header: { | |
| 140 | + 'content-type': 'application/json' | |
| 141 | + }, // 设置请求的 header | |
| 142 | + success: function(res) { | |
| 143 | + if (res.data.code == 0) { | |
| 144 | + th.setData({ | |
| 145 | + is_success: 1, | |
| 146 | + is_sub: 0 | |
| 147 | + }) | |
| 148 | + var store_name = th.data.store_name; //预约门店 | |
| 149 | + var number = res.data.data.Number; | |
| 150 | + var temp_url = "/api/wx/open/app/user/templatMessageSend"; //模版接口 | |
| 151 | + var userinfo = getApp().globalData.userInfo; | |
| 152 | + var name = d.userInfo.nickname; | |
| 153 | + var json = { | |
| 154 | + "formId": formid, | |
| 155 | + "keyWord": [{ | |
| 156 | + "keyword": res.data.data.StorageName | |
| 157 | + }, { | |
| 158 | + "keyword": name | |
| 159 | + }, { | |
| 160 | + "keyword": number | |
| 161 | + }, { | |
| 162 | + "keyword": res.data.data.Address | |
| 163 | + }, { | |
| 164 | + "keyword": time | |
| 165 | + }, { | |
| 166 | + "keyword": res.data.data.BeauticianName | |
| 167 | + }, { | |
| 168 | + "keyword": res.data.data.ServiceName | |
| 169 | + }], | |
| 170 | + "page": "/pages/user/my_service/tment_details?number=" + number, | |
| 171 | + "storeId": a.stoid, | |
| 172 | + "typeId": "1011", | |
| 173 | + "userId": d.user_id | |
| 174 | + }; | |
| 175 | + var data = JSON.stringify(json); | |
| 176 | + //调用发送预约成功模版接口 | |
| 177 | + wx.request({ | |
| 178 | + url: th.data.inurl + temp_url, | |
| 179 | + data: data, | |
| 180 | + method: 'post', | |
| 181 | + header: { | |
| 182 | + 'content-type': 'application/json' | |
| 183 | + }, // 设置请求的 header | |
| 184 | + success: function(data) {} | |
| 185 | + }) | |
| 186 | + setTimeout(function() { | |
| 187 | + wx.redirectTo({ | |
| 188 | + url: "/pages/user/my_service/tment_details?number=" + number | |
| 189 | + }); | |
| 190 | + }, 1000); | |
| 191 | + } else { | |
| 192 | + getApp().my_warnning(res.data.msg, 0, th); | |
| 193 | + th.setData({ | |
| 194 | + is_sub: 0 | |
| 195 | + }) | |
| 196 | + } | |
| 197 | + } | |
| 198 | + }) | |
| 199 | + } | |
| 139 | 200 | } |
| 140 | 201 | }, |
| 141 | 202 | goto: function(e) { |
| ... | ... | @@ -191,6 +252,9 @@ Page({ |
| 191 | 252 | //分页查询门店信息 |
| 192 | 253 | query_store: function() { |
| 193 | 254 | var th = this; |
| 255 | + th.setData({ | |
| 256 | + is_textea: 0 | |
| 257 | + }) | |
| 194 | 258 | var itemId = th.data.itemId; //服务id |
| 195 | 259 | var url = "/api/weshop/marketing/reservation/storage/page"; |
| 196 | 260 | var key_word = th.data.key_word; |
| ... | ... | @@ -227,18 +291,12 @@ Page({ |
| 227 | 291 | //查询 |
| 228 | 292 | query_beautician: function() { |
| 229 | 293 | var th = this; |
| 294 | + th.setData({ | |
| 295 | + is_textea: 0 | |
| 296 | + }) | |
| 230 | 297 | if (th.data.store_name == "") { |
| 231 | 298 | getApp().my_warnning("请选择服务门店", 0, th); |
| 232 | 299 | } else { |
| 233 | - if (th.data.beautician == 0) { | |
| 234 | - th.setData({ | |
| 235 | - beautician: 1 | |
| 236 | - }) | |
| 237 | - } else { | |
| 238 | - th.setData({ | |
| 239 | - beautician: 0 | |
| 240 | - }) | |
| 241 | - } | |
| 242 | 300 | wx.showLoading({ |
| 243 | 301 | title: '加载中', |
| 244 | 302 | }) |
| ... | ... | @@ -260,9 +318,21 @@ Page({ |
| 260 | 318 | }) |
| 261 | 319 | if (res.data.data.pageData.length < 1) { |
| 262 | 320 | getApp().my_warnning("暂无美容师", 0, th); |
| 321 | + } else { | |
| 322 | + if (th.data.beautician == 0) { | |
| 323 | + th.setData({ | |
| 324 | + beautician: 1, | |
| 325 | + }) | |
| 326 | + } else { | |
| 327 | + th.setData({ | |
| 328 | + beautician: 0, | |
| 329 | + }) | |
| 330 | + } | |
| 263 | 331 | } |
| 264 | 332 | } else { |
| 265 | - getApp().my_warnning("暂无美容师", 0, th); | |
| 333 | + th.setData({ | |
| 334 | + }) | |
| 335 | + getApp().my_warnning(res.data.msg, 0, th); | |
| 266 | 336 | } |
| 267 | 337 | }) |
| 268 | 338 | } |
| ... | ... | @@ -278,7 +348,8 @@ Page({ |
| 278 | 348 | bea_index: bea_index, |
| 279 | 349 | beauticianID: BeauticianID, |
| 280 | 350 | time: "", |
| 281 | - tment_count: "" | |
| 351 | + tment_count: "", | |
| 352 | + is_textea: 0 | |
| 282 | 353 | }) |
| 283 | 354 | |
| 284 | 355 | }, |
| ... | ... | @@ -317,7 +388,7 @@ Page({ |
| 317 | 388 | getApp().my_warnning("请选择服务门店", 0, th); |
| 318 | 389 | } else { |
| 319 | 390 | wx.navigateTo({ |
| 320 | - url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId | |
| 391 | + url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id | |
| 321 | 392 | }); |
| 322 | 393 | } |
| 323 | 394 | }, |
| ... | ... | @@ -330,6 +401,7 @@ Page({ |
| 330 | 401 | itemId: options.service_id, |
| 331 | 402 | buyType: options.BuyType, |
| 332 | 403 | project_id: options.ProjectID, |
| 404 | + validay: options.Validay | |
| 333 | 405 | }) |
| 334 | 406 | wx.getLocation({ |
| 335 | 407 | type: 'wgs84', | ... | ... |
pages/user/my_service/appment_main.wxml
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | <!-- 选择门店 --> |
| 7 | 7 | <view class="flex-vertical mabot"> |
| 8 | 8 | <!-- 门店 --> |
| 9 | - <view class="flex-vertical-between head fs28"> | |
| 9 | + <view class="flex-vertical-between head fs30"> | |
| 10 | 10 | <view>门</view> |
| 11 | 11 | <view>店</view> |
| 12 | 12 | </view> |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | <!-- 选择美容师 --> |
| 21 | 21 | <view class="flex-vertical mabot"> |
| 22 | 22 | <!-- 门店 --> |
| 23 | - <view class="flex-vertical-between head fs28"> | |
| 23 | + <view class="flex-vertical-between head fs30"> | |
| 24 | 24 | <view>美</view> |
| 25 | 25 | <view>容</view> |
| 26 | 26 | <view>师</view> |
| ... | ... | @@ -50,12 +50,12 @@ |
| 50 | 50 | <!-- 选择时间 --> |
| 51 | 51 | <view class="flex-vertical mabot"> |
| 52 | 52 | <!-- 门店 --> |
| 53 | - <view class="head fs28"> | |
| 53 | + <view class="head fs30"> | |
| 54 | 54 | <view>预约时间</view> |
| 55 | 55 | </view> |
| 56 | 56 | |
| 57 | - <!-- 选择门店 --> | |
| 58 | - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url+{{url}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0" bindtap="goto"> | |
| 57 | + <!-- 选择时间 --> | |
| 58 | + <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url+{{url}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto"> | |
| 59 | 59 | <view class="color">{{time==""?'选择时间':time}}</view> |
| 60 | 60 | <view class="angle angler">∟</view> |
| 61 | 61 | </view> |
| ... | ... | @@ -64,17 +64,17 @@ |
| 64 | 64 | <!-- 备注 --> |
| 65 | 65 | <view class="flex Remarks"> |
| 66 | 66 | <!-- 门店 --> |
| 67 | - <view class="flex-space-between head fs28"> | |
| 67 | + <view class="flex-space-between head fs30"> | |
| 68 | 68 | <view>备</view> |
| 69 | 69 | <view>注</view> |
| 70 | 70 | </view> |
| 71 | - <view class="flex fs26"> | |
| 72 | - <block wx:if="{{store==0 && beautician==0}}"> | |
| 73 | - <textarea class="textarea" disabled="{{store || beautician}}" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100"> | |
| 71 | + <view class="flex fs26" bindtap=""> | |
| 72 | + <block wx:if="{{is_textea && store==0}}"> | |
| 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> |
| 76 | 76 | <block wx:else> |
| 77 | - <view class="textarea">填写备注 | |
| 77 | + <view class="textarea color" bindtap="check_text">{{remarks==''?'填写备注':remarks}} | |
| 78 | 78 | </view> |
| 79 | 79 | </block> |
| 80 | 80 | </view> |
| ... | ... | @@ -83,13 +83,15 @@ |
| 83 | 83 | <view>注:剩余可预约人数{{tment_count}}人</view> |
| 84 | 84 | </view> |
| 85 | 85 | |
| 86 | - <view class="submitMax flex-space-between fs30"> | |
| 86 | + <view class="submitMax flex-space-between fs32"> | |
| 87 | 87 | <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> |
| 88 | 88 | <view>我的预约</view> |
| 89 | 89 | </navigator> |
| 90 | - <view class="sub_appment flex-center" bindtap="sub_success"> | |
| 91 | - <view>提交预约</view> | |
| 92 | - </view> | |
| 90 | + <form report-submit='true' bindsubmit="sub_success"> | |
| 91 | + <button form-type="submit" class="sub_appment flex-center"> | |
| 92 | + <view>提交预约</view> | |
| 93 | + </button> | |
| 94 | + </form> | |
| 93 | 95 | </view> |
| 94 | 96 | <block wx:if="{{is_success}}"> |
| 95 | 97 | <view class="subSuccess fs36"> |
| ... | ... | @@ -108,7 +110,7 @@ |
| 108 | 110 | <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon> |
| 109 | 111 | </view> |
| 110 | 112 | <view class="searchbar flex-vertical-between storeListpadd"> |
| 111 | - <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="search_store"/> | |
| 113 | + <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="search_store" /> | |
| 112 | 114 | <view class="search flex-center" bindtap="search_store"> |
| 113 | 115 | <view class="fs28">搜索</view> |
| 114 | 116 | </view> | ... | ... |
pages/user/my_service/appment_main.wxss
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | left: 110rpx; |
| 44 | 44 | width: 540rpx; |
| 45 | 45 | height: 315rpx; |
| 46 | - background-color: rgb(155,155,155); | |
| 46 | + background-color: rgb(155, 155, 155); | |
| 47 | 47 | text-align: center; |
| 48 | 48 | border-radius: 20rpx; |
| 49 | 49 | color: rgb(255, 255, 255); |
| ... | ... | @@ -59,10 +59,16 @@ |
| 59 | 59 | |
| 60 | 60 | .appment, .sub_appment { |
| 61 | 61 | width: 270rpx; |
| 62 | - height: 55rpx; | |
| 62 | + height: 60rpx; | |
| 63 | + line-height: 55rpx; | |
| 63 | 64 | border-radius: 40rpx; |
| 64 | 65 | } |
| 65 | 66 | |
| 67 | +button { | |
| 68 | + height: 100%; | |
| 69 | + background-color: rgb(214, 1, 33); | |
| 70 | +} | |
| 71 | + | |
| 66 | 72 | .appment { |
| 67 | 73 | background-color: rgb(238, 238, 238); |
| 68 | 74 | } |
| ... | ... | @@ -73,7 +79,7 @@ |
| 73 | 79 | } |
| 74 | 80 | |
| 75 | 81 | .head { |
| 76 | - width: 112rpx; | |
| 82 | + width: 122rpx; | |
| 77 | 83 | margin-right: 40rpx; |
| 78 | 84 | height: 50rpx; |
| 79 | 85 | line-height: 50rpx; |
| ... | ... | @@ -88,6 +94,7 @@ |
| 88 | 94 | padding-right: 15rpx; |
| 89 | 95 | padding-top: 15rpx; |
| 90 | 96 | padding-bottom: 15rpx; |
| 97 | + color: rgb(172, 172, 172); | |
| 91 | 98 | } |
| 92 | 99 | |
| 93 | 100 | .mabot { |
| ... | ... | @@ -96,8 +103,8 @@ |
| 96 | 103 | |
| 97 | 104 | .select { |
| 98 | 105 | width: 420rpx; |
| 99 | - height: 50rpx; | |
| 100 | - line-height: 50rpx; | |
| 106 | + height: 55rpx; | |
| 107 | + line-height: 55rpx; | |
| 101 | 108 | background-color: rgb(238, 238, 238); |
| 102 | 109 | border-radius: 10rpx; |
| 103 | 110 | padding-left: 40rpx; | ... | ... |
pages/user/my_service/beauty_deta.js
| ... | ... | @@ -29,6 +29,7 @@ Page({ |
| 29 | 29 | modify: 0, //是否是修改时间 |
| 30 | 30 | iscos: 0, //是否是从美容师列表过来的 |
| 31 | 31 | hours: "", //获取当前时分秒 |
| 32 | + projectId: "", //项目id | |
| 32 | 33 | }, |
| 33 | 34 | |
| 34 | 35 | /** |
| ... | ... | @@ -38,13 +39,13 @@ Page({ |
| 38 | 39 | var th = this; |
| 39 | 40 | var myDate = new Date(); |
| 40 | 41 | var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) |
| 41 | - console.log(date > "09:00" + "和哦哦哦哦的"); | |
| 42 | 42 | var beautician_id = options.BeauticianID; |
| 43 | 43 | th.setData({ |
| 44 | 44 | beautician_id: beautician_id, |
| 45 | 45 | itemId: options.itemId, |
| 46 | 46 | modify: options.modify, |
| 47 | - hours: date | |
| 47 | + hours: date, | |
| 48 | + projectId: options.projectId | |
| 48 | 49 | }) |
| 49 | 50 | if (options.url != undefined) { |
| 50 | 51 | th.setData({ |
| ... | ... | @@ -208,10 +209,12 @@ Page({ |
| 208 | 209 | query_aweek: function() { |
| 209 | 210 | var th = this; |
| 210 | 211 | var beautician_id = th.data.beautician_id; //美容师id |
| 211 | - var itemId = th.data.itemId; //项目id | |
| 212 | + var itemId = th.data.itemId; //服务id | |
| 213 | + var projectId = th.data.projectId; //项目id | |
| 212 | 214 | var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址 |
| 213 | 215 | getApp().request.promiseGet(url, { |
| 214 | 216 | data: { |
| 217 | + projectId: projectId, | |
| 215 | 218 | beauticianId: beautician_id, |
| 216 | 219 | serviceId: itemId, |
| 217 | 220 | storeId: a.stoid, |
| ... | ... | @@ -227,12 +230,7 @@ Page({ |
| 227 | 230 | }; |
| 228 | 231 | arr.push(em); |
| 229 | 232 | } |
| 230 | - | |
| 231 | 233 | arr.sort(th.sort_arr); |
| 232 | - | |
| 233 | - | |
| 234 | - | |
| 235 | - | |
| 236 | 234 | var weeks = ["今天", "明天", "后天"]; |
| 237 | 235 | var week = ""; |
| 238 | 236 | for (var i = 3; i < arr.length; i++) { |
| ... | ... | @@ -262,11 +260,15 @@ Page({ |
| 262 | 260 | |
| 263 | 261 | query_date: function() { |
| 264 | 262 | var th = this; |
| 263 | + var projectId = th.data.projectId; | |
| 265 | 264 | var date_id = th.data.date_id; //日期下标 |
| 266 | 265 | var SeekTime = th.data.aweeks[date_id].time; |
| 266 | + var val = th.data.aweeks[date_id].val; | |
| 267 | + if(val!=""){ | |
| 267 | 268 | var url = "/api/weshop/marketing/reservation/staff/time/list"; |
| 268 | 269 | getApp().request.promiseGet(url, { |
| 269 | 270 | data: { |
| 271 | + projectId: projectId, | |
| 270 | 272 | beauticianId: th.data.beautician_id, |
| 271 | 273 | serviceId: th.data.itemId, |
| 272 | 274 | seekTime: SeekTime, |
| ... | ... | @@ -296,6 +298,7 @@ Page({ |
| 296 | 298 | getApp().my_warnning(res.data.msg, 0, th); |
| 297 | 299 | } |
| 298 | 300 | }) |
| 301 | + } | |
| 299 | 302 | }, |
| 300 | 303 | //更改预约时间 |
| 301 | 304 | change_time: function() { | ... | ... |
pages/user/my_service/beauty_deta.wxml
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | </view> |
| 29 | 29 | </block> |
| 30 | 30 | <block wx:else> |
| 31 | - <view class="scroll-item-h bd"> | |
| 31 | + <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}"> | |
| 32 | 32 | <view>{{weeks[index]}}(约满)</view> |
| 33 | 33 | <view>{{item.time}}</view> |
| 34 | 34 | </view> | ... | ... |
pages/user/my_service/cosmetology_list.js
| ... | ... | @@ -19,6 +19,7 @@ Page({ |
| 19 | 19 | ismore: 0, //是否加载完毕 |
| 20 | 20 | itemId: 0, //服务id, |
| 21 | 21 | storageId: 0, //线下门店id |
| 22 | + projectId:"",//项目id | |
| 22 | 23 | }, |
| 23 | 24 | onReachBottom: function() { |
| 24 | 25 | var th = this; |
| ... | ... | @@ -57,6 +58,7 @@ Page({ |
| 57 | 58 | total: res.data.data.total, |
| 58 | 59 | ismore: ismore, |
| 59 | 60 | is_service_read: 1, |
| 61 | + is_cosmetology_read:1 | |
| 60 | 62 | }), wx.stopPullDownRefresh(); //停止下拉刷新 |
| 61 | 63 | } else { |
| 62 | 64 | getApp().my_warnning(res.data.msg, 0, th); |
| ... | ... | @@ -82,6 +84,7 @@ Page({ |
| 82 | 84 | onLoad: function(options) { |
| 83 | 85 | var th = this; |
| 84 | 86 | th.setData({ |
| 87 | + projectId: options.projectId, | |
| 85 | 88 | itemId: options.itemId, |
| 86 | 89 | storageId: options.storageId |
| 87 | 90 | }) | ... | ... |
pages/user/my_service/i_service.wxml
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | <view>立即使用</view> |
| 50 | 50 | </view> |
| 51 | 51 | <!-- 可预约 --> |
| 52 | - <navigator wx:if="{{item.State}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> | |
| 52 | + <navigator wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> | |
| 53 | 53 | <view>预约</view> |
| 54 | 54 | </navigator> |
| 55 | 55 | </view> | ... | ... |
pages/user/my_service/tment_details.wxml
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | <view class="yellow-b">我的服务</view> |
| 100 | 100 | </navigator> |
| 101 | 101 | <!-- 右边栏 --> |
| 102 | - <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1"> | |
| 102 | + <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}"> | |
| 103 | 103 | <view>更改时间</view> |
| 104 | 104 | </navigator> |
| 105 | 105 | <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}"> | ... | ... |
pages/user/my_service/tment_details.wxss
pages/user/my_service/tment_eval.js
| ... | ... | @@ -147,9 +147,11 @@ Page({ |
| 147 | 147 | th.setData({ |
| 148 | 148 | sub_evaluate: 1 |
| 149 | 149 | }) |
| 150 | - wx.navigateTo({ | |
| 151 | - url: "/pages/user/my_service/tment_order_list" | |
| 152 | - }); | |
| 150 | + setTimeout(function () { | |
| 151 | + wx.redirectTo({ | |
| 152 | + url: "/pages/user/my_service/tment_order_list" | |
| 153 | + }); | |
| 154 | + }, 800); | |
| 153 | 155 | } else { |
| 154 | 156 | getApp().my_warnning(res.data.msg, 0, th); |
| 155 | 157 | } | ... | ... |
pages/user/my_service/tment_eval.wxml
pages/user/my_service/tment_order_list.js
| ... | ... | @@ -84,6 +84,9 @@ Page({ |
| 84 | 84 | wx.showLoading({ |
| 85 | 85 | title: '加载中', |
| 86 | 86 | }) |
| 87 | + th.setData({ | |
| 88 | + is_read:0 | |
| 89 | + }) | |
| 87 | 90 | getApp().request.promiseGet(url, { |
| 88 | 91 | data: { |
| 89 | 92 | storeId: a.stoid, |
| ... | ... | @@ -177,7 +180,7 @@ Page({ |
| 177 | 180 | onShow: function() { |
| 178 | 181 | var th = this; |
| 179 | 182 | th.setData({ |
| 180 | - is_read: 0 | |
| 183 | + is_read:0 | |
| 181 | 184 | }) |
| 182 | 185 | th.query_orderList(); |
| 183 | 186 | }, | ... | ... |
pages/user/my_service/tment_order_list.wxml
| ... | ... | @@ -63,7 +63,7 @@ |
| 63 | 63 | <block wx:else> |
| 64 | 64 | <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator> |
| 65 | 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">更改时间</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 | 67 | <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}" class="important Unimportance flex-level">发表评价</navigator> |
| 68 | 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> |
| 69 | 69 | </view> | ... | ... |