Ver Fonte

添加优化

lex há 1 ano atrás
pai
commit
82391ad98f

BIN
src/student/member-center/images/active-o/1.png


+ 7 - 1
src/student/member-center/member-active-o.tsx

@@ -9,6 +9,7 @@ import { postMessage } from '@/helpers/native-message'
 import { Icon } from 'vant'
 import { browser } from '@/helpers/utils'
 import ColSticky from '@/components/col-sticky'
+import { state } from '@/state'
 
 export default defineComponent({
   setup() {
@@ -16,7 +17,12 @@ export default defineComponent({
     const navBarHeight = ref(0)
 
     const onDetail = () => {
-      router.push('/memberCenter')
+      // 判断是否是机构学生
+      if (state.user.data.tenantId > 0) {
+        window.location.href = location.origin + '/tenant.html#/memberCenter'
+      } else {
+        router.push('/memberCenter')
+      }
     }
 
     const onBack = () => {

+ 23 - 0
src/tenant/member-center/index.module.less

@@ -312,6 +312,7 @@
   }
 
   .system-item {
+    position: relative;
     display: flex;
     flex-direction: column;
     align-items: center;
@@ -325,6 +326,19 @@
     border: 1px solid #e5e5e5;
     margin-left: 10px;
 
+    .bat {
+      position: absolute;
+      top: 0;
+      left: 0;
+      padding: 2px 5px 1px;
+      background: linear-gradient(225deg, #FF9B79 0%, #FF3460 100%);
+      border-radius: 11px 10px 10px 0px;
+      font-size: 12px;
+      font-weight: 600;
+      color: #FFFFFF;
+      line-height: 17px;
+    }
+
     &:last-child {
       margin-right: 10px;
     }
@@ -379,6 +393,15 @@
         background: url('./images/icon-selected.png') no-repeat center;
         background-size: contain;
       }
+
+      .bat {
+        background: linear-gradient(270deg, rgba(255, 255, 255, 0.33) 0%, rgba(254, 229, 227, 0.33) 100%);
+        border-radius: 11px 10px 10px 0px;
+        border: 1px solid #FF4665;
+        border-left: 0;
+        border-top: 0;
+        color: #EF2F56;
+      }
     }
   }
 

+ 3 - 0
src/tenant/member-center/index.tsx

@@ -354,6 +354,9 @@ export default defineComponent({
                           this.selectMember = item
                         }}
                       >
+                        {item.period === 'YEAR' && (
+                          <span class={[styles.bat]}>优惠</span>
+                        )}
                         <p class={styles.title}>{item.title}</p>
                         <p class={styles.price}>
                           <span>¥</span>

+ 23 - 0
src/views/member-center/index.module.less

@@ -185,6 +185,7 @@
   }
 
   .system-item {
+    position: relative;
     display: flex;
     flex-direction: column;
     align-items: center;
@@ -198,6 +199,19 @@
     border: 1px solid #e5e5e5;
     margin-left: 10px;
 
+    .bat {
+      position: absolute;
+      top: 0;
+      left: 0;
+      padding: 2px 5px 1px;
+      background: linear-gradient(90deg, #FF7878 0%, #FF4343 100%);
+      border-radius: 11px 10px 10px 0px;
+      font-size: 12px;
+      font-weight: 600;
+      color: #FFFFFF;
+      line-height: 17px;
+    }
+
     &:first-child {
       margin-left: 0;
     }
@@ -258,6 +272,15 @@
         right: -1px;
         border-radius: 0 12px 0 12px;
       }
+
+      .bat {
+        background: linear-gradient(270deg, rgba(255, 255, 255, 0.33) 0%, rgba(254, 234, 205, 0.33) 100%);
+        border-radius: 11px 10px 10px 0px;
+        border: 1px solid #B1652E;
+        border-left: 0;
+        border-top: 0;
+        color: #B1652E;
+      }
     }
   }
 

+ 4 - 0
src/views/member-center/index.tsx

@@ -308,6 +308,10 @@ export default defineComponent({
                     this.selectMember = item
                   }}
                 >
+                  {item.period === 'YEAR' && (
+                    <span class={[styles.bat]}>优惠</span>
+                  )}
+
                   <div class={styles.discountItem}>
                     {item.discount == 1 && <img src={iconDiscount} />}
                   </div>