kk.shi лет назад: 3
Родитель
Сommit
6d76257041

+ 11 - 5
pages/luckDraw/prize.js

@@ -94,11 +94,17 @@ Page({
   uaerPrizeListView: function(data) {
   uaerPrizeListView: function(data) {
       if (!Array.isArray(data.goodsItemList) || data.goodsItemList.length == 0) {
       if (!Array.isArray(data.goodsItemList) || data.goodsItemList.length == 0) {
           console.log("奖品数据");
           console.log("奖品数据");
-              this.setData({
-                  noResult: true,
-                  mobileTop:getMobileCache(),
-                  goodsItemList: []
-              })
+              if (this.data.page == 1) {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noResult: true
+                })
+            } else {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noMore: true
+                })
+            }
           return
           return
       }
       }
       data.goodsItemList.forEach(v => {
       data.goodsItemList.forEach(v => {

+ 1 - 0
pages/luckDraw/prize.wxml

@@ -42,6 +42,7 @@
             </navigator>
             </navigator>
       </view>
       </view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
+      <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>
     </view>
     </view>
 </view>
 </view>
 
 

+ 9 - 3
pages/luckDraw/profile.js

@@ -94,11 +94,17 @@ Page({
     uaerPrizeListView: function(data) {
     uaerPrizeListView: function(data) {
         if (!Array.isArray(data.goodsItemList) || data.goodsItemList.length == 0) {
         if (!Array.isArray(data.goodsItemList) || data.goodsItemList.length == 0) {
             console.log("优惠券数据为空");
             console.log("优惠券数据为空");
+            if (this.data.page == 1) {
                 this.setData({
                 this.setData({
-                    noResult: true,
                     mobileTop:getMobileCache(),
                     mobileTop:getMobileCache(),
-                    goodsItemList:[]
+                    noResult: true
                 })
                 })
+            } else {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noMore: true
+                })
+            }
             return
             return
         }
         }
         data.goodsItemList.forEach(v => {
         data.goodsItemList.forEach(v => {
@@ -121,7 +127,7 @@ Page({
      * 页面上拉触底事件的处理函数
      * 页面上拉触底事件的处理函数
     */
     */
     onReachBottom: function () {
     onReachBottom: function () {
-        if (this.data.lock || this.data.noResult) {
+        if (this.data.lock || this.data.noMore) {
             return
             return
         }
         }
         this.data.lock = true
         this.data.lock = true

+ 1 - 0
pages/luckDraw/profile.wxml

@@ -75,6 +75,7 @@
       </view>
       </view>
       
       
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
+      <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
     </view>
     </view>
 </view>
 </view>
 
 

+ 8 - 3
pages/luckDraw/recordPrize.js

@@ -93,10 +93,15 @@ Page({
     uaerPrizeListView: function(data) {
     uaerPrizeListView: function(data) {
         if (!Array.isArray(data) || data.length == 0) {
         if (!Array.isArray(data) || data.length == 0) {
             console.log("抽奖记录数据为空");
             console.log("抽奖记录数据为空");
+            if (this.data.page == 1) {
                 this.setData({
                 this.setData({
-                    noResult: true,
-                    userDrawItemList:[]
+                    noResult: true
                 })
                 })
+            } else {
+                this.setData({
+                    noMore: true
+                })
+            }
             return
             return
         }
         }
         data.forEach(v => {
         data.forEach(v => {
@@ -118,7 +123,7 @@ Page({
      * 页面上拉触底事件的处理函数
      * 页面上拉触底事件的处理函数
      */
      */
     onReachBottom: function () {
     onReachBottom: function () {
-        if (this.data.lock || this.data.noResult) {
+        if (this.data.lock || this.data.noMore) {
             return
             return
         }
         }
         this.data.lock = true
         this.data.lock = true

+ 1 - 0
pages/luckDraw/recordPrize.wxml

@@ -28,6 +28,7 @@
         </view>
         </view>
       </view>
       </view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无抽奖记录 ————</view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无抽奖记录 ————</view>
+      <view class="no_result" wx:if="{{noMore}}">———— 更多抽奖 | 敬请期待 ————</view>
     </view>
     </view>
 </view>
 </view>