81 lines
2.3 KiB
JavaScript
81 lines
2.3 KiB
JavaScript
Page({
|
|
data: {
|
|
escortServices: [
|
|
{ id: 1, name: '陪诊', icon: 'heart', url: '', type: '' },
|
|
{ id: 2, name: '代问诊', icon: 'chat-heart', url: '', type: '' },
|
|
{ id: 3, name: '代预约', icon: 'draft', url: '', type: '' },
|
|
{ id: 4, name: '其他助诊', icon: 'cooperate', url: '', type: '' },
|
|
],
|
|
otherServices: [
|
|
{ id: 1, name: '代探望', icon: 'apple', url: '', type: '' },
|
|
{ id: 2, name: '企业陪诊', icon: 'city-8', url: '', type: '' },
|
|
{ id: 3, name: '陪诊师入驻', icon: 'usergroup', url: '', type: '' },
|
|
{ id: 4, name: '商务合作', icon: 'command', url: '', type: '' },
|
|
],
|
|
tools: [
|
|
{ id: 1, name: '医院电话', icon: 'call', url: 'pages/hospital/contact', type: 'page' },
|
|
{ id: 2, name: '科室排行', icon: 'ai-coordinate-system', url: 'pages/hospital/ranking', type: 'page' },
|
|
{ id: 3, name: '医保备案', icon: 'system-code', url: '#小程序://异地备案/FfXUvTLmNptZx5E', type: 'wxapp' },
|
|
{ id: 4, name: '医疗影像', icon: 'film-1', url: 'https://www.114yygh.com/', type: 'website' }
|
|
]
|
|
},
|
|
|
|
async onLoad() {
|
|
},
|
|
|
|
goToAiChat() {
|
|
wx.switchTab({
|
|
url: '/pages/ai/aichat'
|
|
});
|
|
},
|
|
|
|
goToContact() {
|
|
wx.makePhoneCall({
|
|
phoneNumber: '18618162956'
|
|
});
|
|
},
|
|
|
|
goToServiceList() {
|
|
wx.navigateTo({
|
|
url: '/pages/escort/itemlist'
|
|
});
|
|
},
|
|
|
|
goToAssistDetail(e) {
|
|
const id = e.currentTarget.dataset.id;
|
|
wx.navigateTo({
|
|
url: `/pages/escort/itemlist?assistId=${id}`
|
|
});
|
|
},
|
|
|
|
goToOtherServicesDetail(e) {
|
|
const item = e.currentTarget.dataset.item;
|
|
if (!item || !item.type || !item.url) {
|
|
wx.showToast({
|
|
title: '建设中, 请电话联系!',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
switch (item.type) {
|
|
case 'page':
|
|
wx.navigateTo({ url: '/' + item.url });
|
|
break;
|
|
case 'tab':
|
|
wx.switchTab({ url: '/' + item.url });
|
|
break;
|
|
case 'website':
|
|
wx.navigateTo({ url: '/pages/webview/index?url=' + encodeURIComponent(item.url) });
|
|
break;
|
|
case 'wxapp':
|
|
wx.navigateToMiniProgram({ shortLink: item.url, env: 'release' })
|
|
break;
|
|
default:
|
|
wx.showToast({
|
|
title: '建设中, 请电话联系!',
|
|
icon: 'none'
|
|
});
|
|
}
|
|
}
|
|
});
|