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,6 +41,20 @@ Page({ | ||
| 41 | lat: "", //纬度坐标 | 41 | lat: "", //纬度坐标 |
| 42 | lon: "", //经度坐标 | 42 | lon: "", //经度坐标 |
| 43 | is_gps: 1, //是否开启gps | 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 | onclickstore: function() { | 59 | onclickstore: function() { |
| 46 | var th = this; | 60 | var th = this; |
| @@ -48,14 +62,11 @@ Page({ | @@ -48,14 +62,11 @@ Page({ | ||
| 48 | if (store) { | 62 | if (store) { |
| 49 | th.setData({ | 63 | th.setData({ |
| 50 | store: 0, | 64 | store: 0, |
| 51 | - placeholder: "填写备注" | ||
| 52 | }) | 65 | }) |
| 53 | - wx.hideLoading(); | ||
| 54 | } else { | 66 | } else { |
| 55 | th.setData({ | 67 | th.setData({ |
| 56 | beautician: 0, | 68 | beautician: 0, |
| 57 | store: 1, | 69 | store: 1, |
| 58 | - placeholder: "" | ||
| 59 | }) | 70 | }) |
| 60 | if (th.data.store_list.length < 1) { | 71 | if (th.data.store_list.length < 1) { |
| 61 | wx.showLoading({ | 72 | wx.showLoading({ |
| @@ -73,11 +84,13 @@ Page({ | @@ -73,11 +84,13 @@ Page({ | ||
| 73 | }) | 84 | }) |
| 74 | }, | 85 | }, |
| 75 | //提交预约 | 86 | //提交预约 |
| 76 | - sub_success: function() { | 87 | + sub_success: function(e) { |
| 77 | var th = this; | 88 | var th = this; |
| 89 | + var formid = e.detail.formId; //发送预约成功模版信息 | ||
| 78 | var store = th.data.store_name; //门店名称 | 90 | var store = th.data.store_name; //门店名称 |
| 79 | var bea_name = th.data.beautician_name; //美容师名称 | 91 | var bea_name = th.data.beautician_name; //美容师名称 |
| 80 | var time = th.data.time; //预约时间 | 92 | var time = th.data.time; //预约时间 |
| 93 | + var is_sub = th.data.is_sub; //是否重复提交 | ||
| 81 | //提交预约前的判断 | 94 | //提交预约前的判断 |
| 82 | if (store == "") { | 95 | if (store == "") { |
| 83 | getApp().my_warnning("请选择服务门店", 0, th); | 96 | getApp().my_warnning("请选择服务门店", 0, th); |
| @@ -89,53 +102,101 @@ Page({ | @@ -89,53 +102,101 @@ Page({ | ||
| 89 | getApp().my_warnning("请选择预约时间", 0, th); | 102 | getApp().my_warnning("请选择预约时间", 0, th); |
| 90 | return false; | 103 | return false; |
| 91 | } else { | 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 | goto: function(e) { | 202 | goto: function(e) { |
| @@ -191,6 +252,9 @@ Page({ | @@ -191,6 +252,9 @@ Page({ | ||
| 191 | //分页查询门店信息 | 252 | //分页查询门店信息 |
| 192 | query_store: function() { | 253 | query_store: function() { |
| 193 | var th = this; | 254 | var th = this; |
| 255 | + th.setData({ | ||
| 256 | + is_textea: 0 | ||
| 257 | + }) | ||
| 194 | var itemId = th.data.itemId; //服务id | 258 | var itemId = th.data.itemId; //服务id |
| 195 | var url = "/api/weshop/marketing/reservation/storage/page"; | 259 | var url = "/api/weshop/marketing/reservation/storage/page"; |
| 196 | var key_word = th.data.key_word; | 260 | var key_word = th.data.key_word; |
| @@ -227,18 +291,12 @@ Page({ | @@ -227,18 +291,12 @@ Page({ | ||
| 227 | //查询 | 291 | //查询 |
| 228 | query_beautician: function() { | 292 | query_beautician: function() { |
| 229 | var th = this; | 293 | var th = this; |
| 294 | + th.setData({ | ||
| 295 | + is_textea: 0 | ||
| 296 | + }) | ||
| 230 | if (th.data.store_name == "") { | 297 | if (th.data.store_name == "") { |
| 231 | getApp().my_warnning("请选择服务门店", 0, th); | 298 | getApp().my_warnning("请选择服务门店", 0, th); |
| 232 | } else { | 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 | wx.showLoading({ | 300 | wx.showLoading({ |
| 243 | title: '加载中', | 301 | title: '加载中', |
| 244 | }) | 302 | }) |
| @@ -260,9 +318,21 @@ Page({ | @@ -260,9 +318,21 @@ Page({ | ||
| 260 | }) | 318 | }) |
| 261 | if (res.data.data.pageData.length < 1) { | 319 | if (res.data.data.pageData.length < 1) { |
| 262 | getApp().my_warnning("暂无美容师", 0, th); | 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 | } else { | 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,7 +348,8 @@ Page({ | ||
| 278 | bea_index: bea_index, | 348 | bea_index: bea_index, |
| 279 | beauticianID: BeauticianID, | 349 | beauticianID: BeauticianID, |
| 280 | time: "", | 350 | time: "", |
| 281 | - tment_count: "" | 351 | + tment_count: "", |
| 352 | + is_textea: 0 | ||
| 282 | }) | 353 | }) |
| 283 | 354 | ||
| 284 | }, | 355 | }, |
| @@ -317,7 +388,7 @@ Page({ | @@ -317,7 +388,7 @@ Page({ | ||
| 317 | getApp().my_warnning("请选择服务门店", 0, th); | 388 | getApp().my_warnning("请选择服务门店", 0, th); |
| 318 | } else { | 389 | } else { |
| 319 | wx.navigateTo({ | 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,6 +401,7 @@ Page({ | ||
| 330 | itemId: options.service_id, | 401 | itemId: options.service_id, |
| 331 | buyType: options.BuyType, | 402 | buyType: options.BuyType, |
| 332 | project_id: options.ProjectID, | 403 | project_id: options.ProjectID, |
| 404 | + validay: options.Validay | ||
| 333 | }) | 405 | }) |
| 334 | wx.getLocation({ | 406 | wx.getLocation({ |
| 335 | type: 'wgs84', | 407 | type: 'wgs84', |
pages/user/my_service/appment_main.wxml
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <!-- 选择门店 --> | 6 | <!-- 选择门店 --> |
| 7 | <view class="flex-vertical mabot"> | 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 | <view>门</view> | 10 | <view>门</view> |
| 11 | <view>店</view> | 11 | <view>店</view> |
| 12 | </view> | 12 | </view> |
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | <!-- 选择美容师 --> | 20 | <!-- 选择美容师 --> |
| 21 | <view class="flex-vertical mabot"> | 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 | <view>美</view> | 24 | <view>美</view> |
| 25 | <view>容</view> | 25 | <view>容</view> |
| 26 | <view>师</view> | 26 | <view>师</view> |
| @@ -50,12 +50,12 @@ | @@ -50,12 +50,12 @@ | ||
| 50 | <!-- 选择时间 --> | 50 | <!-- 选择时间 --> |
| 51 | <view class="flex-vertical mabot"> | 51 | <view class="flex-vertical mabot"> |
| 52 | <!-- 门店 --> | 52 | <!-- 门店 --> |
| 53 | - <view class="head fs28"> | 53 | + <view class="head fs30"> |
| 54 | <view>预约时间</view> | 54 | <view>预约时间</view> |
| 55 | </view> | 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 | <view class="color">{{time==""?'选择时间':time}}</view> | 59 | <view class="color">{{time==""?'选择时间':time}}</view> |
| 60 | <view class="angle angler">∟</view> | 60 | <view class="angle angler">∟</view> |
| 61 | </view> | 61 | </view> |
| @@ -64,17 +64,17 @@ | @@ -64,17 +64,17 @@ | ||
| 64 | <!-- 备注 --> | 64 | <!-- 备注 --> |
| 65 | <view class="flex Remarks"> | 65 | <view class="flex Remarks"> |
| 66 | <!-- 门店 --> | 66 | <!-- 门店 --> |
| 67 | - <view class="flex-space-between head fs28"> | 67 | + <view class="flex-space-between head fs30"> |
| 68 | <view>备</view> | 68 | <view>备</view> |
| 69 | <view>注</view> | 69 | <view>注</view> |
| 70 | </view> | 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 | </textarea> | 74 | </textarea> |
| 75 | </block> | 75 | </block> |
| 76 | <block wx:else> | 76 | <block wx:else> |
| 77 | - <view class="textarea">填写备注 | 77 | + <view class="textarea color" bindtap="check_text">{{remarks==''?'填写备注':remarks}} |
| 78 | </view> | 78 | </view> |
| 79 | </block> | 79 | </block> |
| 80 | </view> | 80 | </view> |
| @@ -83,13 +83,15 @@ | @@ -83,13 +83,15 @@ | ||
| 83 | <view>注:剩余可预约人数{{tment_count}}人</view> | 83 | <view>注:剩余可预约人数{{tment_count}}人</view> |
| 84 | </view> | 84 | </view> |
| 85 | 85 | ||
| 86 | - <view class="submitMax flex-space-between fs30"> | 86 | + <view class="submitMax flex-space-between fs32"> |
| 87 | <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> | 87 | <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> |
| 88 | <view>我的预约</view> | 88 | <view>我的预约</view> |
| 89 | </navigator> | 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 | </view> | 95 | </view> |
| 94 | <block wx:if="{{is_success}}"> | 96 | <block wx:if="{{is_success}}"> |
| 95 | <view class="subSuccess fs36"> | 97 | <view class="subSuccess fs36"> |
| @@ -108,7 +110,7 @@ | @@ -108,7 +110,7 @@ | ||
| 108 | <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon> | 110 | <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon> |
| 109 | </view> | 111 | </view> |
| 110 | <view class="searchbar flex-vertical-between storeListpadd"> | 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 | <view class="search flex-center" bindtap="search_store"> | 114 | <view class="search flex-center" bindtap="search_store"> |
| 113 | <view class="fs28">搜索</view> | 115 | <view class="fs28">搜索</view> |
| 114 | </view> | 116 | </view> |
pages/user/my_service/appment_main.wxss
| @@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
| 43 | left: 110rpx; | 43 | left: 110rpx; |
| 44 | width: 540rpx; | 44 | width: 540rpx; |
| 45 | height: 315rpx; | 45 | height: 315rpx; |
| 46 | - background-color: rgb(155,155,155); | 46 | + background-color: rgb(155, 155, 155); |
| 47 | text-align: center; | 47 | text-align: center; |
| 48 | border-radius: 20rpx; | 48 | border-radius: 20rpx; |
| 49 | color: rgb(255, 255, 255); | 49 | color: rgb(255, 255, 255); |
| @@ -59,10 +59,16 @@ | @@ -59,10 +59,16 @@ | ||
| 59 | 59 | ||
| 60 | .appment, .sub_appment { | 60 | .appment, .sub_appment { |
| 61 | width: 270rpx; | 61 | width: 270rpx; |
| 62 | - height: 55rpx; | 62 | + height: 60rpx; |
| 63 | + line-height: 55rpx; | ||
| 63 | border-radius: 40rpx; | 64 | border-radius: 40rpx; |
| 64 | } | 65 | } |
| 65 | 66 | ||
| 67 | +button { | ||
| 68 | + height: 100%; | ||
| 69 | + background-color: rgb(214, 1, 33); | ||
| 70 | +} | ||
| 71 | + | ||
| 66 | .appment { | 72 | .appment { |
| 67 | background-color: rgb(238, 238, 238); | 73 | background-color: rgb(238, 238, 238); |
| 68 | } | 74 | } |
| @@ -73,7 +79,7 @@ | @@ -73,7 +79,7 @@ | ||
| 73 | } | 79 | } |
| 74 | 80 | ||
| 75 | .head { | 81 | .head { |
| 76 | - width: 112rpx; | 82 | + width: 122rpx; |
| 77 | margin-right: 40rpx; | 83 | margin-right: 40rpx; |
| 78 | height: 50rpx; | 84 | height: 50rpx; |
| 79 | line-height: 50rpx; | 85 | line-height: 50rpx; |
| @@ -88,6 +94,7 @@ | @@ -88,6 +94,7 @@ | ||
| 88 | padding-right: 15rpx; | 94 | padding-right: 15rpx; |
| 89 | padding-top: 15rpx; | 95 | padding-top: 15rpx; |
| 90 | padding-bottom: 15rpx; | 96 | padding-bottom: 15rpx; |
| 97 | + color: rgb(172, 172, 172); | ||
| 91 | } | 98 | } |
| 92 | 99 | ||
| 93 | .mabot { | 100 | .mabot { |
| @@ -96,8 +103,8 @@ | @@ -96,8 +103,8 @@ | ||
| 96 | 103 | ||
| 97 | .select { | 104 | .select { |
| 98 | width: 420rpx; | 105 | width: 420rpx; |
| 99 | - height: 50rpx; | ||
| 100 | - line-height: 50rpx; | 106 | + height: 55rpx; |
| 107 | + line-height: 55rpx; | ||
| 101 | background-color: rgb(238, 238, 238); | 108 | background-color: rgb(238, 238, 238); |
| 102 | border-radius: 10rpx; | 109 | border-radius: 10rpx; |
| 103 | padding-left: 40rpx; | 110 | padding-left: 40rpx; |
pages/user/my_service/beauty_deta.js
| @@ -29,6 +29,7 @@ Page({ | @@ -29,6 +29,7 @@ Page({ | ||
| 29 | modify: 0, //是否是修改时间 | 29 | modify: 0, //是否是修改时间 |
| 30 | iscos: 0, //是否是从美容师列表过来的 | 30 | iscos: 0, //是否是从美容师列表过来的 |
| 31 | hours: "", //获取当前时分秒 | 31 | hours: "", //获取当前时分秒 |
| 32 | + projectId: "", //项目id | ||
| 32 | }, | 33 | }, |
| 33 | 34 | ||
| 34 | /** | 35 | /** |
| @@ -38,13 +39,13 @@ Page({ | @@ -38,13 +39,13 @@ Page({ | ||
| 38 | var th = this; | 39 | var th = this; |
| 39 | var myDate = new Date(); | 40 | var myDate = new Date(); |
| 40 | var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) | 41 | var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) |
| 41 | - console.log(date > "09:00" + "和哦哦哦哦的"); | ||
| 42 | var beautician_id = options.BeauticianID; | 42 | var beautician_id = options.BeauticianID; |
| 43 | th.setData({ | 43 | th.setData({ |
| 44 | beautician_id: beautician_id, | 44 | beautician_id: beautician_id, |
| 45 | itemId: options.itemId, | 45 | itemId: options.itemId, |
| 46 | modify: options.modify, | 46 | modify: options.modify, |
| 47 | - hours: date | 47 | + hours: date, |
| 48 | + projectId: options.projectId | ||
| 48 | }) | 49 | }) |
| 49 | if (options.url != undefined) { | 50 | if (options.url != undefined) { |
| 50 | th.setData({ | 51 | th.setData({ |
| @@ -208,10 +209,12 @@ Page({ | @@ -208,10 +209,12 @@ Page({ | ||
| 208 | query_aweek: function() { | 209 | query_aweek: function() { |
| 209 | var th = this; | 210 | var th = this; |
| 210 | var beautician_id = th.data.beautician_id; //美容师id | 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 | var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址 | 214 | var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址 |
| 213 | getApp().request.promiseGet(url, { | 215 | getApp().request.promiseGet(url, { |
| 214 | data: { | 216 | data: { |
| 217 | + projectId: projectId, | ||
| 215 | beauticianId: beautician_id, | 218 | beauticianId: beautician_id, |
| 216 | serviceId: itemId, | 219 | serviceId: itemId, |
| 217 | storeId: a.stoid, | 220 | storeId: a.stoid, |
| @@ -227,12 +230,7 @@ Page({ | @@ -227,12 +230,7 @@ Page({ | ||
| 227 | }; | 230 | }; |
| 228 | arr.push(em); | 231 | arr.push(em); |
| 229 | } | 232 | } |
| 230 | - | ||
| 231 | arr.sort(th.sort_arr); | 233 | arr.sort(th.sort_arr); |
| 232 | - | ||
| 233 | - | ||
| 234 | - | ||
| 235 | - | ||
| 236 | var weeks = ["今天", "明天", "后天"]; | 234 | var weeks = ["今天", "明天", "后天"]; |
| 237 | var week = ""; | 235 | var week = ""; |
| 238 | for (var i = 3; i < arr.length; i++) { | 236 | for (var i = 3; i < arr.length; i++) { |
| @@ -262,11 +260,15 @@ Page({ | @@ -262,11 +260,15 @@ Page({ | ||
| 262 | 260 | ||
| 263 | query_date: function() { | 261 | query_date: function() { |
| 264 | var th = this; | 262 | var th = this; |
| 263 | + var projectId = th.data.projectId; | ||
| 265 | var date_id = th.data.date_id; //日期下标 | 264 | var date_id = th.data.date_id; //日期下标 |
| 266 | var SeekTime = th.data.aweeks[date_id].time; | 265 | var SeekTime = th.data.aweeks[date_id].time; |
| 266 | + var val = th.data.aweeks[date_id].val; | ||
| 267 | + if(val!=""){ | ||
| 267 | var url = "/api/weshop/marketing/reservation/staff/time/list"; | 268 | var url = "/api/weshop/marketing/reservation/staff/time/list"; |
| 268 | getApp().request.promiseGet(url, { | 269 | getApp().request.promiseGet(url, { |
| 269 | data: { | 270 | data: { |
| 271 | + projectId: projectId, | ||
| 270 | beauticianId: th.data.beautician_id, | 272 | beauticianId: th.data.beautician_id, |
| 271 | serviceId: th.data.itemId, | 273 | serviceId: th.data.itemId, |
| 272 | seekTime: SeekTime, | 274 | seekTime: SeekTime, |
| @@ -296,6 +298,7 @@ Page({ | @@ -296,6 +298,7 @@ Page({ | ||
| 296 | getApp().my_warnning(res.data.msg, 0, th); | 298 | getApp().my_warnning(res.data.msg, 0, th); |
| 297 | } | 299 | } |
| 298 | }) | 300 | }) |
| 301 | + } | ||
| 299 | }, | 302 | }, |
| 300 | //更改预约时间 | 303 | //更改预约时间 |
| 301 | change_time: function() { | 304 | change_time: function() { |
pages/user/my_service/beauty_deta.wxml
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | </view> | 28 | </view> |
| 29 | </block> | 29 | </block> |
| 30 | <block wx:else> | 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 | <view>{{weeks[index]}}(约满)</view> | 32 | <view>{{weeks[index]}}(约满)</view> |
| 33 | <view>{{item.time}}</view> | 33 | <view>{{item.time}}</view> |
| 34 | </view> | 34 | </view> |
pages/user/my_service/cosmetology_list.js
| @@ -19,6 +19,7 @@ Page({ | @@ -19,6 +19,7 @@ Page({ | ||
| 19 | ismore: 0, //是否加载完毕 | 19 | ismore: 0, //是否加载完毕 |
| 20 | itemId: 0, //服务id, | 20 | itemId: 0, //服务id, |
| 21 | storageId: 0, //线下门店id | 21 | storageId: 0, //线下门店id |
| 22 | + projectId:"",//项目id | ||
| 22 | }, | 23 | }, |
| 23 | onReachBottom: function() { | 24 | onReachBottom: function() { |
| 24 | var th = this; | 25 | var th = this; |
| @@ -57,6 +58,7 @@ Page({ | @@ -57,6 +58,7 @@ Page({ | ||
| 57 | total: res.data.data.total, | 58 | total: res.data.data.total, |
| 58 | ismore: ismore, | 59 | ismore: ismore, |
| 59 | is_service_read: 1, | 60 | is_service_read: 1, |
| 61 | + is_cosmetology_read:1 | ||
| 60 | }), wx.stopPullDownRefresh(); //停止下拉刷新 | 62 | }), wx.stopPullDownRefresh(); //停止下拉刷新 |
| 61 | } else { | 63 | } else { |
| 62 | getApp().my_warnning(res.data.msg, 0, th); | 64 | getApp().my_warnning(res.data.msg, 0, th); |
| @@ -82,6 +84,7 @@ Page({ | @@ -82,6 +84,7 @@ Page({ | ||
| 82 | onLoad: function(options) { | 84 | onLoad: function(options) { |
| 83 | var th = this; | 85 | var th = this; |
| 84 | th.setData({ | 86 | th.setData({ |
| 87 | + projectId: options.projectId, | ||
| 85 | itemId: options.itemId, | 88 | itemId: options.itemId, |
| 86 | storageId: options.storageId | 89 | storageId: options.storageId |
| 87 | }) | 90 | }) |
pages/user/my_service/i_service.wxml
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | <view>立即使用</view> | 49 | <view>立即使用</view> |
| 50 | </view> | 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 | <view>预约</view> | 53 | <view>预约</view> |
| 54 | </navigator> | 54 | </navigator> |
| 55 | </view> | 55 | </view> |
pages/user/my_service/tment_details.wxml
| @@ -99,7 +99,7 @@ | @@ -99,7 +99,7 @@ | ||
| 99 | <view class="yellow-b">我的服务</view> | 99 | <view class="yellow-b">我的服务</view> |
| 100 | </navigator> | 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 | <view>更改时间</view> | 103 | <view>更改时间</view> |
| 104 | </navigator> | 104 | </navigator> |
| 105 | <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}"> | 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,9 +147,11 @@ Page({ | ||
| 147 | th.setData({ | 147 | th.setData({ |
| 148 | sub_evaluate: 1 | 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 | } else { | 155 | } else { |
| 154 | getApp().my_warnning(res.data.msg, 0, th); | 156 | getApp().my_warnning(res.data.msg, 0, th); |
| 155 | } | 157 | } |
pages/user/my_service/tment_eval.wxml
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image> | 61 | <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image> |
| 62 | </view> | 62 | </view> |
| 63 | <view class="fs36 flex-center"> | 63 | <view class="fs36 flex-center"> |
| 64 | - <view>评论成功</view> | 64 | + <view>评价成功</view> |
| 65 | </view> | 65 | </view> |
| 66 | </view> | 66 | </view> |
| 67 | </block> | 67 | </block> |
pages/user/my_service/tment_order_list.js
| @@ -84,6 +84,9 @@ Page({ | @@ -84,6 +84,9 @@ Page({ | ||
| 84 | wx.showLoading({ | 84 | wx.showLoading({ |
| 85 | title: '加载中', | 85 | title: '加载中', |
| 86 | }) | 86 | }) |
| 87 | + th.setData({ | ||
| 88 | + is_read:0 | ||
| 89 | + }) | ||
| 87 | getApp().request.promiseGet(url, { | 90 | getApp().request.promiseGet(url, { |
| 88 | data: { | 91 | data: { |
| 89 | storeId: a.stoid, | 92 | storeId: a.stoid, |
| @@ -177,7 +180,7 @@ Page({ | @@ -177,7 +180,7 @@ Page({ | ||
| 177 | onShow: function() { | 180 | onShow: function() { |
| 178 | var th = this; | 181 | var th = this; |
| 179 | th.setData({ | 182 | th.setData({ |
| 180 | - is_read: 0 | 183 | + is_read:0 |
| 181 | }) | 184 | }) |
| 182 | th.query_orderList(); | 185 | th.query_orderList(); |
| 183 | }, | 186 | }, |
pages/user/my_service/tment_order_list.wxml
| @@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
| 63 | <block wx:else> | 63 | <block wx:else> |
| 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">更改时间</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> | 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> | 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 | </view> | 69 | </view> |