wangxy 4 mesi fa
parent
commit
2dbc61376f
1 ha cambiato i file con 78 aggiunte e 5 eliminazioni
  1. 78 5
      pages/pay/order.vue

+ 78 - 5
pages/pay/order.vue

@@ -41,7 +41,7 @@
 											<text class="bottom-money">实付款:¥{{item.money}}</text>
 										</view>
 										<!--  v-if="item.status ==1" -->
-										<view class="bottom-btn">立即支付</view>
+										<view class="bottom-btn" @click="handlePay(item)">立即支付</view>
 									</view>
 								</template>
 							</uni-list-item>
@@ -55,14 +55,80 @@
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
 						:refresher-triggered="dingdanData.daiFukuan.loading" :refresher-threshold="50"
 						refresher-background="lightgreen" @refresherrefresh="onRefresh">
-
+							<uni-list>
+								<uni-list-item v-for="item in dingdanData.daiFukuan.list" class="order-list-item">
+									<template v-slot:body>
+										<view class="order-item-head">
+											<view class="order-name-box">
+												<icon></icon><text>鹅状元自营</text>
+											</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>
+											</view>
+										</view>
+										<view class="order-content-box">
+											<icon :class="'content-img'+item.cardId"></icon>
+											<view class="content-body-box">
+												<view class="content-name">SVIP终身卡</view>
+												<view class="content-tag">终身有效</view>
+												<view class="content-yuanjia">¥{{item.cardYuanjia}}</view>
+											</view>
+										</view>
+										<view class="order-bottom-box">
+											<view class="bottom-money-box">
+												<text class="bottom-data">{{item.ctime}}</text>
+												<text class="bottom-money">实付款:¥{{item.money}}</text>
+											</view>
+											<!--  v-if="item.status ==1" -->
+											<view class="bottom-btn" @click="handlePay(item)">立即支付</view>
+										</view>
+									</template>
+								</uni-list-item>
+								<uni-load-more :status="dingdanData.daiFukuan.state" @click="getMore(1)"
+									:contentText="dingdanData.daiFukuan.contentText">
+								</uni-load-more>
+							</uni-list>
 					</scroll-view>
 				</view>
 				<view v-if="dingdanData.current === 2">
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
-						:refresher-triggered="dingdanData.yifukuan.loading" :refresher-threshold="50"
+						:refresher-triggered="dingdanData.yiFukuan.loading" :refresher-threshold="50"
 						refresher-background="lightgreen" @refresherrefresh="onRefresh">
-
+							<uni-list>
+								<uni-list-item v-for="item in dingdanData.yiFukuan.list" class="order-list-item">
+									<template v-slot:body>
+										<view class="order-item-head">
+											<view class="order-name-box">
+												<icon></icon><text>鹅状元自营</text>
+											</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>
+											</view>
+										</view>
+										<view class="order-content-box">
+											<icon :class="'content-img'+item.cardId"></icon>
+											<view class="content-body-box">
+												<view class="content-name">SVIP终身卡</view>
+												<view class="content-tag">终身有效</view>
+												<view class="content-yuanjia">¥{{item.cardYuanjia}}</view>
+											</view>
+										</view>
+										<view class="order-bottom-box">
+											<view class="bottom-money-box">
+												<text class="bottom-data">{{item.ctime}}</text>
+												<text class="bottom-money">实付款:¥{{item.money}}</text>
+											</view>
+										</view>
+									</template>
+								</uni-list-item>
+								<uni-load-more :status="dingdanData.yiFukuan.state" @click="getMore(2)"
+									:contentText="dingdanData.yiFukuan.contentText">
+								</uni-load-more>
+							</uni-list>
 
 					</scroll-view>
 				</view>
@@ -128,6 +194,13 @@
 		},
 	})
 
+
+	function handlePay(item) {
+		uni.redirectTo({
+			url: `/pages/pay/orderPay?id=${item.id}`
+		})
+	}
+
 	function onChangeTab(e) {
 		if (dingdanData.current !== e.currentIndex) {
 			dingdanData.current = e.currentIndex;
@@ -199,7 +272,7 @@
 					dingdanData.daiFukuan.state = 'more';
 					dingdanData.daiFukuan.loading = false;
 				}
-			} else if (code == 1) {
+			} else if (code == 2) {
 				if (res.data.total >= dingdanData.yiFukuan.list.length) {
 					// 英语
 					dingdanData.yiFukuan.state = 'no-more';