|
@@ -23,8 +23,9 @@
|
|
|
</view>
|
|
|
<view>
|
|
|
<text>不支持退订</text>
|
|
|
- <text v-if="item.status ==0||item.status ==1" class="pay-status">已付款</text>
|
|
|
- <text v-if="item.status ==2" class="pay-status">待付款</text>
|
|
|
+ <text v-if="item.status ==2" class="pay-status">已付款</text>
|
|
|
+ <text v-if="item.status ==3" class="pay-status">已关闭</text>
|
|
|
+ <text v-if="item.status ==1" class="pay-status">待付款</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="order-content-box">
|
|
@@ -41,7 +42,7 @@
|
|
|
<text class="bottom-money">实付款:¥{{item.money}}</text>
|
|
|
</view>
|
|
|
<!-- v-if="item.status ==1" -->
|
|
|
- <view class="bottom-btn" @click="handlePay(item)">立即支付</view>
|
|
|
+ <view class="bottom-btn" v-if="item.status ==1" @click="handlePay(item)">立即支付</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</uni-list-item>
|
|
@@ -64,8 +65,9 @@
|
|
|
</view>
|
|
|
<view>
|
|
|
<text>不支持退订</text>
|
|
|
- <text v-if="item.status ==0||item.status ==1" class="pay-status">已付款</text>
|
|
|
- <text v-if="item.status ==2" class="pay-status">待付款</text>
|
|
|
+ <text v-if="item.status ==2" class="pay-status">已付款</text>
|
|
|
+ <text v-if="item.status ==3" class="pay-status">已关闭</text>
|
|
|
+ <text v-if="item.status ==1" class="pay-status">待付款</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="order-content-box">
|
|
@@ -82,7 +84,7 @@
|
|
|
<text class="bottom-money">实付款:¥{{item.money}}</text>
|
|
|
</view>
|
|
|
<!-- v-if="item.status ==1" -->
|
|
|
- <view class="bottom-btn" @click="handlePay(item)">立即支付</view>
|
|
|
+ <view class="bottom-btn" v-if="item.status ==1" @click="handlePay(item)">立即支付</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</uni-list-item>
|
|
@@ -105,8 +107,9 @@
|
|
|
</view>
|
|
|
<view>
|
|
|
<text>不支持退订</text>
|
|
|
- <text v-if="item.status ==0||item.status ==1" class="pay-status">已付款</text>
|
|
|
- <text v-if="item.status ==2" class="pay-status">已付款</text>
|
|
|
+ <text v-if="item.status ==2" class="pay-status">已付款</text>
|
|
|
+ <text v-if="item.status ==3" class="pay-status">已关闭</text>
|
|
|
+ <text v-if="item.status ==1" class="pay-status">待付款</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="order-content-box">
|
|
@@ -144,7 +147,8 @@
|
|
|
ref
|
|
|
} from "vue";
|
|
|
import {
|
|
|
- getOrderList
|
|
|
+ getOrderList,
|
|
|
+ orderAdd
|
|
|
} from "@/api/order";
|
|
|
import {
|
|
|
onLoad
|
|
@@ -196,9 +200,21 @@
|
|
|
|
|
|
|
|
|
function handlePay(item) {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/pay/orderPay?id=${item.id}`
|
|
|
+ let req = {
|
|
|
+ cardId:item.cardId
|
|
|
+ }
|
|
|
+ orderAdd(req).then(res=>{
|
|
|
+ console.log('res');
|
|
|
+ cacheManager.updateVipStatus('auth',cardId.value)
|
|
|
+ toast('开通成功!')
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/study/index'
|
|
|
+ })
|
|
|
})
|
|
|
+
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url: `/pages/pay/orderPay?id=${item.id}`
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
function onChangeTab(e) {
|