wangxy 5 miesięcy temu
rodzic
commit
ab6bfee9c1
3 zmienionych plików z 21 dodań i 15 usunięć
  1. 19 13
      components/catalogue/catalogue.vue
  2. 1 1
      pages/game/index.vue
  3. 1 1
      pages/unitTest/index.vue

+ 19 - 13
components/catalogue/catalogue.vue

@@ -1,7 +1,7 @@
 <template>
 	<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
 	 mask-background-color="rgba(255, 255, 255, 0.6);" :is-shadow="false">
-		<scroll-view scroll-y="true" :scroll-top="scrollTop"  class="ezy-catalogue-dialog" :style="{backgroundImage: 'url(' + catalogueBjFun() + ')'}">
+		<scroll-view scroll-y="true" :scroll-top="scrollTop"  class="ezy-catalogue-dialog" :style="{background: 'url(' + catalogueBjFun() + ')'}">
 			<uni-icons @click="handleClose" class="catalogue-close-btn"></uni-icons>
 			<!-- 目录区域 -->
 			<uni-collapse v-model="activeCollapse" class="ezy-catalogue-collapse" :class="{ 'ezy-catalogue-collapse-vip': AuthCode === 'VIP'}" accordion>
@@ -44,16 +44,22 @@
 	} from "@/utils/common.js"
 	import {getUserIdentity} from "@/utils/common.js"
 	import {MESSAGE_VISITER_TO_LOGIN,MESSAGE_BEFORE_PAY} from "@/utils/constant.js"
-    import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
+  import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
+  import cacheManager from "@/utils/cacheManager.js";
 	import {
-	  onShow
+	  onShow,onLoad
 	} from '@dcloudio/uni-app';
 	const growthType = ref(null);
 	const AuthCode = ref(null);
 	const scrollTop = ref(0)
-	
+	const cardId = ref(null)
 	onShow(() => AuthCode.value = getUserIdentity()); // 用户身份
+  onLoad(() => {
+    if (cacheManager.get('auth')) {
+      cardId.value = cacheManager.get('auth').cardId;
+    }
+  })
 
 	const $emit = defineEmits(['change-zhang'])
 
@@ -72,13 +78,13 @@
 	})
 
 	function catalogueBjFun(){
-		// 需要大哥加逻辑判断
-		// 数学背景
-		return '/static/images/catalog/catalog-shuxue-bj.png'
-		
-		
-		// 英语背景
-		// return '/static/images/catalog/catalog-yingyu-bj'
+		if(cardId.value ==1){
+			// 数学
+			return 'static/images/catalog/catalog-shuxue-bj.png'
+		}else if(cardId.value ==2){
+			// 英语
+			return 'static/images/catalog/catalog-yingyu-bj.png'
+		}
 	}
 	
 	function ykConfirm() {
@@ -127,7 +133,6 @@
 
 		if(index !=0 && AuthCode.value == 'Not-Vip'){
 			// 非VIP
-			popupRef.value.close();
 			confirmDialogRef.value.handleShow();
 			return;
 		}
@@ -135,7 +140,8 @@
 		handleClose();
 	}
 	function handleConfirmPay() {
-		uni.redirectTo({ url: '/pages/pay/svip' })
+    const url = `/pages/pay/svip?cardId=${cardId.value}`
+		uni.redirectTo({ url })
 	}
 	defineExpose({
 		showPopup

+ 1 - 1
pages/game/index.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="ezy-game-page">
 		<!-- 返回按钮 -->
-		<view class="ezy-nav-bar-icon" @click="handleBack"></view>
+		<!-- <view class="ezy-nav-bar-icon" @click="handleBack"></view> -->
 		<!-- 积分 -->
 		<view class="ezy-jf-box game-jf-box">
 			<icon class="jf-icon"></icon>

+ 1 - 1
pages/unitTest/index.vue

@@ -3,7 +3,7 @@
 		<view class="ezy-navBar-box">
 			<view @click="handleBack" class="nav-bar-icon"></view>
 			<text class="nav-bar-title">单元测试</text>
-			<view class="nav-bar-other"><text class="key-note">{{count}}</text>/<text>{{total}}</text></view>
+			<view class="nav-bar-other"><text class="key-note">{{current}}</text>/<text>{{total}}</text></view>
 		</view>
 		<view class="shiti-frame-box">
 			<w-swiper :list="list" :current="current" class="ezy-exam-swiper" @change="onSwiperChange">