Commit 00c42d5578d63800497274245a4b95a712c25e07
1 parent
63d69574
填充我的服务项目
Showing
3 changed files
with
26 additions
and
33 deletions
app.json
1 | 1 | { |
2 | 2 | "pages": [ |
3 | + "pages/user/Appment_main/Appment_main", | |
3 | 4 | "pages/user/my_service/my_service", |
4 | 5 | "pages/index/index/index", |
5 | 6 | "pages/goods/categoryList/categoryList", |
... | ... | @@ -47,16 +48,12 @@ |
47 | 48 | "pages/team/team_ping/team_ping", |
48 | 49 | "pages/cart/cart2_pt/cart2_pt", |
49 | 50 | "pages/cart/cart_wk/cart_wk", |
50 | - | |
51 | 51 | "pages/user/member/menber", |
52 | 52 | "pages/user/member/bring/bring", |
53 | 53 | "pages/user/member/bring/msg/msg", |
54 | 54 | "pages/user/member/account/account", |
55 | 55 | "pages/user/member/account_unable/account_unable", |
56 | 56 | "pages/user/member/cash_record/cash_record", |
57 | - "pages/user/deposit/deposit", | |
58 | - "pages/user/deposit/prepaid/prepaid", | |
59 | - "pages/user/deposit/prepaid/msg/msg", | |
60 | 57 | "pages/user/coupons/coupons", |
61 | 58 | "pages/user/coupons/qr_code/qr_code", |
62 | 59 | "pages/user/coupons/query/index", |
... | ... | @@ -64,21 +61,19 @@ |
64 | 61 | "pages/user/integral/integral", |
65 | 62 | "pages/user/integral/query/index", |
66 | 63 | "pages/user/integral/msg/msg", |
67 | - | |
68 | 64 | "pages/user/userqy/userqy", |
69 | 65 | "pages/user/user_spsy/user_spsy", |
70 | 66 | "pages/user/user_fw/user_fw", |
71 | 67 | "pages/user/user_coupon/user_coupon", |
72 | 68 | "pages/user/grow_value/grow_value", |
73 | 69 | "pages/payment/pay_success/pay_success" |
74 | - | |
75 | 70 | ], |
76 | 71 | "permission": { |
77 | 72 | "scope.userLocation": { |
78 | 73 | "desc": "获取你的位置信息" |
79 | 74 | } |
80 | 75 | }, |
81 | - "window": { | |
76 | + "window": { | |
82 | 77 | "backgroundTextStyle": "light", |
83 | 78 | "navigationBarTextStyle": "black", |
84 | 79 | "navigationBarTitleText": "加载中...", |
... | ... | @@ -91,7 +86,6 @@ |
91 | 86 | "selectedColor": "#f23030", |
92 | 87 | "borderStyle": "white", |
93 | 88 | "backgroundColor": "#ffffff", |
94 | - | |
95 | 89 | "list": [ |
96 | 90 | { |
97 | 91 | "pagePath": "pages/index/index/index", | ... | ... |
pages/user/my_service/my_service.js
... | ... | @@ -13,6 +13,7 @@ Page({ |
13 | 13 | content: "请将二维码展示给核销员,服务更快捷!" |
14 | 14 | }, |
15 | 15 | iurl: a.imghost, |
16 | + defimgurl:"/miniapp/images/yyservice/yyxmdefault.jpg", | |
16 | 17 | service_List: null, //服务项目列表 |
17 | 18 | is_service_read: 0, |
18 | 19 | curpage: 1, |
... | ... | @@ -50,18 +51,14 @@ Page({ |
50 | 51 | //查询服务项目列表 |
51 | 52 | query_service: function() { |
52 | 53 | var th = this; |
53 | - var url = "http://localhost:8022/api/weshop/users/grade/wechat/cash/page"; | |
54 | - // //获取服务项目 | |
55 | - // getApp().request.promiseGet("/api/weshop/users/grade/wechat/cash/page", { | |
56 | - | |
57 | - // }).then(res => { | |
58 | - // console.log("11111111111"+res); | |
59 | - // }) | |
54 | + var url = "http://172.20.0.13:8085/api/weshop/marketing/reservation/marketing/sm/list"; | |
60 | 55 | wx.request({ |
61 | - url: "http://localhost:8022/api/weshop/yy_fuwu_list", | |
56 | + url: url, | |
57 | + data: { | |
58 | + storeId: 1, | |
59 | + userId: 5682130 | |
60 | + }, | |
62 | 61 | success: function(res) { |
63 | - | |
64 | - console.log("11111111111" + res.data.data.pageData); | |
65 | 62 | if (res.data.code == 0) { |
66 | 63 | |
67 | 64 | // th.data.curpage++; |
... | ... | @@ -80,9 +77,8 @@ Page({ |
80 | 77 | // }), wx.stopPullDownRefresh(); //停止下拉刷新 |
81 | 78 | |
82 | 79 | th.setData({ |
83 | - service_List: res.data.data.pageData | |
80 | + service_List: res.data.data | |
84 | 81 | }) |
85 | - console.log(th.data.service_List.name + "111"); | |
86 | 82 | } |
87 | 83 | } |
88 | 84 | }) |
... | ... | @@ -93,7 +89,7 @@ Page({ |
93 | 89 | var ind = e.currentTarget.dataset.ind; |
94 | 90 | var item = this.data.service_List[ind]; |
95 | 91 | |
96 | - var ewm = "^" + this.data.userinfo.erpvipid + "|" + item.id + "|" + item.type_b + "|" + item.time+ "|TY01|"; | |
92 | + var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|" + item.Validay + "|TY01|"; | |
97 | 93 | var tt = th.format_time(1); |
98 | 94 | ewm = ewm + tt; |
99 | 95 | th.data.qr_code_object.val = ewm; |
... | ... | @@ -123,4 +119,9 @@ Page({ |
123 | 119 | fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':') |
124 | 120 | return fm; |
125 | 121 | }, |
122 | + //跳转到首页 | |
123 | + goto:function(e){ | |
124 | + var url = e.currentTarget.dataset.url; | |
125 | + getApp().goto(url); | |
126 | + } | |
126 | 127 | }) |
127 | 128 | \ No newline at end of file | ... | ... |
pages/user/my_service/my_service.wxml
... | ... | @@ -11,49 +11,47 @@ |
11 | 11 | <view class="rel" wx:for="{{service_List}}"> |
12 | 12 | <view class="abs"> |
13 | 13 | <!-- 皇冠log --> |
14 | - <block wx:if="{{item.type_b==0}}"> | |
14 | + <block wx:if="{{item.BuyType==4}}"> | |
15 | 15 | <image class="equity_money" src="{{iurl}}/miniapp/images//yyservice/equity.png" lazy-load="true"></image> |
16 | 16 | </block> |
17 | 17 | <!-- 金钱log --> |
18 | - <block wx:if="{{item.type_b==1}}"> | |
18 | + <block wx:if="{{item.BuyType==1}}"> | |
19 | 19 | <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/money.png" lazy-load="true"></image> |
20 | 20 | </block> |
21 | 21 | <!-- 礼包log --> |
22 | - <block wx:if="{{item.type_b==2}}"> | |
22 | + <block wx:if="{{item.BuyType==3}}"> | |
23 | 23 | <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/giftpackage.png" lazy-load="true"></image> |
24 | 24 | </block> |
25 | 25 | </view> |
26 | 26 | <view> |
27 | 27 | <view class="flex-center"> |
28 | - <image class="itemimage" src="{{iurl+item.img}}" lazy-load="true" data-errorimg="service_List[{{index}}].img" binderror="bind_bnerr1" data-img="{{item.img}}"></image> | |
28 | + <image class="itemimage" src="{{item.img==undefined?iurl+defimgurl:iurl+item.img}}" lazy-load="true" data-errorimg="service_List[{{index}}].img" binderror="bind_bnerr1" data-img="{{item.img}}"></image> | |
29 | 29 | </view> |
30 | 30 | |
31 | 31 | <view class="flex-center itemName"> |
32 | - <view class="fs32 Name ellipsis-1">{{item.name}}</view> | |
32 | + <view class="fs32 Name ellipsis-1">{{item.ProjectName}}</view> | |
33 | 33 | </view> |
34 | 34 | |
35 | 35 | <view class="flex-center fs24 itemCount"> |
36 | 36 | <view>剩余次数:</view> |
37 | - <view>{{item.chishu}}</view> | |
37 | + <view>{{item.ObtainTimes}}</view> | |
38 | 38 | </view> |
39 | 39 | |
40 | 40 | <view class="flex-center fs24 itemEffective"> |
41 | 41 | <view>有效期至</view> |
42 | - <view class="Date">{{item.time}}</view> | |
42 | + <view class="Date">{{item.Validay}}</view> | |
43 | 43 | </view> |
44 | 44 | |
45 | 45 | </view> |
46 | 46 | |
47 | 47 | <view class="flex-center fs24 functionMax"> |
48 | - <view class="flex-level Use" bindtap="open_fw" data-order_sn="111111111111111111111111111" data-ind="{{index}}"> | |
48 | + <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}"> | |
49 | 49 | <view>立即使用</view> |
50 | 50 | </view> |
51 | 51 | <!-- 可预约 --> |
52 | - <block wx:if="{{item.is_yy}}"> | |
53 | 52 | <navigator class="flex-level appointment" url="/pages/user/Appment_main/Appment_main"> |
54 | 53 | <view>预约</view> |
55 | - </navigator> | |
56 | - </block> | |
54 | + </navigator> | |
57 | 55 | </view> |
58 | 56 | </view> |
59 | 57 | |
... | ... | @@ -69,7 +67,7 @@ |
69 | 67 | </view> |
70 | 68 | <view class="flex-level fs30 xc-ash">暂无服务项目</view> |
71 | 69 | <view class="flex-level"> |
72 | - <navigator url="/pages/user/my_service/my_service" bindtap="goto"> | |
70 | + <navigator data-url="/pages/user/index/index" bindtap="goto"> | |
73 | 71 | <view class="flex-center fs28 white">回到首页</view> |
74 | 72 | </navigator> |
75 | 73 | </view> | ... | ... |