Browse Source

Merge remote-tracking branch 'origin/2024鹅状元' into 2024鹅状元

wangxy 6 months ago
parent
commit
dfbdb7de1d

+ 45 - 0
api/order.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+export function getOrderList(data = {}) {
+  return request({
+    'url': '/app/order/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+export function orderAdd(data = {}) {
+  return request({
+    'url': '/app/order/add',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+export function orderPayAli(data = {}) {
+  return request({
+    'url': '/app/order/pay/ali',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+export function orderPayWx(data = {}) {
+  return request({
+    'url': '/app/order/pay/wx',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 69 - 10
common/styles/global/pages.scss

@@ -2,6 +2,10 @@
 // 登录页  padding-bottom: env(safe-area-inset-bottom); box-sizing: unset;
 .ezy-login-page {
 	width:100%;height:100vh; background-color: #80dfff;position: relative;
+	.login-nav-bar-icon{
+		width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: var(--status-bar-height);
+		background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
+	}
 	.ezy-login-wrap{width:100%;height: 1623.08rpx;background-image: url("@/static/images/login/login-bj.jpg");@include ezy-no-repeat-cover(top);}
 	.login-body-box{
 		display: flex;flex-direction: column;display: flex;box-sizing: border-box;
@@ -955,38 +959,93 @@
 	padding-top:var(--status-bar-height);display: flex;flex-direction: column;
 	@include ezy-no-repeat-cover(bottom);background-image: url("@/static/images/common/ezy-page-bj.png");
 	.svip-login{
-		width: 673rpx;height: 269rpx;margin: 0 auto;
+		width: 673rpx;height: 269rpx;margin: 24rpx auto 0;
 		@include ezy-no-repeat-cover;background-image: url("@/static/images/pay/svip-logo.png");
 	}
 	.svip-list-box{
-		margin: 0 auto;
-		.list-item-box{display: flex;align-items: center;color: #fff;margin-bottom: 24rpx;}
+		margin: 24rpx auto;
+		.list-item-box{display: flex;align-items: center;color: #fff;margin-bottom: 28rpx;}
 		.list-icon{
 			width: 96rpx;height: 106rpx;@include ezy-no-repeat-cover;margin-right: 16rpx;
 		}
 		.list-title{
 			font-size: 28rpx;font-weight: 600;margin-bottom: 10rpx;
 		}
-		.list-content{font-size: 25rpx;}
+		.list-content{font-size: 25rpx;color: rgba(255, 255, 255, 0.8);}
 		
 	}
 	.open-svip-box{
 		width: 702rpx;height:413rpx;margin: 0 auto;box-sizing: border-box;padding: 0 16rpx;
 		@include ezy-no-repeat-cover;background-image: url("@/static/images/pay/svip-block-bj.png");
 		.svip-price-box{
-			display: flex;justify-content: space-between;border-bottom: 2rpx solid #efd774;
-			margin-top: 120rpx;box-sizing: border-box;padding:0 24rpx 24rpx;color: #87664d;
+			display: flex;justify-content: space-between;border-bottom: 2rpx solid #efd774;font-size: 32rpx;
+			margin-top: 120rpx;box-sizing: border-box;padding:0 24rpx 24rpx;color: #87664d;align-items: center;
 			.original-price{text-decoration: line-through;}
-			.discount-price{color: #ff0101;}
+			.discount-price{color: #ff0101;font-size: 40rpx;}
 		}
 		.pay-type-box{
-			display: flex;align-items: center;
+			display: flex;align-items: center;padding:20rpx 24rpx;box-sizing: border-box;
+			.type-radio-title{color: #87664d;margin-right: 32rpx;flex-shrink: 0;font-size: 32rpx;}
+			.type-radio-content{display: flex;flex-direction: row;align-items: center;
+			justify-content: space-between;flex: 1;font-size: 32rpx;}
+		}
+		.type-radio-box{
+			display: flex;align-items: center;color: #87664d;
+			icon{width: 48rpx;height: 48rpx;@include ezy-no-repeat-cover;margin-right: 10rpx;}
+			.uni-radio-input{
+				width: 48rpx;height: 48rpx;@include ezy-no-repeat-cover;margin-left: 16rpx;
+				background-image: url("@/static/images/pay/svip-radio.png");
+				background-color:transparent;border:0; pointer-events: none;
+			}
+			.radio-checked .uni-radio-input{
+				width: 48rpx;height: 48rpx;@include ezy-no-repeat-cover;color:transparent;
+				background-image: url("@/static/images/pay/svip-radio-checked.png");
+			}
 		}
-		.type-radio-box{display: flex;align-items: center;}
+		.wx-radio{background-image: url("@/static/images/pay/svip-wx-icon.png");}
+		.zfb-radio{background-image: url("@/static/images/pay/svip-zfb-icon.png");}
 		.open-svip-btn{
-			width: 333rpx;height: 88rpx;line-height: 88rpx;text-align: center;color: #fff;
+			width: 333rpx;height: 88rpx;line-height: 88rpx;text-align: center;color: #fff;margin: 10rpx auto;font-size: 36rpx;
 			@include ezy-no-repeat-cover;background-image: url("@/static/images/pay/svip-btn-bj.png");
 		}
 	}
+	
+	@media (max-height: 800px) {
+		min-height: 1346rpx;
+		.svip-login{width: 538rpx;height: 215rpx;margin: 0 auto;}
+		.svip-list-box{
+			margin: 0 auto;
+			.list-item-box{margin-bottom: 20rpx;}
+		}
+		.open-svip-box{
+			width: 673rpx;height:396rpx;
+			.open-svip-btn{margin: 0 auto;}
+			}
+	}
+	@media (max-height: 700px) {
+		min-height: 1250rpx;
+		.svip-login{width: 500rpx;height: 200rpx;margin: 0 auto;}
+		.svip-list-box{
+			.list-item-box{margin-bottom: 16rpx;}
+			.list-icon{
+				width: 96rpx;height: 106rpx;@include ezy-no-repeat-cover;margin-right: 16rpx;
+			}
+			.list-title{font-size: 26rpx;}
+			.list-content{font-size: 22rpx;}
+		}
+		.open-svip-box{
+			width: 625rpx;height:349rpx;
+			.svip-price-box{
+				font-size: 30rpx;margin-top: 90rpx;padding:0 24rpx 24rpx;
+				.discount-price{color: #ff0101;font-size: 36rpx;}
+			}
+			.pay-type-box{
+				padding:10rpx 12rpx;
+				.type-radio-title{margin-right: 24rpx;font-size: 30rpx;}
+				.type-radio-content{font-size: 30rpx;}
+			}
+			.open-svip-btn{width: 300rpx;height: 80rpx;line-height: 80rpx;margin: 6rpx auto;font-size: 32rpx;}
+		}
+	}
 }
 

+ 1 - 1
pages/login/login.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="ezy-login-page">
-	
+		<view @click="goIndex" class="login-nav-bar-icon"></view>
 		<view class="ezy-login-wrap">
 			<view class="login-body-box">
 				<view class="login-title-img"></view>

+ 7 - 4
pages/login/sliderDialog.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="slider-check-dialog">
 		<view class="slider-check-content">
-			<view class="slider-close" @click="sliderClose"></view>
+			<view class="slider-close" @click="sliderClose(AWSC)"></view>
 			<view class="slider-check-tip" :class="{ 'slider-tip-red': isSlider}">请滑动下方滑块,完成验证</view>
 			<view id="yzm-slider"></view>
 			<text @click="AWSC.emitData" class="slider-check-btn"></text>
@@ -26,9 +26,12 @@
 			receiveRenderData(data) {
 				this.$emit('emitFun', data)
 			},
-			sliderClose() {
-				this.getReset();
-				this.$emit('sliderClose')
+			sliderClose(AWSC) {
+				AWSC.getReset();
+				// this.$emit('sliderClose')
+				uni.redirectTo({
+					url: `/pages/login/index`
+				})
 			}
 		}
 	}

+ 1 - 1
pages/my/index.vue

@@ -66,7 +66,7 @@
 	let hyqyData = reactive({
 			indicatorDots: true,
 			autoplay: true,
-			interval: 2000,
+			interval: 10000,
 			duration: 500
 	});
 	let loginFlag = ref(false);

+ 4 - 1
pages/my/telDialog.vue

@@ -101,7 +101,10 @@
 			// 获取验证码按钮
 			getYzmBtn() {
 				// 判断手机号校验是否通过
-				if (this.bindObj.isDisabled === true) {
+				if (this.bindObj.timeLeft !=60) {
+					toast('请在'+this.bindObj.timeLeft +'后重新获取验证码!')
+					return
+				}else if(this.bindObj.isDisabled === true) {
 					toast("请输入正确的手机号!")
 					return
 				}else{

+ 355 - 2
pages/pay/order.vue

@@ -1,9 +1,362 @@
 <template>
-	<view>订单页面</view>
+	<view class="ezy-cuoti-page">
+		<view class="icon-title-navBar-box">
+			<view @click="goBack" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">我的订单</text>
+		</view>
+		<view class="cuoti-border-box">
+
+			<uni-segmented-control :current="dingdanData.current" :values="dingdanData.items" active-color="#3A7FE9"
+				@clickItem="onChangeTab" class="cuo-tab-box" />
+			<view class="cuoti-content-box">
+				<view v-if="dingdanData.current === 0">
+					<scroll-view scroll-y="true" refresher-enabled="true"
+						:refresher-triggered="dingdanData.quanbu.loading" :refresher-threshold="50"
+						refresher-background="lightgreen" @refresherrefresh="onRefresh" class="cuoti-scroll-view">
+						<!--数学-->
+						<uni-list>
+							<uni-list-item v-for="item in dingdanData.quanbu.list" class="list-item-box">
+								<template v-slot:body>
+									<view>
+										鹅状元自营 不支持退订
+									</view>
+									<view v-if="item.status ==0||item.status ==1">
+										已付款
+									</view>
+									<view v-if="item.status ==2">
+										未付款
+									</view>
+									<view>
+										图片
+									</view>
+									<view>
+										{{item.cardName}}
+
+									</view>
+									<view>
+
+										{{item.cardYuanjia}}
+									</view>
+									<view>
+										{{item.ctime}}
+
+									</view>
+									<view>
+										实付款:{{item.money}}
+									</view>
+									<view v-if="item.status ==1">
+										立即支付
+									</view>
+								</template>
+							</uni-list-item>
+							<uni-load-more :status="dingdanData.quanbu.state" @click="getMore(0)"
+								:contentText="dingdanData.quanbu.contentText">
+							</uni-load-more>
+						</uni-list>
+					</scroll-view>
+				</view>
+				<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">
+
+					</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">
+
+
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+		<CustomTabBar></CustomTabBar>
+	</view>
 </template>
 
-<script>
+<script setup>
+	import {
+		reactive,
+		ref
+	} from "vue";
+	import {
+		getOrderList
+	} from "@/api/order";
+	import {
+		onLoad
+	} from "@dcloudio/uni-app";
+	import {
+		toast,
+		getUserIdentity
+	} from "@/utils/common";
+	import cacheManager from '@/utils/cacheManager.js';
+	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
+	const dingdanData = reactive({
+		items: ['全部', '待付款', '已付款'],
+		current: 0,
+		quanbu: {
+			page: 0,
+			list: [],
+			loading: false,
+			state: 'more',
+			contentText: {
+				contentdown: '查看更多',
+				contentrefresh: '加载中',
+				contentnomore: '没有更多'
+			}
+
+		},
+		daiFukuan: {
+			page: 0,
+			list: [],
+			loading: false,
+			state: 'more',
+			contentText: {
+				contentdown: '查看更多',
+				contentrefresh: '加载中',
+				contentnomore: '没有更多'
+			}
+		},
+		yiFukuan: {
+			page: 0,
+			list: [],
+			loading: false,
+			state: 'more',
+			contentText: {
+				contentdown: '查看更多',
+				contentrefresh: '加载中',
+				contentnomore: '没有更多'
+			}
+		},
+	})
+
+	function onChangeTab(e) {
+		if (dingdanData.current !== e.currentIndex) {
+			dingdanData.current = e.currentIndex;
+			if (dingdanData.current == 0) {
+				dingdanData.quanbu.page = 0
+			} else if (dingdanData.current == 1) {
+				dingdanData.daiFukuan.page = 0
+			} else if (dingdanData.current == 2) {
+				dingdanData.yiFukuan.page = 0
+			}
+			refreshData(dingdanData.current);
+		}
+	}
+
+	function refreshData(code) {
+		const opt = {
+			page: 1,
+			size: 10, // 固定查询10条
+			status: code
+		}
+
+		if (code == 0) {
+			dingdanData.quanbu.list = [];
+			// 数学
+			dingdanData.quanbu.state = 'loading';
+			dingdanData.quanbu.page++;
+			opt.page = dingdanData.quanbu.page;
+		} else if (code == 1) {
+			dingdanData.daiFukuan.list = [];
+			// 英语
+			dingdanData.daiFukuan.state = 'loading';
+			dingdanData.daiFukuan.page++;
+			opt.page = dingdanData.daiFukuan.page;
+		} else if (code == 2) {
+			dingdanData.yiFukuan.list = [];
+			// 英语
+			dingdanData.yiFukuan.state = 'loading';
+			dingdanData.yiFukuan.page++;
+			opt.page = dingdanData.yiFukuan.page;
+		}
+		getOrderList(opt).then(res => {
+			if (code == 0) {
+				dingdanData.quanbu.list = dingdanData.quanbu.list.concat(res.data.data);
+				dingdanData.quanbu.loading = false;
+			} else if (code == 1) {
+				dingdanData.daiFukuan.list = dingdanData.daiFukuan.list.concat(res.data.data);
+				dingdanData.daiFukuan.loading = false;
+			} else if (code == 2) {
+				dingdanData.yiFukuan.list = dingdanData.yiFukuan.list.concat(res.data.data);
+				dingdanData.yiFukuan.loading = false;
+			}
+			if (code == 0) {
+				if (res.data.total >= dingdanData.quanbu.list.length) {
+					// 数学
+					dingdanData.quanbu.state = 'no-more';
+					dingdanData.quanbu.loading = false;
+				} else {
+					// 数学
+					dingdanData.quanbu.state = 'more';
+					dingdanData.quanbu.loading = false;
+				}
+			} else if (code == 1) {
+				if (res.data.total >= dingdanData.daiFukuan.list.length) {
+					// 英语
+					dingdanData.daiFukuan.state = 'no-more';
+					dingdanData.daiFukuan.loading = false;
+				} else {
+					// 英语
+					dingdanData.daiFukuan.state = 'more';
+					dingdanData.daiFukuan.loading = false;
+				}
+			} else if (code == 1) {
+				if (res.data.total >= dingdanData.yiFukuan.list.length) {
+					// 英语
+					dingdanData.yiFukuan.state = 'no-more';
+					dingdanData.yiFukuan.loading = false;
+				} else {
+					// 英语
+					dingdanData.yiFukuan.state = 'more';
+					dingdanData.yiFukuan.loading = false;
+				}
+			}
+		}).catch(err => {
+			if (code == 0) {
+				// 数学
+				dingdanData.quanbu.state = 'more';
+				dingdanData.quanbu.loading = false;
+			} else if (code == 1) {
+				// 英语
+				dingdanData.daiFukuan.state = 'more';
+				dingdanData.daiFukuan.loading = false;
+			} else if (code == 2) {
+				// 英语
+				dingdanData.yiFukuan.state = 'more';
+				dingdanData.yiFukuan.loading = false;
+			}
+		})
+	}
+
+	function onRefresh() {
+		if (dingdanData.current == 0) {
+			dingdanData.quanbu.page = 0;
+			dingdanData.quanbu.list = [];
+			dingdanData.quanbu.loading = true;
+		} else if (dingdanData.current == 1) {
+			dingdanData.daiFukuan.page = 0;
+			dingdanData.daiFukuan.list = [];
+			dingdanData.daiFukuan.loading = true;
+		} else if (dingdanData.current == 2) {
+			dingdanData.yiFukuan.page = 0;
+			dingdanData.yiFukuan.list = [];
+			dingdanData.yiFukuan.loading = true;
+		}
+		refreshData(dingdanData.current);
+	}
+
+	function getMore(code) {
+		const opt = {
+			page: 1,
+			size: 10, // 固定查询10条
+			status: code // 前台索引加1为学科cardId
+		}
+
+		if (code == 0) {
+			if (dingdanData.quanbu.state == 'no-more') {
+				return;
+			}
+			// 数学
+			dingdanData.quanbu.state = 'loading';
+			dingdanData.quanbu.page++;
+			opt.page = dingdanData.quanbu.page;
+		} else if (code == 1) {
+			if (dingdanData.daiFukuan.state == 'no-more') {
+				return;
+			}
+			dingdanData.daiFukuan.state = 'loading';
+			dingdanData.daiFukuan.page++;
+			opt.page = dingdanData.daiFukuan.page;
+		} else if (code == 2) {
+			if (dingdanData.yiFukuan.state == 'no-more') {
+				return;
+			}
+			dingdanData.yiFukuan.state = 'loading';
+			dingdanData.yiFukuan.page++;
+			opt.page = dingdanData.yiFukuan.page;
+		}
+		getOrderList(opt).then(res => {
+			if (code == 0) {
+				dingdanData.quanbu.list = dingdanData.quanbu.list.concat(res.data.data);
+				dingdanData.quanbu.loading = false;
+			} else if (code == 1) {
+				dingdanData.daiFukuan.list = dingdanData.daiFukuan.list.concat(res.data.data);
+				dingdanData.daiFukuan.loading = false;
+			} else if (code == 2) {
+				dingdanData.yiFukuan.list = dingdanData.yiFukuan.list.concat(res.data.data);
+				dingdanData.yiFukuan.loading = false;
+			}
+			if (code == 0) {
+				if (res.data.total >= dingdanData.quanbu.list.length) {
+					// 数学
+					dingdanData.quanbu.state = 'no-more';
+					dingdanData.quanbu.state_text = '没有更多啦';
+					dingdanData.quanbu.loading = false;
+				} else {
+					// 数学
+					dingdanData.quanbu.state = 'more';
+					dingdanData.quanbu.state_text = '加载更多';
+					dingdanData.quanbu.loading = false;
+				}
+			} else if (code == 1) {
+				if (res.data.total >= dingdanData.daiFukuan.list.length) {
+					// 英语
+					dingdanData.daiFukuan.state = 'no-more';
+					dingdanData.daiFukuan.state_text = '没有更多啦';
+					dingdanData.daiFukuan.loading = false;
+				} else {
+					// 英语
+					dingdanData.daiFukuan.state = 'more';
+					dingdanData.daiFukuan.state_text = '加载更多';
+					dingdanData.daiFukuan.loading = false;
+				}
+			} else if (code == 2) {
+				if (res.data.total >= dingdanData.yiFukuan.list.length) {
+					// 英语
+					dingdanData.yiFukuan.state = 'no-more';
+					dingdanData.yiFukuan.state_text = '没有更多啦';
+					dingdanData.yiFukuan.loading = false;
+				} else {
+					// 英语
+					dingdanData.yiFukuan.state = 'more';
+					dingdanData.yiFukuan.state_text = '加载更多';
+					dingdanData.yiFukuan.loading = false;
+				}
+			}
+		}).catch(err => {
+			if (code == 0) {
+				// 数学
+				dingdanData.quanbu.state = 'more';
+				dingdanData.quanbu.state_text = '加载更多';
+				dingdanData.quanbu.loading = false;
+			} else if (code == 1) {
+				// 英语
+				dingdanData.daiFukuan.state = 'more';
+				dingdanData.daiFukuan.state_text = '加载更多';
+				dingdanData.daiFukuan.loading = false;
+			} else if (code == 2) {
+				// 英语
+				dingdanData.yiFukuan.state = 'more';
+				dingdanData.yiFukuan.state_text = '加载更多';
+				dingdanData.yiFukuan.loading = false;
+			}
+		})
+	}
+
+	function goBack() {
+		uni.redirectTo({
+			url: '/pages/my/index'
+		})
+	}
+
+	onLoad(() => {
+		getMore(dingdanData.current);
+	})
 </script>
 
 <style>
+
 </style>

+ 20 - 11
pages/pay/svip.vue

@@ -21,26 +21,32 @@
 				<view>原价:<text class="original-price">¥598</text></view>
 				<view class="discount-price">活动价:¥198</view>
 			</view>
-			<radio-group @change="radioChange" class="pay-type-box">
-				<view>支付方式</view>
-				<view class="type-radio-box">
-					<icon></icon>
-					<text>微信</text>
-					<radio value="weixin" :checked="payType==='weixin'" />
-				</view>
-				<view class="type-radio-box">
-					<icon></icon>
-					<text>支付宝</text>
-					<radio value="zhifubao" :checked="payType==='zhifubao'" />
+			<radio-group @change="radioChange" class="pay-type-box" >
+				<view class="type-radio-title">支付方式</view>
+				<view class="type-radio-content">
+					<view class="type-radio-box">
+						<icon class="wx-radio"></icon>
+						<text>微信</text>
+						<radio value="weixin" :checked="payType==='weixin'" activeBackgroundColor="transparent"
+						:class="{'radio-checked': payType==='weixin'}"/>
+					</view>
+					<view class="type-radio-box">
+						<icon class="zfb-radio"></icon>
+						<text>支付宝</text>
+						<radio value="zhifubao" :checked="payType==='zhifubao'" activeBackgroundColor="transparent"
+						:class="{'radio-checked': payType==='zhifubao'}" style="margin-right: 0;"/>
+					</view>
 				</view>
 			</radio-group>
 			<view class="open-svip-btn">立即开通</view>
 		</view>
+		<CustomTabBar></CustomTabBar>
 	</view>
 </template>
 
 <script setup>
 import {ref} from "vue";
+import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
 let payType = ref('weixin')
 const svipArr = [
     {
@@ -64,6 +70,9 @@ const svipArr = [
         content: '成为会员,即刻畅享专属权益,开启无忧学习之旅'
     }
 ];
+function radioChange(data){
+	payType.value = data.detail.value;
+}
 </script>
 
 <style>