修改组件和接口返回信息
This commit is contained in:
54
src/components/TeaSpecialistLevel.vue
Normal file
54
src/components/TeaSpecialistLevel.vue
Normal 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>
|
||||
Reference in New Issue
Block a user