Commit aaae60ece9f99dbea14b489ca2fe42a5abc00606
Merge branch 'dev_20191114' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev_20191114
Showing
7 changed files
with
50 additions
and
28 deletions
app.json
| ... | ... | @@ -68,8 +68,11 @@ |
| 68 | 68 | "pages/user/user_spsy/user_spsy", |
| 69 | 69 | "pages/user/user_fw/user_fw", |
| 70 | 70 | "pages/user/user_coupon/user_coupon", |
| 71 | - "pages/user/grow_value/grow_value" | |
| 71 | + "pages/user/grow_value/grow_value", | |
| 72 | 72 | |
| 73 | + "pages/user/plus/plus", | |
| 74 | + "pages/user/cardinfo/cardinfo" | |
| 75 | + | |
| 73 | 76 | ], |
| 74 | 77 | "window": { |
| 75 | 78 | "backgroundTextStyle": "light", | ... | ... |
pages/user/Detailed/Detailed.js
| 1 | -var e = function(e) { | |
| 2 | - return e && e.__esModule ? e : { | |
| 3 | - default: e | |
| 4 | - }; | |
| 5 | - }(require("../../../utils/LoadMore.js")), | |
| 6 | - t = getApp(), | |
| 1 | +var t = getApp(), | |
| 7 | 2 | r = t.globalData, |
| 8 | 3 | a = t.request, |
| 9 | 4 | o = t.globalData.setting, |
| 10 | 5 | os = o, |
| 11 | 6 | i = require("../../../utils/util.js"), |
| 12 | 7 | ut = i, |
| 13 | - s = require("../../../utils/common.js"), | |
| 14 | - n = new e.default(); | |
| 15 | -Page({ | |
| 8 | + s = require("../../../utils/common.js"); | |
| 16 | 9 | |
| 10 | +Page({ | |
| 17 | 11 | /** |
| 18 | 12 | * 页面的初始数据 |
| 19 | 13 | */ |
| ... | ... | @@ -34,8 +28,7 @@ Page({ |
| 34 | 28 | |
| 35 | 29 | }, |
| 36 | 30 | selectDetailed: function() { |
| 37 | - var th = this, | |
| 38 | - e = th; | |
| 31 | + var th = this, e = th; | |
| 39 | 32 | getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { |
| 40 | 33 | data: { |
| 41 | 34 | storeId: o.stoid, |
| ... | ... | @@ -44,20 +37,24 @@ Page({ |
| 44 | 37 | pageSize: th.data.pageSize |
| 45 | 38 | } |
| 46 | 39 | }).then(res => { |
| 47 | - th.data.page++;//当前页数+1 | |
| 48 | - var arr1 = th.data.arrayDetailed;//获取明细数组 | |
| 49 | - var arr2 = res.data.data.pageData;//获取当前查询数据 | |
| 50 | - var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 | |
| 40 | + | |
| 41 | + th.setData({isDetailed:1}) | |
| 42 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | |
| 43 | + th.data.page++;//当前页数+1 | |
| 44 | + var arr1 = th.data.arrayDetailed;//获取明细数组 | |
| 45 | + var arr2 = res.data.data.pageData;//获取当前查询数据 | |
| 46 | + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 | |
| 51 | 47 | |
| 52 | - var ismore = 0; | |
| 53 | - if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 | |
| 48 | + var ismore = 0; | |
| 49 | + if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 | |
| 54 | 50 | |
| 55 | - th.setData({ | |
| 56 | - arrayDetailed: arr3, | |
| 57 | - total: res.data.data.total, | |
| 58 | - ismore: ismore, | |
| 59 | - isDetailed: 1 | |
| 60 | - }) | |
| 51 | + th.setData({ | |
| 52 | + arrayDetailed: arr3, | |
| 53 | + total: res.data.data.total, | |
| 54 | + ismore: ismore, | |
| 55 | + isDetailed: 1 | |
| 56 | + }) | |
| 57 | + } | |
| 61 | 58 | }), |
| 62 | 59 | wx.stopPullDownRefresh(); |
| 63 | 60 | ... | ... |
pages/user/Detailed/Detailed.json
pages/user/Detailed/Detailed.wxml
pages/user/Detailed/Detailed.wxss
pages/user/index/index.wxml
| ... | ... | @@ -180,7 +180,7 @@ |
| 180 | 180 | <view class="fs26">联系客服</view> |
| 181 | 181 | </view> |
| 182 | 182 | |
| 183 | - <view class="item t-c" data-url="/pages/user/plus/plus?is_card=1" bindtap="goto" wx:if="{{is_dengji==1}}"> | |
| 183 | + <view class="item t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto" wx:if="{{is_dengji==1}}"> | |
| 184 | 184 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/plus/privilege_o.png"></image> |
| 185 | 185 | <view class="fs26">plus会员</view> |
| 186 | 186 | </view> | ... | ... |
pages/user/plus/plus.js
| ... | ... | @@ -125,6 +125,20 @@ Page({ |
| 125 | 125 | * 生命周期函数--监听页面显示 |
| 126 | 126 | */ |
| 127 | 127 | onShow: function () { |
| 128 | + var th=this,app_d=getApp().globalData; | |
| 129 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + app_d.user_id, { | |
| 130 | + success: function (e) { | |
| 131 | + var userInfo = e.data.data; | |
| 132 | + if(userInfo['card_field']){ | |
| 133 | + getApp().confirmBox("您已经是plus会员"); | |
| 134 | + setTimeout(function () { | |
| 135 | + var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 136 | + wx.reLaunch({url: u_url}) | |
| 137 | + },1500) | |
| 138 | + } | |
| 139 | + }, | |
| 140 | + }); | |
| 141 | + | |
| 128 | 142 | this.getPlusCardType(); |
| 129 | 143 | }, |
| 130 | 144 | |
| ... | ... | @@ -271,8 +285,12 @@ Page({ |
| 271 | 285 | }, |
| 272 | 286 | //--支付成功,跳转到等级卡续费页面-- |
| 273 | 287 | success:function () { |
| 274 | - var u_url="/pages/user/cardinfo/cardinfo"; | |
| 275 | - wx.reLaunch({url:u_url}) | |
| 288 | + var th=this; | |
| 289 | + getApp().my_warnning("支付成功", 0, th); | |
| 290 | + setTimeout(function () { | |
| 291 | + var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 292 | + wx.reLaunch({url: u_url}) | |
| 293 | + },1500) | |
| 276 | 294 | }, |
| 277 | 295 | |
| 278 | 296 | //--绑定邀请码的输入-- | ... | ... |