wangguoyu 6 meses atrás
pai
commit
40ffc2f40a
3 arquivos alterados com 5 adições e 3 exclusões
  1. 2 1
      pages/study/product/shuxue.vue
  2. 1 1
      utils/common.js
  3. 2 1
      utils/request.js

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

@@ -7,9 +7,10 @@
 			<view>
 				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
 					@click="listClick(item, index)" :class="{ 'brand-active': index === 0 }">
-					<view class="brand-icon">
+					<view v-if="isVip === 'VIP' || item.number == 1" class="brand-icon">
 						{{ item.number }}
 					</view>
+	
 					<view v-if="item.daeFlag">
 					<template v-if="growthType ==0">蛋</template>
 					<template v-if="growthType ==1">小鹅</template>

+ 1 - 1
utils/common.js

@@ -57,7 +57,7 @@ export function catchError(promise) {
 export function getUserIdentity() {
 	const auth = cacheManager.get('auth');
 	if (auth) {
-		if (auth.cardList.some(item => item === auth.catdId)) {
+		if (auth.cardList.some(item => item === auth.cardId)) {
 			// VIP
 			return 'VIP'
 		}

+ 2 - 1
utils/request.js

@@ -45,6 +45,7 @@ const request = config => {
 				//   return
 				// }
 				const code = res.code
+				const msg = res.msg
 				// const msg = errorCode[code] || res.data.msg || errorCode['default']
 				if (code === 401) {
 					showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
@@ -72,7 +73,7 @@ const request = config => {
 					toast("数据异常-400")
 					reject('400')
 				} else if (code !== 0) {
-					//   toast(msg)
+					toast(msg)
 					reject(code)
 				}
 				resolve(res)