|  | @@ -1,9 +1,7 @@
 | 
	
		
			
				|  |  | -import { Button, Cell, Dialog, Image, List, Toast } from 'vant'
 | 
	
		
			
				|  |  | +import { Cell, Image, List } from 'vant'
 | 
	
		
			
				|  |  |  import { defineComponent } from 'vue'
 | 
	
		
			
				|  |  |  import styles from './index.module.less'
 | 
	
		
			
				|  |  |  import iconStudent from '@common/images/icon_student.png'
 | 
	
		
			
				|  |  | -import iconSvip from './images/icon-svip.png'
 | 
	
		
			
				|  |  | -import iconVip from './images/icon-vip.png'
 | 
	
		
			
				|  |  |  import request from '@/helpers/request'
 | 
	
		
			
				|  |  |  import ColResult from '@/components/col-result'
 | 
	
		
			
				|  |  |  import ColHeader from '@/components/col-header'
 | 
	
	
		
			
				|  | @@ -46,46 +44,11 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          this.dataShow = false
 | 
	
		
			
				|  |  |          this.finished = true
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    formatVipImg(vipType: string) {
 | 
	
		
			
				|  |  | -      if (vipType === 'VIP') {
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -          img: iconVip,
 | 
	
		
			
				|  |  | -          vip: 'VIP'
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } else if (['SVIP', 'PERMANENT_SVIP'].includes(vipType)) {
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -          img: iconSvip,
 | 
	
		
			
				|  |  | -          vip: 'SVIP'
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -          img: null,
 | 
	
		
			
				|  |  | -          vip: ''
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    async onRemove(item: any) {
 | 
	
		
			
				|  |  | -      try {
 | 
	
		
			
				|  |  | -        Dialog.confirm({
 | 
	
		
			
				|  |  | -          title: '提示',
 | 
	
		
			
				|  |  | -          message: '确定删除该粉丝吗?',
 | 
	
		
			
				|  |  | -          confirmButtonColor: 'var(--van-primary)'
 | 
	
		
			
				|  |  | -        }).then(async () => {
 | 
	
		
			
				|  |  | -          await request.post('/api-teacher/teacher/delFans/' + item.userId)
 | 
	
		
			
				|  |  | -          Toast('课程删除成功')
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          this.params.page = 1;
 | 
	
		
			
				|  |  | -          this.list = []
 | 
	
		
			
				|  |  | -          this.getList()
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -      } catch {
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    render() {
 | 
	
		
			
				|  |  |      return (
 | 
	
		
			
				|  |  | -      <div class={styles.myFansContainer}>
 | 
	
		
			
				|  |  | +      <div>
 | 
	
		
			
				|  |  |          <ColHeader />
 | 
	
		
			
				|  |  |          {this.dataShow ? (
 | 
	
		
			
				|  |  |            <List
 | 
	
	
		
			
				|  | @@ -95,40 +58,29 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              class={[styles.liveList, 'mb12']}
 | 
	
		
			
				|  |  |              onLoad={this.getList}
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  | -            {this.list.map((item: any) => {
 | 
	
		
			
				|  |  | -              const formatImg = this.formatVipImg(item.vipType)
 | 
	
		
			
				|  |  | -              return (
 | 
	
		
			
				|  |  | -                <Cell
 | 
	
		
			
				|  |  | -                  class={styles.myFans}
 | 
	
		
			
				|  |  | -                  center
 | 
	
		
			
				|  |  | -                  v-slots={{
 | 
	
		
			
				|  |  | -                    icon: () => (
 | 
	
		
			
				|  |  | -                      <div class={[styles.userImgSection]}>
 | 
	
		
			
				|  |  | -                        <Image
 | 
	
		
			
				|  |  | -                          class={[styles.userImg, formatImg.vip && styles[formatImg.vip]]}
 | 
	
		
			
				|  |  | -                          src={item.avatar || iconStudent}
 | 
	
		
			
				|  |  | -                          fit="cover"
 | 
	
		
			
				|  |  | -                        />
 | 
	
		
			
				|  |  | -                        {formatImg.img && (
 | 
	
		
			
				|  |  | -                          <img class={styles.imgTag} src={formatImg.img} />
 | 
	
		
			
				|  |  | -                        )}
 | 
	
		
			
				|  |  | -                      </div>
 | 
	
		
			
				|  |  | -                    ),
 | 
	
		
			
				|  |  | -                    title: () => (
 | 
	
		
			
				|  |  | -                      <div class={styles.userInfo}>
 | 
	
		
			
				|  |  | -                        <div class={styles.userName}> {item.userName} </div>
 | 
	
		
			
				|  |  | -                        <div class={styles.piNameSubject}>
 | 
	
		
			
				|  |  | -                          <span class={styles.subject}>{item.subjectName}</span>
 | 
	
		
			
				|  |  | -                        </div>
 | 
	
		
			
				|  |  | +            {this.list.map((item: any) => (
 | 
	
		
			
				|  |  | +              <Cell
 | 
	
		
			
				|  |  | +                class={styles.myFans}
 | 
	
		
			
				|  |  | +                titleStyle={{ paddingLeft: '8px' }}
 | 
	
		
			
				|  |  | +                v-slots={{
 | 
	
		
			
				|  |  | +                  icon: () => (
 | 
	
		
			
				|  |  | +                    <Image
 | 
	
		
			
				|  |  | +                      class={styles.userImg}
 | 
	
		
			
				|  |  | +                      src={item.avatar || iconStudent}
 | 
	
		
			
				|  |  | +                      fit="cover"
 | 
	
		
			
				|  |  | +                    />
 | 
	
		
			
				|  |  | +                  ),
 | 
	
		
			
				|  |  | +                  title: () => (
 | 
	
		
			
				|  |  | +                    <div class={styles.userInfo}>
 | 
	
		
			
				|  |  | +                      <div class={styles.userName}> {item.userName} </div>
 | 
	
		
			
				|  |  | +                      <div class={styles.piNameSubject}>
 | 
	
		
			
				|  |  | +                        <span class={styles.subject}>{item.subjectName}</span>
 | 
	
		
			
				|  |  |                        </div>
 | 
	
		
			
				|  |  | -                    ),
 | 
	
		
			
				|  |  | -                    value: () => <div class={styles.btnGroup}>
 | 
	
		
			
				|  |  | -                      <span class={styles.removeBtn} onClick={() => this.onRemove(item)}>移除</span>
 | 
	
		
			
				|  |  |                      </div>
 | 
	
		
			
				|  |  | -                  }}
 | 
	
		
			
				|  |  | -                />
 | 
	
		
			
				|  |  | -              )
 | 
	
		
			
				|  |  | -            })}
 | 
	
		
			
				|  |  | +                  )
 | 
	
		
			
				|  |  | +                }}
 | 
	
		
			
				|  |  | +              />
 | 
	
		
			
				|  |  | +            ))}
 | 
	
		
			
				|  |  |            </List>
 | 
	
		
			
				|  |  |          ) : (
 | 
	
		
			
				|  |  |            <ColResult btnStatus={false} classImgSize="SMALL" tips="暂无粉丝" />
 |