wangguoyu 6 月之前
父节点
当前提交
af65d01398
共有 2 个文件被更改,包括 44 次插入6 次删除
  1. 27 0
      pages/pay/paySuccessAll.vue
  2. 17 6
      pages/pay/svip.vue

+ 27 - 0
pages/pay/paySuccessAll.vue

@@ -0,0 +1,27 @@
+<!-- 蛋破壳弹窗 -->
+<template>
+	<uni-popup ref="paySuccessPopup" :animation="false" :is-mask-click="false"
+	 mask-background-color="rgba(51, 137, 217, 0.65);">
+	 <view class="ezy-pay-success-dialog"> </view>
+	</uni-popup>
+</template>
+
+<script setup>
+	import { ref } from 'vue';
+	const paySuccessPopup = ref(null); // 索引
+	// 打开弹窗
+	function handleShow() {
+		paySuccessPopup.value.open();
+	}
+	// 取消
+	function handleClose() {
+		paySuccessPopup.value.close();
+	}
+	defineExpose({
+			handleShow,
+			handleClose
+		})
+</script>
+
+<style>
+</style>

+ 17 - 6
pages/pay/svip.vue

@@ -44,6 +44,7 @@
 		<CustomTabBar></CustomTabBar>
 		<!-- 蛋破壳 -->
 		<pay-success ref="daoPokeRef"></pay-success>
+		<pay-successAll ref="daoPokeAllRef"></pay-successAll>
 	</view>
 </template>
 
@@ -57,6 +58,7 @@
 	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
 	import cacheManager from "@/utils/cacheManager.js";
 	import paySuccess from './paySuccess.vue';
+	import paySuccessAll from './paySuccessAll.vue';
 	import {
 		onLoad,
 		onReady
@@ -68,6 +70,8 @@
 	let payType = ref('weixin')
 	let cardId = ref('')
 	const daoPokeRef = ref(null);
+	const daoPokeAllRef = ref(null);
+	const isVip = getUserIdentity();
 	const svipArr = [{
 			iconPath: 'static/images/pay/svip-list-icon1.png',
 			title: '学习资源,随心畅学',
@@ -98,22 +102,29 @@
 	}
 
 	function creatOrder(data) {
-		
-		
-		
+
+
+
 		let req = {
 			cardId: cardId.value
 		}
 		orderAdd(req).then(res => {
 			cacheManager.updateVipStatus('auth', cardId.value)
-			cacheManager.updateObject('auth',{growthType:1})
-			daoPokeRef.value.handleShow();
+			cacheManager.updateObject('auth', {
+				growthType: 1
+			})
+			if (isVip != 'VIP') {
+				daoPokeRef.value.handleShow();
+			} else {
+				daoPokeAllRef.value.handleShow();
+			}
 			setTimeout(() => {
 				daoPokeRef.value.handleClose();
+				daoPokeAllRef.value.handleClose();
 				uni.redirectTo({
 					url: '/pages/study/index'
 				})
-			},3000)
+			}, 3000)
 		})
 	}