wangguoyu 5 ヶ月 前
コミット
31a79fc890
2 ファイル変更17 行追加10 行削除
  1. 13 8
      pages/study/index.vue
  2. 4 2
      pages/study/product/shuxue.vue

+ 13 - 8
pages/study/index.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="ezy-study-page">
+	<view class="ezy-study-page">
+		{{currentProduct}}
 		<shuxueZhangjie v-if="currentProduct ==1" @clickGradeTerm="clickGradeTerm" @onLeft="onLeft" @onRight="onRight"
 			@handleCheckCatalogue="handleCheckCatalogue" @listClick="listClick" :options="infoData">
 		</shuxueZhangjie>
@@ -10,7 +11,7 @@
 		<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
 		<catalogue ref="catalogueRef" @change-zhang="handleChangeZhang"></catalogue>
 		<CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
-				<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPay" :content="tipContent"></tip-small-dialog>
+				<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
 	</view>
 
 </template>
@@ -46,14 +47,14 @@
 		toast,getUserIdentity
 	} from "@/utils/common";
 	import cacheManager from "@/utils/cacheManager.js";
-	const tipContent = '付费章节,是否前往开通付费?'; 
-	const currentProduct = cacheManager.get('auth').cardId; //当前产品
+	const tipContent = '付费章节,是否前往开通付费?';  //当前产品
 	const goPayDialogRef = ref(null);
 	const eggDialogRef = ref(null);
 	const zhangId = ref(null); //游客使用
 	const nianji = ref(null);//游客使用
 	const cardId = ref(null);//游客使用
-	const catalogueRef = ref(null);
+	const catalogueRef = ref(null);
+	const currentProduct = ref(null);
 	const selectZhang = ref(null);
 	let infoData = reactive({
 		jieList: [],
@@ -70,7 +71,8 @@
 	})
 
 	function init(options){
-		if (cacheManager.get('auth')) {
+		if (cacheManager.get('auth')) {
+			currentProduct.value = cacheManager.get('auth').cardId;
 			//会员 取auth
 			selectZhang.value = cacheManager.get('auth');
 			console.log(selectZhang.value);
@@ -83,7 +85,8 @@
 		} else {
 			zhangId.value = options.zhangId
 			nianji.value = options.nianji
-			cardId.value = options.cardId
+			cardId.value = options.cardId
+			currentProduct.value = options.cardId
 			// 未登录 游客 
 			getCommonZhang(options)
 		}
@@ -206,7 +209,9 @@
 
 		})
 	}
-
+	function goPayPage(){
+		
+	}
 	function handleChangeZhang(data) {
 		selectZhang.value = data;
     const authCode = getUserIdentity();

+ 4 - 2
pages/study/product/shuxue.vue

@@ -5,6 +5,7 @@
 			<view class="chapter-box" @click="handleCheckCatalogue">{{options.numberStr}}</view>
 			<view class="chapter-title-box">{{options.zhangName}}</view>
 			<view>
+			
 				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
 					@click="listClick(item, index)" :class="getClass(options.jieList,index)">
 					<view v-if="isVip === 'VIP'" class="brand-icon">
@@ -19,8 +20,9 @@
 							{{ item.jieName }}
 						</view>
 					</view>
-					<view v-if="isVip !== 'VIP'"  class="brand-lock">
-						<view v-if="item.number ==1">{{ item.number }}</view>
+					<view v-if="isVip !== 'VIP'">
+						<view v-if="item.number ==1" class="brand-icon">{{ item.number }}</view>
+						<view v-if="item.number !=1" class="brand-lock">{{ item.number }}</view>
 						<view v-if="item.daeFlag">
 						<template v-if="growthType ==0">蛋</template>
 						<template v-if="growthType ==1">小鹅</template>