From bc2fb1715babf20a541fcdc7c1cfcfad3d32d418 Mon Sep 17 00:00:00 2001 From: jacobxu666 Date: Fri, 28 Aug 2026 21:59:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=97=A8=E5=BA=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=95=86=E6=88=B7=E7=94=B5=E8=AF=9D=E5=A4=9A=E5=8F=B7=E7=A0=81?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E5=88=86=E9=9A=94=E5=B1=95=E7=A4=BA=E5=B9=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8B=86=E5=88=86=E8=BF=9E=E5=86=99=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=EF=BC=8Cicon=E9=A2=9C=E8=89=B2=E4=B8=8E=E7=9B=B8?= =?UTF-8?q?=E9=82=BB=E6=A8=A1=E5=9D=97=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- pages/venue/detail.vue | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/pages/venue/detail.vue b/pages/venue/detail.vue index 3ef0db1..dfa9121 100644 --- a/pages/venue/detail.vue +++ b/pages/venue/detail.vue @@ -20,14 +20,17 @@ - - + + - + 商户电话 - {{ store.servicePhone }} + + {{ i > 0 ? ',' : '' }}{{ p }} + @@ -76,6 +79,29 @@ export default { discountList() { if (!this.store || !this.store.merchantDiscount) return [] return this.store.merchantDiscount.split('\n') + }, + // xuchao: 客服电话列表:按常见分隔符切分;无分隔符连写的多个11位手机号也自动拆开 + servicePhoneList() { + if (!this.store || !this.store.servicePhone) return [] + const parts = String(this.store.servicePhone).split(/[,,;;、\s\n]+/).filter(Boolean) + const out = [] + parts.forEach(p => { + if (p.length > 11 && /^1[3-9]\d{9}$/.test(p.slice(0, 11))) { + let rest = p + const segs = [] + while (rest.length >= 11 && /^1[3-9]\d{9}$/.test(rest.slice(0, 11))) { + segs.push(rest.slice(0, 11)) + rest = rest.slice(11) + } + if (rest) segs[segs.length - 1] += rest + if (segs.length > 1) { + out.push(...segs) + return + } + } + out.push(p) + }) + return out } }, onLoad(options) { @@ -84,10 +110,10 @@ export default { } }, methods: { - // xuchao: 点击商户电话唤起拨号 - callPhone() { - if (!this.store || !this.store.servicePhone) return - uni.makePhoneCall({ phoneNumber: String(this.store.servicePhone) }) + // xuchao: 点击某个商户电话唤起拨号(多个号码时逐个可点) + callPhone(phone) { + if (!phone) return + uni.makePhoneCall({ phoneNumber: String(phone) }) }, loadDetail(shopId) { const loc = uni.getStorageSync('lng') && uni.getStorageSync('lat')