wangxy 6 ماه پیش
والد
کامیت
dbb91bb085
1فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 8 3
      components/catalogue/catalogue.vue

+ 8 - 3
components/catalogue/catalogue.vue

@@ -46,6 +46,12 @@
 	import {MESSAGE_VISITER_TO_LOGIN,MESSAGE_BEFORE_PAY} from "@/utils/constant.js"
     import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
+	import {
+	  onShow
+	} from '@dcloudio/uni-app';
+	const growthType = ref(null);
+	const AuthCode = ref(null);
+	onShow(() => AuthCode.value = getUserIdentity()); // 用户身份
 
 	const $emit = defineEmits(['change-zhang'])
 
@@ -56,7 +62,6 @@
 	const list = ref([]); // 章节
 	const activeCollapse = ref('');
 	const Message = MESSAGE_BEFORE_PAY;
-	const AuthCode = getUserIdentity(); // 用户身份
 	const youkeDialogRef = ref(null);
 
 	function ykConfirm() {
@@ -103,13 +108,13 @@
 	 * @param({zhangId:string}) data
 	 */
 	function handleSelectZhang(data,index) {
-		if(index !=0 && AuthCode == 'Visitor'){
+		if(index !=0 && AuthCode.value == 'Visitor'){
 			// 游客
 			youkeDialogRef.value.handleShow();
 			return;
 		}
 
-		if(index !=0 && AuthCode == 'Not-Vip'){
+		if(index !=0 && AuthCode.value == 'Not-Vip'){
 			// 非VIP
 			popupRef.value.close();
 			confirmDialogRef.value.handleShow();