完善功能
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_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/'
|
VITE_UPLOAD_IMAGE_URL = 'https://chaz.oss-cn-shanghai.aliyuncs.com/'
|
||||||
|
|||||||
@ -28,3 +28,10 @@ export function getBankCardList() {
|
|||||||
export function withdrawApply(amount: number, bank_id: number) {
|
export function withdrawApply(amount: number, bank_id: number) {
|
||||||
return http.Post('/teamapi/user/submitReflect', { amount, bank_id })
|
return http.Post('/teamapi/user/submitReflect', { amount, bank_id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现说明
|
||||||
|
*/
|
||||||
|
export function getWithdrawDesc() {
|
||||||
|
return http.Post<any>('/teamapi/user/commissionContent')
|
||||||
|
}
|
||||||
@ -154,3 +154,14 @@ export function getAnnouncements(data: {page: number, size: number, search: stri
|
|||||||
export function getAnnouncementDetails(id: number) {
|
export function getAnnouncementDetails(id: number) {
|
||||||
return http.Post<any>('/teamapi/training/trainingDetails', { id })
|
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>
|
</view>
|
||||||
|
|
||||||
<!-- 进度2-到账成功 -->
|
<!-- 进度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">
|
<view class="mr-44rpx">
|
||||||
<wd-img width="22rpx" height="260rpx" :src="`${OSS}images/withdraw/withdraw_image2.png`"></wd-img>
|
<wd-img width="22rpx" height="260rpx" :src="`${OSS}images/withdraw/withdraw_image2.png`"></wd-img>
|
||||||
</view>
|
</view>
|
||||||
@ -63,10 +63,16 @@
|
|||||||
<view class="text-#606266">提现金额</view>
|
<view class="text-#606266">提现金额</view>
|
||||||
<view class="text-#303133">¥{{ billDetails.amount }}</view>
|
<view class="text-#303133">¥{{ billDetails.amount }}</view>
|
||||||
</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-#606266">到账银行卡</view>
|
||||||
<view class="text-#303133">{{ billDetails.bank_name }}({{ Progress.handleFormatBankCardNumber(billDetails.bank_card) }})</view>
|
<view class="text-#303133">{{ billDetails.bank_name }}({{ Progress.handleFormatBankCardNumber(billDetails.bank_card) }})</view>
|
||||||
</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>
|
||||||
|
|
||||||
<view class="mx-60rpx mt-90rpx bg-#F6F7F8 rounded-8rpx h-90rpx leading-90rpx text-center" @click="router.navigateBack">
|
<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>
|
<script lang="ts" setup>
|
||||||
import { getUserTransactionDetailsInfo } from '@/api/user'
|
import { getUserTransactionDetailsInfo } from '@/api/user'
|
||||||
import { router } from '@/utils/tools'
|
import { router, previewImage } from '@/utils/tools'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,12 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-26rpx text-26rpx leading-36rpx mx-70rpx">
|
<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>
|
<text class="text-#4C9F44" @click="Withdraw.handleWithdrawAll">全部提现</text>
|
||||||
</view>
|
</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 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>
|
</view>
|
||||||
@ -98,7 +101,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getBankCardList, withdrawApply } from '@/api/bank'
|
import { getBankCardList, withdrawApply, getWithdrawDesc } from '@/api/bank'
|
||||||
import { useUserStore, useStoreStore } from '@/store'
|
import { useUserStore, useStoreStore } from '@/store'
|
||||||
import { toast } from '@/utils/toast'
|
import { toast } from '@/utils/toast'
|
||||||
import { amount } from '@/utils/test'
|
import { amount } from '@/utils/test'
|
||||||
@ -118,7 +121,6 @@
|
|||||||
bank_name: '',
|
bank_name: '',
|
||||||
bank_card: ''
|
bank_card: ''
|
||||||
})
|
})
|
||||||
console.log("🚀 ~ selectBank:", selectBank.value.id)
|
|
||||||
|
|
||||||
// 提现金额
|
// 提现金额
|
||||||
const withdrawMoney = ref<string>('')
|
const withdrawMoney = ref<string>('')
|
||||||
@ -129,6 +131,9 @@
|
|||||||
height: 'calc(100vh - var(--window-top) - var(--window-bottom))'
|
height: 'calc(100vh - var(--window-top) - var(--window-bottom))'
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
// 描述信息
|
||||||
|
const withdrawDesc = ref<string>('')
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = ref({
|
const userInfo = ref({
|
||||||
avatar: '',
|
avatar: '',
|
||||||
@ -143,16 +148,35 @@
|
|||||||
cert_id: 0,
|
cert_id: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
Withdraw.getWithdrawDesc()
|
||||||
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
Withdraw.handleGetUserInfo()
|
Withdraw.handleGetUserInfo()
|
||||||
Withdraw.getBankCardList()
|
Withdraw.handleGetBankCardList()
|
||||||
})
|
})
|
||||||
|
|
||||||
const Withdraw = {
|
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()
|
const res = await getBankCardList()
|
||||||
bankList.value = res.list
|
bankList.value = res.list
|
||||||
},
|
},
|
||||||
@ -226,6 +250,7 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '提交中...'
|
title: '提交中...'
|
||||||
})
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await withdrawApply(money, selectBank.value.id)
|
await withdrawApply(money, selectBank.value.id)
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<!-- 背景图 -->
|
<!-- 背景图 -->
|
||||||
<view class="mt-20rpx mx-30rpx">
|
<view class="mt-20rpx mx-30rpx">
|
||||||
<view class="wallet-bg">
|
<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="mr-30rpx">平台余额</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="flex items-center mr-12rpx">
|
<view class="flex items-center mr-12rpx">
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view class="w-168rpx h-40rpx relative mr-44rpx">
|
<view class="w-168rpx h-40rpx relative mr-44rpx">
|
||||||
<view class="absolute left-0 top-0 h-36rpx flex items-start">
|
<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>
|
||||||
<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 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>
|
</view>
|
||||||
@ -16,35 +16,36 @@
|
|||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
level: {
|
level: {
|
||||||
type: String,
|
type: Number,
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 茶艺师等级对应的icon和文字
|
// 茶艺师等级对应的icon和文字(这个数组5-1就是对应的等级)
|
||||||
const levelMap = {
|
const levelMap = {
|
||||||
gold: {
|
4: {
|
||||||
icon: `${OSS}icon/icon_gold_medal.png`,
|
icon: `${OSS}icon/icon_gold_medal.png`,
|
||||||
text: '金牌茶艺师'
|
text: '云华茶艺师'
|
||||||
},
|
},
|
||||||
senior: {
|
3: {
|
||||||
icon: `${OSS}icon/icon_senior_medal.png`,
|
icon: `${OSS}icon/icon_senior_medal.png`,
|
||||||
text: '高级茶艺师'
|
text: '竹影茶艺师'
|
||||||
},
|
},
|
||||||
intermediate: {
|
2: {
|
||||||
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
||||||
text: '中级茶艺师'
|
text: '明月茶艺师'
|
||||||
},
|
},
|
||||||
junior: {
|
1: {
|
||||||
icon: `${OSS}icon/icon_junior_medal.png`,
|
icon: `${OSS}icon/icon_junior_medal.png`,
|
||||||
text: '初级茶艺师'
|
text: '清风茶艺师'
|
||||||
},
|
},
|
||||||
enthusiast: {
|
// 1: {
|
||||||
icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
// icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
||||||
text: '茶艺爱好者'
|
// text: '茶艺爱好者'
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
<view class="mb-30rpx flex items-start">
|
<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>
|
<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 >
|
<view >
|
||||||
<tea-specialist-level :level="TeaSpecialistNumberLevelValue[profile.level]"></tea-specialist-level>
|
<tea-specialist-level :level="profile.level"></tea-specialist-level>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -84,17 +84,20 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 兴趣爱好 -->
|
<!-- 标签 -->
|
||||||
<view class="mb-30rpx">
|
<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="bg-[#FBFBFB] min-h-136rpx px-28rpx py-20rpx rounded-8rpx">
|
||||||
<view class="mb-16rpx flex items-center">
|
<view class="mb-16rpx flex items-center">
|
||||||
<wd-img width="32rpx" height="32rpx" :src="`${OSS}images/chayishi/hobby.png`"
|
<wd-img width="32rpx" height="32rpx" :src="`${OSS}images/chayishi/hobby.png`"
|
||||||
class="mr-12rpx" />
|
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>
|
||||||
<view class="interest-text text-26rpx text-[#606266] leading-40rpx">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -130,13 +133,12 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router } from '@/utils/tools'
|
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 TeaSpecialistLevel from '@/components/TeaSpecialistLevel.vue'
|
||||||
import { TeaSpecialistNumberLevelValue } from '@/utils/teaSpecialist'
|
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
const navbarHeight = inject('navbarHeight')
|
|
||||||
const rightPadding = inject('capsuleOffset')
|
const exclusiveCirclesLabel = ref<Array<any>>([])
|
||||||
|
|
||||||
const profile = ref<{
|
const profile = ref<{
|
||||||
name: string // 茶艺师名字
|
name: string // 茶艺师名字
|
||||||
@ -151,6 +153,7 @@
|
|||||||
hobby_introduce: string // 兴趣爱好介绍
|
hobby_introduce: string // 兴趣爱好介绍
|
||||||
price: number // 服务费
|
price: number // 服务费
|
||||||
mileage_price: number // 车马费
|
mileage_price: number // 车马费
|
||||||
|
label?: string[] // 专属圈子标签
|
||||||
}>({
|
}>({
|
||||||
name: '',
|
name: '',
|
||||||
star: 0,
|
star: 0,
|
||||||
@ -164,6 +167,7 @@
|
|||||||
hobby_introduce: '',
|
hobby_introduce: '',
|
||||||
price: 0,
|
price: 0,
|
||||||
mileage_price: 0,
|
mileage_price: 0,
|
||||||
|
label: [] // 专属圈子标签
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
@ -175,8 +179,20 @@
|
|||||||
* 初始化茶艺师详情
|
* 初始化茶艺师详情
|
||||||
*/
|
*/
|
||||||
handleInit: async() => {
|
handleInit: async() => {
|
||||||
|
const label = await getExclusiveCirclesLabel()
|
||||||
|
exclusiveCirclesLabel.value = label
|
||||||
|
|
||||||
const res = await getTeaSpecialistProfile()
|
const res = await getTeaSpecialistProfile()
|
||||||
profile.value = res
|
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>
|
</view>
|
||||||
|
|
||||||
<!-- 兴趣爱好 -->
|
|
||||||
<view class="info-card mx-30rpx mt-30rpx rounded-24rpx bg-white p-30rpx">
|
<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>
|
<text class="mb-24rpx block text-32rpx text-[#303133] font-bold leading-44rpx">兴趣爱好</text>
|
||||||
<wd-textarea v-model="formData.hobby_introduce"
|
<wd-textarea v-model="formData.hobby_introduce"
|
||||||
:auto-height="true"
|
:auto-height="true"
|
||||||
@ -98,7 +116,7 @@
|
|||||||
placeholder="茶艺: 你的茶艺兴趣爱好是什么? 比如茶艺研究、品鉴、茶道美学......快来分享一下吧!"
|
placeholder="茶艺: 你的茶艺兴趣爱好是什么? 比如茶艺研究、品鉴、茶道美学......快来分享一下吧!"
|
||||||
custom-class='!rounded-18rpx !border-2rpx !border-[#EFF0EF] !bg-[#F8F9FA] !mt-20rpx'
|
custom-class='!rounded-18rpx !border-2rpx !border-[#EFF0EF] !bg-[#F8F9FA] !mt-20rpx'
|
||||||
custom-textarea-class='!bg-[#F8F9FA] !min-h-[100rpx] !px-24rpx !py-24rpx' />
|
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">
|
<!-- <view class="info-card mx-30rpx mt-30rpx rounded-24rpx bg-white p-30rpx">
|
||||||
@ -174,7 +192,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router } from '@/utils/tools'
|
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'
|
import { useToast } from 'wot-design-uni'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
@ -190,6 +208,10 @@
|
|||||||
// 性别选择器
|
// 性别选择器
|
||||||
const genderOptions = ref(['男', '女'])
|
const genderOptions = ref(['男', '女'])
|
||||||
|
|
||||||
|
// 专属圈子标签
|
||||||
|
const selectedTags = ref<number[]>([])
|
||||||
|
const exclusiveCirclesLabel = ref<Array<any>>([])
|
||||||
|
|
||||||
// 茶艺师资料
|
// 茶艺师资料
|
||||||
const formData = ref<{
|
const formData = ref<{
|
||||||
name: string // 茶艺师名字
|
name: string // 茶艺师名字
|
||||||
@ -198,7 +220,7 @@
|
|||||||
height: number // 身高
|
height: number // 身高
|
||||||
weight: number // 体重
|
weight: number // 体重
|
||||||
image_arr: string[] // 照片数组
|
image_arr: string[] // 照片数组
|
||||||
hobby_introduce: string // 兴趣爱好介绍
|
label_id?: string // 兴趣爱好介绍
|
||||||
}>({
|
}>({
|
||||||
name: '',
|
name: '',
|
||||||
both: 0,
|
both: 0,
|
||||||
@ -206,7 +228,7 @@
|
|||||||
height: 0,
|
height: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
image_arr: [],
|
image_arr: [],
|
||||||
hobby_introduce: '',
|
label_id: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单内容回显
|
// 表单内容回显
|
||||||
@ -227,6 +249,9 @@
|
|||||||
handleInit: async() => {
|
handleInit: async() => {
|
||||||
const res = await getTeaSpecialistProfile()
|
const res = await getTeaSpecialistProfile()
|
||||||
|
|
||||||
|
const label = await getExclusiveCirclesLabel()
|
||||||
|
exclusiveCirclesLabel.value = label
|
||||||
|
|
||||||
// 处理性别
|
// 处理性别
|
||||||
formData.value = res
|
formData.value = res
|
||||||
sex.value = res.sex == 1 ? '男' : '女'
|
sex.value = res.sex == 1 ? '男' : '女'
|
||||||
@ -236,12 +261,31 @@
|
|||||||
formData.value.both = new Date(born).getTime()
|
formData.value.both = new Date(born).getTime()
|
||||||
both.value = born
|
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}))
|
fileList.value = (formData.value.image_arr || []).map((item: string) => ({ url: item, name: item}))
|
||||||
ProfileEdit.fileList = fileList.value
|
ProfileEdit.fileList = fileList.value
|
||||||
console.log("🚀 ~ ProfileEdit.fileList:", ProfileEdit.fileList)
|
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
|
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) {
|
if (!formData.value.image_arr.length) {
|
||||||
toast.show('请上传照片')
|
toast.show('请上传照片')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
name: formData.value.name,
|
name: formData.value.name,
|
||||||
sex: formData.value.sex,
|
sex: formData.value.sex,
|
||||||
both: formData.value.both,
|
both: formData.value.both,
|
||||||
weight: formData.value.weight,
|
weight: formData.value.weight,
|
||||||
height: formData.value.height,
|
height: formData.value.height,
|
||||||
hobby_introduce: formData.value.hobby_introduce,
|
label_id: selectedTags.value.join(','),
|
||||||
image: formData.value.image_arr.join(','),
|
image: formData.value.image_arr.join(','),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,4 +479,16 @@
|
|||||||
opacity: 0.8;
|
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>
|
</style>
|
||||||
|
|||||||
@ -88,10 +88,10 @@
|
|||||||
|
|
||||||
<scroll-view class="cost-content !pb-40rpx" scroll-y :show-scrollbar="false" :enhanced="true">
|
<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-label">订单总额</text>
|
||||||
<text class="cost-value">¥ {{ costDetails.all_amount }}</text>
|
<text class="cost-value">¥ {{ costDetails.all_amount }}</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="bg-[#FBFBFB] py-24rpx px-30rpx rounded-16rpx">
|
<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-label">{{ order.leaf_name }}</text>
|
||||||
<text class="cost-sub-value">¥ {{ costDetails.tea_price }}</text>
|
<text class="cost-sub-value">¥ {{ costDetails.tea_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cost-sub-item">
|
<!-- <view class="cost-sub-item">
|
||||||
<text class="cost-sub-label">茶具使用</text>
|
<text class="cost-sub-label">茶具使用</text>
|
||||||
<text class="cost-sub-value">¥ {{ costDetails.teacup_price }}</text>
|
<text class="cost-sub-value">¥ {{ costDetails.teacup_price }}</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 优惠 -->
|
<!-- 优惠 -->
|
||||||
<view class="cost-item">
|
<view class="cost-item">
|
||||||
@ -150,11 +150,11 @@
|
|||||||
<view class="cost-value">¥ {{ costDetails.handling_fee }}</view>
|
<view class="cost-value">¥ {{ costDetails.handling_fee }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="cost-item">
|
<!-- <view class="cost-item">
|
||||||
<text class="cost-label">平台服务费</text>
|
<text class="cost-label">平台服务费</text>
|
||||||
<text class="cost-value">¥ {{ costDetails.handling_fee }}</text>
|
<text class="cost-value">¥ {{ costDetails.handling_fee }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
-->
|
||||||
<!-- 分隔线 -->
|
<!-- 分隔线 -->
|
||||||
<view class="cost-divider" />
|
<view class="cost-divider" />
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +1,35 @@
|
|||||||
// 茶艺师等级枚举
|
// 茶艺师等级枚举
|
||||||
export enum TeaSpecialistLevel {
|
export enum TeaSpecialistLevel {
|
||||||
Gold = '金牌茶艺师',
|
Gold = '云华茶艺师',
|
||||||
Senior = '高级茶艺师',
|
Senior = '竹影茶艺师',
|
||||||
Intermediate = '中级茶艺师',
|
Intermediate = '明月茶艺师',
|
||||||
Junior = '初级茶艺师',
|
Junior = '清风茶艺师',
|
||||||
Enthusiast = '茶艺爱好者'
|
// Enthusiast = '茶艺爱好者'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 等级名称对应值
|
||||||
export const TeaSpecialistLevelValue = {
|
export const TeaSpecialistLevelValue = {
|
||||||
['金牌茶艺师']: 'gold',
|
['云华茶艺师']: 'gold',
|
||||||
['高级茶艺师']: 'senior',
|
['竹影茶艺师']: 'senior',
|
||||||
['中级茶艺师']: 'intermediate',
|
['明月茶艺师']: 'intermediate',
|
||||||
['初级茶艺师']: 'junior',
|
['清风茶艺师']: 'junior',
|
||||||
['茶艺爱好者']: 'enthusiast',
|
// ['茶艺爱好者']: 'enthusiast',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TeaSpecialistNumberLevelValue = {
|
export const TeaSpecialistNumberLevelValue = {
|
||||||
[1]: 'enthusiast',
|
// [1]: 'enthusiast',
|
||||||
[2]: 'junior',
|
[1]: 'junior',
|
||||||
[3]: 'intermediate',
|
[2]: 'intermediate',
|
||||||
[4]: 'senior',
|
[3]: 'senior',
|
||||||
[5]: 'gold',
|
[4]: 'gold',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 茶艺师对象结构
|
// 茶艺师对象结构
|
||||||
export const TeaSpecialistLevels = [
|
export const TeaSpecialistLevels = [
|
||||||
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold},
|
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior, level: 1 },
|
||||||
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior },
|
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate, level: 2 },
|
||||||
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate },
|
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior, level: 3 },
|
||||||
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior },
|
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold, level: 4 },
|
||||||
{ id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast }
|
// { id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast, level: 1 }
|
||||||
];
|
];
|
||||||
@ -166,3 +166,13 @@ export function getCurrentDate() {
|
|||||||
export function hidePhoneMiddle(phone: string): string {
|
export function hidePhoneMiddle(phone: string): string {
|
||||||
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
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