feat: 支持角色身份自定义名称全链路配置与动态展示
这个提交包含在:
@@ -18,10 +18,10 @@
|
||||
mode="aspectFill"
|
||||
>
|
||||
</image>
|
||||
<text class="tag-title">{{ agentInfo.level_info?.name }}</text>
|
||||
<text class="tag-title">{{ levelTitle }}</text>
|
||||
</view>
|
||||
<view v-if="agentInfo.is_venue || agentInfo.identities?.includes('venue')" class="mini-tag">酒道馆</view>
|
||||
<view v-if="agentInfo.is_county || agentInfo.identities?.includes('county')" class="mini-tag">区县</view>
|
||||
<view v-if="agentInfo.is_venue || agentInfo.identities?.includes('venue')" class="mini-tag">{{ roleNames.venue || '酒道馆' }}</view>
|
||||
<view v-if="agentInfo.is_county || agentInfo.identities?.includes('county')" class="mini-tag">{{ roleNames.county || '区县' }}</view>
|
||||
<view class="ss-iconfont uicon-arrow-right" style="color: #fff; font-size: 28rpx">
|
||||
</view>
|
||||
</view>
|
||||
@@ -39,6 +39,29 @@
|
||||
const agentInfo = computed(() => sheep.$store('user').agentInfo);
|
||||
const headerBg = sheep.$url.css('/assets/addons/shopro/uniapp/commission/background.png');
|
||||
|
||||
const roleNames = computed(() => {
|
||||
return (
|
||||
userInfo.value?.custom_role_names ||
|
||||
userInfo.value?.role_names ||
|
||||
agentInfo.value?.custom_role_names ||
|
||||
agentInfo.value?.role_names ||
|
||||
{}
|
||||
);
|
||||
});
|
||||
|
||||
const levelTitle = computed(() => {
|
||||
if (userInfo.value?.maker_level_name) return userInfo.value.maker_level_name;
|
||||
if (agentInfo.value?.maker_level_name) return agentInfo.value.maker_level_name;
|
||||
const rawName = agentInfo.value?.level_info?.name;
|
||||
if (rawName && roleNames.value.maker && rawName.includes('创客')) {
|
||||
return rawName.replace('创客', roleNames.value.maker);
|
||||
}
|
||||
if (rawName && roleNames.value.taster && rawName.includes('品酒师')) {
|
||||
return rawName.replace('品酒师', roleNames.value.taster);
|
||||
}
|
||||
return rawName || '';
|
||||
});
|
||||
|
||||
const state = reactive({
|
||||
showMoney: false,
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户