Commit ce01d1cfbd84f4da0bb6f68767f0fb6f8914e89f
1 parent
7f9ce66d
卡项列表 和 服务项目 修改
Showing
3 changed files
with
21 additions
and
12 deletions
packageA/pages/my_service/hist_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;">服务记录</navigator> | |
4 | + <navigator class="History fs26" url="/packageA/pages/service_record/service_record" style="left:10px;right:auto;" data-userid="{{options.UserId}}">服务记录</navigator> | |
5 | 5 | <navigator class="History fs26" url="/packageA/pages/my_service/hist_service" data-userid="{{options.UserId}}">历史预约</navigator> |
6 | 6 | </view> |
7 | 7 | ... | ... |
packageA/pages/service_record/service_record.js
... | ... | @@ -14,10 +14,11 @@ Page({ |
14 | 14 | endDate: '结束日期', |
15 | 15 | }, |
16 | 16 | |
17 | - onLoad: function(t) { | |
17 | + onLoad: function(options) { | |
18 | 18 | _this = this; |
19 | 19 | |
20 | 20 | this.setData({ |
21 | + options, | |
21 | 22 | currentDate: this.currentDate(), |
22 | 23 | }); |
23 | 24 | |
... | ... | @@ -27,15 +28,23 @@ Page({ |
27 | 28 | }, |
28 | 29 | |
29 | 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 | ... | ... |