Salon 侧全场景脱敏与拨号单次取号改造:收掉预约选择客户的完整手机号出口,新增按门店与订单上下文授权的拨号取号端点及隐私号占位渠道,前端改为脱敏展示加呼叫取号,并同步更新协议条款
自动发布开发环境 Nacos 配置 / publish (push) Successful in 24s

This commit is contained in:
2026-11-04 22:02:51 +08:00
parent bbe1473b70
commit 05493923e4
33 changed files with 697 additions and 28 deletions
@@ -67,6 +67,13 @@
<div class="customer-meta">
<span>预约用户:{{ order.customerNickname || '用户' }}</span>
<span v-if="order.customerPhoneMasked">联系电话:{{ order.customerPhoneMasked }}</span>
<a-button
v-if="order.customerPhoneMasked && order.userId"
size="small"
type="link"
:loading="dialingOrderId === order.id"
@click="dialCustomer(order)"
>呼叫</a-button>
</div>
<div v-if="isQuoteOrder(order)" class="quote-summary">
@@ -215,6 +222,7 @@ const route = useRoute()
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const orders = ref<any[]>([])
const dialingOrderId = ref<IdType | null>(null)
/**
* Purpose: orderRefs supports ArtistOrderView.vue by holding or executing the order refs page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
@@ -659,6 +667,26 @@ const confirmQuote = async () => {
}
}
/** 按订单上下文单次取号后发起拨号,号码不落库、不缓存。 */
const dialCustomer = async (order: any) => {
if (!order?.userId || !order?.id) {
message.warning('缺少订单上下文,无法取号')
return
}
dialingOrderId.value = order.id
try {
const result = await userApi.dialCustomer(order.userId, order.id)
if (!result?.dialNumber) {
throw new Error('未获取到可拨打号码')
}
window.location.href = `tel:${result.dialNumber}`
} catch (error: any) {
message.error(error?.message || '取号失败')
} finally {
dialingOrderId.value = null
}
}
/** completeOrder is a local helper used by this page script. */
const completeOrder = (orderId: IdType) => {
Modal.confirm({