修正订单状态错误

This commit is contained in:
wangsongsole 2022-09-28 17:39:12 +08:00
parent 9a0c817590
commit d7a9ca1ee7
1 changed files with 11 additions and 10 deletions

View File

@ -30,14 +30,14 @@
<div v-for="(item,index) in couponList" :key="item.id" <div v-for="(item,index) in couponList" :key="item.id"
:class="more===item.id?'content-item content-item-more':'content-item'"> :class="more===item.id?'content-item content-item-more':'content-item'">
<div class="content-box"> <div class="content-box">
<div :class="item.status===2 ?'left-box left-boxs':'left-box'"> <div :class="item.status===3 ?'left-box left-boxs':'left-box'">
<p class="left-box-moneySign"> <p class="left-box-moneySign">
<span class="left-box-money"></span> <span class="left-box-money"></span>
{{item.reduce}} {{item.reduce}}
</p> </p>
<p class="left-box-full">满{{item.full}}元可用</p> <p class="left-box-full">满{{item.full}}元可用</p>
<p class="left-box-button" @click="goUse(item)"> <p class="left-box-button" @click="goUse(item)">
{{item.status===0?'去使用':item.status===1?'已使用':"已失效"}} {{item.status===1?'去使用':item.status===2?'已使用':"已失效"}}
</p> </p>
</div> </div>
<div class="right-box"> <div class="right-box">
@ -51,8 +51,8 @@
<img :class="more===item.id?'imgArrow':''" src="./img/arr.png" alt=""> <img :class="more===item.id?'imgArrow':''" src="./img/arr.png" alt="">
</p> </p>
</div> </div>
<img class="stand" v-show="item.status===2" src="./img/invalid.png" alt=""> <img class="stand" v-show="item.status===3" src="./img/invalid.png" alt="">
<img class="stand" v-show="item.status===1" src="./img/use.png" alt=""> <img class="stand" v-show="item.status===2" src="./img/use.png" alt="">
</div> </div>
</div> </div>
<p class="text"> <p class="text">
@ -76,11 +76,11 @@
data () { data () {
return { return {
tabList: [ tabList: [
{ id: 0, text: "待使用" }, { id: 1, text: "待使用" },
{ id: 1, text: "已使用" }, { id: 2, text: "已使用" },
{ id: 2, text: "已失效" } { id: 3, text: "已失效" }
], ],
tabActive: 0, /* tab 选中下标 */ tabActive: 1, /* tab 选中下标 */
more: false, /* 是否展示更多 状态 */ more: false, /* 是否展示更多 状态 */
couponList: [] couponList: []
} }
@ -111,8 +111,9 @@
/* 去使用 */ /* 去使用 */
goUse (item) { goUse (item) {
if (item.status) return; if (item.status === 1) {
window.location.replace('./couponCollection.html'); window.location.replace('./couponCollection.html');
};
}, },
/* tab点击 */ /* tab点击 */