lex 8 months ago
parent
commit
2df4c29288
2 changed files with 4 additions and 4 deletions
  1. 3 3
      src/views/member-center/index.tsx
  2. 1 1
      vite.config.ts

+ 3 - 3
src/views/member-center/index.tsx

@@ -245,18 +245,18 @@ export default defineComponent({
         let startTime = new Date()
         // vip类型 VIP:会员 SVIP:SVIP,PERMANENT_SVIP:永久SVIP,NOT_VIP:不是vip
         // vip过期类型 VIP:会员 SVIP:SVIP,ALL_VIP:全vip
-        if (userInfo.value.userVip.vipType === 'SVIP') {
+        if (state.tabActive === 'SVIP') {
           startTime = dayjs(
             userInfo.value.userVip.svipEndDate || new Date()
           ).toDate()
-        } else if (userInfo.value.userVip.vipType === 'VIP') {
+        } else if (state.tabActive === 'VIP') {
           // 购买Vip时,先有vip的有效时间,如果没有则取SVIP有效时间,都没有默认当前
           startTime = dayjs(
             userInfo.value.userVip.vipEndDate ||
               userInfo.value.userVip.svipEndDate ||
               new Date()
           ).toDate()
-        } else if (userInfo.value.userVip.vipType === 'PERMANENT_SVIP') {
+        } else if (isPermanent.value) {
           Toast('您已是永久SVIP会员')
           return
         }

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/'
-const proxyUrl = 'https://dev.colexiu.com/'
+const proxyUrl = 'https://test.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.14:8000/'
 export default defineConfig({
   base: './',