添加虚拟号码

This commit is contained in:
wangxiaowei
2026-04-23 18:48:56 +08:00
parent fadf49c047
commit 8e7c1ab6f6
3 changed files with 43 additions and 5 deletions

View File

@ -253,3 +253,10 @@ export function getConfig() {
meta: { ignoreAuth: true }
})
}
/**
* 拨打虚拟手机号码
*/
export function callVirtualNumber(order_sn: string) {
return http.Post<any>('/api/order/mobileBind', {order_sn})
}

View File

@ -502,6 +502,7 @@
import { getTeaTypeList } from '@/api/tea'
import { getTeaSpecialistFeeDetails, createTeaSpecialistRenewOrder } from '@/api/tea-specialist'
import type { ITeaTypeListResult } from '@/api/types/tea'
import { callVirtualNumber } from '@/api/user'
const OSS = inject('OSS')
const toast = useToast()
@ -815,9 +816,11 @@
/**
* 拨打电话
*/
handleCall: () => {
handleCall: async () => {
const res = await callVirtualNumber(order.value.order_sn)
console.log("🚀 ~ res:", res)
uni.makePhoneCall({
phoneNumber: order.value.team_mobile
phoneNumber: res.mobile
})
}
}

View File

@ -46,7 +46,10 @@
<wd-checkbox v-model="agree" checked-color="#4C9F44" size="large"> </wd-checkbox>
</view>
<view class="font-400 text-26rpx leading-40rpx text-[#8F959E] ml-14rpx flex-1" @click="agree = !agree">
我已阅读并同意 <text class="text-[#4C9F44]" @click.stop="Login.handleToWebview('service')">服务协议</text> <text class="text-[#4C9F44]" @click.stop="Login.handleToWebview('privacy')">隐私政策</text>未注册手机号登录后将自动你为您创建账号
我已阅读并同意
<text class="text-[#4C9F44]" @click.stop="Login.handleToWebview('service')">服务协议</text>
<text class="text-[#4C9F44]" @click.stop="Login.handleToWebview('privacy')">隐私政策</text>
<text class="text-[#4C9F44]" @click.stop="Login.handleToAgreement()">茶址平台用户协议</text>未注册手机号登录后将自动你为您创建账号
</view>
</view>
</view>
@ -94,7 +97,7 @@
*/
handleLogin: async (e: object) => {
if (!agree.value) {
toast.info('请同意服务协议隐私政策')
toast.info('请同意服务协议隐私政策、茶址平台用户协议')
return
}
@ -182,6 +185,31 @@
handleToWebview: (type: string) => {
router.navigateTo(`/pages/webview/webview?type=${type}`)
},
// 跳转到茶址茶艺师入驻协议页面
handleToAgreement: () => {
const fileUrl = import.meta.env.VITE_SERVER_BASEURL + '/茶址平台用户协议.docx'
uni.downloadFile({
url: fileUrl,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
uni.openDocument({
filePath: downloadRes.tempFilePath,
showMenu: true,
fail: (err) => {
console.error('打开文档失败:', err)
toast.info('打开文档失败,请稍后重试')
}
})
} else {
toast.info('下载协议失败')
}
},
fail: (err) => {
toast.info('下载协议失败,请稍后重试')
}
})
},
}
</script>