From 8e7c1ab6f6e8ff8ced3fb7b04f2242a8c11272e3 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Thu, 23 Apr 2026 18:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=99=9A=E6=8B=9F=E5=8F=B7?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 9 +++++- .../order/tea-specialist/order-detail.vue | 7 ++-- src/pages/login/login.vue | 32 +++++++++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index 903864b..4924dae 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -252,4 +252,11 @@ export function getConfig() { return http.Post('/api/setting/get' , null , { meta: { ignoreAuth: true } }) -} \ No newline at end of file +} + +/** + * 拨打虚拟手机号码 + */ +export function callVirtualNumber(order_sn: string) { + return http.Post('/api/order/mobileBind', {order_sn}) +} diff --git a/src/bundle/order/tea-specialist/order-detail.vue b/src/bundle/order/tea-specialist/order-detail.vue index c9ccf29..e05ac9f 100644 --- a/src/bundle/order/tea-specialist/order-detail.vue +++ b/src/bundle/order/tea-specialist/order-detail.vue @@ -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 }) } } diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 3abb00c..4dd8ebb 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -46,7 +46,10 @@ - 我已阅读并同意 《服务协议》《隐私政策》,未注册手机号登录后将自动你为您创建账号 + 我已阅读并同意 + 《服务协议》 + 《隐私政策》 + 《茶址平台用户协议》,未注册手机号登录后将自动你为您创建账号 @@ -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('下载协议失败,请稍后重试') + } + }) + }, }