Commit f7875257 by 谢中龙

提代码

parent dce82af3
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
// 修改 BRANCH_ID 为对应的商户id // 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应 // app.js 中brandId 修改为对应
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test, 预生产 pre const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
//仅生产环境时 配置 : //仅生产环境时 配置 :
//3001 3001 , //3001 3001 ,
//泰华 2006 , //泰华 2006 ,
//多多一上 2007 , //多多一上 2007 ,
//雪岛书屋 2008 //雪岛书屋 2008
//苏州邻里 2003 //苏州邻里 2003
const BRANCH_ID = 3001 const BRANCH_ID = 1002
const isMall = true const isMall = true
const needMock = '' // const needMock = '' //
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wx313ec36b710125d4", "appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E", "projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
......
...@@ -80,7 +80,7 @@ wxService.page({ ...@@ -80,7 +80,7 @@ wxService.page({
}, },
//获取我的超值卡列表 //获取我的超值卡列表
getMyValueCardList(){ getMyValueCardList(refresh){
const { member } = wx.getStorageSync('_baseUserInfo'); const { member } = wx.getStorageSync('_baseUserInfo');
if (!member) { if (!member) {
wx.showToast({ wx.showToast({
...@@ -122,7 +122,13 @@ wxService.page({ ...@@ -122,7 +122,13 @@ wxService.page({
myCardsList: this.data.myCardsList, myCardsList: this.data.myCardsList,
isNoData: this.data.isNoData isNoData: this.data.isNoData
}) })
console.log(data) }
if(refresh){
wx.showToast({
title: '刷新成功',
});
wx.stopPullDownRefresh();
} }
wx.hideLoading(); wx.hideLoading();
}); });
...@@ -176,14 +182,21 @@ wxService.page({ ...@@ -176,14 +182,21 @@ wxService.page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
wx.stopPullDownRefresh(); this.data.pageNum = 1;
this.data.myCardsList = [];
this.data.isNoData = false;
this.getMyValueCardList(true);
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
if(!this.data.isNoData){
this.data.pageNum++;
this.getMyValueCardList();
}
}, },
}) })
\ No newline at end of file
...@@ -107,8 +107,8 @@ wxService.page({ ...@@ -107,8 +107,8 @@ wxService.page({
} }
let memeberId = member.id, let memeberId = member.id,
storeId = member.storeId; // storeId = member.storeId;
// storeId = ''; storeId = '';
let activityId = this.data.id; let activityId = this.data.id;
let url = ''; let url = '';
if (this.data.buyType == 1){ if (this.data.buyType == 1){
...@@ -118,8 +118,16 @@ wxService.page({ ...@@ -118,8 +118,16 @@ wxService.page({
url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`; url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`;
} }
wx.showLoading({
title: '支付中..',
});
wxService.post(url).then(res => { wxService.post(url).then(res => {
wx.hideLoading();
if(res.data.result == 0){ if(res.data.result == 0){
this.setData({
checked: false,
});
//现金支付 //现金支付
if (this.data.buyType == 1){ if (this.data.buyType == 1){
let data = res.data.data ? res.data.data : null; let data = res.data.data ? res.data.data : null;
...@@ -156,8 +164,17 @@ wxService.page({ ...@@ -156,8 +164,17 @@ wxService.page({
} }
else{ else{
wx.showToast({ wx.showToast({
title: '购买成功!', title: '支付成功!',
});
wx.showLoading({
title: '跳转中...',
}); });
setTimeout(() => {
wx.hideLoading();
wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard',
});
}, 500);
} }
} }
else{ else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment