skyblued 2 years ago
parent
commit
bfe0c01fe3

+ 9 - 11
src/business-components/user-detail/index.module.less

@@ -42,16 +42,8 @@
     .buyNum {
       color: #ff802c;
       font-size: 14px;
-      display: flex;
-      align-items: center;
-      &::before {
-        content: ' ';
-        display: inline-block;
-        width: 1px;
-        height: 12px;
-        margin: 0 8px;
-        background: #d3d3d3;
-      }
+      text-align: right;
+      margin-top: 8px;
     }
 
     .buyNumInfo {
@@ -68,10 +60,10 @@
       font-weight: 600;
       color: var(--van-primary);
       line-height: 17px;
+      color: #FA6400;
       .infoPrice{
         font-size: 16px;
         font-weight: bold;
-        color: #FA6400;
       }
       .infoNum{
         font-size: 14px;
@@ -107,3 +99,9 @@
     }
   }
 }
+.iconTeacher{
+  margin-top: 3px;
+  margin-right: 6px;
+  width: 39px;
+  height: 16px;
+}

+ 36 - 40
src/business-components/user-detail/index.tsx

@@ -5,7 +5,8 @@ import styles from './index.module.less'
 import iconUserNum from '@common/images/icon_user_num.png'
 import defaultIcon from '@common/images/icon_teacher.png'
 import iconTimer from '@common/images/icon_timer2.png'
-
+import IconXueli from '@common/images/icon-xueli.png'
+import IconJiaozi from '@common/images/icon-jiaozi.png'
 /**
  * @description: 视频详情
  * @param {type} headUrl 头像
@@ -98,48 +99,43 @@ export default defineComponent({
               title: () => (
                 <div class={styles.name}>
                   <div class={styles.username}>
-                    {this.userInfo.username || `游客${this.userInfo.id || ''}`}
+                    <div>
+                      {this.userInfo.username ||
+                        `游客${this.userInfo.id || ''}`}
+                    </div>
+                    <div>
+                      {(this.userInfo as any).isDegree && (
+                        <img class={styles.iconTeacher} src={IconXueli} />
+                      )}
+                      {(this.userInfo as any).isTeacher && (
+                        <img class={styles.iconTeacher} src={IconJiaozi} />
+                      )}
+                    </div>
                   </div>
-                  {this.showType === 'TIME' ? (
-                    <Tag
-                      style={{ marginLeft: '8px' }}
-                      color="#FFF1DE"
-                      textColor="#FF9300"
-                    >
-                      {this.userInfo.lessonNum}课时
-                    </Tag>
-                  ) : (
-                    this.showBuy && (
-                      <div class={styles.buyNum}>
-                        {this.userInfo.buyNum}人已
-                        {this.userInfo.lessonPrice <= 0 &&
-                        this.userInfo.auditVersion === 0
-                          ? '领取'
-                          : '购买'}
-                      </div>
-                    )
-                  )}
                 </div>
               ),
-              value: () =>
-                this.showType === 'TIME' ? (
-                  <div class={styles.buyNumInfo}>
-                    <Icon name={iconUserNum} size={14} class={styles.iconBuy} />{' '}
-                    已购 {this.userInfo.buyNum} 人
-                  </div>
-                ) : (
-                  <div class={styles.info}>
-                    {/* 0元不显示,为了处理ios审核问题 */}
-                    {this.userInfo.lessonPrice > 0 && (
-                      <>¥{this.userInfo.lessonPrice}/</>
-                    )}
-                    {this.userInfo.lessonPrice <= 0 &&
-                      this.userInfo.auditVersion !== 0 && <>¥{0}/</>}
-                    {this.userInfo.lessonPrice <= 0 &&
-                      this.userInfo.auditVersion === 0 && <>免费/</>}
-                    {this.userInfo.lessonNum}课时
-                  </div>
-                )
+              value: () => (
+                <div class={styles.info}>
+                  {/* 0元不显示,为了处理ios审核问题 */}
+                  {this.userInfo.lessonPrice > 0 && (
+                    <>¥{this.userInfo.lessonPrice}</>
+                  )}
+                  {this.userInfo.lessonPrice <= 0 &&
+                    this.userInfo.auditVersion !== 0 && <>¥{0}</>}
+                  {this.userInfo.lessonPrice <= 0 &&
+                    this.userInfo.auditVersion === 0 && <>免费</>}
+                  <span style={{color: '#999', fontSize: '14px', fontWeight: 400}}>/{this.userInfo.lessonNum}课时</span>
+                  {this.showBuy && (
+                    <div class={styles.buyNum}>
+                      {this.userInfo.buyNum}人已
+                      {this.userInfo.lessonPrice <= 0 &&
+                      this.userInfo.auditVersion === 0
+                        ? '领取'
+                        : '购买'}
+                    </div>
+                  )}
+                </div>
+              )
             }}
           ></Cell>
         </CellGroup>