Commit 7ea4bc76 by 李伟康

commit 修复BUG

1 parent 0fe22f86
......@@ -208,20 +208,7 @@ export default {
};
},
mounted () {
const userInfo = uni.$storage.get("userInfo") || {};
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.reLaunch({
url: "/pages/common/login",
});
return
}
setTimeout(() => {
uni.$storage.set("userInfo", null)
}, 5e3)
console.log(userInfo)
this.userInfo = userInfo
setInterval(() => {
this.dateKey = Date.now();
......
......@@ -136,6 +136,7 @@ export default {
position: relative;
background: rgba(255, 255, 255, 0.6);
visibility: hidden;
height: 0;
&::after {
position: absolute;
content: "";
......@@ -183,6 +184,7 @@ export default {
padding-bottom: 16rpx;
animation: scale-up-top-right 0.4s;
visibility: visible;
height: auto;
}
@keyframes scale-up-top-right {
0% {
......
......@@ -356,7 +356,9 @@ export default {
try {
const { pageParams: { couponId, carInfo }, customerInfo } = this, {
shopMerchantId } = uni.$storage.get("userInfo"),
validateStatus = await this.validate()
validateStatus = await this.validate(),
checkCouponAmount = await this.checkCouponAmount(couponId, [shopMerchantId])
if (!checkCouponAmount.length) throw '该门店礼券已使用完,请联系管理员配置。'
if (!validateStatus) return
uni.showLoading()
let { staffName, salesUuid } = customerInfo,
......@@ -451,6 +453,13 @@ export default {
},
resetFocusIndex () {
this.focusIndex = -1
},
async checkCouponAmount (merchantCouponId, merchantIdList) {
const { list } = await uni.$api.boutiqueApi.findCouponList({
merchantCouponId,
merchantIdList
})
return list || []
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!