diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js
index 3a695eb..c789f95 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.js
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -32,24 +32,28 @@ Page({
GetList: function () {
var th = this;
var url = "/api/weshop/marketing/giftbag/bound/get";
+ wx.showLoading({
+ title: '加载中',
+ })
getApp().request.promiseGet(url, {
data: {
"actId": th.data.getActId, //活动id
- "actType":4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
+ "actType": 4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
"giftBagId": th.data.giftID, //礼包ID
"storeId": a.stoid, //商家ID
"userId": d.user_id //用户ID
}
}).then(res => {
+ wx.hideLoading();
if (res.data.code == 0) {
- if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons!=null) {
+ if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) {
//礼包内容--礼券
th.setData({
cardShow: true,
cards: res.data.data.lbCoupons
})
}
- if (res.data.data.lbSM.length > 0 && res.data.data.lbSM!=nll) {
+ if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != nll) {
//礼包内容--服务项目
th.setData({
itemShow: true,
@@ -100,7 +104,8 @@ Page({
if (res.data.data.actIntro != '') {
th.setData({
textShow: true,
- textTitle: res.data.data.actIntro
+ textTitle: res.data.data.actIntro.replace(/\
/g, '\div>')
})
}
} else {
@@ -119,11 +124,7 @@ Page({
th.GetList();
},
onShow: function onShow() {
- var th = this;
- var textTitle = th.data.textTitle.replace(/
![]()
-
-
-
-
-
-
-
- ______
-
-
- 新人专享\n你的美丽我来缔造
-
-
- ______
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 免费领取
-
-
- {{item.fromName}}
-
-
-
-
- {{item.fromName}}
-
-
- {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
-
-
-
-
-
+
+
+
+
+
+
+
+ ______
-
-
-
-
-
+
+ 新人专享\n你的美丽我来缔造
-
-
-
-
-
-
- ———
-
-
- 新人专享优惠券
-
-
- ———
-
-
-
-
-
-
-
-
- 全场通用
-
-
- 品牌限定
-
-
- 品类限定
-
-
- 用途限定
-
-
- 分类限定
-
-
- {{item.sum+"元券"}}
- {{"满"+item.buySum+"元可以用"}}
-
-
-
-
+
+ ______
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- ———
-
-
- 新人专享福利
-
-
- ———
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
-
-
-
-
-
+
+
+
+
+
-
- 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+
+ 包邮券
+
+
+ {{item.sum+"元券"}}
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+ ———
+
+
+ 新人专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 51ca204..d4f2510 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -37,7 +37,7 @@ Page({
th.getList();
},
onShow: function() {
-
+
},
GetBuyPrice: function(e) {
@@ -57,6 +57,9 @@ Page({
},
function() {
my_confirm.open_cancel(0);
+ wx.showLoading({
+ title: '加载中',
+ })
var json = {
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
@@ -76,6 +79,7 @@ Page({
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
var order_sn = res.data.data.orderSn;
res = res.data.data.result;
@@ -89,7 +93,9 @@ Page({
success: function(res) {
getApp().goto(url);
},
- fail: function(res) {}
+ fail: function(res) {
+ getApp().my_confirm("取消支付", 0, th);
+ }
});
} else {
getApp().my_warnning(res.data.msg, 0, th);
@@ -99,7 +105,6 @@ Page({
}
-
)
@@ -118,6 +123,9 @@ Page({
},
function() {
my_confirm.open_cancel(0);
+ wx.showLoading({
+ title: '加载中',
+ })
var json = {
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
@@ -136,6 +144,7 @@ Page({
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
getApp().my_warnning("兑换成功!", 1, th);
} else {
@@ -197,7 +206,7 @@ Page({
var th = this;
var url = e.currentTarget.dataset.url;
getApp().goto(url);
-
+
},
//下拉事件
onReachBottom: function() {
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 3ed78b4..a7e6a29 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -61,6 +61,9 @@ Page({
},
function() {
my_confirm.open_cancel(0);
+ wx.showLoading({
+ title: '加载中',
+ })
var json = {
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
@@ -80,6 +83,7 @@ Page({
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
var res = res.data.data;
var order_sn = res.orderSn;
@@ -124,6 +128,9 @@ Page({
},
function() {
my_confirm.open_cancel(0);
+ wx.showLoading({
+ title: '加载中',
+ })
var json = {
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
@@ -142,6 +149,7 @@ Page({
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
getApp().my_warnning("兑换成功!", 1, th);
} else {
@@ -157,6 +165,9 @@ Page({
GetMyGiftList: function() {
var _this = this;
var th = this;
+ wx.showLoading({
+ title: '加载中',
+ })
getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
data: {
"storeId": a.stoid, //商家ID
@@ -164,6 +175,7 @@ Page({
"orderSn": th.data.orderSn
},
success: function success(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
th.setData({
giftImage: th.data.iurl + res.data.data.lbUrl,
@@ -279,6 +291,9 @@ Page({
//获取核销码
getcode: function() {
var th = this;
+ wx.showLoading({
+ title: '加载中',
+ })
var orderSn = th.data.orderSn; //订单号
var json = {
"storeId": a.stoid,
@@ -294,6 +309,7 @@ Page({
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res) {
+ wx.hideLoading();
if (res.data.code == 0) {
th.setData({
code: res.data.data
diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js
index e1c5ca3..6dd2691 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.js
+++ b/pages/giftpack/mygiftpack/mygiftpack.js
@@ -28,8 +28,6 @@ Page({
},
onLoad: function(options) {
- // this.getStorageID = options.stoid;
- // this.getUserID = options.userid;
var th = this;
th.setData({
getStorageID: a.stoid,
@@ -40,49 +38,15 @@ Page({
th.getList();
},
onShow: function() {
- // this.pages = 1;
- // this.pageSize = 10;
- // this.loadingType = 0;
- // this.getList();
- // var th = this;
- // th.setData({
- // pages: 1,
- // pageSize: 10,
- // loadingType: 0
- // })
- // th.getList();
- },
- // methods: {
- // BuyGift: function BuyGift() {
- // /*销毁跳转*/
- // uni.reLaunch({
- // url: 'pages/giftpack/buygiftpack/giftpackbuy?stoid=' + this.getStorageID + '&userid=' + this.getUserID
- // });
-
- // },
- // GetGiftPackList: function(getId, ojb) {
- // //不销毁调整
- // uni.navigateTo({
- // url: 'pages/giftpack/giftpacklist/giftpacklist?isBuy=0&stoid=' + this.getStorageID + '&userid=' + this.getUserID + '&id=' +
- // getId
- // });
- // },
+ },
getList: function() {
var th = this;
- // if (th.data.loadingType) {
- // return false;
- // }
- // // that.loadingType = 1;
- // th.setData({
- // loadingType: 1
- // })
+ wx.showLoading({
+ title: '加载中',
+ })
getApp().request.get('/api/weshop/marketing/my/giftbag/page', {
data: {
- // "storeId": this.getStorageID, //商家ID
- // "userId": this.getUserID, //用户ID
- // "page": this.pages,
- // "pageSize": this.pageSize
storeId: th.data.getStorageID, //商家ID
userId: th.data.getUserID, //用户ID
page: th.data.curpage,
@@ -108,47 +72,7 @@ Page({
is_read: 1
})
}
- // if (res.data.code == 0) {
- // if (res.data.data.total > 0) {
- // // _this.isEmpty = false;
- // _this.setData({
- // isEmpty: false
- // })
- // } else {
- // // _this.isEmpty = true;
- // _this.setData({
- // isEmpty: true
- // })
- // }
- // if (res.data.data.pageData.length == 0) {
- // // _this.loadingType = 2;
- // _this.setData({
- // loadingType: 2
- // })
- // } else {
- // var wareCard = that.wareCard;
- // var is_resad = 0;
- // // if (_this.wareCard.length < res.data.data.pageData.length) {
- // if (wareCard.length < res.data.data.total) {
- // for (var i = 0; i < res.data.data.pageData.length; i++) {
- // wareCard.push(res.data.data.pageData[i]);
- // }
- // }else{
- // is_resad=1
- // }
- // _this.setData({
- // wareCard: wareCard,
- // is_resad: is_resad
- // })
-
- // // _this.loadingType = 0;
- // _this.setData({
- // loadingType: 0
- // })
- // }
- // } else {
-
- // }
+
}
});
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;