H5 部署与路由: - manifest.json: router.base 改为 "/" 适配 public/ 根目录部署 - nginx-crmeb.conf: 恢复与 feature/fsgx 一致的原始配置 - App.vue: PC端重定向路径改为动态推导,修复死循环加载问题 - static/html/pc.html: 动态推导 H5 根路径,适配本地/云端两种部署 H5登录: - pages/users/login/index.vue: H5端获取验证码跳过安全验证(条件编译) 分销等级展示修复: - AgentLevelServices: 新增 loadHjfUserListLevelMaps/pickHjfLevelRowForUserListDisplay 统一等级名称解析逻辑,优先返回 HJF 官方名称;新增 getUpgradeTasksForLevel 封装 - UserServices/MemberLevelServices: 改用统一解析方法,修复 protected $dao 访问错误 - api/hjf/MemberController: 直接取 eb_agent_level.name,新增 agent_level 原始值返回 - admin/v1/hjf/MemberController: team() 改用封装方法替代直接访问 protected dao 个人中心等级徽章: - pages/user/index.vue + member/index.vue: memberInfo 沿链路透传 - member/template1.vue: UID右侧显示HjfMemberBadge,直接读 userInfo.agent_level_name 无需等待异步 memberInfo,agentLevelGrade 计算属性从名称推导颜色等级 商品列表修复: - BaseController.php/Common.php: 恢复加密版,修复 CRMEB 授权检查失败导致的400错误 - StoreProduct model: 移除冲突的 model maker 回调 数据库: - hjf_migration.sql: 完善会员等级体系迁移脚本 - eb_agent_level.sql: 新增等级初始数据脚本 Made-with: Cursor
145 lines
3.5 KiB
Vue
145 lines
3.5 KiB
Vue
<script>
|
|
import propertyList from '@/utils/propertyList.js';
|
|
import template1 from './template1.vue';
|
|
import template2 from './template2.vue';
|
|
import template3 from './template3.vue';
|
|
import template4 from './template4.vue';
|
|
import template5 from './template5.vue';
|
|
// #ifdef MP || APP-PLUS
|
|
import topBar from '../topBar.vue';
|
|
// #endif
|
|
export default {
|
|
components: {
|
|
template1,
|
|
template2,
|
|
template3,
|
|
template4,
|
|
template5,
|
|
// #ifdef MP || APP-PLUS
|
|
topBar
|
|
// #endif
|
|
},
|
|
props: {
|
|
userInfo: {
|
|
type: Object,
|
|
default: () => {}
|
|
},
|
|
memberData: {
|
|
type: Object,
|
|
default: () => {}
|
|
},
|
|
orderAdminData: {
|
|
type: Object,
|
|
default: () => {}
|
|
},
|
|
isScrolling: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
balanceStatus: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
// HJF 分销等级信息,向下透传给各 template
|
|
memberInfo: {
|
|
type: Object,
|
|
default: () => ({ agent_level: 0, member_level: 0, member_level_name: '' })
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
property: []
|
|
};
|
|
},
|
|
watch: {
|
|
memberData: {
|
|
handler(nVal, oVal) {
|
|
this.$nextTick((e) => {
|
|
this.getPropertyArr(nVal.property);
|
|
});
|
|
},
|
|
immediate: true,
|
|
deep: true
|
|
},
|
|
userInfo: {
|
|
handler(nVal, oVal) {
|
|
this.$nextTick((e) => {
|
|
this.getPropertyArr(this.memberData.property);
|
|
});
|
|
},
|
|
deep: true
|
|
}
|
|
},
|
|
methods: {
|
|
getPropertyArr(arr) {
|
|
let data = [];
|
|
const propertyFilter = propertyList.filter((item) => {
|
|
return arr.includes(item.value);
|
|
});
|
|
|
|
propertyFilter.forEach((item) => {
|
|
if ((item.value == 0 && this.balanceStatus) || item.value != 0) {
|
|
data.push({
|
|
...item,
|
|
value: this.userInfo[item.k]
|
|
});
|
|
}
|
|
});
|
|
const filteredItems = data.filter(item => {
|
|
if (this.userInfo.is_promoter === 0 && ['spread_user_count','brokerage_price','spread_order_count'].includes(item.k)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
this.property = filteredItems;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<view>
|
|
<!-- #ifdef MP || APP-PLUS -->
|
|
<topBar v-if="memberData.style != 5" :styleType="memberData.style" :isScrolling="isScrolling"></topBar>
|
|
<!-- #endif -->
|
|
<template1 v-if="memberData.style == 1" :perShowType="memberData.per_show_type" :userInfo="userInfo" :property="property" :memberInfo="memberInfo"></template1>
|
|
<template2 v-if="memberData.style == 2" :perShowType="memberData.per_show_type" :userInfo="userInfo" :property="property"></template2>
|
|
<template3 v-if="memberData.style == 3" :perShowType="memberData.per_show_type" :userInfo="userInfo" :property="property"></template3>
|
|
<template4 v-if="memberData.style == 4" :perShowType="memberData.per_show_type" :userInfo="userInfo" :commission="orderAdminData.commission"></template4>
|
|
<template5
|
|
v-if="memberData.style == 5"
|
|
:perShowType="memberData.per_show_type"
|
|
:userInfo="userInfo"
|
|
:commission="orderAdminData.commission"
|
|
:isScrolling="isScrolling"
|
|
:property="property"
|
|
></template5>
|
|
</view>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
/deep/ .bind-phone {
|
|
margin-top: 12rpx;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 30px;
|
|
width: max-content;
|
|
text-align: center;
|
|
font-size: 20rpx;
|
|
font-weight: 400;
|
|
color: #ffffff;
|
|
line-height: 28rpx;
|
|
padding: 6rpx 16rpx;
|
|
}
|
|
/deep/ .tips::before {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -6rpx;
|
|
left: calc(50% - 6rpx);
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 6rpx solid transparent;
|
|
border-right: 6rpx solid transparent;
|
|
border-top: 6rpx solid #ffd89c; /* 修改颜色以改变三角形颜色 */
|
|
}
|
|
</style>
|