🎨 style: 优化样式

This commit is contained in:
wangsongsole 2024-03-02 02:49:55 +08:00
parent edcb1cf5d8
commit 6331ce09d1
1 changed files with 17 additions and 3 deletions

View File

@ -14,6 +14,13 @@
<body> <body>
<div id="app"> <div id="app">
<div class="mask" v-show="loading" @touchmove.prevent @mousewheel.prevent>
<div class="loading">
<div></div>
<div></div>
</div>
</div>
<img class="back" @click="backHandler" <img class="back" @click="backHandler"
src=" https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="" /> src=" https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="" />
@ -55,7 +62,7 @@
<div class="but" v-show="goods.status==3" @click="toHome"> <div class="but" v-show="goods.status==3" @click="toHome">
重新兑换 重新兑换
</div> </div>
<div class="but refresh" v-show="[0,1].includes(goods.status)" @click="getInfo"> <div class="but refresh" v-show="[0,1].includes(goods.status)" @click="()=>getInfo(true)">
刷新 刷新
</div> </div>
@ -82,9 +89,16 @@
}); });
/* 获取详情 */ /* 获取详情 */
function getInfo () { function getInfo (isLoading) {
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 (isLoading) {
loading.value = true;
const clr = setTimeout(() => {
loading.value = false;
clearTimeout(clr);
}, 1000);
}
if (res.code == 200) { if (res.code == 200) {
const { product_name, update_time, status, show_url, account, create_time, use_coupon } = 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, use_coupon }; goods.value = { product_name, update_time, status, show_url, account, create_time, orderNumber, use_coupon };
@ -136,7 +150,7 @@
history.go(-1); history.go(-1);
} }
return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount }; return { copyFunction, getInfo, backHandler, toHome, dynamicBanner, goods, toast, goodsCount, loading };
} }
}).mount('#app') }).mount('#app')
</script> </script>