完善功能
This commit is contained in:
6
env/.env.development
vendored
6
env/.env.development
vendored
@ -8,10 +8,10 @@ VITE_DELETE_CONSOLE = false
|
||||
VITE_SHOW_SOURCEMAP = true
|
||||
|
||||
# 请求地址
|
||||
VITE_SERVER_BASEURL = 'https://76458.com'
|
||||
VITE_SERVER_BASEURL = 'https://test1.stnav.com'
|
||||
# 图片上传路径
|
||||
VITE_UPLOAD_BASEURL = 'https://76458.com/upload'
|
||||
VITE_UPLOAD_BASEURL = 'https://test1.stnav.com/upload'
|
||||
|
||||
# 上传图片请求地址
|
||||
VITE_UPLOAD_BASEURL = 'https://76458.com/teamapi/upload/image'
|
||||
VITE_UPLOAD_BASEURL = 'https://test1.stnav.com/teamapi/upload/image'
|
||||
VITE_UPLOAD_IMAGE_URL = 'https://chaz.oss-cn-shanghai.aliyuncs.com/'
|
||||
|
||||
@ -27,4 +27,11 @@ export function getBankCardList() {
|
||||
*/
|
||||
export function withdrawApply(amount: number, bank_id: number) {
|
||||
return http.Post('/teamapi/user/submitReflect', { amount, bank_id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现说明
|
||||
*/
|
||||
export function getWithdrawDesc() {
|
||||
return http.Post<any>('/teamapi/user/commissionContent')
|
||||
}
|
||||
@ -153,4 +153,15 @@ export function getAnnouncements(data: {page: number, size: number, search: stri
|
||||
*/
|
||||
export function getAnnouncementDetails(id: number) {
|
||||
return http.Post<any>('/teamapi/training/trainingDetails', { id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专属圈子标签
|
||||
*/
|
||||
export function getExclusiveCirclesLabel() {
|
||||
return http.Post<any>('/api/teamaster/getLabel', null,
|
||||
{
|
||||
meta: { ignoreAuth: true }
|
||||
}
|
||||
)
|
||||
}
|
||||
@ -33,7 +33,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 进度2-到账成功 -->
|
||||
<view class="mx-98rpx flex" v-if="billDetails.status > 1">
|
||||
<view class="mx-98rpx flex" v-if="billDetails.status >= 1">
|
||||
<view class="mr-44rpx">
|
||||
<wd-img width="22rpx" height="260rpx" :src="`${OSS}images/withdraw/withdraw_image2.png`"></wd-img>
|
||||
</view>
|
||||
@ -63,10 +63,16 @@
|
||||
<view class="text-#606266">提现金额</view>
|
||||
<view class="text-#303133">¥{{ billDetails.amount }}</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-between font-400 text-28rpx leading-40rpx">
|
||||
<view class="flex items-center justify-between font-400 text-28rpx leading-40rpx mt-20rpx">
|
||||
<view class="text-#606266">到账银行卡</view>
|
||||
<view class="text-#303133">{{ billDetails.bank_name }}({{ Progress.handleFormatBankCardNumber(billDetails.bank_card) }})</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-between font-400 text-28rpx leading-40rpx mt-20rpx" v-if="billDetails.status == 1" @click="previewImage(billDetails.voucher, [billDetails.voucher])">
|
||||
<view class="text-#606266">打款证明</view>
|
||||
<view>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-60rpx mt-90rpx bg-#F6F7F8 rounded-8rpx h-90rpx leading-90rpx text-center" @click="router.navigateBack">
|
||||
@ -78,7 +84,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getUserTransactionDetailsInfo } from '@/api/user'
|
||||
import { router } from '@/utils/tools'
|
||||
import { router, previewImage } from '@/utils/tools'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
|
||||
@ -88,9 +88,12 @@
|
||||
</view>
|
||||
|
||||
<view class="mt-26rpx text-26rpx leading-36rpx mx-70rpx">
|
||||
<text class="text-#606266 mr-20rpx">可提现{{ userInfo.user_money }}元</text>
|
||||
<text class="text-#606266">可提现{{ userInfo.user_money }}元</text>
|
||||
<text class="text-#4C9F44" @click="Withdraw.handleWithdrawAll">全部提现</text>
|
||||
</view>
|
||||
<view v-if="withdrawDesc" class="mx-70rpx mt-20rpx text-26rpx leading-36rpx">
|
||||
<text class="text-#606266 mr-20rpx">{{ withdrawDesc }}</text>
|
||||
</view>
|
||||
|
||||
<view class="mx-48rpx h-90rpx leading-90rpx rounded-8rpx text-center mt-112rpx text-[#fff]" :class="withdrawMoney != '' ? 'bg-[#4C9F44]' : 'bg-[#A5CFA1]'" @click="Withdraw.handleConfirmwithdrawMoney">确定</view>
|
||||
</view>
|
||||
@ -98,7 +101,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getBankCardList, withdrawApply } from '@/api/bank'
|
||||
import { getBankCardList, withdrawApply, getWithdrawDesc } from '@/api/bank'
|
||||
import { useUserStore, useStoreStore } from '@/store'
|
||||
import { toast } from '@/utils/toast'
|
||||
import { amount } from '@/utils/test'
|
||||
@ -118,7 +121,6 @@
|
||||
bank_name: '',
|
||||
bank_card: ''
|
||||
})
|
||||
console.log("🚀 ~ selectBank:", selectBank.value.id)
|
||||
|
||||
// 提现金额
|
||||
const withdrawMoney = ref<string>('')
|
||||
@ -129,6 +131,9 @@
|
||||
height: 'calc(100vh - var(--window-top) - var(--window-bottom))'
|
||||
}))
|
||||
|
||||
// 描述信息
|
||||
const withdrawDesc = ref<string>('')
|
||||
|
||||
// 用户信息
|
||||
const userInfo = ref({
|
||||
avatar: '',
|
||||
@ -143,16 +148,35 @@
|
||||
cert_id: 0,
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
Withdraw.getWithdrawDesc()
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
Withdraw.handleGetUserInfo()
|
||||
Withdraw.getBankCardList()
|
||||
Withdraw.handleGetBankCardList()
|
||||
})
|
||||
|
||||
const Withdraw = {
|
||||
/**
|
||||
* 获取提现描述
|
||||
*/
|
||||
getWithdrawDesc: async () => {
|
||||
try {
|
||||
const res = await getWithdrawDesc()
|
||||
withdrawDesc.value = res.explain
|
||||
console.log("🚀 ~ res:", res)
|
||||
// store.setWithdrawDesc(res.content)
|
||||
} catch (error) {
|
||||
toast.info('获取提现说明失败,请稍后重试')
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取银行卡列表
|
||||
*/
|
||||
getBankCardList: async () => {
|
||||
handleGetBankCardList: async () => {
|
||||
const res = await getBankCardList()
|
||||
bankList.value = res.list
|
||||
},
|
||||
@ -226,6 +250,7 @@
|
||||
uni.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
|
||||
try {
|
||||
await withdrawApply(money, selectBank.value.id)
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<!-- 背景图 -->
|
||||
<view class="mt-20rpx mx-30rpx">
|
||||
<view class="wallet-bg">
|
||||
<view class="flex items-center ml-72rpx pt-10rpx">
|
||||
<view class="flex items-center ml-72rpx pt-20rpx">
|
||||
<view class="mr-30rpx">平台余额</view>
|
||||
<view class="flex items-center">
|
||||
<view class="flex items-center mr-12rpx">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<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>
|
||||
<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>
|
||||
@ -16,35 +16,36 @@
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
|
||||
defineProps({
|
||||
level: {
|
||||
type: String,
|
||||
type: Number,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
// 茶艺师等级对应的icon和文字
|
||||
// 茶艺师等级对应的icon和文字(这个数组5-1就是对应的等级)
|
||||
const levelMap = {
|
||||
gold: {
|
||||
4: {
|
||||
icon: `${OSS}icon/icon_gold_medal.png`,
|
||||
text: '金牌茶艺师'
|
||||
text: '云华茶艺师'
|
||||
},
|
||||
senior: {
|
||||
3: {
|
||||
icon: `${OSS}icon/icon_senior_medal.png`,
|
||||
text: '高级茶艺师'
|
||||
text: '竹影茶艺师'
|
||||
},
|
||||
intermediate: {
|
||||
2: {
|
||||
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
||||
text: '中级茶艺师'
|
||||
text: '明月茶艺师'
|
||||
},
|
||||
junior: {
|
||||
1: {
|
||||
icon: `${OSS}icon/icon_junior_medal.png`,
|
||||
text: '初级茶艺师'
|
||||
text: '清风茶艺师'
|
||||
},
|
||||
enthusiast: {
|
||||
icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
||||
text: '茶艺爱好者'
|
||||
}
|
||||
// 1: {
|
||||
// icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
||||
// text: '茶艺爱好者'
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<view class="mb-30rpx flex items-start">
|
||||
<wd-tag color="#FF5951" bg-color="#FEF1F0" custom-class="!rounded-6rpx !px-16rpx !py-4rpx !h-40rpx !w-144rpx" v-if="profile.age_range > 0">90后茶艺师</wd-tag>
|
||||
<view >
|
||||
<tea-specialist-level :level="TeaSpecialistNumberLevelValue[profile.level]"></tea-specialist-level>
|
||||
<tea-specialist-level :level="profile.level"></tea-specialist-level>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -84,17 +84,20 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 兴趣爱好 -->
|
||||
<!-- 标签 -->
|
||||
<view class="mb-30rpx">
|
||||
<view class="font-bold text-[#303133] text-32rpx leading-44rpx mb-22rpx">兴趣爱好</view>
|
||||
<view class="font-bold text-[#303133] text-32rpx leading-44rpx mb-22rpx">专属圈子</view>
|
||||
<view class="bg-[#FBFBFB] min-h-136rpx px-28rpx py-20rpx rounded-8rpx">
|
||||
<view class="mb-16rpx flex items-center">
|
||||
<wd-img width="32rpx" height="32rpx" :src="`${OSS}images/chayishi/hobby.png`"
|
||||
class="mr-12rpx" />
|
||||
<text class="text-28rpx text-[#303133] font-bold leading-40rpx">兴趣爱好</text>
|
||||
<text class="text-28rpx text-[#303133] font-bold leading-40rpx">专属圈子</text>
|
||||
</view>
|
||||
<view class="interest-text text-26rpx text-[#606266] leading-40rpx">
|
||||
{{ profile.hobby_introduce }}
|
||||
<view class="flex flex-wrap items-center">
|
||||
<view class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx"
|
||||
v-for="(item, index) in profile.label" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -130,13 +133,12 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { router } from '@/utils/tools'
|
||||
import { getTeaSpecialistProfile } from '@/api/tes-specialist'
|
||||
import { getTeaSpecialistProfile, getExclusiveCirclesLabel } from '@/api/tes-specialist'
|
||||
import TeaSpecialistLevel from '@/components/TeaSpecialistLevel.vue'
|
||||
import { TeaSpecialistNumberLevelValue } from '@/utils/teaSpecialist'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = inject('navbarHeight')
|
||||
const rightPadding = inject('capsuleOffset')
|
||||
|
||||
const exclusiveCirclesLabel = ref<Array<any>>([])
|
||||
|
||||
const profile = ref<{
|
||||
name: string // 茶艺师名字
|
||||
@ -151,6 +153,7 @@
|
||||
hobby_introduce: string // 兴趣爱好介绍
|
||||
price: number // 服务费
|
||||
mileage_price: number // 车马费
|
||||
label?: string[] // 专属圈子标签
|
||||
}>({
|
||||
name: '',
|
||||
star: 0,
|
||||
@ -164,6 +167,7 @@
|
||||
hobby_introduce: '',
|
||||
price: 0,
|
||||
mileage_price: 0,
|
||||
label: [] // 专属圈子标签
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
@ -175,8 +179,20 @@
|
||||
* 初始化茶艺师详情
|
||||
*/
|
||||
handleInit: async() => {
|
||||
const label = await getExclusiveCirclesLabel()
|
||||
exclusiveCirclesLabel.value = label
|
||||
|
||||
const res = await getTeaSpecialistProfile()
|
||||
profile.value = res
|
||||
|
||||
let labelNames: string[] = []
|
||||
exclusiveCirclesLabel.value.forEach((item: any) => {
|
||||
if (res.label_id && res.label_id.split(',').includes(item.id.toString())) {
|
||||
labelNames.push(item.label_name)
|
||||
}
|
||||
})
|
||||
|
||||
profile.value.label = labelNames
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -89,8 +89,26 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 兴趣爱好 -->
|
||||
<view class="info-card mx-30rpx mt-30rpx rounded-24rpx bg-white p-30rpx">
|
||||
<view class="text-32rpx leading-44rpx text-#303133 mb-32rpx flex items-center">
|
||||
专属圈子
|
||||
<view class="flex items-center">
|
||||
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||
</view>
|
||||
<text class="text-[#818CA9] ml-10rpx text-20rpx mt-4rpx">最多可选6个</text>
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex items-center flex-wrap">
|
||||
<view v-for="item in exclusiveCirclesLabel" :key="item.id" class="tea-tag" :style="selectedTags.includes(item.id) ? 'background:#4C9F44;color:#fff;' : 'background:#F3F3F3;color:#818CA9;'
|
||||
" @click="ProfileEdit.handleTagClick(item.id)">
|
||||
{{ item.label_name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 兴趣爱好 -->
|
||||
<!-- <view class="info-card mx-30rpx mt-30rpx rounded-24rpx bg-white p-30rpx">
|
||||
<text class="mb-24rpx block text-32rpx text-[#303133] font-bold leading-44rpx">兴趣爱好</text>
|
||||
<wd-textarea v-model="formData.hobby_introduce"
|
||||
:auto-height="true"
|
||||
@ -98,7 +116,7 @@
|
||||
placeholder="茶艺: 你的茶艺兴趣爱好是什么? 比如茶艺研究、品鉴、茶道美学......快来分享一下吧!"
|
||||
custom-class='!rounded-18rpx !border-2rpx !border-[#EFF0EF] !bg-[#F8F9FA] !mt-20rpx'
|
||||
custom-textarea-class='!bg-[#F8F9FA] !min-h-[100rpx] !px-24rpx !py-24rpx' />
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 视频信息 -->
|
||||
<!-- <view class="info-card mx-30rpx mt-30rpx rounded-24rpx bg-white p-30rpx">
|
||||
@ -174,7 +192,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { router } from '@/utils/tools'
|
||||
import { getTeaSpecialistProfile, editTeaSpecialistProfile } from '@/api/tes-specialist'
|
||||
import { getTeaSpecialistProfile, editTeaSpecialistProfile, getExclusiveCirclesLabel } from '@/api/tes-specialist'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -190,6 +208,10 @@
|
||||
// 性别选择器
|
||||
const genderOptions = ref(['男', '女'])
|
||||
|
||||
// 专属圈子标签
|
||||
const selectedTags = ref<number[]>([])
|
||||
const exclusiveCirclesLabel = ref<Array<any>>([])
|
||||
|
||||
// 茶艺师资料
|
||||
const formData = ref<{
|
||||
name: string // 茶艺师名字
|
||||
@ -198,7 +220,7 @@
|
||||
height: number // 身高
|
||||
weight: number // 体重
|
||||
image_arr: string[] // 照片数组
|
||||
hobby_introduce: string // 兴趣爱好介绍
|
||||
label_id?: string // 兴趣爱好介绍
|
||||
}>({
|
||||
name: '',
|
||||
both: 0,
|
||||
@ -206,7 +228,7 @@
|
||||
height: 0,
|
||||
weight: 0,
|
||||
image_arr: [],
|
||||
hobby_introduce: '',
|
||||
label_id: '',
|
||||
})
|
||||
|
||||
// 表单内容回显
|
||||
@ -226,6 +248,9 @@
|
||||
*/
|
||||
handleInit: async() => {
|
||||
const res = await getTeaSpecialistProfile()
|
||||
|
||||
const label = await getExclusiveCirclesLabel()
|
||||
exclusiveCirclesLabel.value = label
|
||||
|
||||
// 处理性别
|
||||
formData.value = res
|
||||
@ -236,12 +261,31 @@
|
||||
formData.value.both = new Date(born).getTime()
|
||||
both.value = born
|
||||
|
||||
// 处理专属圈子标签回显
|
||||
if (res.label_id) {
|
||||
selectedTags.value = res.label_id.split(',').map((id: string) => parseInt(id))
|
||||
}
|
||||
|
||||
// 处理照片数组
|
||||
fileList.value = (formData.value.image_arr || []).map((item: string) => ({ url: item, name: item}))
|
||||
ProfileEdit.fileList = fileList.value
|
||||
console.log("🚀 ~ ProfileEdit.fileList:", ProfileEdit.fileList)
|
||||
},
|
||||
|
||||
// 标签点击事件
|
||||
handleTagClick(id: number) {
|
||||
const idx = selectedTags.value.indexOf(id)
|
||||
if (idx > -1) {
|
||||
selectedTags.value.splice(idx, 1)
|
||||
} else {
|
||||
if (selectedTags.value.length < 6) {
|
||||
selectedTags.value.push(id)
|
||||
} else {
|
||||
toast.show('最多只能选择6个圈子')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择性别
|
||||
*/
|
||||
@ -325,18 +369,30 @@
|
||||
return false
|
||||
}
|
||||
|
||||
// 专属圈子校验
|
||||
if (selectedTags.value.length === 0) {
|
||||
toast.show('请至少选择一个专属圈子')
|
||||
return false
|
||||
}
|
||||
|
||||
if (selectedTags.value.length > 6) {
|
||||
toast.show('最多只能选择6个专属圈子')
|
||||
return false
|
||||
}
|
||||
|
||||
if (!formData.value.image_arr.length) {
|
||||
toast.show('请上传照片')
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
const params = {
|
||||
name: formData.value.name,
|
||||
sex: formData.value.sex,
|
||||
both: formData.value.both,
|
||||
weight: formData.value.weight,
|
||||
height: formData.value.height,
|
||||
hobby_introduce: formData.value.hobby_introduce,
|
||||
label_id: selectedTags.value.join(','),
|
||||
image: formData.value.image_arr.join(','),
|
||||
}
|
||||
|
||||
@ -423,4 +479,16 @@
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.tea-tag {
|
||||
padding: 0 8rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -88,10 +88,10 @@
|
||||
|
||||
<scroll-view class="cost-content !pb-40rpx" scroll-y :show-scrollbar="false" :enhanced="true">
|
||||
<!-- 订单总额 -->
|
||||
<view class="cost-item">
|
||||
<!-- <view class="cost-item">
|
||||
<text class="cost-label">订单总额</text>
|
||||
<text class="cost-value">¥ {{ costDetails.all_amount }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="bg-[#FBFBFB] py-24rpx px-30rpx rounded-16rpx">
|
||||
<!-- 服务费 -->
|
||||
@ -123,10 +123,10 @@
|
||||
<text class="cost-sub-label">{{ order.leaf_name }}</text>
|
||||
<text class="cost-sub-value">¥ {{ costDetails.tea_price }}</text>
|
||||
</view>
|
||||
<view class="cost-sub-item">
|
||||
<!-- <view class="cost-sub-item">
|
||||
<text class="cost-sub-label">茶具使用</text>
|
||||
<text class="cost-sub-value">¥ {{ costDetails.teacup_price }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 优惠 -->
|
||||
<view class="cost-item">
|
||||
@ -150,11 +150,11 @@
|
||||
<view class="cost-value">¥ {{ costDetails.handling_fee }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="cost-item">
|
||||
<!-- <view class="cost-item">
|
||||
<text class="cost-label">平台服务费</text>
|
||||
<text class="cost-value">¥ {{ costDetails.handling_fee }}</text>
|
||||
</view>
|
||||
|
||||
-->
|
||||
<!-- 分隔线 -->
|
||||
<view class="cost-divider" />
|
||||
|
||||
|
||||
@ -1,33 +1,35 @@
|
||||
// 茶艺师等级枚举
|
||||
export enum TeaSpecialistLevel {
|
||||
Gold = '金牌茶艺师',
|
||||
Senior = '高级茶艺师',
|
||||
Intermediate = '中级茶艺师',
|
||||
Junior = '初级茶艺师',
|
||||
Enthusiast = '茶艺爱好者'
|
||||
Gold = '云华茶艺师',
|
||||
Senior = '竹影茶艺师',
|
||||
Intermediate = '明月茶艺师',
|
||||
Junior = '清风茶艺师',
|
||||
// Enthusiast = '茶艺爱好者'
|
||||
}
|
||||
|
||||
// 等级名称对应值
|
||||
export const TeaSpecialistLevelValue = {
|
||||
['金牌茶艺师']: 'gold',
|
||||
['高级茶艺师']: 'senior',
|
||||
['中级茶艺师']: 'intermediate',
|
||||
['初级茶艺师']: 'junior',
|
||||
['茶艺爱好者']: 'enthusiast',
|
||||
['云华茶艺师']: 'gold',
|
||||
['竹影茶艺师']: 'senior',
|
||||
['明月茶艺师']: 'intermediate',
|
||||
['清风茶艺师']: 'junior',
|
||||
// ['茶艺爱好者']: 'enthusiast',
|
||||
}
|
||||
|
||||
export const TeaSpecialistNumberLevelValue = {
|
||||
[1]: 'enthusiast',
|
||||
[2]: 'junior',
|
||||
[3]: 'intermediate',
|
||||
[4]: 'senior',
|
||||
[5]: 'gold',
|
||||
// [1]: 'enthusiast',
|
||||
[1]: 'junior',
|
||||
[2]: 'intermediate',
|
||||
[3]: 'senior',
|
||||
[4]: 'gold',
|
||||
}
|
||||
|
||||
|
||||
// 茶艺师对象结构
|
||||
export const TeaSpecialistLevels = [
|
||||
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold},
|
||||
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior },
|
||||
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate },
|
||||
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior },
|
||||
{ id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast }
|
||||
];
|
||||
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior, level: 1 },
|
||||
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate, level: 2 },
|
||||
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior, level: 3 },
|
||||
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold, level: 4 },
|
||||
// { id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast, level: 1 }
|
||||
];
|
||||
|
||||
@ -165,4 +165,14 @@ export function getCurrentDate() {
|
||||
*/
|
||||
export function hidePhoneMiddle(phone: string): string {
|
||||
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览图片
|
||||
*/
|
||||
export function previewImage(current: string, urls: string[]) {
|
||||
uni.previewImage({
|
||||
current,
|
||||
urls
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user