Commit 821a7b39e3a4a8dbffc3b96b85515beef9d2caf6

Authored by yvan.ni
1 parent 7ae5ebe1

购买等级卡流程, 明细的修改

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({  
16 -  
17 - 8 + s = require("../../../utils/common.js");
18 9
  10 +Page({
19 /** 11 /**
20 * 页面的初始数据 12 * 页面的初始数据
21 */ 13 */
@@ -36,8 +28,7 @@ Page({ @@ -36,8 +28,7 @@ Page({
36 28
37 }, 29 },
38 selectDetailed: function() { 30 selectDetailed: function() {
39 - var th = this,  
40 - e = th; 31 + var th = this, e = th;
41 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { 32 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", {
42 data: { 33 data: {
43 storeId: o.stoid, 34 storeId: o.stoid,
@@ -46,20 +37,24 @@ Page({ @@ -46,20 +37,24 @@ Page({
46 pageSize: th.data.pageSize 37 pageSize: th.data.pageSize
47 } 38 }
48 }).then(res => { 39 }).then(res => {
49 - th.data.page++;//当前页数+1  
50 - var arr1 = th.data.arrayDetailed;//获取明细数组  
51 - var arr2 = res.data.data.pageData;//获取当前查询数据  
52 - 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];//把当前查询数组拼接到原本数组后面
53 47
54 - var ismore = 0;  
55 - if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 48 + var ismore = 0;
  49 + if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断
56 50
57 - th.setData({  
58 - arrayDetailed: arr3,  
59 - total: res.data.data.total,  
60 - ismore: ismore,  
61 - isDetailed: 1  
62 - }) 51 + th.setData({
  52 + arrayDetailed: arr3,
  53 + total: res.data.data.total,
  54 + ismore: ismore,
  55 + isDetailed: 1
  56 + })
  57 + }
63 }), 58 }),
64 wx.stopPullDownRefresh(); 59 wx.stopPullDownRefresh();
65 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
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </view> 13 </view>
14 14
15 15
16 - 16 +
17 <!-- 奖励详情 --> 17 <!-- 奖励详情 -->
18 <view class="flex-space-between fs28 maxvalue" wx:for="{{arrayDetailed}}"> 18 <view class="flex-space-between fs28 maxvalue" wx:for="{{arrayDetailed}}">
19 19
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