lex 11 mēneši atpakaļ
vecāks
revīzija
d986e331a1

+ 2 - 1
src/views/student-info/components/users/index.tsx

@@ -34,6 +34,7 @@ export default defineComponent({
       // MUSIC:曲目 逗号隔开
       let status = false
       const { userInfo } = this
+      console.log(userInfo, 'userInfo')
       switch (type) {
         case 'STYLE':
         case 'VIDEO':
@@ -44,7 +45,7 @@ export default defineComponent({
           }
           break
         case 'VIP':
-          status = userInfo.isVip > 0
+          status = userInfo.userVip?.vipType === 'VIP'
           break
         case 'SVIP':
           status =

+ 18 - 16
src/views/student-info/my-follow/item.tsx

@@ -75,14 +75,12 @@ export default defineComponent({
           }
           break
         case 'VIP':
-          if (teacher.membershipStartTime && teacher.membershipEndTime) {
-            const startTime = dayjs(teacher.membershipStartTime).valueOf()
-            const endTime = dayjs(teacher.membershipEndTime).valueOf()
-            const nowTime = dayjs().valueOf()
-            status = nowTime >= startTime && nowTime <= endTime
-          } else {
-            status = false
-          }
+          status = this.item.vipType === 'VIP'
+          break
+        case 'SVIP':
+          status =
+            this.item.vipType === 'SVIP' ||
+            this.item.vipType === 'PERMANENT_SVIP'
           break
         default:
           status = false
@@ -108,14 +106,18 @@ export default defineComponent({
               {item.userName}
             </p>
             <div class="flex items-center">
-              <ElImage
-                src={
-                  this.checkBadge('VIP')
-                    ? getAssetsHomeFile('icon_vip.png')
-                    : getAssetsHomeFile('icon_vip_default.png')
-                }
-                class="h-7 -ml-1"
-              />
+              {(this.checkBadge('SVIP') || this.checkBadge('VIP')) && (
+                <ElImage
+                  src={
+                    this.checkBadge('SVIP')
+                      ? getAssetsHomeFile('icon_svip.png')
+                      : this.checkBadge('VIP')
+                      ? getAssetsHomeFile('icon_vip.png')
+                      : ''
+                  }
+                  class="w-[42px] -ml-1"
+                />
+              )}
               <img
                 src={
                   this.checkBadge('STYLE')

+ 1 - 1
src/views/user-info/components/users/index.tsx

@@ -58,7 +58,7 @@ export default defineComponent({
           }
           break
         case 'VIP':
-          status = userInfo.isVip > 0
+          status = userInfo.userVip?.vipType === 'VIP'
           break
         case 'SVIP':
           status =

+ 1 - 1
vite.config.ts

@@ -15,7 +15,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://www.colexiu.com/';
-const proxyUrl = 'https://dev.colexiu.com/'
+const proxyUrl = 'https://test.colexiu.com/'
 export default defineConfig({
   base: './',
   plugins: [