Commit d24847bcceaaa763c53437ddbd06f51e7f69980d
1 parent
e662d353
修改卡项列表、历史预约、服务项目、预约服务
Showing
11 changed files
with
55 additions
and
25 deletions
components/diy_nav/diy_nav.js
packageA/pages/cardList/cardList.js
packageA/pages/cardList/cardList.wxml
1 | 1 | <view class="page"> |
2 | 2 | <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic"> |
3 | - <swiper-item wx:for="{{banner}}"><image src="{{item.ad_code}}" class="swiper-img"/></swiper-item> | |
3 | + <swiper-item wx:for="{{banner}}"><image src="{{item.ad_code ? item.ad_code : (imghost + default_img)}}" class="swiper-img"/></swiper-item> | |
4 | 4 | <!-- <swiper-item>234</swiper-item> |
5 | 5 | <swiper-item>345</swiper-item> --> |
6 | 6 | </swiper> |
... | ... | @@ -26,6 +26,6 @@ |
26 | 26 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> |
27 | 27 | </view> |
28 | 28 | <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> --> |
29 | - <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view> | |
29 | + <view class="noMore">- 已经到底了 -</view> | |
30 | 30 | </scroll-view> |
31 | 31 | </view> | ... | ... |
packageA/pages/cardList/cardList.wxss
packageA/pages/my_service/appment_main.js
... | ... | @@ -96,7 +96,7 @@ Page({ |
96 | 96 | var buyType = th.data.buyType; //服务项目类型 |
97 | 97 | var storeId = a.stoid; //商家id |
98 | 98 | var storageId = th.data.storageId; //门店id |
99 | - var userId = d.user_id; //用户id | |
99 | + var userId = th.data.options.userid; //用户id | |
100 | 100 | var remarks = th.data.remarks; //用户备注 |
101 | 101 | var project_id = th.data.project_id; //项目id |
102 | 102 | var validay = th.data.validay; |
... | ... | @@ -153,7 +153,7 @@ Page({ |
153 | 153 | "page": "/pages/user/my_service/tment_details?number=" + number, |
154 | 154 | "storeId": a.stoid, |
155 | 155 | "typeId": "1011", |
156 | - "userId": d.user_id | |
156 | + "userId": th.data.options.userid | |
157 | 157 | }; |
158 | 158 | var data = JSON.stringify(json); |
159 | 159 | //调用发送预约成功模版接口 |
... | ... | @@ -373,7 +373,7 @@ Page({ |
373 | 373 | key_word = key_word.replace(/\s+/g, ""); |
374 | 374 | getApp().request.promiseGet(url, { |
375 | 375 | data: { |
376 | - userId:getApp().globalData.user_id, | |
376 | + userId: th.data.options.userid, | |
377 | 377 | storeId: a.stoid, |
378 | 378 | serviceId: itemId, |
379 | 379 | latitude: th.data.lat, |
... | ... | @@ -428,7 +428,7 @@ Page({ |
428 | 428 | getApp().request.promiseGet(url, { |
429 | 429 | data: { |
430 | 430 | storeId: a.stoid, |
431 | - userId: d.user_id, | |
431 | + userId: th.data.options.userid, | |
432 | 432 | serviceId: itemid, |
433 | 433 | storageId: storageId |
434 | 434 | } |
... | ... | @@ -527,6 +527,7 @@ Page({ |
527 | 527 | onLoad: function(options) { |
528 | 528 | var th = this; |
529 | 529 | th.setData({ |
530 | + options, | |
530 | 531 | itemId: options.service_id, |
531 | 532 | buyType: options.BuyType, |
532 | 533 | project_id: options.ProjectID, |
... | ... | @@ -564,16 +565,18 @@ Page({ |
564 | 565 | // 获取当前默认导购信息及归属门店信息 |
565 | 566 | getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { |
566 | 567 | data: { |
567 | - store_id: 1, | |
568 | - guide_id: 73, | |
569 | - UserCode: '01', | |
568 | + store_id: a.stoid, | |
569 | + guide_id: e.globalData.guide_id, | |
570 | + UserCode: th.data.options.usercode, | |
570 | 571 | } |
571 | 572 | }).then(res => { |
572 | - console.log('res==>', res.data.data); | |
573 | - th.setData({ | |
574 | - store_name: res.data.data.StorageName, | |
575 | - beautician_name: res.data.data.StaffName, | |
576 | - }); | |
573 | + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode); | |
574 | + if(res.data.data.Tech) { | |
575 | + th.setData({ | |
576 | + store_name: res.data.data.StorageName, | |
577 | + beautician_name: res.data.data.StaffName, | |
578 | + }); | |
579 | + } | |
577 | 580 | }); |
578 | 581 | |
579 | 582 | }, |
... | ... | @@ -630,7 +633,7 @@ Page({ |
630 | 633 | getApp().request.promiseGet(url, { |
631 | 634 | data: { |
632 | 635 | storeId: a.stoid, |
633 | - userId: d.user_id, | |
636 | + userId: th.data.options.userid, | |
634 | 637 | projectId: project_id |
635 | 638 | } |
636 | 639 | }).then(res => { | ... | ... |
packageA/pages/my_service/hist_service.js
packageA/pages/my_service/i_service.js
packageA/pages/my_service/i_service.wxml
1 | 1 | <!-- 背景图片 --> |
2 | 2 | <view catchtap="close"> |
3 | 3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> |
4 | - <navigator class="History fs26" url="/packageA/pages/service_record/service_record" style="left:10px;right:auto;" data-userid="{{options.UserId}}">服务记录</navigator> | |
5 | - <navigator class="History fs26" url="/packageA/pages/my_service/hist_service" data-userid="{{options.UserId}}">历史预约</navigator> | |
4 | + <navigator class="History fs26" url="/packageA/pages/service_record/service_record?userid={{options.UserId}}" style="left:10px;right:auto;">服务记录</navigator> | |
5 | + <navigator class="History fs26" url="/packageA/pages/my_service/hist_service?userid={{options.UserId}}">历史预约</navigator> | |
6 | 6 | </view> |
7 | 7 | |
8 | 8 | <!-- 预约内容 --> |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> |
51 | 51 | <view>帮你预约</view> |
52 | 52 | </view> --> |
53 | - <view class="flex-level btn" data-url="/packageA/pages/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 class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}&userid={{options.UserId}}&usercode={{options.UserCode}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> | |
54 | 54 | <view>帮你预约</view> |
55 | 55 | </view> |
56 | 56 | </view> | ... | ... |
packageA/pages/service_record/service_record.js
... | ... | @@ -28,6 +28,7 @@ Page({ |
28 | 28 | }, |
29 | 29 | |
30 | 30 | onShow: function() { |
31 | + reqData.url = '/api/weshop/marketing/servicewrite/page'; | |
31 | 32 | reqData.data = { |
32 | 33 | storeId: app.globalData.setting.stoid, |
33 | 34 | }; |
... | ... | @@ -39,8 +40,6 @@ Page({ |
39 | 40 | reqData.data.userId = app.globalData.user_id; |
40 | 41 | this.isLogin() |
41 | 42 | .then(function(data) { |
42 | - reqData.url = '/api/weshop/marketing/servicewrite/page'; | |
43 | - | |
44 | 43 | _this.getData(true, reqData.url, reqData.data); |
45 | 44 | }); |
46 | 45 | }; | ... | ... |
packageA/pages/shop_details/shop_details.js
0 → 100644
1 | +Page({ | |
2 | + data: { | |
3 | + shop: null, | |
4 | + }, | |
5 | + | |
6 | + onLoad(options) { | |
7 | + let shop = JSON.parse(decodeURIComponent(options.shop)) | |
8 | + this.setData({ | |
9 | + shop: shop, | |
10 | + }); | |
11 | + }, | |
12 | + | |
13 | + // 监听拨打电话 | |
14 | + onPhone() { | |
15 | + wx.makePhoneCall({ | |
16 | + phoneNumber: this.data.shop.pickup_phone, | |
17 | + }) | |
18 | + }, | |
19 | + | |
20 | +}) | |
0 | 21 | \ No newline at end of file | ... | ... |
pages/user/my_service/i_service.wxml
... | ... | @@ -65,6 +65,7 @@ |
65 | 65 | <view class="end fs26 xc-black">到底了</view> |
66 | 66 | <view class="Line"></view> |
67 | 67 | </view> |
68 | + <!-- <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">选择更多服务卡项,</view> --> | |
68 | 69 | </view> |
69 | 70 | <!-- 无服务项目 --> |
70 | 71 | <view wx:if="{{service_List.length<1 && is_service_read}}"> |
... | ... | @@ -75,7 +76,8 @@ |
75 | 76 | <view class="flex-level"> |
76 | 77 | <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image> |
77 | 78 | </view> |
78 | - <view class="flex-level fs30 xc-ash">暂无服务项目</view> | |
79 | + <!-- <view class="flex-level fs30 xc-ash">暂无服务项目</view> --> | |
80 | + <view class="flex-level fs30 xc-ash">暂无服务卡项,<text class="ctb" data-url="/packageA/pages/cardList/cardList" bindtap="goto">立即购买!</text></view> | |
79 | 81 | <view class="flex-level"> |
80 | 82 | <navigator data-url="/pages/user/index/index" bindtap="goto"> |
81 | 83 | <view class="flex-center fs28 white">回到首页</view> | ... | ... |