Commit 333d78d8 by 谢中龙

提交版本

parent 5985997f
...@@ -79,6 +79,7 @@ const prod_brand_config = { ...@@ -79,6 +79,7 @@ const prod_brand_config = {
logo: 'https://img3.bigaka.com/prd/3001/202003/20200331/3001842823fb-2601-4b58-a648-79ad799ad425.png', logo: 'https://img3.bigaka.com/prd/3001/202003/20200331/3001842823fb-2601-4b58-a648-79ad799ad425.png',
openRefundTips : true,//是否开启退货须知显示 openRefundTips : true,//是否开启退货须知显示
refundTips : '温馨提示:退货通过审核后需将清单随包裹一起寄回或纸条备注(订单号与退货商品款号)【请务必审核通过后24小时内填写寄回运单号,拒签到付/顺丰/EMS/天天快递 不影响二次销售】',//退货须知文本 refundTips : '温馨提示:退货通过审核后需将清单随包裹一起寄回或纸条备注(订单号与退货商品款号)【请务必审核通过后24小时内填写寄回运单号,拒签到付/顺丰/EMS/天天快递 不影响二次销售】',//退货须知文本
//wx654ce96a7324e76f 小程序微信支付券
}, },
//泰华配置 //泰华配置
2006: { 2006: {
......
...@@ -60,7 +60,11 @@ wxService.page({ ...@@ -60,7 +60,11 @@ wxService.page({
pointDeductRuleUrl : '',//积分规则说明 pointDeductRuleUrl : '',//积分规则说明
avaliablePoint : 0,//可用积分数 avaliablePoint : 0,//可用积分数
pointDeductMoney : 0.00, pointDeductMoney : 0.00,
//积分支付数据
pointPayInfo : {
point : 0,
pointAmount : 0
},
}, },
//获取积分抵扣配置信息 //获取积分抵扣配置信息
...@@ -110,6 +114,7 @@ wxService.page({ ...@@ -110,6 +114,7 @@ wxService.page({
}); });
//需要计算显示订单价格 //需要计算显示订单价格
this.setPayPrice();
}, },
//显示积分抵扣规则 //显示积分抵扣规则
onTapShowDeductRule(){ onTapShowDeductRule(){
...@@ -289,7 +294,7 @@ wxService.page({ ...@@ -289,7 +294,7 @@ wxService.page({
this.setData({ this.setData({
useNotUserCoupon: true, useNotUserCoupon: true,
defalutCoupon: 0, defalutCoupon: 0,
couponId: '', couponId: 0,
couponSettingId: '', couponSettingId: '',
defalutCouponId: '', defalutCouponId: '',
currentCoupon: 0, currentCoupon: 0,
...@@ -376,8 +381,9 @@ wxService.page({ ...@@ -376,8 +381,9 @@ wxService.page({
let promotionPrice = (orderInitPrice - calCouponPrice) > 0 ? (orderInitPrice - calCouponPrice) : 0; let promotionPrice = (orderInitPrice - calCouponPrice) > 0 ? (orderInitPrice - calCouponPrice) : 0;
//看一下积分是否勾选了 //看一下积分是否勾选了
if(this.data.deductCheckStatus){ if(this.data.deductCheckStatus){
promotionPrice = parseFloat(promotionPrice - this.data.pointDeductMoney).toString(2); promotionPrice = promotionPrice*1 - this.data.pointDeductMoney*1;
} }
// 实际价格 - 优惠价 + plus // 实际价格 - 优惠价 + plus
this.setData({ this.setData({
// orderPrice: Math.round(orderInitPrice - orderCoupon) // orderPrice: Math.round(orderInitPrice - orderCoupon)
...@@ -679,6 +685,9 @@ wxService.page({ ...@@ -679,6 +685,9 @@ wxService.page({
if (this.data.couponId) { if (this.data.couponId) {
params.couponId = this.data.couponId; params.couponId = this.data.couponId;
} }
else if(this.data.couponId === 0){
params.couponId = 0;
}
wxService.post(`/sale/trade/buyer/preview`, params).then(res => { wxService.post(`/sale/trade/buyer/preview`, params).then(res => {
if (res) { if (res) {
...@@ -710,6 +719,19 @@ wxService.page({ ...@@ -710,6 +719,19 @@ wxService.page({
noSelectPrice: sum noSelectPrice: sum
}) })
} }
//获取是否有积分抵扣的
let pointPayInfo = data.pointPayInfo ? data.pointPayInfo : null;
if(pointPayInfo){
this.data.avaliablePoint = pointPayInfo.point;
this.data.pointDeductMoney = pointPayInfo.pointAmount;
if(pointPayInfo.point == 0 || pointPayInfo.pointAmount){
this.data.deductCheckStatus = false;
}
}
this.data.pointPayInfo = data.pointPayInfo;
//如果没有couponId则认为是第一次进来没有自己选择优惠券 //如果没有couponId则认为是第一次进来没有自己选择优惠券
if (!this.data.couponId) { if (!this.data.couponId) {
if (!this.data.useNotUserCoupon) { if (!this.data.useNotUserCoupon) {
...@@ -736,7 +758,10 @@ wxService.page({ ...@@ -736,7 +758,10 @@ wxService.page({
defalutCouponId: defalutCouponId, defalutCouponId: defalutCouponId,
couponSettingId: couponSettingId, couponSettingId: couponSettingId,
orderInitPrice: data.amount, orderInitPrice: data.amount,
totalGoodsPrice: this.data.totalGoodsPrice totalGoodsPrice: this.data.totalGoodsPrice,
avaliablePoint : this.data.avaliablePoint,
pointDeductMoney : this.data.pointDeductMoney,
deductCheckStatus : this.data.deductCheckStatus
}, () => { }, () => {
// 实付款 // 实付款
this.setPayPrice() this.setPayPrice()
...@@ -747,7 +772,10 @@ wxService.page({ ...@@ -747,7 +772,10 @@ wxService.page({
this.setData({ this.setData({
currentOrderList: data, currentOrderList: data,
orderInitPrice: data.amount, orderInitPrice: data.amount,
totalGoodsPrice: this.data.totalGoodsPrice totalGoodsPrice: this.data.totalGoodsPrice,
avaliablePoint : this.data.avaliablePoint,
pointDeductMoney : this.data.pointDeductMoney,
deductCheckStatus : this.data.deductCheckStatus
}, () => { }, () => {
// 实付款 // 实付款
this.setPayPrice() this.setPayPrice()
...@@ -761,7 +789,10 @@ wxService.page({ ...@@ -761,7 +789,10 @@ wxService.page({
defalutCouponId: this.data.defalutCouponId, defalutCouponId: this.data.defalutCouponId,
couponSettingId: this.data.couponSettingId, couponSettingId: this.data.couponSettingId,
orderInitPrice: data.amount, orderInitPrice: data.amount,
totalGoodsPrice: this.data.totalGoodsPrice totalGoodsPrice: this.data.totalGoodsPrice,
avaliablePoint : this.data.avaliablePoint,
pointDeductMoney : this.data.pointDeductMoney,
deductCheckStatus : this.data.deductCheckStatus
}, () => { }, () => {
// 实付款 // 实付款
this.setPayPrice() this.setPayPrice()
...@@ -898,15 +929,22 @@ wxService.page({ ...@@ -898,15 +929,22 @@ wxService.page({
params.storeInfo = this.data.orderStoreInfo.storeInfo; params.storeInfo = this.data.orderStoreInfo.storeInfo;
} }
} }
//处理积分抵扣
if(this.data.deductCheckStatus){
params.pointPayInfo = this.data.pointPayInfo;
}
else{
params.pointPayInfo = {
point : 0,
pointAmount : 0
}
}
let _this = this; let _this = this;
let url = isSelect ? '/sale/payment/merged/buyer/bill' : '/sale/trade/buyer/bill' let url = isSelect ? '/sale/payment/merged/buyer/bill' : '/sale/trade/buyer/bill'
wxService.post(`${url}`, params).then(res => { wxService.post(`${url}`, params).then(res => {
if (res) { if (res) {
const { const {result,data} = res.data
result,
data
} = res.data
let tradeId = data.tradeId; let tradeId = data.tradeId;
wx.removeStorageSync('choosedStoreInfo'); wx.removeStorageSync('choosedStoreInfo');
wx.removeStorageSync('orderRemark'); wx.removeStorageSync('orderRemark');
......
...@@ -96,6 +96,9 @@ wxService.page({ ...@@ -96,6 +96,9 @@ wxService.page({
data.logistic = null; data.logistic = null;
} }
// 处理积分抵扣
data.pointPayInfo = data.pointPayInfo ? data.pointPayInfo : {point:0,pointAmount:0};
//处理能不能退款 //处理能不能退款
let canApplyRefund = true; let canApplyRefund = true;
let filter = skuVOList.filter(c => c.canRefundNum > 0); let filter = skuVOList.filter(c => c.canRefundNum > 0);
......
...@@ -144,6 +144,10 @@ ...@@ -144,6 +144,10 @@
<text>¥{{utils.numberFormat(detail.promotionDiscount)}}</text> <text>¥{{utils.numberFormat(detail.promotionDiscount)}}</text>
</view> </view>
<view class="order-pro-list"> <view class="order-pro-list">
<text>积分抵扣</text>
<text>使用{{detail.pointPayInfo.point}}积分,抵扣¥{{detail.pointPayInfo.pointAmount}}</text>
</view>
<view class="order-pro-list">
<text>优惠券优惠</text> <text>优惠券优惠</text>
<text>¥{{utils.numberFormat(detail.coouponDiscount)}}</text> <text>¥{{utils.numberFormat(detail.coouponDiscount)}}</text>
</view> </view>
......
...@@ -55,10 +55,21 @@ wxService.page({ ...@@ -55,10 +55,21 @@ wxService.page({
}; };
this.generatePointObject(tentacleInfo); this.generatePointObject(tentacleInfo);
} }
this.getOptionsData();
}, },
watch: { watch: {
experAccessible(newVal, oldVal) { // experAccessible(newVal, oldVal) {
if(newVal) { // if(newVal) {
// this.getOptionsData();
// } else {
// // 去别的页面
// wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
// }
// }
},
//获取集点详情
getOptionsData(){
// 登录接口返回err // 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr') const reLoginErrFlag = wx.getStorageSync('reLoginErr')
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
...@@ -98,11 +109,6 @@ wxService.page({ ...@@ -98,11 +109,6 @@ wxService.page({
isAuthorization: true isAuthorization: true
}) })
} }
} else {
// 去别的页面
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
}
}
}, },
// 集点详情 // 集点详情
getPointDetail(id) { getPointDetail(id) {
...@@ -156,13 +162,72 @@ wxService.page({ ...@@ -156,13 +162,72 @@ wxService.page({
this.showTimeStatus('活动已经失效啦,看看其他的') this.showTimeStatus('活动已经失效啦,看看其他的')
} else { } else {
// 会员集点活动统计信息 进行中且有效 // 会员集点活动统计信息 进行中且有效
this.getPointConsumptionCount(id) this.getPointConsumptionCount(id);
//限制必须是扫码进来的才调用
// let scene = wx.getLaunchOptionsSync().scene;
// if(scene == 1011){
this.getUserShowRewardCollectionPoint(id);
// }
} }
}) })
} }
} }
}) })
}, },
//获取用户扫码进来是否需要弹出领取集点的
getUserShowRewardCollectionPoint(id){
wxService.post(`/sale/touchpoints/pointConsumptionActivity/verifyWhetherReward?id=${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
//如果需要 弹出提示框
if(data == 1){
this.showConfirmModal(id);
}
}
}
})
},
//弹出原生提示框让用户去点击
showConfirmModal(id){
let self = this;
if(this.showModal){
return ;
}
this.showModal = true;
wx.showModal({
title : '集点领取提示',
content : '恭喜您获得一个集点',
showCancel : false,
confirmText : '确认领取',
confirmColor : '#05C35B',
success (res) {
if(res.confirm){
self.userConfirmGetCollectionPoint(id);
}
self.showModal = false;
}
})
},
//调用领取接口
userConfirmGetCollectionPoint(id){
wxService.post(`/sale/touchpoints/pointConsumptionActivity/award?id=${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
//如果需要 弹出提示框
wx.showToast({
title: '领取成功~',
});
this.getPointDetail(this.data.id);
}
}
});
},
showTimeStatus(status) { showTimeStatus(status) {
wx.showToast({ wx.showToast({
title: `${status}`, title: `${status}`,
......
...@@ -15,14 +15,15 @@ wxService.page({ ...@@ -15,14 +15,15 @@ wxService.page({
currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始 currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始
}, },
watch: { watch: {
experAccessible(newVal, oldVal) { // 暂时先不要体验版
if(newVal) { // experAccessible(newVal, oldVal) {
this.getPointList() // if(newVal) {
} else { // this.getPointList()
// 去别的页面 // } else {
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace() // // 去别的页面
} // wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
} // }
// }
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -39,6 +40,9 @@ wxService.page({ ...@@ -39,6 +40,9 @@ wxService.page({
}; };
this.generatePointObject(tentacleInfo); this.generatePointObject(tentacleInfo);
} }
//获取集点
this.getPointList();
}, },
/** /**
......
...@@ -46,10 +46,11 @@ ...@@ -46,10 +46,11 @@
"current": 16, "current": 16,
"list": [ "list": [
{ {
"id": -1, "id": 0,
"name": "会员中心", "name": "会员中心",
"pathName": "pages/userCenter/userCenter", "pathName": "pages/userCenter/userCenter",
"query": "" "query": "m=b)XQE0mX00",
"scene": null
}, },
{ {
"id": -1, "id": -1,
...@@ -637,6 +638,13 @@ ...@@ -637,6 +638,13 @@
"pathName": "subPackageMarketing/page/pages/scratch/scratch", "pathName": "subPackageMarketing/page/pages/scratch/scratch",
"query": "id=700043642982764548", "query": "id=700043642982764548",
"scene": null "scene": null
},
{
"id": -1,
"name": "集点活动列表",
"pathName": "pages/pointList/pointList",
"query": "",
"scene": null
} }
] ]
} }
......
...@@ -28,11 +28,20 @@ wxService.page({ ...@@ -28,11 +28,20 @@ wxService.page({
//判断用户是不是已经登录了 //判断用户是不是已经登录了
let userInfo = wx.getStorageSync('_baseUserInfo'); let userInfo = wx.getStorageSync('_baseUserInfo');
if (userInfo) { if (userInfo) {
if(userInfo.member.cardNoWeixin){
wx.showToast({
title: '您已开过卡',
icon : 'none'
});
setTimeout(() => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/userCenter/userCenter', url: '/pages/userCenter/userCenter',
}); });
},300);
return; return;
} }
}
//未登录 需要授权登录 弹出设置的开卡图片 //未登录 需要授权登录 弹出设置的开卡图片
this.setData({ this.setData({
......
...@@ -42,19 +42,23 @@ wxService.page({ ...@@ -42,19 +42,23 @@ wxService.page({
let data = res.data.data ? res.data.data : null; let data = res.data.data ? res.data.data : null;
if(data){ if(data){
if(data.type == 3){ if(data.type == 3){
//判断打开着是不是自己
let currentLogginUser = wx.getStorageSync('_baseUserInfo');
if(!currentLogginUser){
let memberId = data.tentacleId;
this.markShareRecords(memberId,this.data.activityId);
}
else{
let curLoginMemberId = currentLogginUser.memberId;
if(curLoginMemberId != memberId){ // 不是自己打开的分享链接时才调用分享成功的接口 防止自己刷次数
let memberId = data.tentacleId; let memberId = data.tentacleId;
this.markShareRecords(memberId,this.data.activityId); this.markShareRecords(memberId,this.data.activityId);
}
} // //判断打开着是不是自己
// let currentLogginUser = wx.getStorageSync('_baseUserInfo');
// if(!currentLogginUser){
// let memberId = data.tentacleId;
// this.markShareRecords(memberId,this.data.activityId);
// }
// else{
// let curLoginMemberId = currentLogginUser.memberId;
// if(curLoginMemberId != memberId){ // 不是自己打开的分享链接时才调用分享成功的接口 防止自己刷次数
// let memberId = data.tentacleId;
// this.markShareRecords(memberId,this.data.activityId);
// }
// }
} }
} }
} }
...@@ -174,9 +178,6 @@ wxService.page({ ...@@ -174,9 +178,6 @@ wxService.page({
awardTxtFontSize: '22px', awardTxtFontSize: '22px',
callback: () => { callback: () => {
if(self.data.leftNum > 0){ if(self.data.leftNum > 0){
wx.showLoading({
title: '开奖中..',
});
self.getAwardInfo(); self.getAwardInfo();
} }
else{ else{
...@@ -271,7 +272,6 @@ wxService.page({ ...@@ -271,7 +272,6 @@ wxService.page({
} }
this.getUserCanScratchCount(); this.getUserCanScratchCount();
wx.hideLoading();
}); });
}, },
......
...@@ -148,7 +148,6 @@ class Http { ...@@ -148,7 +148,6 @@ class Http {
channel: channel channel: channel
}) })
} }
} }
checkStatus (resp) { checkStatus (resp) {
...@@ -189,15 +188,28 @@ class Http { ...@@ -189,15 +188,28 @@ class Http {
content: '请求数据超时' content: '请求数据超时'
}) })
} }
if (error.msg && error.msg !='该用户尚未登录'){ //针对刮刮卡错误语单独处理
else if(error.msg == '对不起,您已超过此活动设置刮奖最大次数!!' || error.msg == '当前活动已失效!'){
wx.showModal({
title: '刮刮卡提示',
content: error.msg,
showCancel: false,
confirmText: '好的',
confirmColor: '#cb3c3c',
success: function (modalRes) {
}
});
}
else if (error.msg && error.msg !='该用户尚未登录'){
setTimeout(() => { setTimeout(() => {
wx.showToast({ wx.showToast({
title: `${error.msg}`, title: `${error.msg}`,
icon: 'none', icon: 'none',
duration:2500
})
}) })
});
} }
return Promise.reject(error) return Promise.reject(error)
} }
......
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