Commit 09e74ee4e12011b35b579a3bc0d3af7f556cb921
1 parent
7a85cdab
OA单的优化
Showing
11 changed files
with
82 additions
and
15 deletions
components/nodata/nodata.js
components/nodata/nodata.wxml
packageA/pages/chongzhiDetails/chongzhiDetails.js
... | ... | @@ -23,6 +23,7 @@ Page({ |
23 | 23 | */ |
24 | 24 | onLoad: function (options) { |
25 | 25 | |
26 | + wx.showLoading(); | |
26 | 27 | const self = this; |
27 | 28 | if(options.type) |
28 | 29 | self.setData({type:options.type}); |
... | ... | @@ -50,11 +51,11 @@ Page({ |
50 | 51 | |
51 | 52 | |
52 | 53 | getApp().request.promiseGet("/api/weshop/ad/page",{ |
53 | - data:{store_id:os.stoid,enabled:1,pid:601} | |
54 | + data:{store_id:os.stoid,enabled:1,pid:1210} | |
54 | 55 | }).then(res=>{ |
55 | 56 | if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ |
56 | 57 | var a = res.data.data.pageData; |
57 | - self.setData({show_img:a[0].ad_code,ad_color:a[0].bgcolor}); | |
58 | + self.setData({show_img:a[0].ad_code,ad_color:a[0].bgcolor,ad:a[0] }); | |
58 | 59 | } |
59 | 60 | }) |
60 | 61 | |
... | ... | @@ -94,6 +95,8 @@ Page({ |
94 | 95 | self.setData({ |
95 | 96 | result: result, |
96 | 97 | }); |
98 | + | |
99 | + wx.hideLoading(); | |
97 | 100 | |
98 | 101 | }, |
99 | 102 | }); |
... | ... | @@ -276,4 +279,12 @@ Page({ |
276 | 279 | } |
277 | 280 | }) |
278 | 281 | }, |
282 | + | |
283 | + | |
284 | + go_url:function (e){ | |
285 | + var url=e.currentTarget.dataset.url; | |
286 | + if(url){ | |
287 | + getApp().goto(url); | |
288 | + } | |
289 | + } | |
279 | 290 | }) |
280 | 291 | \ No newline at end of file | ... | ... |
packageA/pages/chongzhiDetails/chongzhiDetails.wxml
... | ... | @@ -3,16 +3,30 @@ |
3 | 3 | <view class="container"> |
4 | 4 | <view> |
5 | 5 | <view class="banner-container" wx:if="{{show_img}}"> |
6 | - <image class="img-block" src="{{url+show_img}}" mode="widthFix" | |
7 | - lazy-load="true" binderror="bind_err" data-errorimg="show_img" ></image></view> | |
6 | + | |
7 | + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(ad.ad_weapplink,'plugin')>=0}}"> | |
8 | + <image class="img-block" src="{{url+show_img}}" mode="widthFix" | |
9 | + lazy-load="true" binderror="bind_err" data-errorimg="show_img" ></image> | |
10 | + </navigator> | |
11 | + | |
12 | + <block wx:else> | |
13 | + <image class="img-block" src="{{url+show_img}}" mode="widthFix" bindtap="go_url" | |
14 | + data-url="{{ad.ad_weapplink}}" | |
15 | + lazy-load="true" binderror="bind_err" data-errorimg="show_img" ></image> | |
16 | + </block> | |
17 | + | |
18 | + | |
19 | + </view> | |
20 | + | |
21 | + <view class="title-container" wx:else> | |
22 | + <view class="title"> | |
23 | + <view>女王专享</view> | |
24 | + <view>你的美丽我来缔造</view> | |
25 | + </view> | |
26 | + </view> | |
8 | 27 | |
9 | 28 | <view class="list"> |
10 | - <view class="title-container"> | |
11 | - <view class="title"> | |
12 | - <view>女王专享</view> | |
13 | - <view>你的美丽我来缔造</view> | |
14 | - </view> | |
15 | - </view> | |
29 | + | |
16 | 30 | <view > |
17 | 31 | <view class="list-item flex" wx:for="{{result.givelist}}"> |
18 | 32 | <!-- 左图片 --> | ... | ... |
packageA/pages/chongzhiDetails/g_filter.wxs
... | ... | @@ -6,6 +6,11 @@ var is_acting = function(endtime){ |
6 | 6 | var bijiao = getDate(endtime) - getDate(); |
7 | 7 | return bijiao > 0 ? true : false; |
8 | 8 | } |
9 | +var has_char=function(url,key){ | |
10 | + if(!url) return -1; | |
11 | + return url.indexOf(key); | |
12 | +} | |
9 | 13 | module.exports = { |
10 | - is_acting:is_acting | |
14 | + is_acting:is_acting, | |
15 | + has_char:has_char, | |
11 | 16 | } |
12 | 17 | \ No newline at end of file | ... | ... |
packageD/pages/user/deposit/prepaid/prepaid.js
... | ... | @@ -13,7 +13,8 @@ Page({ |
13 | 13 | iurl: o.imghost, |
14 | 14 | showModal: false, //弹框控制器 |
15 | 15 | perpaid: [], //数据, |
16 | - paying:0 | |
16 | + paying:0, | |
17 | + is_get:0 | |
17 | 18 | }, |
18 | 19 | onLoad:function (){ |
19 | 20 | //定义第一次进入 |
... | ... | @@ -50,6 +51,9 @@ Page({ |
50 | 51 | }, |
51 | 52 | /*预存款的劵*/ |
52 | 53 | async yuck() { |
54 | + | |
55 | + | |
56 | + wx.showLoading(); | |
53 | 57 | var user_id = getApp().globalData.user_id; |
54 | 58 | var store_id = os.stoid; |
55 | 59 | console.log(user_id, "有进来吗银行卡", store_id ); |
... | ... | @@ -68,6 +72,9 @@ Page({ |
68 | 72 | e.setData({ |
69 | 73 | perpaid: perpaids,is_get:1 |
70 | 74 | }); |
75 | + | |
76 | + wx.hideLoading(); | |
77 | + | |
71 | 78 | }) |
72 | 79 | |
73 | 80 | }, | ... | ... |
packageD/pages/user/deposit/prepaid/prepaid.json
packageD/pages/user/deposit/prepaid/prepaid.wxml
... | ... | @@ -38,6 +38,11 @@ |
38 | 38 | |
39 | 39 | </block> |
40 | 40 | |
41 | + | |
42 | +<view wx:if="{{perpaid.length==0 && is_get}}" style="text-align: center;"> | |
43 | + <nodata title="暂无充值活动" nodataContainer="nodata"></nodata> | |
44 | +</view> | |
45 | + | |
41 | 46 | <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view> |
42 | 47 | <view class="big-rim modalDlg" wx:if="{{showModal}}"> |
43 | 48 | <view class="gb-rim" bindtap="shut"> | ... | ... |
packageD/pages/user/deposit/prepaid/prepaid.wxss
pages/user/userinfo/userinfo.js
pages/user/userinfo/userinfo.wxml
... | ... | @@ -238,6 +238,14 @@ |
238 | 238 | </view> |
239 | 239 | </view> |
240 | 240 | |
241 | + <view wx:if="{{user.staffTel}}" class="user-name flex-vertical-between"> | |
242 | + <view class="user-name-txt">{{guide_title}}电话</view> | |
243 | + <view class="flex-center user-txt-right"> | |
244 | + <view class="one-line">{{user.staffTel}}</view> | |
245 | + </view> | |
246 | + | |
247 | + </view> | |
248 | + | |
241 | 249 | |
242 | 250 | |
243 | 251 | </view> | ... | ... |
-
mentioned in commit c9a60728768a0597bea0908ec693751d5da4b45d