Commit 767a574a2d33a64985326061a25992fdc48a9774

Authored by WXD-SEASON\season
1 parent 946dad07

user_spsy转到H包

app.json
@@ -13,8 +13,7 @@ @@ -13,8 +13,7 @@
13 "pages/activity/seckill_list/seckill_list", 13 "pages/activity/seckill_list/seckill_list",
14 "pages/activity/pind_list/pind_list", 14 "pages/activity/pind_list/pind_list",
15 "pages/team/team_show/team_show", 15 "pages/team/team_show/team_show",
16 - "pages/user/userqy/userqy",  
17 - "pages/user/user_spsy/user_spsy", 16 + "pages/user/userqy/userqy",
18 "pages/user/plus/plus", 17 "pages/user/plus/plus",
19 "pages/user/my_service/i_service", 18 "pages/user/my_service/i_service",
20 "pages/giftpack/birthdaygift/birthdaygift", 19 "pages/giftpack/birthdaygift/birthdaygift",
@@ -251,7 +250,8 @@ @@ -251,7 +250,8 @@
251 "root": "packageH/", 250 "root": "packageH/",
252 "name": "pack8", 251 "name": "pack8",
253 "pages": [ 252 "pages": [
254 - "pages/goodsInfo/goodsInfo" 253 + "pages/goodsInfo/goodsInfo",
  254 + "pages/user/user_spsy/user_spsy"
255 ] 255 ]
256 } 256 }
257 ], 257 ],
packageB/pages/user/user_coupon/user_coupon.js
@@ -14,6 +14,11 @@ Page({ @@ -14,6 +14,11 @@ Page({
14 GradeId:null, 14 GradeId:null,
15 FormId:null, 15 FormId:null,
16 now:'', 16 now:'',
  17 + ismore: 0, //数据是否全部加载完成
  18 + is_read: 0, //是否查询过我的礼包接口
  19 + curpage: 1, //当前分页数
  20 + pageSize: 10, //页大小
  21 + total: 0, //总数量
17 }, 22 },
18 clik_coupon:function(){ 23 clik_coupon:function(){
19 this.setData({ 24 this.setData({
@@ -41,30 +46,85 @@ Page({ @@ -41,30 +46,85 @@ Page({
41 /** 46 /**
42 * 生命周期函数--监听页面显示 47 * 生命周期函数--监听页面显示
43 */ 48 */
44 - onShow:async function () {  
45 - var th = this,q_list=null;  
46 -  
47 - //--获取列表--  
48 - await getApp().request.promiseGet("/api/weshop/users/grade/wechat/cash/page", {  
49 - data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id}  
50 - }).then(res => {  
51 - q_list = res.data.data.pageData;  
52 - })  
53 - //取分类最后一级  
54 - for(var i in q_list){  
55 - var name=q_list[i].UseObjectName;  
56 - var arr=name.split("\\")  
57 - q_list[i].UseObjectName=arr[arr.length-1];  
58 - q_list[i].Remark = q_list[i].Remark.replace(/\n/g, "\n")  
59 - }  
60 - th.setData({quan_list:q_list});  
61 - 49 + onShow:function () {
  50 + this.getList();
62 }, 51 },
63 52
64 /** 53 /**
65 * 页面上拉触底事件的处理函数 54 * 页面上拉触底事件的处理函数
66 */ 55 */
67 onReachBottom: function () { 56 onReachBottom: function () {
  57 + var th = this;
  58 + if (th.data.total <= th.data.pageSize) return;
  59 + if (th.data.ismore) return;
  60 + th.getList();
  61 +
  62 +
  63 + },
  64 + getList: function () {
  65 +
  66 + if(this.data.ismore) return false;
  67 + if(this.data.searching) return false;
  68 + this.data.searching=1;
  69 +
  70 + wx.showLoading({
  71 + title: '加载中.',
  72 + })
  73 +
  74 + var th = this,q_list=null;
  75 +
  76 + //--获取列表--
  77 + getApp().request.promiseGet("/api/weshop/users/grade/wechat/cash/page", {
  78 + data:{ storeId:os.stoid,
  79 + FormId:th.data.FormId,
  80 + GradeId:th.data.GradeId,
  81 + userId:getApp().globalData.user_id,
  82 + page: th.data.curpage,
  83 + pageSize: th.data.pageSize}
  84 + }).then(res => {
  85 + th.data.searching=0;
  86 + if (utils.ajax_ok(res)){
  87 +
  88 +
  89 + q_list = res.data.data.pageData;
  90 +
  91 + //取分类最后一级
  92 + for(var i in q_list){
  93 + var name=q_list[i].UseObjectName;
  94 + var arr=name.split("\\")
  95 + q_list[i].UseObjectName=arr[arr.length-1];
  96 + q_list[i].Remark = q_list[i].Remark.replace(/\n/g, "\n")
  97 + }
  98 + th.data.curpage++;
  99 +
  100 + var quan_list=th.data.quan_list||[];
  101 +
  102 + quan_list=quan_list.concat(q_list);
  103 + if (quan_list.length>=res.data.data.total) {
  104 + th.setData({
  105 + is_read: 1,
  106 + ismore: 1,
  107 + is_get:1,
  108 + })
  109 + }
  110 + th.setData({
  111 + quan_list:quan_list,
  112 + total: res.data.data.total
  113 + });
  114 + }
  115 + else {
  116 +
  117 + th.setData({
  118 + is_read: 1,
  119 + ismore: 1,
  120 + is_get:1,
  121 + })
  122 + }
  123 + wx.hideLoading();
  124 +
  125 + })
  126 +
  127 +
68 128
69 }, 129 },
70 130
packageB/pages/user/user_coupon/user_coupon.wxml
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
6 <!-- 券内容 --> 6 <!-- 券内容 -->
7 <view class="q_content"> 7 <view class="q_content">
8 <view class="item" wx:for="{{quan_list}}"> 8 <view class="item" wx:for="{{quan_list}}">
  9 +
  10 +
9 <view class="xc-coupon-frame flex-center"> 11 <view class="xc-coupon-frame flex-center">
10 <view class="coupon-frame flex rel"> 12 <view class="coupon-frame flex rel">
11 <!-- 锯齿 --> 13 <!-- 锯齿 -->
@@ -104,6 +106,11 @@ @@ -104,6 +106,11 @@
104 </view> 106 </view>
105 </view> 107 </view>
106 </view> 108 </view>
  109 +
  110 + <block wx:if="{{is_get}}">
  111 + <!-- 没有更多数据 -->
  112 + <view class="noMore 1">—— 已经到底了 ——</view>
  113 + </block>
107 </view> 114 </view>
108 115
109 <!-- 弹出框扫描 --> 116 <!-- 弹出框扫描 -->
packageB/pages/user/user_coupon/user_coupon.wxss
@@ -178,4 +178,10 @@ margin:0 0rpx 0 22rpx; @@ -178,4 +178,10 @@ margin:0 0rpx 0 22rpx;
178 .blue{background-color:#5e82e3;} 178 .blue{background-color:#5e82e3;}
179 .g_gray{background-color: #aaaaaa} 179 .g_gray{background-color: #aaaaaa}
180 180
181 -.f_text{text-align: center; height:96rpx; }  
182 \ No newline at end of file 181 \ No newline at end of file
  182 +.f_text{text-align: center; height:96rpx; }
  183 +.noMore {
  184 + padding: 20rpx;
  185 + color: #bbb;
  186 + text-align: center;
  187 + font-size: 22rpx;
  188 +}
183 \ No newline at end of file 189 \ No newline at end of file
packageE/pages/user/user_fw/user_fw.js
@@ -39,7 +39,7 @@ Page({ @@ -39,7 +39,7 @@ Page({
39 var fw_list=null; 39 var fw_list=null;
40 //--获取列表-- 40 //--获取列表--
41 await getApp().request.promiseGet("/api/weshop/users/grade/wechat/sm/page", { 41 await getApp().request.promiseGet("/api/weshop/users/grade/wechat/sm/page", {
42 - data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id} 42 + data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id,pageSize:100}
43 }).then(res => { 43 }).then(res => {
44 fw_list = res.data.data.pageData; 44 fw_list = res.data.data.pageData;
45 }) 45 })
packageG/pages/user/userqy/userqy.js
@@ -209,7 +209,7 @@ Page({ @@ -209,7 +209,7 @@ Page({
209 getApp().goto("/packageE/pages/user/user_fw/user_fw?gradeId="+th.data.gradeId+"&FormId="+item.Id); 209 getApp().goto("/packageE/pages/user/user_fw/user_fw?gradeId="+th.data.gradeId+"&FormId="+item.Id);
210 break; 210 break;
211 case "03": 211 case "03":
212 - getApp().goto("/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id); 212 + getApp().goto("/packageH/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id);
213 break; 213 break;
214 case "10": 214 case "10":
215 getApp().request.get("/api/weshop/users/grade/vipprivilegelist/other/get",{ 215 getApp().request.get("/api/weshop/users/grade/vipprivilegelist/other/get",{
pages/user/user_spsy/user_spsy.js renamed to packageH/pages/user/user_spsy/user_spsy.js
1 // pages/user/usersy/usersy.js 1 // pages/user/usersy/usersy.js
2 var e = getApp(), 2 var e = getApp(),
3 os = e.globalData.setting; 3 os = e.globalData.setting;
4 -var ut = require('../../../utils/util');  
5 -var regeneratorRuntime = require('../../../utils/runtime.js'); 4 +var ut = require('../../../../utils/util');
  5 +var regeneratorRuntime = require('../../../../utils/runtime.js');
6 6
7 Page({ 7 Page({
8 /** 8 /**
@@ -126,6 +126,7 @@ Page({ @@ -126,6 +126,7 @@ Page({
126 FormId, 126 FormId,
127 storeId: os.stoid, 127 storeId: os.stoid,
128 userId: getApp().globalData.user_id, 128 userId: getApp().globalData.user_id,
  129 + pageSize:100
129 } 130 }
130 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", { 131 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", {
131 data: req_data, 132 data: req_data,
pages/user/user_spsy/user_spsy.json renamed to packageH/pages/user/user_spsy/user_spsy.json
pages/user/user_spsy/user_spsy.wxml renamed to packageH/pages/user/user_spsy/user_spsy.wxml
pages/user/user_spsy/user_spsy.wxss renamed to packageH/pages/user/user_spsy/user_spsy.wxss