Browse Source

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

tanxue 1 month ago
parent
commit
e0f3053ce1

+ 6 - 6
pages/mall/detailDialog.vue

@@ -220,14 +220,14 @@
 					id: orderId.value
 				}).then(res3 => {
 					console.log('res3', res3);
-					if (res3.code == 0) {
+					if (res3.code == 0&&res3.data.success) {
 						genggaiVip(res3.data)
 					} else {
 						setTimeout(() => {
 							orderCheck({
 								id: orderId.value
 							}).then(res4 => {
-								if (res4.code == 0) {
+								if (res4.code == 0&&res4.data.success) {
 									genggaiVip(res4.data)
 								} else {
 									toast(
@@ -369,7 +369,7 @@
 						id: orderId.value
 					}).then(res3 => {
 						console.log('res3', res3);
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 
 							genggaiVip(res3.data)
 						} else {
@@ -377,7 +377,7 @@
 								orderCheck({
 									id: orderId.value
 								}).then(res4 => {
-									if (res4.code == 0) {
+									if (res4.code == 0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(
@@ -437,7 +437,7 @@
 					orderCheck({
 						id: orderId.value
 					}).then(res3 => {
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 							genggaiVip(res3.data)
 						} else {
 							setTimeout(() => {
@@ -445,7 +445,7 @@
 									id: orderId.value
 								}).then(res4 => {
 									if (res4.code ==
-										0) {
+										0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(

+ 6 - 6
pages/mall/mallPage.vue

@@ -331,14 +331,14 @@
 					id: orderId.value
 				}).then(res3 => {
 					console.log('res3', res3);
-					if (res3.code == 0) {
+					if (res3.code == 0&&res3.data.success) {
 						genggaiVip(res3.data)
 					} else {
 						setTimeout(() => {
 							orderCheck({
 								id: orderId.value
 							}).then(res4 => {
-								if (res4.code == 0) {
+								if (res4.code == 0&&res4.data.success) {
 									genggaiVip(res4.data)
 								} else {
 									toast(
@@ -483,7 +483,7 @@
 						id: orderId.value
 					}).then(res3 => {
 						console.log('res3', res3);
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 
 							genggaiVip(res3.data)
 						} else {
@@ -491,7 +491,7 @@
 								orderCheck({
 									id: orderId.value
 								}).then(res4 => {
-									if (res4.code == 0) {
+									if (res4.code == 0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(
@@ -551,7 +551,7 @@
 					orderCheck({
 						id: orderId.value
 					}).then(res3 => {
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 							genggaiVip(res3.data)
 						} else {
 							setTimeout(() => {
@@ -559,7 +559,7 @@
 									id: orderId.value
 								}).then(res4 => {
 									if (res4.code ==
-										0) {
+										0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(

+ 12 - 8
pages/pay/order.vue

@@ -244,10 +244,14 @@
 		ref
 	} from "vue";
 	import {
+		orderAdd,
+		orderPayAli,
+		orderPayWx,
+		orderPayApple,
 		getOrderList,
 		orderInfo,
-		orderAdd
-	} from "@/api/order";
+		orderCheck
+	} from "@/api/order.js"
 	import {
 		onLoad
 	} from "@dcloudio/uni-app";
@@ -397,14 +401,14 @@
 				id: orderId.value
 			}).then(res3 => {
 				console.log('res3', res3);
-				if (res3.code == 0) {
+				if (res3.code == 0&&res3.data.success) {
 					genggaiVip(res3.data)
 				} else {
 					setTimeout(() => {
 						orderCheck({
 							id: orderId.value
 						}).then(res4 => {
-							if (res4.code == 0) {
+							if (res4.code == 0&&res4.data.success) {
 								genggaiVip(res4.data)
 							} else {
 								toast(
@@ -547,7 +551,7 @@
 						id: orderId.value
 					}).then(res3 => {
 						console.log('res3', res3);
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 
 							genggaiVip(res3.data)
 						} else {
@@ -555,7 +559,7 @@
 								orderCheck({
 									id: orderId.value
 								}).then(res4 => {
-									if (res4.code == 0) {
+									if (res4.code == 0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(
@@ -615,7 +619,7 @@
 					orderCheck({
 						id: orderId.value
 					}).then(res3 => {
-						if (res3.code == 0) {
+						if (res3.code == 0&&res3.data.success) {
 							genggaiVip(res3.data)
 						} else {
 							setTimeout(() => {
@@ -623,7 +627,7 @@
 									id: orderId.value
 								}).then(res4 => {
 									if (res4.code ==
-										0) {
+										0&&res4.data.success) {
 										genggaiVip(res4.data)
 									} else {
 										toast(

+ 20 - 12
pages/study/lookShipin.vue

@@ -36,7 +36,7 @@
 			</view>
 		</uni-popup>
 		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<svip-dialog ref="svipDialogRef" @confirm-btn="svipConfirm"></svip-dialog>
+		<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
 	</view>
 
 </template>
@@ -56,7 +56,7 @@
 	} from "@/api/shipin.js"
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
 	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import svipDialog from './svipDialog.vue';
+	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import {
 		toast,
 		getUserIdentity
@@ -79,6 +79,7 @@
 				tipFlag: '',
 				credit: '',
 				subjectId: '',
+				tipContent: '是否前往开通付费',
 				typeId: '',
 				seekTime: '',
 				jieId: '',
@@ -92,7 +93,7 @@
 		components: {
 			tipMiddleDialog,
 			tipBigDialog,
-			svipDialog
+			tipSmallDialog
 		},
 		onLoad(options) {
 			if (!cacheManager.get('auth')) {
@@ -233,10 +234,10 @@
 				} else {
 					const AuthCode = getUserIdentity();
 					console.log(AuthCode);
-					// if (AuthCode == 'Not-Vip') {
-					// 	this.$refs.svipDialogRef.handleShow();
-					// 	return false
-					// }
+					if (AuthCode == 'Not-Vip') {
+						this.$refs.goPayDialogRef.handleShow();
+						return false
+					}
 					//	debugger
 					Number(this.jieId++)
 					console.log('this.pageData', this.pageData);
@@ -264,7 +265,7 @@
 				}
 			},
 			getLiveYk() {
-				if(!this.videoId){
+				if (!this.videoId) {
 					toast("video缺失!")
 					return false
 				}
@@ -276,7 +277,7 @@
 				})
 			},
 			getLive() {
-				if(!this.videoId){
+				if (!this.videoId) {
 					toast("video缺失!")
 					return false
 				}
@@ -296,7 +297,8 @@
 			goUpPage() {
 				if (!cacheManager.get('auth')) {
 					uni.redirectTo({
-						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId + '&subjectId=' +
+						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId +
+							'&subjectId=' +
 							this.subjectId + '&tipFlag=' + this.tipFlag
 					})
 				} else {
@@ -309,9 +311,15 @@
 
 
 			},
-			svipConfirm() {
+			goPayPage() {
+				let zhangInfoLocal = cacheManager.get('zhangInfo')
+				if (!zhangInfoLocal.cardId) {
+					toast("cardId 丢失请重新选择学科LevelId");
+					return false
+				}
 				uni.redirectTo({
-					url: '/pages/pay/svip?cardId=' + cacheManager.get('auth').cardId
+					url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
+						zhangInfoLocal.subjectId
 				})
 			},
 			ykConfirm() {

+ 24 - 15
pages/study/lookShipinNew.vue

@@ -7,14 +7,15 @@
 		<view class="course-body-box">
 			<view class="ezy-video-box course-video-box">
 				<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth"
-					:change:playAuth="renderScript.receiveMsg" :videoId="videoId" :change:videoId="renderScript.videoIdFun"
-					:hideFlag="hideFlag" :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
+					:change:playAuth="renderScript.receiveMsg" :videoId="videoId"
+					:change:videoId="renderScript.videoIdFun" :hideFlag="hideFlag"
+					:change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
 					:change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime"
 					:change:seekTime="renderScript.seekTimeFun" class="ezy-video">
 				</view>
 			</view>
 		</view>
-	<!-- 	<view class="course-content-border">
+		<!-- 	<view class="course-content-border">
 			<view class="course-content-box">
 				<view v-for="(item,index) in progressMarkers" :key="index" @click="markersClick(item)">
 					<view class="title-play-box">
@@ -37,7 +38,7 @@
 			</view>
 		</uni-popup>
 		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<svip-dialog ref="svipDialogRef" @confirm-btn="svipConfirm"></svip-dialog>
+		<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
 	</view>
 
 </template>
@@ -57,7 +58,7 @@
 	} from "@/api/shipin.js"
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
 	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import svipDialog from './svipDialog.vue';
+	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import {
 		toast,
 		getUserIdentity
@@ -76,6 +77,7 @@
 				jieName: '',
 				hideFlag: 'show',
 				videoId: "", //阿里云视频id
+				tipContent: '是否前往开通付费',
 				subjectId: '',
 				credit: '',
 				tipFlag: '',
@@ -93,7 +95,7 @@
 		components: {
 			tipMiddleDialog,
 			tipBigDialog,
-			svipDialog
+			tipSmallDialog
 		},
 		onLoad(options) {
 			if (!cacheManager.get('auth')) {
@@ -234,10 +236,10 @@
 				} else {
 					const AuthCode = getUserIdentity();
 					console.log(AuthCode);
-					// if (AuthCode == 'Not-Vip') {
-					// 	this.$refs.svipDialogRef.handleShow();
-					// 	return false
-					// }
+					if (AuthCode == 'Not-Vip') {
+						this.$refs.goPayDialogRef.handleShow();
+						return false
+					}
 					//	debugger
 					Number(this.jieId++)
 					console.log('this.pageData', this.pageData);
@@ -265,7 +267,7 @@
 				}
 			},
 			getLiveYk() {
-				if(!this.videoId){
+				if (!this.videoId) {
 					toast("video缺失!")
 					return false
 				}
@@ -277,7 +279,7 @@
 				})
 			},
 			getLive() {
-				if(!this.videoId){
+				if (!this.videoId) {
 					toast("video缺失!")
 					return false
 				}
@@ -297,7 +299,8 @@
 			goUpPage() {
 				if (!cacheManager.get('auth')) {
 					uni.redirectTo({
-						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId + '&subjectId=' +
+						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId +
+							'&subjectId=' +
 							this.subjectId + '&tipFlag=' + this.tipFlag
 					})
 				} else {
@@ -310,9 +313,15 @@
 
 
 			},
-			svipConfirm() {
+			goPayPage() {
+				let zhangInfoLocal = cacheManager.get('zhangInfo')
+				if (!zhangInfoLocal.cardId) {
+					toast("cardId 丢失请重新选择学科LevelId");
+					return false
+				}
 				uni.redirectTo({
-					url: '/pages/pay/svip?cardId=' + cacheManager.get('auth').cardId
+					url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
+						zhangInfoLocal.subjectId
 				})
 			},
 			ykConfirm() {