提交
This commit is contained in:
@@ -249,7 +249,7 @@
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<span v-if="fitem.user.vip==1">
|
||||
<!-- <span v-if="fitem.user.vip==1">
|
||||
<img style="width: 20px;height: 20px;" src="../../../assets/img/vip.png" alt="">
|
||||
<el-tag size="mini" type="warning" style="font-weight: bold;" effect="dark">超级VIP</el-tag>
|
||||
</span>
|
||||
@@ -260,7 +260,15 @@
|
||||
<span v-if="fitem.user.vip==3">
|
||||
<img style="width: 20px;height: 20px;" src="../../../assets/img/zm.png" alt="">
|
||||
<el-tag size="mini" type="success" style="font-weight: bold;" >众秒之门</el-tag>
|
||||
</span>
|
||||
</span> -->
|
||||
|
||||
|
||||
<span v-if="!fitem.user.userVips||fitem.user.userVips.length==0">-</span>
|
||||
|
||||
<span v-else v-html="computedVipType(fitem.user.userVips)">
|
||||
<!-- <img style="width: 25px;height: 25px;" src="../../../assets/img/vip.png" alt=""> -->
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buier td3 xcenter">
|
||||
@@ -333,22 +341,22 @@
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="orderSn" header-align="center" align="center" label="订单编号" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" header-align="center" align="center" label="VIP" width="80">
|
||||
<el-table-column prop="userName" header-align="center" align="center" label="VIP" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.user.vip==0">-</span>
|
||||
<span v-if="!scope.row.user.userVips||scope.row.user.userVips.length==0">-</span>
|
||||
|
||||
<span v-if="scope.row.user.vip==1">
|
||||
<img style="width: 25px;height: 25px;" src="../../../assets/img/vip.png" alt="">
|
||||
<el-tag size="mini" type="warning" style="font-weight: bold;" effect="dark">超级VIP</el-tag>
|
||||
<span v-else v-html="computedVipType(scope.row.user.userVips)">
|
||||
<!-- <img style="width: 25px;height: 25px;" src="../../../assets/img/vip.png" alt=""> -->
|
||||
|
||||
</span>
|
||||
<span v-if="scope.row.user.vip==2">
|
||||
<!-- <span v-if="scope.row.user.vip==2">
|
||||
<img style="width: 25px;height: 25px;" src="../../../assets/img/wumen.png" alt="">
|
||||
<el-tag size="mini" style="font-weight: bold;">吴门医述</el-tag>
|
||||
</span>
|
||||
<span v-if="scope.row.user.vip==3">
|
||||
<img style="width: 25px;height: 25px;" src="../../../assets/img/zm.png" alt="">
|
||||
<el-tag size="mini" type="success" style="font-weight: bold;" >众秒之门</el-tag>
|
||||
</span>
|
||||
</span> -->
|
||||
|
||||
|
||||
|
||||
@@ -750,6 +758,45 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
computedVipType(userVips) {
|
||||
if (!userVips || userVips.length === 0) return '';
|
||||
|
||||
const vipMap = {
|
||||
4: '中医',
|
||||
5: '针灸',
|
||||
6: '肿瘤',
|
||||
7: '国学',
|
||||
8: '心理学'
|
||||
};
|
||||
|
||||
const vipTypes = userVips.map(vip => vip.type);
|
||||
const isMedicalVip = vipTypes.some(type => [4, 5, 6].includes(type));
|
||||
const isPsychologyVip = vipTypes.some(type => [7, 8].includes(type));
|
||||
|
||||
// 特殊情况:医学 + 心理学
|
||||
if (isMedicalVip && isPsychologyVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 11px;" effect="dark">医学SVIP</el-tag><br/>
|
||||
<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #67c23a 0%, #e1f3d8 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 11px;" effect="dark">国学与心理学SVIP</el-tag>`;
|
||||
}
|
||||
|
||||
// 只有医学VIP
|
||||
if (isMedicalVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 11px;" effect="dark">医学超级VIP</el-tag>`;
|
||||
}
|
||||
|
||||
// 只有心理学VIP
|
||||
if (isPsychologyVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #67c23a 0%, #e1f3d8 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 11px;" effect="dark">国学与心理学超级VIP</el-tag>`;
|
||||
}
|
||||
|
||||
// **普通情况**:单独展示所有 `type` 对应的内容
|
||||
return vipTypes
|
||||
.filter(type => vipMap[type]) // 过滤出有对应名称的类型
|
||||
.map(type => `<el-tag size="mini" type="info" style="font-weight: bold; color: #fff; padding: 2px; border-radius: 2px; font-size: 11px; background: #409EFF;" effect="dark">${vipMap[type]}</el-tag>`)
|
||||
.join(' ');
|
||||
},
|
||||
|
||||
|
||||
changeFilterPresale(){
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
|
||||
@@ -60,11 +60,19 @@
|
||||
<span>{{
|
||||
scope.row.nickname ? scope.row.nickname : "暂无用户名"
|
||||
}}</span
|
||||
>-
|
||||
<span v-if="scope.row.vip == 0">普通用户</span>
|
||||
>
|
||||
<br/>
|
||||
|
||||
<span v-if="!scope.row.userVips||scope.row.userVips.length==0">-</span>
|
||||
|
||||
<span v-else v-html="computedVipType(scope.row.userVips)">
|
||||
<!-- <img style="width: 25px;height: 25px;" src="../../../assets/img/vip.png" alt=""> -->
|
||||
|
||||
</span>
|
||||
<!-- <span v-if="scope.row.vip == 0">普通用户</span>
|
||||
<span v-else-if="scope.row.vip == 2">(吴门医述VIP)</span>
|
||||
<span v-else-if="scope.row.vip == 1">(超级VIP)</span>
|
||||
<span v-else-if="scope.row.vip == 3">(众妙之门VIP)</span>
|
||||
<span v-else-if="scope.row.vip == 3">(众妙之门VIP)</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="age" header-align="center" align="center" label="年龄">
|
||||
@@ -143,7 +151,7 @@
|
||||
label="天医币"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="peanutCoin"
|
||||
header-align="center"
|
||||
align="center"
|
||||
@@ -171,7 +179,7 @@
|
||||
<el-button slot="reference" size="small">办理金额</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
prop="readTime"
|
||||
header-align="center"
|
||||
@@ -422,6 +430,43 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
computedVipType(userVips) {
|
||||
if (!userVips || userVips.length === 0) return '';
|
||||
|
||||
const vipMap = {
|
||||
4: '中医',
|
||||
5: '针灸',
|
||||
6: '肿瘤',
|
||||
7: '国学',
|
||||
8: '心理学'
|
||||
};
|
||||
|
||||
const vipTypes = userVips.map(vip => vip.type);
|
||||
const isMedicalVip = vipTypes.some(type => [4, 5, 6].includes(type));
|
||||
const isPsychologyVip = vipTypes.some(type => [7, 8].includes(type));
|
||||
|
||||
// 特殊情况:医学 + 心理学
|
||||
if (isMedicalVip && isPsychologyVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 10px;" effect="dark">医学SVIP</el-tag><br/>
|
||||
<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #67c23a 0%, #e1f3d8 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 10px;" effect="dark">国学与心理学SVIP</el-tag>`;
|
||||
}
|
||||
|
||||
// 只有医学VIP
|
||||
if (isMedicalVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 10px;" effect="dark">医学超级VIP</el-tag>`;
|
||||
}
|
||||
|
||||
// 只有心理学VIP
|
||||
if (isPsychologyVip) {
|
||||
return `<el-tag size="mini" type="warning" style="font-weight: bold; background-image: linear-gradient(90deg, #67c23a 0%, #e1f3d8 100%); color: #fff; padding: 2px; border-radius: 2px; font-size: 10px;" effect="dark">国学与心理学超级VIP</el-tag>`;
|
||||
}
|
||||
|
||||
// **普通情况**:单独展示所有 `type` 对应的内容
|
||||
return vipTypes
|
||||
.filter(type => vipMap[type]) // 过滤出有对应名称的类型
|
||||
.map(type => `<el-tag size="mini" type="info" style="font-weight: bold; color: #fff; padding: 2px; border-radius: 2px; font-size: 10px; background: #409EFF;" effect="dark">${vipMap[type]}</el-tag>`)
|
||||
.join(' ');
|
||||
},
|
||||
getVipMoney(data) {
|
||||
console.log("data at line 420:", data.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user