修改组件和接口返回信息

This commit is contained in:
wangxiaowei
2025-11-05 16:28:25 +08:00
parent 9bfdf0b03e
commit 29bf4dae74
15 changed files with 537 additions and 54 deletions

View File

@ -0,0 +1,54 @@
<template>
<view class="w-168rpx h-40rpx relative mr-44rpx">
<view class="absolute left-0 top-0 h-36rpx flex items-start">
<!-- 金牌茶艺师 -->
<wd-img :src="levelMap[level].icon" width="36rpx" height="36rpx"></wd-img>
</view>
<view class="bg-[#F0F6EF] text-[#006C2D] font-400 text-22rpx leading-32rpx rounded-4rpx text-center w-150rpx ml-18rpx pb-4rpx">{{ levelMap[level].text }}</view>
</view>
</template>
<script lang="ts" setup name="TeaSpecialistLevel">
/**
* TeaSpecialistLevel 茶艺师等级
* @description 用于展示茶艺师等级
*/
const OSS = inject('OSS')
defineProps({
level: {
type: String,
default: ''
}
})
// 茶艺师等级对应的icon和文字
const levelMap = {
gold: {
icon: `${OSS}icon/icon_gold_medal.png`,
text: '金牌茶艺师'
},
senior: {
icon: `${OSS}icon/icon_senior_medal.png`,
text: '高级茶艺师'
},
intermediate: {
icon: `${OSS}icon/icon_intermediate_medal.png`,
text: '中级茶艺师'
},
junior: {
icon: `${OSS}icon/icon_junior_medal.png`,
text: '初级茶艺师'
},
enthusiast: {
icon: `${OSS}icon/icon_enthusiast_medal.png`,
text: '茶艺爱好者'
}
}
</script>
<script lang="ts">
export default {}
</script>