-
Status changed to merged
-
mentioned in commit 2742d35c556e9ef74ad35b64203c29e6e5bf1938
Showing
23 changed files
components/diy_nav/diy_nav.js
@@ -46,7 +46,8 @@ Component({ | @@ -46,7 +46,8 @@ Component({ | ||
46 | //智能跳转 | 46 | //智能跳转 |
47 | go_url:function (e) { | 47 | go_url:function (e) { |
48 | var url=e.currentTarget.dataset.url; | 48 | var url=e.currentTarget.dataset.url; |
49 | - getApp().goto(url); | 49 | + console.log('url==>', url); |
50 | + // getApp().goto(url); | ||
50 | } | 51 | } |
51 | } | 52 | } |
52 | }) | 53 | }) |
53 | \ No newline at end of file | 54 | \ No newline at end of file |
packageA/pages/cardList/cardList.js
packageA/pages/cardList/cardList.wxml
1 | <view class="page"> | 1 | <view class="page"> |
2 | <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic"> | 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 | <!-- <swiper-item>234</swiper-item> | 4 | <!-- <swiper-item>234</swiper-item> |
5 | <swiper-item>345</swiper-item> --> | 5 | <swiper-item>345</swiper-item> --> |
6 | </swiper> | 6 | </swiper> |
@@ -26,6 +26,6 @@ | @@ -26,6 +26,6 @@ | ||
26 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> | 26 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> |
27 | </view> | 27 | </view> |
28 | <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> --> | 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 | </scroll-view> | 30 | </scroll-view> |
31 | </view> | 31 | </view> |
packageA/pages/cardList/cardList.wxss
packageA/pages/my_service/appment_main.js
@@ -34,7 +34,7 @@ Page({ | @@ -34,7 +34,7 @@ Page({ | ||
34 | is_success: 0, //是否提交成功 | 34 | is_success: 0, //是否提交成功 |
35 | remarks: "", //备注 | 35 | remarks: "", //备注 |
36 | storageId: "", //线下门店id | 36 | storageId: "", //线下门店id |
37 | - url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来 | 37 | + url: "/packageA/pages/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来 |
38 | buyType: "", //项目类型 | 38 | buyType: "", //项目类型 |
39 | time: "", //选择预约时间 | 39 | time: "", //选择预约时间 |
40 | tment_count: "", //可预约人数 | 40 | tment_count: "", //可预约人数 |
@@ -96,7 +96,7 @@ Page({ | @@ -96,7 +96,7 @@ Page({ | ||
96 | var buyType = th.data.buyType; //服务项目类型 | 96 | var buyType = th.data.buyType; //服务项目类型 |
97 | var storeId = a.stoid; //商家id | 97 | var storeId = a.stoid; //商家id |
98 | var storageId = th.data.storageId; //门店id | 98 | var storageId = th.data.storageId; //门店id |
99 | - var userId = d.user_id; //用户id | 99 | + var userId = th.data.options.userid; //用户id |
100 | var remarks = th.data.remarks; //用户备注 | 100 | var remarks = th.data.remarks; //用户备注 |
101 | var project_id = th.data.project_id; //项目id | 101 | var project_id = th.data.project_id; //项目id |
102 | var validay = th.data.validay; | 102 | var validay = th.data.validay; |
@@ -150,10 +150,10 @@ Page({ | @@ -150,10 +150,10 @@ Page({ | ||
150 | "keyword": res.data.data.Address | 150 | "keyword": res.data.data.Address |
151 | } | 151 | } |
152 | ], | 152 | ], |
153 | - "page": "/pages/user/my_service/tment_details?number=" + number, | 153 | + "page": "/packageA/pages/my_service/tment_details?number=" + number, |
154 | "storeId": a.stoid, | 154 | "storeId": a.stoid, |
155 | "typeId": "1011", | 155 | "typeId": "1011", |
156 | - "userId": d.user_id | 156 | + "userId": th.data.options.userid |
157 | }; | 157 | }; |
158 | var data = JSON.stringify(json); | 158 | var data = JSON.stringify(json); |
159 | //调用发送预约成功模版接口 | 159 | //调用发送预约成功模版接口 |
@@ -168,7 +168,7 @@ Page({ | @@ -168,7 +168,7 @@ Page({ | ||
168 | }) | 168 | }) |
169 | setTimeout(function() { | 169 | setTimeout(function() { |
170 | wx.redirectTo({ | 170 | wx.redirectTo({ |
171 | - url: "/pages/user/my_service/tment_details?number=" + number | 171 | + url: "/packageA/pages/my_service/tment_details?number=" + number |
172 | }); | 172 | }); |
173 | }, 1000); | 173 | }, 1000); |
174 | } else { | 174 | } else { |
@@ -373,7 +373,7 @@ Page({ | @@ -373,7 +373,7 @@ Page({ | ||
373 | key_word = key_word.replace(/\s+/g, ""); | 373 | key_word = key_word.replace(/\s+/g, ""); |
374 | getApp().request.promiseGet(url, { | 374 | getApp().request.promiseGet(url, { |
375 | data: { | 375 | data: { |
376 | - userId:getApp().globalData.user_id, | 376 | + userId: th.data.options.userid, |
377 | storeId: a.stoid, | 377 | storeId: a.stoid, |
378 | serviceId: itemId, | 378 | serviceId: itemId, |
379 | latitude: th.data.lat, | 379 | latitude: th.data.lat, |
@@ -413,7 +413,8 @@ Page({ | @@ -413,7 +413,8 @@ Page({ | ||
413 | var th = this; | 413 | var th = this; |
414 | th.setData({ | 414 | th.setData({ |
415 | is_textea: 0 | 415 | is_textea: 0 |
416 | - }) | 416 | + }); |
417 | + | ||
417 | if (th.data.store_name == "") { | 418 | if (th.data.store_name == "") { |
418 | getApp().my_warnning("请选择服务门店", 0, th); | 419 | getApp().my_warnning("请选择服务门店", 0, th); |
419 | th.settime(); | 420 | th.settime(); |
@@ -428,7 +429,7 @@ Page({ | @@ -428,7 +429,7 @@ Page({ | ||
428 | getApp().request.promiseGet(url, { | 429 | getApp().request.promiseGet(url, { |
429 | data: { | 430 | data: { |
430 | storeId: a.stoid, | 431 | storeId: a.stoid, |
431 | - userId: d.user_id, | 432 | + userId: th.data.options.userid, |
432 | serviceId: itemid, | 433 | serviceId: itemid, |
433 | storageId: storageId | 434 | storageId: storageId |
434 | } | 435 | } |
@@ -459,6 +460,7 @@ Page({ | @@ -459,6 +460,7 @@ Page({ | ||
459 | }) | 460 | }) |
460 | } | 461 | } |
461 | }, | 462 | }, |
463 | + | ||
462 | choice_beautician: function(e) { | 464 | choice_beautician: function(e) { |
463 | var th = this; | 465 | var th = this; |
464 | var bea_index = e.currentTarget.dataset.baaindex; | 466 | var bea_index = e.currentTarget.dataset.baaindex; |
@@ -515,8 +517,10 @@ Page({ | @@ -515,8 +517,10 @@ Page({ | ||
515 | th.setData({ | 517 | th.setData({ |
516 | is_textea: 1 | 518 | is_textea: 1 |
517 | }) | 519 | }) |
520 | + console.log('optionsxxx===>', this.data.options); | ||
521 | + // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); | ||
518 | wx.navigateTo({ | 522 | wx.navigateTo({ |
519 | - url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id | 523 | + url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id |
520 | }); | 524 | }); |
521 | 525 | ||
522 | } | 526 | } |
@@ -527,6 +531,7 @@ Page({ | @@ -527,6 +531,7 @@ Page({ | ||
527 | onLoad: function(options) { | 531 | onLoad: function(options) { |
528 | var th = this; | 532 | var th = this; |
529 | th.setData({ | 533 | th.setData({ |
534 | + options, | ||
530 | itemId: options.service_id, | 535 | itemId: options.service_id, |
531 | buyType: options.BuyType, | 536 | buyType: options.BuyType, |
532 | project_id: options.ProjectID, | 537 | project_id: options.ProjectID, |
@@ -562,19 +567,34 @@ Page({ | @@ -562,19 +567,34 @@ Page({ | ||
562 | }); | 567 | }); |
563 | 568 | ||
564 | // 获取当前默认导购信息及归属门店信息 | 569 | // 获取当前默认导购信息及归属门店信息 |
565 | - getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { | ||
566 | - data: { | ||
567 | - store_id: 1, | ||
568 | - guide_id: 73, | ||
569 | - UserCode: '01', | ||
570 | - } | ||
571 | - }).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, | 570 | + if(options.firstleader) { |
571 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+a.stoid+"/"+options.firstleader,{}).then(res=>{ | ||
572 | + if(res.data.code==0){ | ||
573 | + getApp().globalData.guide_id=res.data.data.id; | ||
574 | + | ||
575 | + getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { | ||
576 | + data: { | ||
577 | + store_id: a.stoid, | ||
578 | + guide_id: e.globalData.guide_id, | ||
579 | + UserCode: th.data.options.usercode, | ||
580 | + } | ||
581 | + }).then(res => { | ||
582 | + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode); | ||
583 | + if(res.data.data.Tech) { | ||
584 | + th.setData({ | ||
585 | + store_name: res.data.data.StorageName, | ||
586 | + beautician_name: res.data.data.StaffName, | ||
587 | + beauticianID: res.data.data.StaffId, | ||
588 | + StorageId: res.data.data.StorageId, | ||
589 | + }); | ||
590 | + } | ||
591 | + }); | ||
592 | + | ||
593 | + | ||
594 | + }; | ||
576 | }); | 595 | }); |
577 | - }); | 596 | + }; |
597 | + | ||
578 | 598 | ||
579 | }, | 599 | }, |
580 | //查询剩下可预约人数 | 600 | //查询剩下可预约人数 |
@@ -630,7 +650,7 @@ Page({ | @@ -630,7 +650,7 @@ Page({ | ||
630 | getApp().request.promiseGet(url, { | 650 | getApp().request.promiseGet(url, { |
631 | data: { | 651 | data: { |
632 | storeId: a.stoid, | 652 | storeId: a.stoid, |
633 | - userId: d.user_id, | 653 | + userId: th.data.options.userid, |
634 | projectId: project_id | 654 | projectId: project_id |
635 | } | 655 | } |
636 | }).then(res => { | 656 | }).then(res => { |
@@ -645,9 +665,9 @@ Page({ | @@ -645,9 +665,9 @@ Page({ | ||
645 | }) | 665 | }) |
646 | }, | 666 | }, |
647 | //关闭导航 | 667 | //关闭导航 |
648 | - close: function() { | ||
649 | - var th = this; | ||
650 | - var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
651 | - nav_b.close_box(); | ||
652 | - } | 668 | + // close: function() { |
669 | + // var th = this; | ||
670 | + // var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
671 | + // nav_b.close_box(); | ||
672 | + // } | ||
653 | }) | 673 | }) |
654 | \ No newline at end of file | 674 | \ No newline at end of file |
packageA/pages/my_service/appment_main.wxml
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | </view> | 55 | </view> |
56 | 56 | ||
57 | <!-- 选择时间 --> | 57 | <!-- 选择时间 --> |
58 | - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto"> | 58 | + <view class="flex-vertical-between fs26 select" data-url="/packageA/pages/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto"> |
59 | <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view> | 59 | <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view> |
60 | <view class="angle angler">∟</view> | 60 | <view class="angle angler">∟</view> |
61 | </view> | 61 | </view> |
@@ -147,4 +147,4 @@ | @@ -147,4 +147,4 @@ | ||
147 | <view wx:if="{{store}}" class="disgraceful" bindtap="onclickstore"></view> | 147 | <view wx:if="{{store}}" class="disgraceful" bindtap="onclickstore"></view> |
148 | <warn id="warn"></warn> | 148 | <warn id="warn"></warn> |
149 | <!-- 制作一个圆球导航 --> | 149 | <!-- 制作一个圆球导航 --> |
150 | -<nav_b id="nav_b"></nav_b> | ||
151 | \ No newline at end of file | 150 | \ No newline at end of file |
151 | +<!-- <nav_b id="nav_b"></nav_b> --> | ||
152 | \ No newline at end of file | 152 | \ No newline at end of file |
packageA/pages/my_service/beauty_deta.js
@@ -46,13 +46,16 @@ Page({ | @@ -46,13 +46,16 @@ Page({ | ||
46 | 46 | ||
47 | 47 | ||
48 | th.setData({ | 48 | th.setData({ |
49 | + options, | ||
50 | + storeid: options.storeid, | ||
49 | beautician_id: beautician_id, | 51 | beautician_id: beautician_id, |
50 | itemId: options.itemId, | 52 | itemId: options.itemId, |
51 | modify: options.modify, | 53 | modify: options.modify, |
52 | hours: hours, | 54 | hours: hours, |
53 | projectId: options.projectId, | 55 | projectId: options.projectId, |
54 | - storageId:storageId | ||
55 | - }) | 56 | + storageId: storageId, |
57 | + }); | ||
58 | + | ||
56 | if (options.url != undefined) { | 59 | if (options.url != undefined) { |
57 | th.setData({ | 60 | th.setData({ |
58 | url: options.url | 61 | url: options.url |
@@ -162,7 +165,7 @@ Page({ | @@ -162,7 +165,7 @@ Page({ | ||
162 | "number": th.data.number, | 165 | "number": th.data.number, |
163 | "remark": "更改时间", | 166 | "remark": "更改时间", |
164 | "states": 0, | 167 | "states": 0, |
165 | - "storeId": a.stoid | 168 | + "storeId": a.stoid, |
166 | }; | 169 | }; |
167 | var data = JSON.stringify(json); | 170 | var data = JSON.stringify(json); |
168 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | 171 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 |
@@ -198,7 +201,8 @@ Page({ | @@ -198,7 +201,8 @@ Page({ | ||
198 | //直接给上一个页面赋值 | 201 | //直接给上一个页面赋值 |
199 | time: time, | 202 | time: time, |
200 | beautician_name: th.data.StaffName, | 203 | beautician_name: th.data.StaffName, |
201 | - beauticianID: th.data.beautician_id | 204 | + beauticianID: th.data.beautician_id, |
205 | + storageId: th.data.storageId, | ||
202 | }); | 206 | }); |
203 | wx.navigateBack({ | 207 | wx.navigateBack({ |
204 | //返回 | 208 | //返回 |
@@ -208,7 +212,8 @@ Page({ | @@ -208,7 +212,8 @@ Page({ | ||
208 | var prevPage = pages[pages.length - 2]; //上一页面 | 212 | var prevPage = pages[pages.length - 2]; //上一页面 |
209 | prevPage.setData({ | 213 | prevPage.setData({ |
210 | //直接给上一个页面赋值 | 214 | //直接给上一个页面赋值 |
211 | - time: time | 215 | + time: time, |
216 | + storageId: th.data.storageId, | ||
212 | }); | 217 | }); |
213 | wx.navigateBack({ | 218 | wx.navigateBack({ |
214 | //返回 | 219 | //返回 |
@@ -245,7 +250,7 @@ Page({ | @@ -245,7 +250,7 @@ Page({ | ||
245 | beauticianId: beautician_id, | 250 | beauticianId: beautician_id, |
246 | serviceId: itemId, | 251 | serviceId: itemId, |
247 | storeId: a.stoid, | 252 | storeId: a.stoid, |
248 | - storageId:storageId | 253 | + storageId:storageId |
249 | } | 254 | } |
250 | }).then(res => { | 255 | }).then(res => { |
251 | if (res.data.code == 0) { | 256 | if (res.data.code == 0) { |
@@ -363,7 +368,7 @@ Page({ | @@ -363,7 +368,7 @@ Page({ | ||
363 | "number": number, | 368 | "number": number, |
364 | "remark": "更改预约时间", | 369 | "remark": "更改预约时间", |
365 | "states": 0, | 370 | "states": 0, |
366 | - "storeId": a.stoid | 371 | + "storeId": a.stoid, |
367 | }; | 372 | }; |
368 | var data = JSON.stringify(json); | 373 | var data = JSON.stringify(json); |
369 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | 374 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 |
packageA/pages/my_service/cosmetology_list.js
@@ -3,6 +3,8 @@ var e = getApp(), | @@ -3,6 +3,8 @@ var e = getApp(), | ||
3 | os = a, | 3 | os = a, |
4 | t = e.request, | 4 | t = e.request, |
5 | d = e.globalData; | 5 | d = e.globalData; |
6 | + | ||
7 | + | ||
6 | Page({ | 8 | Page({ |
7 | 9 | ||
8 | /** | 10 | /** |
@@ -21,6 +23,7 @@ Page({ | @@ -21,6 +23,7 @@ Page({ | ||
21 | storageId: 0, //线下门店id | 23 | storageId: 0, //线下门店id |
22 | projectId:"",//项目id | 24 | projectId:"",//项目id |
23 | }, | 25 | }, |
26 | + | ||
24 | onReachBottom: function() { | 27 | onReachBottom: function() { |
25 | var th = this; | 28 | var th = this; |
26 | if (this.data.total <= th.data.pageSize) return; | 29 | if (this.data.total <= th.data.pageSize) return; |
@@ -30,6 +33,8 @@ Page({ | @@ -30,6 +33,8 @@ Page({ | ||
30 | }) | 33 | }) |
31 | th.query_cology(); | 34 | th.query_cology(); |
32 | }, | 35 | }, |
36 | + | ||
37 | + | ||
33 | query_cology: function() { | 38 | query_cology: function() { |
34 | var th = this; | 39 | var th = this; |
35 | var url = "/api/weshop/marketing/reservation/staff/pagenew"; | 40 | var url = "/api/weshop/marketing/reservation/staff/pagenew"; |
@@ -38,7 +43,7 @@ Page({ | @@ -38,7 +43,7 @@ Page({ | ||
38 | getApp().request.promiseGet(url, { | 43 | getApp().request.promiseGet(url, { |
39 | data: { | 44 | data: { |
40 | storeId: a.stoid, | 45 | storeId: a.stoid, |
41 | - userId: d.user_id, | 46 | + userId: th.data.options.userid, |
42 | serviceId: itemId, | 47 | serviceId: itemId, |
43 | storageId: storageId, | 48 | storageId: storageId, |
44 | page: th.data.curpage, | 49 | page: th.data.curpage, |
@@ -67,6 +72,8 @@ Page({ | @@ -67,6 +72,8 @@ Page({ | ||
67 | } | 72 | } |
68 | }) | 73 | }) |
69 | }, | 74 | }, |
75 | + | ||
76 | + | ||
70 | //图片失败,默认图片 | 77 | //图片失败,默认图片 |
71 | bind_bnerr1: function(e) { | 78 | bind_bnerr1: function(e) { |
72 | var _errImg = e.target.dataset.errorimg; | 79 | var _errImg = e.target.dataset.errorimg; |
@@ -78,12 +85,17 @@ Page({ | @@ -78,12 +85,17 @@ Page({ | ||
78 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 85 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
79 | } | 86 | } |
80 | }, | 87 | }, |
88 | + | ||
89 | + | ||
90 | + | ||
81 | /** | 91 | /** |
82 | * 生命周期函数--监听页面加载 | 92 | * 生命周期函数--监听页面加载 |
83 | */ | 93 | */ |
84 | onLoad: function(options) { | 94 | onLoad: function(options) { |
95 | + console.log('options--->', options); | ||
85 | var th = this; | 96 | var th = this; |
86 | - th.setData({ | 97 | + this.setData({ |
98 | + options, | ||
87 | projectId: options.projectId, | 99 | projectId: options.projectId, |
88 | itemId: options.itemId, | 100 | itemId: options.itemId, |
89 | storageId: options.storageId | 101 | storageId: options.storageId |
@@ -105,4 +117,5 @@ Page({ | @@ -105,4 +117,5 @@ Page({ | ||
105 | th.query_cology(); | 117 | th.query_cology(); |
106 | }, | 118 | }, |
107 | 119 | ||
120 | + | ||
108 | }) | 121 | }) |
109 | \ No newline at end of file | 122 | \ No newline at end of file |
packageA/pages/my_service/cosmetology_list.wxml
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | </view> | 27 | </view> |
28 | 28 | ||
29 | <!-- 预约状态 --> | 29 | <!-- 预约状态 --> |
30 | - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}"> | 30 | + <navigator class="flex-center gofu go" url="/packageA/pages/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}"> |
31 | <view class="fs24">预约</view> | 31 | <view class="fs24">预约</view> |
32 | </navigator> | 32 | </navigator> |
33 | </view> | 33 | </view> |
packageA/pages/my_service/hist_service.js
@@ -69,7 +69,7 @@ Page({ | @@ -69,7 +69,7 @@ Page({ | ||
69 | */ | 69 | */ |
70 | onLoad: function(options) { | 70 | onLoad: function(options) { |
71 | var th = this; | 71 | var th = this; |
72 | - // console.log('xxoptions==>', options); | 72 | + console.log('xxoptions==>', options); |
73 | this.setData({ | 73 | this.setData({ |
74 | options, | 74 | options, |
75 | }); | 75 | }); |
@@ -120,7 +120,7 @@ Page({ | @@ -120,7 +120,7 @@ Page({ | ||
120 | getApp().request.promiseGet(url, { | 120 | getApp().request.promiseGet(url, { |
121 | data: { | 121 | data: { |
122 | storeId: a.stoid, | 122 | storeId: a.stoid, |
123 | - userId: this.data.options.userid, | 123 | + userId: th.data.options.userid, |
124 | beginDate: startTime, | 124 | beginDate: startTime, |
125 | endDate: endTime, | 125 | endDate: endTime, |
126 | page: th.data.curpage, | 126 | page: th.data.curpage, |
packageA/pages/my_service/i_service.js
@@ -40,7 +40,10 @@ Page({ | @@ -40,7 +40,10 @@ Page({ | ||
40 | options, | 40 | options, |
41 | }); | 41 | }); |
42 | var th = this; | 42 | var th = this; |
43 | - th.query_service(); | 43 | + // if(options.UserId) { |
44 | + th.query_service(); | ||
45 | + // }; | ||
46 | + | ||
44 | }, | 47 | }, |
45 | /** | 48 | /** |
46 | * 生命周期函数--监听页面显示 | 49 | * 生命周期函数--监听页面显示 |
@@ -132,7 +135,7 @@ Page({ | @@ -132,7 +135,7 @@ Page({ | ||
132 | "继续使用", | 135 | "继续使用", |
133 | function() { | 136 | function() { |
134 | my_confirm.open_cancel(0); | 137 | my_confirm.open_cancel(0); |
135 | - var deta_url = "/pages/user/my_service/tment_details?number=" + res.data.data.Number; | 138 | + var deta_url = "/packageA/pages/my_service/tment_details?userid="+ th.data.options.UserId + "&number=" + res.data.data.Number; |
136 | wx.navigateTo({ | 139 | wx.navigateTo({ |
137 | url: deta_url | 140 | url: deta_url |
138 | }) | 141 | }) |
@@ -212,7 +215,7 @@ Page({ | @@ -212,7 +215,7 @@ Page({ | ||
212 | "继续预约", | 215 | "继续预约", |
213 | function() { | 216 | function() { |
214 | my_confirm.open_cancel(0); | 217 | my_confirm.open_cancel(0); |
215 | - var deta_url = "/pages/user/my_service/tment_details?number=" + number; | 218 | + var deta_url = "/packageA/pages/my_service/tment_details?number=" + number + "&userid="+ th.data.options.UserId; |
216 | wx.navigateTo({ | 219 | wx.navigateTo({ |
217 | url: deta_url | 220 | url: deta_url |
218 | }) | 221 | }) |
packageA/pages/my_service/i_service.wxml
1 | <!-- 背景图片 --> | 1 | <!-- 背景图片 --> |
2 | <view catchtap="close"> | 2 | <view catchtap="close"> |
3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> | 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 | </view> | 6 | </view> |
7 | 7 | ||
8 | <!-- 预约内容 --> | 8 | <!-- 预约内容 --> |
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> | 50 | <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> |
51 | <view>帮你预约</view> | 51 | <view>帮你预约</view> |
52 | </view> --> | 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}}&firstleader={{options.first_leader}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> |
54 | <view>帮你预约</view> | 54 | <view>帮你预约</view> |
55 | </view> | 55 | </view> |
56 | </view> | 56 | </view> |
packageA/pages/my_service/tment_details.js
@@ -71,6 +71,7 @@ Page({ | @@ -71,6 +71,7 @@ Page({ | ||
71 | onLoad: function(options) { | 71 | onLoad: function(options) { |
72 | var th = this; | 72 | var th = this; |
73 | th.setData({ | 73 | th.setData({ |
74 | + options, | ||
74 | number: options.number | 75 | number: options.number |
75 | }) | 76 | }) |
76 | }, | 77 | }, |
@@ -82,7 +83,7 @@ Page({ | @@ -82,7 +83,7 @@ Page({ | ||
82 | getApp().request.promiseGet(url, { | 83 | getApp().request.promiseGet(url, { |
83 | data: { | 84 | data: { |
84 | storeId: a.stoid, | 85 | storeId: a.stoid, |
85 | - userId: d.user_id, | 86 | + userId: th.data.options.userid, |
86 | number: number | 87 | number: number |
87 | } | 88 | } |
88 | }).then(res => { | 89 | }).then(res => { |
packageA/pages/my_service/tment_details.wxml
@@ -97,20 +97,20 @@ | @@ -97,20 +97,20 @@ | ||
97 | <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> | 97 | <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> |
98 | <view class="yellow-b" data-index="{{index}}">取消预约</view> | 98 | <view class="yellow-b" data-index="{{index}}">取消预约</view> |
99 | </view> | 99 | </view> |
100 | - <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list"> | 100 | + <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/packageA/pages/my_service/tment_order_list?userid={{options.userid}}"> |
101 | <view class="yellow-b">我的服务</view> | 101 | <view class="yellow-b">我的服务</view> |
102 | </navigator> | 102 | </navigator> |
103 | <!-- 右边栏 --> | 103 | <!-- 右边栏 --> |
104 | - <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}}"> | 104 | + <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/packageA/pages/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}"> |
105 | <view>更改时间</view> | 105 | <view>更改时间</view> |
106 | </navigator> | 106 | </navigator> |
107 | - <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}"> | 107 | + <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}&userid={{options.userid}}"> |
108 | <view>发表评价</view> | 108 | <view>发表评价</view> |
109 | </navigator> | 109 | </navigator> |
110 | - <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}"> | 110 | + <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}&userid={{options.userid}}"> |
111 | <view>查看评价</view> | 111 | <view>查看评价</view> |
112 | </navigator> | 112 | </navigator> |
113 | - <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}"> | 113 | + <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/packageA/pages/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}&userid={{options.userid}}"> |
114 | <view>重新预约</view> | 114 | <view>重新预约</view> |
115 | </navigator> | 115 | </navigator> |
116 | 116 |
packageA/pages/my_service/tment_eval.js
@@ -40,7 +40,7 @@ Page({ | @@ -40,7 +40,7 @@ Page({ | ||
40 | getApp().request.promiseGet(url, { | 40 | getApp().request.promiseGet(url, { |
41 | data: { | 41 | data: { |
42 | Star: index + 1, | 42 | Star: index + 1, |
43 | - storeId: a.stoid | 43 | + storeId: a.stoid, |
44 | } | 44 | } |
45 | }).then(res => { | 45 | }).then(res => { |
46 | if (res.data.code == 0) { | 46 | if (res.data.code == 0) { |
@@ -103,7 +103,7 @@ Page({ | @@ -103,7 +103,7 @@ Page({ | ||
103 | getApp().request.promiseGet(url, { | 103 | getApp().request.promiseGet(url, { |
104 | data: { | 104 | data: { |
105 | storeId: a.stoid, | 105 | storeId: a.stoid, |
106 | - userId: d.user_id, | 106 | + userId: th.data.options.userid, |
107 | number: number | 107 | number: number |
108 | } | 108 | } |
109 | }).then(res => { | 109 | }).then(res => { |
@@ -126,7 +126,7 @@ Page({ | @@ -126,7 +126,7 @@ Page({ | ||
126 | getApp().request.promiseGet(url, { | 126 | getApp().request.promiseGet(url, { |
127 | data: { | 127 | data: { |
128 | number: th.data.number, | 128 | number: th.data.number, |
129 | - storeId: a.stoid | 129 | + storeId: a.stoid, |
130 | } | 130 | } |
131 | }).then(res => { | 131 | }).then(res => { |
132 | if (res.data.code == 0) { | 132 | if (res.data.code == 0) { |
@@ -175,7 +175,7 @@ Page({ | @@ -175,7 +175,7 @@ Page({ | ||
175 | "number": posNo, | 175 | "number": posNo, |
176 | "remark": proposal, | 176 | "remark": proposal, |
177 | "star": stars + 1, | 177 | "star": stars + 1, |
178 | - "storeId": a.stoid | 178 | + "storeId": a.stoid, |
179 | }; | 179 | }; |
180 | var data = JSON.stringify(json); //转换成json格式 | 180 | var data = JSON.stringify(json); //转换成json格式 |
181 | wx.request({ | 181 | wx.request({ |
@@ -220,6 +220,7 @@ Page({ | @@ -220,6 +220,7 @@ Page({ | ||
220 | onLoad: function(options) { | 220 | onLoad: function(options) { |
221 | var th = this; | 221 | var th = this; |
222 | th.setData({ | 222 | th.setData({ |
223 | + options, | ||
223 | number: options.Number, | 224 | number: options.Number, |
224 | is_evaluate: options.evaluate | 225 | is_evaluate: options.evaluate |
225 | }) | 226 | }) |
@@ -265,7 +266,7 @@ Page({ | @@ -265,7 +266,7 @@ Page({ | ||
265 | orderNumber: th.data.number, | 266 | orderNumber: th.data.number, |
266 | orderType: 2, | 267 | orderType: 2, |
267 | storeId: a.stoid, | 268 | storeId: a.stoid, |
268 | - userId: d.user_id | 269 | + userId: th.data.options.userid, |
269 | } | 270 | } |
270 | }).then(res => { | 271 | }).then(res => { |
271 | if (res.data.code == 0) { | 272 | if (res.data.code == 0) { |
packageA/pages/my_service/tment_order_list.js
@@ -39,6 +39,9 @@ Page({ | @@ -39,6 +39,9 @@ Page({ | ||
39 | * 生命周期函数--监听页面加载 | 39 | * 生命周期函数--监听页面加载 |
40 | */ | 40 | */ |
41 | onLoad: function(options) { | 41 | onLoad: function(options) { |
42 | + this.setData({ | ||
43 | + options, | ||
44 | + }); | ||
42 | var state=options.state; | 45 | var state=options.state; |
43 | if (state != null && state != undefined && state!=""){ | 46 | if (state != null && state != undefined && state!=""){ |
44 | this.setData({ activeCategoryId: state }); | 47 | this.setData({ activeCategoryId: state }); |
@@ -93,7 +96,7 @@ Page({ | @@ -93,7 +96,7 @@ Page({ | ||
93 | getApp().request.promiseGet(url, { | 96 | getApp().request.promiseGet(url, { |
94 | data: { | 97 | data: { |
95 | storeId: a.stoid, | 98 | storeId: a.stoid, |
96 | - userId: d.user_id, | 99 | + userId: th.data.options.userid, |
97 | state: state_index, | 100 | state: state_index, |
98 | page: th.data.curpage, | 101 | page: th.data.curpage, |
99 | pageSize: th.data.pageSize | 102 | pageSize: th.data.pageSize |
packageA/pages/my_service/tment_order_list.wxml
@@ -68,12 +68,12 @@ | @@ -68,12 +68,12 @@ | ||
68 | <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view> | 68 | <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view> |
69 | </block> | 69 | </block> |
70 | <block wx:else> | 70 | <block wx:else> |
71 | - <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator> | 71 | + <navigator url="/packageA/pages/my_service/tment_details?number={{item.Number}}&userid={{options.userid}}" class="Unimportance flex-level">查看详情</navigator> |
72 | </block> | 72 | </block> |
73 | - <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> | ||
74 | - <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}" class="important Unimportance flex-level">发表评价</navigator> | ||
75 | - <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> | ||
76 | - <navigator wx:if="{{item.State==4}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}" class="important Unimportance flex-level">评价详情</navigator> | 73 | + <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/packageA/pages/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}&userid={{options.userid}}">更改时间</navigator> |
74 | + <navigator wx:if="{{item.State==1}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}&userid={{options.userid}}" class="important Unimportance flex-level">发表评价</navigator> | ||
75 | + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/packageA/pages/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}&userid={{options.userid}}" class="important Unimportance flex-level">重新预约</navigator> | ||
76 | + <navigator wx:if="{{item.State==4}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}&userid={{options.userid}}" class="important Unimportance flex-level">评价详情</navigator> | ||
77 | </view> | 77 | </view> |
78 | </view> | 78 | </view> |
79 | <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}"> | 79 | <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}"> |
packageA/pages/service_record/service_record.js
@@ -28,6 +28,7 @@ Page({ | @@ -28,6 +28,7 @@ Page({ | ||
28 | }, | 28 | }, |
29 | 29 | ||
30 | onShow: function() { | 30 | onShow: function() { |
31 | + reqData.url = '/api/weshop/marketing/servicewrite/page'; | ||
31 | reqData.data = { | 32 | reqData.data = { |
32 | storeId: app.globalData.setting.stoid, | 33 | storeId: app.globalData.setting.stoid, |
33 | }; | 34 | }; |
@@ -39,8 +40,6 @@ Page({ | @@ -39,8 +40,6 @@ Page({ | ||
39 | reqData.data.userId = app.globalData.user_id; | 40 | reqData.data.userId = app.globalData.user_id; |
40 | this.isLogin() | 41 | this.isLogin() |
41 | .then(function(data) { | 42 | .then(function(data) { |
42 | - reqData.url = '/api/weshop/marketing/servicewrite/page'; | ||
43 | - | ||
44 | _this.getData(true, reqData.url, reqData.data); | 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 | \ No newline at end of file | 21 | \ No newline at end of file |
pages/user/my_service/i_service.wxml
@@ -65,6 +65,7 @@ | @@ -65,6 +65,7 @@ | ||
65 | <view class="end fs26 xc-black">到底了</view> | 65 | <view class="end fs26 xc-black">到底了</view> |
66 | <view class="Line"></view> | 66 | <view class="Line"></view> |
67 | </view> | 67 | </view> |
68 | + <!-- <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">选择更多服务卡项,</view> --> | ||
68 | </view> | 69 | </view> |
69 | <!-- 无服务项目 --> | 70 | <!-- 无服务项目 --> |
70 | <view wx:if="{{service_List.length<1 && is_service_read}}"> | 71 | <view wx:if="{{service_List.length<1 && is_service_read}}"> |
@@ -75,7 +76,8 @@ | @@ -75,7 +76,8 @@ | ||
75 | <view class="flex-level"> | 76 | <view class="flex-level"> |
76 | <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image> | 77 | <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image> |
77 | </view> | 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 | <view class="flex-level"> | 81 | <view class="flex-level"> |
80 | <navigator data-url="/pages/user/index/index" bindtap="goto"> | 82 | <navigator data-url="/pages/user/index/index" bindtap="goto"> |
81 | <view class="flex-center fs28 white">回到首页</view> | 83 | <view class="flex-center fs28 white">回到首页</view> |