Commit ce01d1cfbd84f4da0bb6f68767f0fb6f8914e89f
1 parent
7f9ce66d
卡项列表 和 服务项目 修改
Showing
3 changed files
with
21 additions
and
12 deletions
packageA/pages/my_service/hist_service.js
@@ -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: this.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.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;">服务记录</navigator> | 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> | 5 | <navigator class="History fs26" url="/packageA/pages/my_service/hist_service" data-userid="{{options.UserId}}">历史预约</navigator> |
6 | </view> | 6 | </view> |
7 | 7 |
packageA/pages/service_record/service_record.js
@@ -14,10 +14,11 @@ Page({ | @@ -14,10 +14,11 @@ Page({ | ||
14 | endDate: '结束日期', | 14 | endDate: '结束日期', |
15 | }, | 15 | }, |
16 | 16 | ||
17 | - onLoad: function(t) { | 17 | + onLoad: function(options) { |
18 | _this = this; | 18 | _this = this; |
19 | 19 | ||
20 | this.setData({ | 20 | this.setData({ |
21 | + options, | ||
21 | currentDate: this.currentDate(), | 22 | currentDate: this.currentDate(), |
22 | }); | 23 | }); |
23 | 24 | ||
@@ -27,15 +28,23 @@ Page({ | @@ -27,15 +28,23 @@ Page({ | ||
27 | }, | 28 | }, |
28 | 29 | ||
29 | onShow: function() { | 30 | onShow: function() { |
30 | - this.isLogin() | ||
31 | - .then(function(data) { | ||
32 | - reqData.url = '/api/weshop/marketing/servicewrite/page'; | ||
33 | - reqData.data = { | ||
34 | - storeId: app.globalData.setting.stoid, | ||
35 | - userId: app.globalData.user_id, | ||
36 | - }; | ||
37 | - _this.getData(true, reqData.url, reqData.data); | ||
38 | - }); | 31 | + reqData.data = { |
32 | + storeId: app.globalData.setting.stoid, | ||
33 | + }; | ||
34 | + | ||
35 | + if(this.data.options.userid) { | ||
36 | + reqData.data.userId = this.data.options.userid; | ||
37 | + _this.getData(true, reqData.url, reqData.data); | ||
38 | + } else { | ||
39 | + reqData.data.userId = app.globalData.user_id; | ||
40 | + this.isLogin() | ||
41 | + .then(function(data) { | ||
42 | + reqData.url = '/api/weshop/marketing/servicewrite/page'; | ||
43 | + | ||
44 | + _this.getData(true, reqData.url, reqData.data); | ||
45 | + }); | ||
46 | + }; | ||
47 | + | ||
39 | }, | 48 | }, |
40 | 49 | ||
41 | 50 |