From 774042f5b0795d6e80d0508a7c6c4402b7346bb2 Mon Sep 17 00:00:00 2001 From: iceling Date: Tue, 14 Jan 2020 10:00:04 +0800 Subject: [PATCH] 新人有礼提示语修改 --- pages/giftpack/newvipgift/newvipgift.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pages/giftpack/newvipgift/newvipgift.js b/pages/giftpack/newvipgift/newvipgift.js index 135692a..d19ccc0 100644 --- a/pages/giftpack/newvipgift/newvipgift.js +++ b/pages/giftpack/newvipgift/newvipgift.js @@ -28,7 +28,7 @@ Page({ integralTitle: "", growUpTitle: "", is_sub: 0, //是否重复领取 - + }, GetList: function() { var th = this; @@ -39,7 +39,7 @@ Page({ getApp().request.promiseGet(url, { data: { "actId": th.data.getActId, //活动id - "actType":1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 + "actType": 1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 "giftBagId": th.data.giftID, //礼包ID "storeId": a.stoid, //商家ID "userId": d.user_id //用户ID @@ -47,14 +47,14 @@ Page({ }).then(res => { wx.hideLoading(); if (res.data.code == 0) { - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) { + if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) { //礼包内容--礼券 th.setData({ cardShow: true, cards: res.data.data.lbCoupons }) } - if (res.data.data.lbSM != null && res.data.data.lbSM.length>0) { + if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) { //礼包内容--服务项目 th.setData({ itemShow: true, @@ -125,7 +125,7 @@ Page({ th.GetList(); }, onShow: function() { - + }, GetReceive: function() { var th = this; @@ -137,7 +137,9 @@ Page({ th.setData({ is_sub: 1 }) - + wx.showLoading({ + title: '加载中', + }) var json = { "actId": th.data.getActId, //活动Id "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 @@ -155,6 +157,7 @@ Page({ 'content-type': 'application/json' }, // 设置请求的 header success: function(res) { + wx.hideLoading(); th.setData({ is_sub: 0 }) @@ -164,19 +167,19 @@ Page({ }) getApp().my_warnning("领取成功", 1, th); } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); + getApp().my_warnning(res.data.msg, 0, th); } } }) } }, //界面跳转 - goto:function(e){ + goto: function(e) { var url = e.currentTarget.dataset.url; getApp().goto(url); }, //图片失败,默认图片 - bind_bnerr1: function (e) { + bind_bnerr1: function(e) { var th = this; var _errImg = e.target.dataset.errorimg; var _Img = e.target.dataset.img; -- libgit2 0.21.4