From fdbbc44839430278c9efeda4a55be793116509b1 Mon Sep 17 00:00:00 2001
From: yvan.ni <765199919@qq.com>
Date: Fri, 17 Jan 2020 10:26:26 +0800
Subject: [PATCH] 优惠券的修改
---
pages/user/coupons/coupons.js | 7 +++++--
pages/user/coupons/coupons.wxml | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/pages/user/coupons/coupons.js b/pages/user/coupons/coupons.js
index b4a1052..bfbf0ac 100644
--- a/pages/user/coupons/coupons.js
+++ b/pages/user/coupons/coupons.js
@@ -57,6 +57,7 @@ Page({
b_isuse_arr:null,//包邮券的已使用的内容
isloading:0, //正在加载中的代码
+ isset:0,
},
// 点击选中二维码
click: function(e) {
@@ -235,7 +236,7 @@ Page({
if(big_arr.length==0 && this.data.b_can_arr){
big_arr=this.data.b_can_arr;
}
- init_num=this.data.b_can_arr.length;
+ if(this.data.b_can_arr) init_num=this.data.b_can_arr.length;
wx.showLoading(); th.data.isloading=1;
getApp().request.promiseGet("/api/weshop/users/listQuan", {
@@ -246,6 +247,8 @@ Page({
var a = res.data;
val = a.data.total;
var details = a.data.pageData;
+
+ th.setData({isset:1});
//没有找到优惠券的时候
if (details.length == 0 && th.data.current_page==1) {
@@ -289,6 +292,7 @@ Page({
},
overdue:function(){
+
if(this.data.isloading) return;
var len = this.data.details.length;
@@ -348,7 +352,6 @@ Page({
});
-
setTimeout(function () {
if(th.data.current_page==1) details=big_arr;
for (var i = 0; i < details.length; i++) {
diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml
index 83ec009..2aea6bb 100644
--- a/pages/user/coupons/coupons.wxml
+++ b/pages/user/coupons/coupons.wxml
@@ -20,7 +20,7 @@
({{number}})
-
+
没有微券?
快去兑换吧
--
libgit2 0.21.4