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