提交 bb5dcd27 authored 作者: lihuihui's avatar lihuihui

updata

上级 a0fd655b
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="pay-btn"> <div class="pay-btn">
<div class="num">¥<span>199</span>.00</div> <div class="num">¥<span>199</span>.00</div>
<div class="btn" @click="goPay" v-if="orderStatus === 100">立即购买</div> <div class="btn" @click="goPay" v-if="orderStatus === 100">立即购买</div>
<div class="btn" v-if="orderStatus === 1" @click="goHome">已购买</div> <div class="btn active" v-if="orderStatus === 1" @click="goHome">已购买</div>
<div class="btn" v-if="orderStatus === -1" @click="goMyOrder">待支付</div> <div class="btn" v-if="orderStatus === -1" @click="goMyOrder">待支付</div>
</div> </div>
<!-- <van-button type="primary" @click="goPay" class="pay-btn">购买</van-button> --> <!-- <van-button type="primary" @click="goPay" class="pay-btn">购买</van-button> -->
...@@ -36,10 +36,14 @@ export default { ...@@ -36,10 +36,14 @@ export default {
}, },
mounted() { mounted() {
this.getOpenid() this.getOpenid()
clearInterval(this.orderStatusTime)
this.orderStatusTime = setInterval(() => {
this.getOrderStatus() this.getOrderStatus()
}, 1000)
}, },
methods: { methods: {
goHome() { goHome() {
Toast('您已购买!')
this.pushHistory() this.pushHistory()
window.addEventListener('popstate', function(e) { window.addEventListener('popstate', function(e) {
window.location.href = '/' window.location.href = '/'
...@@ -151,5 +155,8 @@ export default { ...@@ -151,5 +155,8 @@ export default {
color: #fff; color: #fff;
font-size: .3rem; font-size: .3rem;
} }
.active{
background: #ccc;
}
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论