Commit aaae60ece9f99dbea14b489ca2fe42a5abc00606

Authored by 后端开发-许程
2 parents 82221a1c 821a7b39

Merge branch 'dev_20191114' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev_20191114

app.json
@@ -68,8 +68,11 @@ @@ -68,8 +68,11 @@
68 "pages/user/user_spsy/user_spsy", 68 "pages/user/user_spsy/user_spsy",
69 "pages/user/user_fw/user_fw", 69 "pages/user/user_fw/user_fw",
70 "pages/user/user_coupon/user_coupon", 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 "window": { 77 "window": {
75 "backgroundTextStyle": "light", 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 r = t.globalData, 2 r = t.globalData,
8 a = t.request, 3 a = t.request,
9 o = t.globalData.setting, 4 o = t.globalData.setting,
10 os = o, 5 os = o,
11 i = require("../../../utils/util.js"), 6 i = require("../../../utils/util.js"),
12 ut = i, 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,8 +28,7 @@ Page({
34 28
35 }, 29 },
36 selectDetailed: function() { 30 selectDetailed: function() {
37 - var th = this,  
38 - e = th; 31 + var th = this, e = th;
39 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { 32 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", {
40 data: { 33 data: {
41 storeId: o.stoid, 34 storeId: o.stoid,
@@ -44,20 +37,24 @@ Page({ @@ -44,20 +37,24 @@ Page({
44 pageSize: th.data.pageSize 37 pageSize: th.data.pageSize
45 } 38 }
46 }).then(res => { 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 wx.stopPullDownRefresh(); 59 wx.stopPullDownRefresh();
63 60
pages/user/Detailed/Detailed.json
1 { 1 {
2 - "navigationBarTitleText": "邀请明细", 2 + "navigationBarTitleText": "邀请明细",
3 "usingComponents": { 3 "usingComponents": {
4 "warn": "/components/long_warn/long_warn" 4 "warn": "/components/long_warn/long_warn"
5 } 5 }
pages/user/Detailed/Detailed.wxml
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
11 <view>奖励明细</view> 11 <view>奖励明细</view>
12 </view> 12 </view>
13 </view> 13 </view>
  14 +
  15 +
14 16
15 <!-- 奖励详情 --> 17 <!-- 奖励详情 -->
16 <view class="flex-space-between fs28 maxvalue" wx:for="{{arrayDetailed}}"> 18 <view class="flex-space-between fs28 maxvalue" wx:for="{{arrayDetailed}}">
pages/user/Detailed/Detailed.wxss
@@ -13,6 +13,8 @@ @@ -13,6 +13,8 @@
13 width: 250rpx; 13 width: 250rpx;
14 } 14 }
15 15
  16 +
  17 +
16 .phone { 18 .phone {
17 width: 250rpx; 19 width: 250rpx;
18 } 20 }
pages/user/index/index.wxml
@@ -180,7 +180,7 @@ @@ -180,7 +180,7 @@
180 <view class="fs26">联系客服</view> 180 <view class="fs26">联系客服</view>
181 </view> 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 <image class="xc-center-img " src="{{iurl}}/miniapp/images/plus/privilege_o.png"></image> 184 <image class="xc-center-img " src="{{iurl}}/miniapp/images/plus/privilege_o.png"></image>
185 <view class="fs26">plus会员</view> 185 <view class="fs26">plus会员</view>
186 </view> 186 </view>
pages/user/plus/plus.js
@@ -125,6 +125,20 @@ Page({ @@ -125,6 +125,20 @@ Page({
125 * 生命周期函数--监听页面显示 125 * 生命周期函数--监听页面显示
126 */ 126 */
127 onShow: function () { 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 this.getPlusCardType(); 142 this.getPlusCardType();
129 }, 143 },
130 144
@@ -271,8 +285,12 @@ Page({ @@ -271,8 +285,12 @@ Page({
271 }, 285 },
272 //--支付成功,跳转到等级卡续费页面-- 286 //--支付成功,跳转到等级卡续费页面--
273 success:function () { 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 //--绑定邀请码的输入--