Browse Source

Merge branch '2024鹅状元' of https://gogs.mtavip.com/wangguoyu/uniProject into 2024鹅状元

tanxue 4 tháng trước cách đây
mục cha
commit
f7d8c7b470
2 tập tin đã thay đổi với 86 bổ sung20 xóa
  1. 6 13
      components/catalogue/catalogue.vue
  2. 80 7
      pages/pay/order.vue

+ 6 - 13
components/catalogue/catalogue.vue

@@ -59,11 +59,16 @@
 
 	const popupRef = ref(null); // 索引
 	const confirmDialogRef = ref(null);
-	const list = ref([]); // 章节
 	const activeCollapse = ref('');
 	const Message = MESSAGE_BEFORE_PAY;
 	const youkeDialogRef = ref(null);
 
+	const props = defineProps({
+		list: {
+			type: Array,
+		}
+	})
+
 	function ykConfirm() {
 		uni.redirectTo({
 			url: '/pages/login/index'
@@ -74,21 +79,9 @@
 	 * @summary 展示弹窗 暴露函数
 	 */
 	async function showPopup() {
-		const [err, data] = await getCatalogue();
-		if (err) {
-			toast("章节目录数据获取失败");
-			return;
-		}
-		refreshCatalogue(data);
 		handleShow();
 	}
 
-	/**
-	 * @param([]) 章节赋值
-	 */
-	function refreshCatalogue(data) {
-		list.value = data;
-	}
 
 	/**
 	 * @summary 展示目录弹窗

+ 80 - 7
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>
@@ -54,15 +54,81 @@
 				<view v-if="dingdanData.current === 1">
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
 						:refresher-triggered="dingdanData.daiFukuan.loading" :refresher-threshold="50"
-						refresher-background="lightgreen" @refresherrefresh="onRefresh">
-
+						refresher-background="transparent" @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-background="lightgreen" @refresherrefresh="onRefresh">
-
+						:refresher-triggered="dingdanData.yiFukuan.loading" :refresher-threshold="50"
+						refresher-background="transparent" @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';