lex 8 months ago
parent
commit
e67fa9fcf9

+ 1 - 1
src/student/video-class/video-class-detail.tsx

@@ -116,7 +116,7 @@ export default defineComponent({
         const userInfo = state.user.data as any
         const alreadyBuy =
           result.lessonGroup.payType === 'VIP'
-            ? result.alreadyBuy || userInfo.isVip
+            ? result.alreadyBuy || userInfo.userVip?.vipType !== 'NOT_VIP'
               ? true
               : false
             : result.alreadyBuy

+ 1 - 1
src/student/video-class/video-detail.tsx

@@ -68,7 +68,7 @@ export default defineComponent({
         const userInfo = state.user.data as any
         const alreadyBuy =
           lessonGroup.payType === 'VIP'
-            ? result.alreadyBuy || userInfo.isVip
+            ? result.alreadyBuy || userInfo.userVip?.vipType !== 'NOT_VIP'
               ? true
               : false
             : result.alreadyBuy

+ 2 - 2
src/teacher/share-page/share-vip/index.tsx

@@ -123,9 +123,9 @@ export default defineComponent({
         </div>
         <ColSticky position="bottom">
           <div class={['btnGroup', styles.btnGroup]}>
-            {this.discount === 1 && (
+            {/* {this.discount === 1 && (
               <div class={styles.tagDiscount}>专属优惠</div>
-            )}
+            )} */}
             <Button
               block
               round

+ 5 - 1
src/views/member-center/index.module.less

@@ -449,7 +449,7 @@
   .iconPermanent {
     position: absolute;
     left: -1px;
-    top: -7px;
+    top: -9px;
     width: 77px;
     height: 20px;
     background: url('./new-images/icon-permanent1.png') no-repeat center;
@@ -545,8 +545,11 @@
 
     .iconPermanent {
       left: -2px;
+      top: -2px;
       background: url('./new-images/icon-permanent.png') no-repeat center;
       background-size: contain;
+      width: 61px;
+      height: 16px;
     }
 
     .discountTag {
@@ -604,6 +607,7 @@
     border-radius: 2px;
     font-size: 12px;
     color: #03A385;
+    margin-top: 2px;
     padding: 1px 2px;
   }
 

+ 27 - 24
src/views/music/album-detail/index.tsx

@@ -269,7 +269,7 @@ export default defineComponent({
     }
 
     const buyVip = computed(() => {
-      const album = albumDetail.value?.musicPaymentTypes
+      const album = albumDetail.value?.paymentType
       return album && album.includes('VIP')
     })
 
@@ -456,9 +456,11 @@ export default defineComponent({
                 <div
                   class={[
                     'btnGroup',
-                    buyVip.value && !state.user.data.isVip && 'btnMore'
+                    buyVip.value &&
+                      !(state.user.data.userVip?.vipType !== 'NOT_VIP') &&
+                      'btnMore'
                   ]}
-                  style={{ paddingTop: '12px' }}
+                  style={{ padding: '0' }}
                 >
                   <Button
                     block
@@ -469,27 +471,28 @@ export default defineComponent({
                   >
                     购买专辑
                   </Button>
-                  {buyVip.value && !state.user.data.isVip && (
-                    <Button
-                      block
-                      round
-                      type="primary"
-                      style={{ fontSize: '16px' }}
-                      onClick={() => {
-                        router.push({
-                          path: '/memberCenter',
-                          query: {
-                            ...route.query
-                          }
-                        })
-                      }}
-                    >
-                      {studentActivityId.value > 0 && (
-                        <div class={[styles.buttonDiscount]}>专属优惠</div>
-                      )}
-                      开通会员
-                    </Button>
-                  )}
+                  {buyVip.value &&
+                    !(state.user.data.userVip?.vipType !== 'NOT_VIP') && (
+                      <Button
+                        block
+                        round
+                        type="primary"
+                        style={{ fontSize: '16px' }}
+                        onClick={() => {
+                          router.push({
+                            path: '/memberCenter',
+                            query: {
+                              ...route.query
+                            }
+                          })
+                        }}
+                      >
+                        {studentActivityId.value > 0 && (
+                          <div class={[styles.buttonDiscount]}>专属优惠</div>
+                        )}
+                        开通会员
+                      </Button>
+                    )}
                 </div>
               </ColSticky>
             )}

+ 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: './',