🎨 style: 优化代码

This commit is contained in:
wangsongsole 2024-01-08 19:48:14 +08:00
parent 1df5c2c521
commit 3f16ee63ae
1 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@
<div v-else class="generate"> <div v-else class="generate">
<p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p> <p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p>
<span @click="backHandler" v-if="cardData.status===3">重新兑换</span> <span @click="backHandler" v-if="cardData.status===3">重新兑换</span>
<span @click="getInfo" v-else>点击刷新</span> <span @click="getInfo()" v-else>点击刷新</span>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -65,7 +65,7 @@
<div v-else class="generate"> <div v-else class="generate">
<p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p> <p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p>
<span @click="backHandler" v-if="cardData.status===3">重新兑换</span> <span @click="backHandler" v-if="cardData.status===3">重新兑换</span>
<span @click="getInfo" v-else>点击刷新</span> <span @click="getInfo()" v-else>点击刷新</span>
</div> </div>
</div> </div>
</template> </template>
@ -83,7 +83,7 @@
<div v-else class="generate"> <div v-else class="generate">
<p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p> <p>{{cardData.status===3?'卡密兑换失败,请重新兑换':'卡密正在生成中,请稍后刷新再查看'}} </p>
<span @click="backHandler" v-if="cardData.status===3">重新兑换</span> <span @click="backHandler" v-if="cardData.status===3">重新兑换</span>
<span @click="getInfo" v-else>点击刷新</span> <span @click="getInfo()" v-else>点击刷新</span>
</div> </div>
</div> </div>
</template> </template>
@ -113,7 +113,7 @@
created () { created () {
this.getInfo(); this.getInfo(true);
}, },
methods: { methods: {
@ -128,9 +128,9 @@
this.openDialog('复制成功'); this.openDialog('复制成功');
}, },
getInfo () { getInfo (loading = false) {
const orderNumber = localStorage.getItem('orderNumber'); const orderNumber = localStorage.getItem('orderNumber');
this.loading = true; this.loading = loading;
/* 获取卡密详情 */ /* 获取卡密详情 */
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => { req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
if (res.code == 200) { if (res.code == 200) {