71 lines
1.3 KiB
JavaScript
71 lines
1.3 KiB
JavaScript
// pages/mine/contact.js
|
|
Page({
|
|
data: {
|
|
// 联系方式配置:action 决定点击行为,call=拨号 / copy=复制 / 空=不可点
|
|
contactItems: [{
|
|
label: '客服热线',
|
|
value: '18618162956',
|
|
icon: 'call',
|
|
action: 'call'
|
|
},
|
|
{
|
|
label: '微信联系',
|
|
value: '18618162956',
|
|
icon: 'logo-wechat-stroke',
|
|
action: 'copy'
|
|
},
|
|
{
|
|
label: '客服邮箱',
|
|
value: 'service@huashengtec.com',
|
|
icon: 'mail',
|
|
action: 'copy'
|
|
},
|
|
{
|
|
label: '工作时间',
|
|
value: '周一至周日 08:00 - 20:00',
|
|
icon: 'calendar-1',
|
|
action: ''
|
|
}
|
|
]
|
|
},
|
|
|
|
onItemTap(e) {
|
|
const {
|
|
action,
|
|
value
|
|
} = e.currentTarget.dataset
|
|
|
|
if (action === 'call') {
|
|
wx.makePhoneCall({
|
|
phoneNumber: value
|
|
})
|
|
return
|
|
}
|
|
|
|
if (action === 'copy') {
|
|
wx.setClipboardData({
|
|
data: value,
|
|
success: () => {
|
|
wx.showToast({
|
|
title: '已复制',
|
|
icon: 'success'
|
|
})
|
|
}
|
|
})
|
|
}
|
|
},
|
|
|
|
onShareAppMessage() {
|
|
return {
|
|
title: '暖橙陪诊', // 转发标题
|
|
path: '/pages/mine/contact'
|
|
}
|
|
},
|
|
|
|
onShareTimeline() {
|
|
return {
|
|
title: '暖橙陪诊'
|
|
}
|
|
}
|
|
})
|