🦀️ fix: 修复bug

This commit is contained in:
wangsongsole 2024-02-04 15:48:33 +08:00
parent 4eef47f6b8
commit 152dcafbd0
3 changed files with 28 additions and 10 deletions

View File

@ -73,8 +73,7 @@
<div v-html="describe.content" class="goodsTip" v-show="describe.type==3&&describe.content"></div> <div v-html="describe.content" class="goodsTip" v-show="describe.type==3&&describe.content"></div>
</div> </div>
<div class="e-btn-box"> <div class="e-btn-box">
<div class="order-box" <div class="order-box" v-if="!backAble&&goodsDetail.restrict>1">
v-if="!backAble&&goodInfo.product_type===2&&goodInfo.card_show==2&&goodsDetail.restrict>1">
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/toOrder.png" alt="" <img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/toOrder.png" alt=""
@click="()=>{location.href='./order.html'}"> @click="()=>{location.href='./order.html'}">
<p>订单</p> <p>订单</p>

View File

@ -51,7 +51,7 @@
</div> </div>
</div> </div>
<div class="but" v-show="goods.status==3"> <div class="but" v-show="goods.status==3" @click="toHome">
重新兑换 重新兑换
</div> </div>
<div class="but refresh" v-show="goods.status==1" @click="getInfo"> <div class="but refresh" v-show="goods.status==1" @click="getInfo">
@ -84,12 +84,21 @@
const orderNumber = sessionStorage.getItem('orderNumber'); const orderNumber = sessionStorage.getItem('orderNumber');
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
const { product_name, status, show_url, card_number, card_password } = res.data; const { product_name, status, show_url, card_number, card_password, use_coupon } = res.data;
goods.value = { product_name, time: res.data.goods.end_time, status, show_url, card_number, card_password, card_show: res.data.goods.card_show }; goods.value = { product_name, time: res.data.goods.end_time, status, show_url, card_number, card_password, card_show: res.data.goods.card_show, use_coupon };
} }
}); });
} }
/* 重新兑换 */
function toHome () {
if (goods.value.use_coupon === 2) {
window.location.replace('../homepage.html');
} else {
window.location.replace('../coupon/couponCollection.html');
}
}
/* 复制 */ /* 复制 */
function copyFunction (number) { function copyFunction (number) {
var aux = document.createElement("input"); var aux = document.createElement("input");
@ -124,7 +133,7 @@
history.go(-1); history.go(-1);
} }
return { copyFunction, getInfo, backHandler, dynamicBanner, goods, toast, goodsCount }; return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount };
} }
}).mount('#app') }).mount('#app')
</script> </script>

View File

@ -52,7 +52,7 @@
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/orderDetails/bottom.png" alt="" <img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/orderDetails/bottom.png" alt=""
class="bottom-img"> class="bottom-img">
</main> </main>
<div class="but" v-show="goods.status==3"> <div class="but" v-show="goods.status==3" @click="toHome">
重新兑换 重新兑换
</div> </div>
<div class="but refresh" v-show="goods.status==1" @click="getInfo"> <div class="but refresh" v-show="goods.status==1" @click="getInfo">
@ -86,12 +86,22 @@
const orderNumber = sessionStorage.getItem('orderNumber'); const orderNumber = sessionStorage.getItem('orderNumber');
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
const { product_name, update_time, status, show_url, account, create_time } = res.data; const { product_name, update_time, status, show_url, account, create_time, use_coupon } = res.data;
goods.value = { product_name, update_time, status, show_url, account, create_time, orderNumber }; goods.value = { product_name, update_time, status, show_url, account, create_time, orderNumber, use_coupon };
} }
}); });
} }
/* 重新兑换 */
function toHome () {
if (goods.value.use_coupon === 2) {
window.location.replace('../homepage.html');
} else {
window.location.replace('../coupon/couponCollection.html');
}
}
/* 复制 */ /* 复制 */
function copyFunction (number) { function copyFunction (number) {
var aux = document.createElement("input"); var aux = document.createElement("input");
@ -126,7 +136,7 @@
history.go(-1); history.go(-1);
} }
return { copyFunction, getInfo, backHandler, dynamicBanner, goods, toast, goodsCount }; return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount };
} }
}).mount('#app') }).mount('#app')
</script> </script>