修改界面中,临时提交
@@ -0,0 +1,7 @@
|
||||
Add-Type -AssemblyName System.Drawing
|
||||
$bmp = [System.Drawing.Bitmap]::FromFile('d:\work\health\code\ws_health\ui\wxapp_escort\images\home-green.png')
|
||||
$p = $bmp.GetPixel(64, 64)
|
||||
Write-Host "home-green center: $($p.R),$($p.G),$($p.B)"
|
||||
$bmp.Dispose()
|
||||
Remove-Item 'd:\work\health\code\ws_health\ui\wxapp_escort\_reicon.ps1', 'd:\work\health\code\ws_health\ui\wxapp_escort\_sample.ps1' -ErrorAction SilentlyContinue
|
||||
Write-Host 'temp scripts cleaned'
|
||||
@@ -0,0 +1,17 @@
|
||||
Add-Type -AssemblyName System.Drawing
|
||||
foreach ($n in 'home-green', 'ai-green', 'mine-green') {
|
||||
$bmp = [System.Drawing.Bitmap]::FromFile("d:\work\health\code\ws_health\ui\wxapp_escort\images\$n.png")
|
||||
$counts = @{}
|
||||
for ($x = 0; $x -lt $bmp.Width; $x += 2) {
|
||||
for ($y = 0; $y -lt $bmp.Height; $y += 2) {
|
||||
$p = $bmp.GetPixel($x, $y)
|
||||
if ($p.A -lt 128) { continue }
|
||||
$key = '{0},{1},{2}' -f $p.R, $p.G, $p.B
|
||||
$counts[$key] = [int]$counts[$key] + 1
|
||||
}
|
||||
}
|
||||
$top = $counts.GetEnumerator() | Sort-Object Value -Descending | Select-Object -First 2
|
||||
$line = ($top | ForEach-Object { "$($_.Key)=$($_.Value)" }) -join ' '
|
||||
Write-Host "$n : $line"
|
||||
$bmp.Dispose()
|
||||
}
|
||||
@@ -7,21 +7,26 @@
|
||||
"pages/escort/recordlist",
|
||||
"pages/escort/agreement",
|
||||
"pages/escort/recorddetail",
|
||||
"pages/escort/guide",
|
||||
"pages/health/profilelist",
|
||||
"pages/health/profileedit",
|
||||
"pages/mine/mine",
|
||||
"pages/mine/about",
|
||||
"pages/mine/contact",
|
||||
"pages/hospital/contact",
|
||||
"pages/hospital/ranking",
|
||||
"pages/home/webview"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarBackgroundColor": "#FAFAF9",
|
||||
"navigationBarTitleText": "暖橙陪诊",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
"color": "#999999",
|
||||
"selectedColor": "#2D6A4F",
|
||||
"selectedColor": "#C2410C",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
/**app.wxss**/
|
||||
|
||||
page {
|
||||
--td-brand-color-1: #fff8f0;
|
||||
--td-brand-color-2: #ffe8d4;
|
||||
--td-brand-color-3: #ffd4a8;
|
||||
--td-brand-color-4: #ffbb72;
|
||||
--td-brand-color-5: #ff9b33;
|
||||
--td-brand-color-6: #ff8500;
|
||||
--td-brand-color-7: #FF9B33;
|
||||
--td-brand-color-8: #e68600;
|
||||
--td-brand-color-9: #cc6e00;
|
||||
--td-brand-color-10: #a35700;
|
||||
/* 品牌翠绿:#22A45D 为基准色(第 7 档),向浅/深各展开数档。
|
||||
首页主视觉已确定该绿为品牌主色,全站令牌与之对齐,
|
||||
避免二级页沿用旧橙色造成首页与内页两套配色。 */
|
||||
--td-brand-color-1: #f0faf3;
|
||||
--td-brand-color-2: #dcf3e3;
|
||||
--td-brand-color-3: #bce6cb;
|
||||
--td-brand-color-4: #8ed6a9;
|
||||
--td-brand-color-5: #5cc387;
|
||||
--td-brand-color-6: #3bb471;
|
||||
--td-brand-color-7: #22a45d;
|
||||
--td-brand-color-8: #1b8550;
|
||||
--td-brand-color-9: #166940;
|
||||
--td-brand-color-10: #114f31;
|
||||
--td-brand-color: var(--td-brand-color-7);
|
||||
--td-brand-color-active: var(--td-brand-color-8);
|
||||
--td-brand-color-disabled: var(--td-brand-color-3);
|
||||
--td-brand-color-light: var(--td-brand-color-1);
|
||||
--td-brand-color-light-active: var(--td-brand-color-2);
|
||||
background-color: #FAF6F1;
|
||||
|
||||
/* 深锚点:用于标题、Logo 文字等需要"分量"的地方,压住整页的重心 */
|
||||
--c-ink: #1c1917;
|
||||
|
||||
background-color: #ffffff;
|
||||
font-family: -apple-system, PingFang SC, Microsoft YaHei, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// 自定义 tabBar:原生 tabBar 只能放 PNG 位图,三个图标分别是
|
||||
// 实心"手托心" / 气泡里塞"AI"字 / 线框人形,风格互相打架。
|
||||
// 改用 TDesign 图标字体后,三个 tab 走同一套线性笔触,只靠颜色区分选中态。
|
||||
Component({
|
||||
data: {
|
||||
selected: 0, // 当前选中项,由各 tab 页在 onShow 里同步
|
||||
activeColor: '#C2410C', // 选中:暖橙深一档,白底 4.69:1,过 WCAG AA 正文标准
|
||||
inactiveColor: '#7A7068', // 未选中:暖灰,白底 4.83:1,过 WCAG AA 正文标准
|
||||
list: [{
|
||||
pagePath: '/pages/home/index',
|
||||
text: '首页',
|
||||
icon: 'home'
|
||||
}, {
|
||||
pagePath: '/pages/ai/aichat',
|
||||
text: 'AI客服',
|
||||
icon: 'chat'
|
||||
}, {
|
||||
pagePath: '/pages/mine/mine',
|
||||
text: '我的',
|
||||
icon: 'user'
|
||||
}]
|
||||
},
|
||||
|
||||
methods: {
|
||||
onTap(e) {
|
||||
const {
|
||||
index,
|
||||
path
|
||||
} = e.currentTarget.dataset
|
||||
// 重复点击当前 tab 不做跳转,避免页面被重置
|
||||
if (index === this.data.selected) {
|
||||
return
|
||||
}
|
||||
wx.switchTab({
|
||||
url: path
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<view class="tab-bar">
|
||||
<view
|
||||
class="tab-item {{ selected === index ? 'is-active' : '' }}"
|
||||
wx:for="{{ list }}"
|
||||
wx:key="pagePath"
|
||||
data-index="{{ index }}"
|
||||
data-path="{{ item.pagePath }}"
|
||||
bindtap="onTap"
|
||||
>
|
||||
<!-- 三个 tab 共用同一套线性图标,选中态只换颜色、不换图形 -->
|
||||
<t-icon
|
||||
name="{{ item.icon }}"
|
||||
size="44rpx"
|
||||
color="{{ selected === index ? activeColor : inactiveColor }}"
|
||||
/>
|
||||
<text class="tab-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,33 @@
|
||||
/* 自定义 tabBar 脱离文档流,fixed 在底部;
|
||||
各 tab 页需自备底部占位(见 home / aichat / mine 的底部留白),否则内容会被盖住 */
|
||||
.tab-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
padding: 12rpx 0 calc(12rpx + env(safe-area-inset-bottom));
|
||||
background: #FFFFFF;
|
||||
border-top: 2rpx solid #F0E9E0;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tab-text {
|
||||
margin-top: 6rpx;
|
||||
/* 与全局约束一致:中文正文不小于 24rpx(12px) */
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
color: #7A7068;
|
||||
}
|
||||
|
||||
.tab-item.is-active .tab-text {
|
||||
color: #C2410C;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -28,6 +28,12 @@ Page({
|
||||
onShow() {
|
||||
this.getAiQuickQuestions()
|
||||
this.setData({ inputFocus: true })
|
||||
// 同步自定义 tabBar 选中态(AI客服为第 1 项)
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
selected: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取陪诊服务问题
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
/* 给 fixed 的自定义 tabBar 留位;安全区由这里统一承担,输入区不再重复加 */
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
||||
background-color: #F5F5F5;
|
||||
position: relative;
|
||||
}
|
||||
@@ -289,7 +292,6 @@
|
||||
.input-area {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx 24rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
border-top: 1rpx solid #EEEEEE;
|
||||
}
|
||||
|
||||
@@ -337,7 +339,6 @@
|
||||
/* AI声明 */
|
||||
.ai-disclaimer {
|
||||
padding: 12rpx 24rpx;
|
||||
padding-bottom: calc(12rpx + env(safe-area-inset-bottom));
|
||||
text-align: center;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// pages/escort/guide.js
|
||||
|
||||
// 人工客服电话:与首页、关于我们保持一致
|
||||
const SERVICE_PHONE = '18618162956'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
// 服务流程:与 itemdetail 的「服务流程」同构,这里只描述通用环节
|
||||
steps: [{
|
||||
title: '线上预约',
|
||||
desc: '选择服务项目,填写就诊医院、科室与时间'
|
||||
},
|
||||
{
|
||||
title: '需求确认',
|
||||
desc: '客服电话核对就诊信息与特殊需求'
|
||||
},
|
||||
{
|
||||
title: '陪诊师接单',
|
||||
desc: '按需求匹配陪诊师,出发前与您联系'
|
||||
},
|
||||
{
|
||||
title: '全程陪同',
|
||||
desc: '取号、缴费、检查、取药全程有人陪'
|
||||
},
|
||||
{
|
||||
title: '服务完成',
|
||||
desc: '确认服务结果,客服回访并处理售后'
|
||||
}
|
||||
],
|
||||
// 就诊前准备:到院前建议提前备齐的材料
|
||||
preparations: [
|
||||
'就诊人身份证、医保卡(或电子医保凭证)',
|
||||
'既往病历、检查报告与影像资料',
|
||||
'需要空腹的项目,就诊当天请勿进食进水',
|
||||
'长期服用的药物清单,方便医生了解用药情况',
|
||||
'提前与陪诊师确认医院、院区与集合地点'
|
||||
],
|
||||
// 温馨提示:通用提醒,不涉及具体退款或收费规则
|
||||
tips: [
|
||||
'建议比预约时间提前 10-15 分钟到达集合点',
|
||||
'贵重物品与重要证件请自行随身保管',
|
||||
'就诊时间或需求有变化,请尽早联系客服调整'
|
||||
]
|
||||
},
|
||||
|
||||
// 下一步:进入陪诊服务列表
|
||||
goToServiceList() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/escort/itemlist'
|
||||
})
|
||||
},
|
||||
|
||||
// 兜底出口:仍有疑问可直接拨打客服电话
|
||||
goToContact() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: SERVICE_PHONE
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊指南', // 转发标题
|
||||
path: '/pages/escort/guide'
|
||||
}
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊指南'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "陪诊指南",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--pages/escort/guide.wxml-->
|
||||
<view class="page-bg">
|
||||
<view class="container">
|
||||
|
||||
<!-- 头部:小色带 + 白底(内页规范,不做整块主色面板) -->
|
||||
<view class="page-header">
|
||||
<view class="header-accent"></view>
|
||||
<text class="header-title">陪诊指南</text>
|
||||
<text class="header-subtitle">第一次用陪诊?三分钟看懂全流程</text>
|
||||
</view>
|
||||
|
||||
<!-- ① 服务流程:下单到完成的通用环节 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="list" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">服务流程</text>
|
||||
</view>
|
||||
<view class="step-list">
|
||||
<view class="step-item" wx:for="{{ steps }}" wx:key="title">
|
||||
<view class="step-index">{{ index + 1 }}</view>
|
||||
<view class="step-body">
|
||||
<text class="step-title">{{ item.title }}</text>
|
||||
<text class="step-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ② 就诊前准备:到院前建议备齐的材料 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="info-circle" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">就诊前准备</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ preparations }}" wx:key="*this">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ③ 温馨提示:通用注意事项,不涉及具体规则 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="error-circle" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">温馨提示</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ tips }}" wx:key="*this">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部出口:看完指南直接去下单,兜底可转人工客服 -->
|
||||
<view class="guide-cta" bindtap="goToServiceList">
|
||||
<text class="guide-cta-text">查看陪诊服务</text>
|
||||
<t-icon name="chevron-right" size="28rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="guide-help" bindtap="goToContact">
|
||||
<t-icon name="call" size="28rpx" color="#9A3412" />
|
||||
<text class="guide-help-text">还有疑问?联系人工客服</text>
|
||||
</view>
|
||||
|
||||
<view class="footer-space"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,207 @@
|
||||
/* pages/escort/guide.wxss
|
||||
内页规范:小色带 + 白底,不用整块主色面板;
|
||||
卡片沿用首页「发丝边 + 紧阴影」,与首页保持同一套视觉语言 */
|
||||
page {
|
||||
--brand-strong: #C2410C; /* 实心块/按钮:白字 4.69:1,过 AA 正文 */
|
||||
--brand-soft: #FFF4E8; /* 图标衬底、标签底 */
|
||||
--brand-line: #FFE0C2; /* 浅橙衬底描边 */
|
||||
--brand-ink: #9A3412; /* 浅橙衬底上的文字/图标:6.8:1,过 AA */
|
||||
|
||||
--ink: #2B2521;
|
||||
--ink-2: #4A4038;
|
||||
--muted: #7A7068; /* 白底 4.8:1,过 AA 正文 */
|
||||
--line: #F0E9E0; /* 米色发丝边 */
|
||||
--paper: #FAF6F0; /* 暖白纸面 */
|
||||
--white: #FFFFFF;
|
||||
|
||||
--shadow-card: 0 2rpx 10rpx rgba(63, 43, 25, 0.04);
|
||||
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
/* ===== 头部:小色带 + 深墨标题 ===== */
|
||||
.page-header {
|
||||
padding: 24rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.header-accent {
|
||||
width: 64rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
background: var(--brand-strong);
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 46rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 通用白卡 ===== */
|
||||
.card {
|
||||
margin-top: 32rpx;
|
||||
padding: 28rpx 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.card-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-mark {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 12rpx;
|
||||
background: var(--brand-strong);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-left: 14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 服务流程:左侧序号 + 递进条目 ===== */
|
||||
.step-item {
|
||||
display: flex;
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.step-index {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.step-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.step-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.step-desc {
|
||||
margin-top: 8rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ===== 要点列表 ===== */
|
||||
.dot-item {
|
||||
display: flex;
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
background: var(--brand-strong);
|
||||
margin: 16rpx 18rpx 0 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dot-text {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: var(--ink-2);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ===== 底部出口 ===== */
|
||||
.guide-cta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 48rpx;
|
||||
padding: 26rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--brand-strong);
|
||||
box-shadow: 0 6rpx 16rpx rgba(194, 65, 12, 0.22);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.guide-cta:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.guide-cta-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--white);
|
||||
letter-spacing: 2rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.guide-help {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 24rpx;
|
||||
padding: 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.guide-help:active {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.guide-help-text {
|
||||
margin-left: 12rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 60rpx;
|
||||
}
|
||||
@@ -15,6 +15,8 @@ Page({
|
||||
},
|
||||
totalPrice: '0.00',
|
||||
showOrderPopup: false,
|
||||
profiles: [], // 健康档案里已保存的就诊人
|
||||
selectedProfileId: '', // 当前选中的就诊人档案 ID,为空表示手动填写
|
||||
patientName: '',
|
||||
patientPhone: '',
|
||||
province: '',
|
||||
@@ -48,6 +50,13 @@ Page({
|
||||
this.loadServiceDetail(serviceId)
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 从"新增就诊人"页面返回时,弹窗还开着就刷新一次可选的就诊人
|
||||
if (this.data.showOrderPopup) {
|
||||
this.loadProfiles()
|
||||
}
|
||||
},
|
||||
|
||||
loadServiceDetail(id) {
|
||||
const app = getApp()
|
||||
let service = null
|
||||
@@ -86,8 +95,57 @@ Page({
|
||||
this.setData({
|
||||
patientName: user.profile?.name || '',
|
||||
patientPhone: user.profile?.mobile || '',
|
||||
selectedProfileId: '',
|
||||
showOrderPopup: true
|
||||
})
|
||||
|
||||
this.loadProfiles()
|
||||
},
|
||||
|
||||
// 读取已保存的就诊人,供弹窗内一键选择
|
||||
loadProfiles() {
|
||||
API.healthProfile.getMyProfiles({
|
||||
page: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return
|
||||
}
|
||||
const list = ((res.data && res.data.list) || []).map((item) => ({
|
||||
_id: item._id,
|
||||
name: item.profile?.name || '',
|
||||
mobile: item.profile?.mobile || ''
|
||||
}))
|
||||
this.setData({
|
||||
profiles: list
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取就诊人列表失败', err)
|
||||
})
|
||||
},
|
||||
|
||||
// 选择就诊人:自动带入姓名与联系电话
|
||||
onSelectProfile(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
const profile = this.data.profiles.find((item) => item._id === id)
|
||||
if (!profile) {
|
||||
return
|
||||
}
|
||||
|
||||
this.setData({
|
||||
selectedProfileId: id,
|
||||
patientName: profile.name,
|
||||
patientPhone: profile.mobile
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到健康档案新增就诊人
|
||||
goToAddProfile() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/health/profileedit'
|
||||
})
|
||||
},
|
||||
|
||||
closeOrderPopup() {
|
||||
@@ -96,15 +154,18 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 手动修改姓名/电话后,不再与所选档案对应,清空选择避免存档信息不一致
|
||||
onPatientNameChange(e) {
|
||||
this.setData({
|
||||
patientName: e.detail.value
|
||||
patientName: e.detail.value,
|
||||
selectedProfileId: ''
|
||||
})
|
||||
},
|
||||
|
||||
onPatientPhoneChange(e) {
|
||||
this.setData({
|
||||
patientPhone: e.detail.value
|
||||
patientPhone: e.detail.value,
|
||||
selectedProfileId: ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -256,6 +317,11 @@ Page({
|
||||
}
|
||||
}
|
||||
|
||||
// 选择了已保存的就诊人时,一并记录档案 ID
|
||||
if (this.data.selectedProfileId) {
|
||||
orderData.healthProfileId = this.data.selectedProfileId
|
||||
}
|
||||
|
||||
wx.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
@@ -292,6 +358,7 @@ Page({
|
||||
|
||||
resetForm() {
|
||||
this.setData({
|
||||
selectedProfileId: '',
|
||||
patientName: '',
|
||||
patientPhone: '',
|
||||
province: '',
|
||||
|
||||
@@ -96,6 +96,26 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 选择就诊人:从健康档案一键带入姓名与电话 -->
|
||||
<view class="order-row column">
|
||||
<text class="order-label">选择就诊人</text>
|
||||
<scroll-view class="patient-scroll" scroll-x wx:if="{{profiles.length > 0}}">
|
||||
<view class="patient-chips">
|
||||
<view class="patient-chip {{selectedProfileId === item._id ? 'active' : ''}}" wx:for="{{profiles}}" wx:key="_id"
|
||||
data-id="{{item._id}}" bindtap="onSelectProfile">
|
||||
<text class="patient-chip-name">{{item.name}}</text>
|
||||
<text class="patient-chip-phone">{{item.mobile}}</text>
|
||||
</view>
|
||||
<view class="patient-chip patient-chip-add" bindtap="goToAddProfile">
|
||||
<text class="patient-chip-name">+ 添加就诊人</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="add-profile-tip" wx:else bindtap="goToAddProfile">
|
||||
<text class="add-profile-tip-text">还没有就诊人,去添加后可一键带入 ›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 就诊人姓名 -->
|
||||
<view class="order-row">
|
||||
<text class="order-label">就诊人姓名</text>
|
||||
|
||||
@@ -493,3 +493,63 @@ page {
|
||||
.popup-submit-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 就诊人选择 */
|
||||
.patient-scroll {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.patient-chips {
|
||||
display: inline-flex;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.patient-chip {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
min-width: 160rpx;
|
||||
padding: 14rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #F9FAFB;
|
||||
border: 2rpx solid #F3F4F6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.patient-chip.active {
|
||||
background: #FDF8EE;
|
||||
border-color: #D4A853;
|
||||
}
|
||||
|
||||
.patient-chip-name {
|
||||
font-size: 26rpx;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.patient-chip.active .patient-chip-name {
|
||||
color: #D4A853;
|
||||
}
|
||||
|
||||
.patient-chip-phone {
|
||||
font-size: 22rpx;
|
||||
color: #9CA3AF;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.patient-chip-add {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.add-profile-tip {
|
||||
width: 100%;
|
||||
padding: 18rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FDF8EE;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.add-profile-tip-text {
|
||||
font-size: 24rpx;
|
||||
color: #A1864B;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "助诊服务"
|
||||
"navigationBarTitleText": "陪诊服务"
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
const API = require('../../utils/api.js')
|
||||
|
||||
// 性别选项,与后端 schema 的 male / female 对应
|
||||
const SEX_OPTIONS = [{
|
||||
value: 'male',
|
||||
label: '男'
|
||||
},
|
||||
{
|
||||
value: 'female',
|
||||
label: '女'
|
||||
}
|
||||
]
|
||||
|
||||
const MOBILE_REGEX = /^1[3-9]\d{9}$/
|
||||
|
||||
Page({
|
||||
data: {
|
||||
id: '',
|
||||
isEdit: false,
|
||||
saving: false,
|
||||
today: '',
|
||||
sexOptions: SEX_OPTIONS,
|
||||
form: {
|
||||
name: '',
|
||||
sex: '',
|
||||
birth: '',
|
||||
mobile: '',
|
||||
idnumber: '',
|
||||
remark: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const id = options.id || ''
|
||||
|
||||
this.setData({
|
||||
id,
|
||||
isEdit: !!id,
|
||||
today: this.formatDate(new Date())
|
||||
})
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: id ? '编辑就诊人' : '新增就诊人'
|
||||
})
|
||||
|
||||
if (id) {
|
||||
this.loadProfile(id)
|
||||
}
|
||||
},
|
||||
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
},
|
||||
|
||||
// 编辑模式:读取档案详情回填表单
|
||||
loadProfile(id) {
|
||||
API.healthProfile.getMyProfileById(id)
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
wx.showToast({
|
||||
title: res.msg || '加载失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const detail = (res.data && res.data.profile) || {}
|
||||
const profile = detail.profile || {}
|
||||
const health = detail.health || {}
|
||||
|
||||
this.setData({
|
||||
form: {
|
||||
name: profile.name || '',
|
||||
sex: profile.sex || '',
|
||||
birth: profile.birth || '',
|
||||
mobile: profile.mobile || '',
|
||||
idnumber: profile.idnumber || '',
|
||||
remark: health.remark || ''
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取就诊人信息失败', err)
|
||||
wx.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onFieldInput(e) {
|
||||
const field = e.currentTarget.dataset.field
|
||||
this.setData({
|
||||
[`form.${field}`]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
onSexSelect(e) {
|
||||
const sex = e.currentTarget.dataset.sex
|
||||
// 再次点击已选中的性别则取消选择
|
||||
this.setData({
|
||||
'form.sex': this.data.form.sex === sex ? '' : sex
|
||||
})
|
||||
},
|
||||
|
||||
onBirthChange(e) {
|
||||
this.setData({
|
||||
'form.birth': e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
// 表单校验,返回错误提示文案;通过校验返回空字符串
|
||||
validate() {
|
||||
const {
|
||||
name,
|
||||
mobile
|
||||
} = this.data.form
|
||||
|
||||
if (!name.trim()) {
|
||||
return '请输入就诊人姓名'
|
||||
}
|
||||
if (!mobile.trim()) {
|
||||
return '请输入联系电话'
|
||||
}
|
||||
if (!MOBILE_REGEX.test(mobile.trim())) {
|
||||
return '请输入正确的手机号'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
onSave() {
|
||||
if (this.data.saving) {
|
||||
return
|
||||
}
|
||||
|
||||
const errorMessage = this.validate()
|
||||
if (errorMessage) {
|
||||
wx.showToast({
|
||||
title: errorMessage,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const {
|
||||
name,
|
||||
sex,
|
||||
birth,
|
||||
mobile,
|
||||
idnumber,
|
||||
remark
|
||||
} = this.data.form
|
||||
|
||||
// 新增用嵌套对象(schema 的 new Model 需要嵌套结构);
|
||||
// 更新用点号路径(schema 更新姓名时会额外写 profile.pinyin,整体替换 profile 会冲突)
|
||||
const payload = this.data.isEdit ? {
|
||||
'profile.name': name.trim(),
|
||||
'profile.sex': sex,
|
||||
'profile.birth': birth,
|
||||
'profile.mobile': mobile.trim(),
|
||||
'profile.idnumber': idnumber.trim(),
|
||||
'health.remark': remark.trim()
|
||||
} : {
|
||||
profile: {
|
||||
name: name.trim(),
|
||||
sex: sex,
|
||||
birth: birth,
|
||||
mobile: mobile.trim(),
|
||||
idnumber: idnumber.trim()
|
||||
},
|
||||
health: {
|
||||
remark: remark.trim()
|
||||
}
|
||||
}
|
||||
|
||||
this.setData({
|
||||
saving: true
|
||||
})
|
||||
wx.showLoading({
|
||||
title: '保存中...'
|
||||
})
|
||||
|
||||
const request = this.data.isEdit ?
|
||||
API.healthProfile.updateMyProfile(this.data.id, payload) :
|
||||
API.healthProfile.createMyProfile(payload)
|
||||
|
||||
request
|
||||
.then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code !== 0) {
|
||||
wx.showToast({
|
||||
title: res.msg || '保存失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.navigateBack()
|
||||
}, 800)
|
||||
})
|
||||
.catch((err) => {
|
||||
wx.hideLoading()
|
||||
console.log('保存就诊人失败', err)
|
||||
wx.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.setData({
|
||||
saving: false
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "新增就诊人",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<view class="container">
|
||||
|
||||
<view class="form-card">
|
||||
<view class="form-item">
|
||||
<text class="form-label">姓名<text class="required">*</text></text>
|
||||
<input class="form-input" value="{{form.name}}" placeholder="请输入就诊人姓名" placeholder-class="input-placeholder"
|
||||
maxlength="20" data-field="name" bindinput="onFieldInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">性别</text>
|
||||
<view class="sex-wrap">
|
||||
<view class="sex-tag {{form.sex === item.value ? 'sex-tag-active' : ''}}" wx:for="{{sexOptions}}" wx:key="value"
|
||||
data-sex="{{item.value}}" bindtap="onSexSelect">
|
||||
<text class="sex-text">{{item.label}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">出生年月</text>
|
||||
<picker mode="date" value="{{form.birth}}" start="1900-01-01" end="{{today}}" bindchange="onBirthChange">
|
||||
<view class="picker-value {{form.birth ? '' : 'picker-placeholder'}}">
|
||||
{{form.birth || '请选择出生年月'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">联系电话<text class="required">*</text></text>
|
||||
<input class="form-input" value="{{form.mobile}}" type="number" placeholder="用于陪诊师联系您" placeholder-class="input-placeholder"
|
||||
maxlength="11" data-field="mobile" bindinput="onFieldInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">证件号</text>
|
||||
<input class="form-input" value="{{form.idnumber}}" placeholder="选填,用于医院建档取号" placeholder-class="input-placeholder"
|
||||
maxlength="30" data-field="idnumber" bindinput="onFieldInput" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-card">
|
||||
<view class="form-item form-item-remark">
|
||||
<text class="form-label">健康备注</text>
|
||||
<textarea class="form-textarea" value="{{form.remark}}" placeholder="选填,如过敏史、慢病、行动不便等情况,便于陪诊师提前准备"
|
||||
placeholder-class="input-placeholder" maxlength="200" data-field="remark" bindinput="onFieldInput" />
|
||||
<text class="remark-count">{{form.remark.length}}/200</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tips">
|
||||
<t-icon name="lock-on" size="26rpx" color="#B0B7C3" />
|
||||
<text class="tips-text">信息仅用于陪诊服务,我们会严格保密</text>
|
||||
</view>
|
||||
|
||||
<view class="footer-bar">
|
||||
<view class="submit-btn {{saving ? 'submit-btn-disabled' : ''}}" bindtap="onSave">
|
||||
<text class="submit-btn-text">保存</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,165 @@
|
||||
page {
|
||||
background-color: #FAF6F1;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding: 24rpx 24rpx 200rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-card {
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 8rpx 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 108rpx;
|
||||
border-bottom: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.form-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.form-item-remark {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
padding: 28rpx 0;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
width: 160rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: 28rpx;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.required {
|
||||
color: #EF4444;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #1F2937;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: #C4C9D2;
|
||||
}
|
||||
|
||||
.picker-value {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #1F2937;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.picker-placeholder {
|
||||
color: #C4C9D2;
|
||||
}
|
||||
|
||||
/* 性别选择 */
|
||||
.sex-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.sex-tag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 120rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #F3F4F6;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.sex-tag-active {
|
||||
background: #FDF8EE;
|
||||
border: 2rpx solid #D4A853;
|
||||
}
|
||||
|
||||
.sex-text {
|
||||
font-size: 28rpx;
|
||||
color: #6B7280;
|
||||
}
|
||||
|
||||
.sex-tag-active .sex-text {
|
||||
color: #D4A853;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 健康备注 */
|
||||
.form-textarea {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1F2937;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.remark-count {
|
||||
align-self: flex-end;
|
||||
font-size: 22rpx;
|
||||
color: #C4C9D2;
|
||||
}
|
||||
|
||||
/* 隐私提示 */
|
||||
.tips {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 12rpx;
|
||||
}
|
||||
|
||||
.tips-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #B0B7C3;
|
||||
}
|
||||
|
||||
/* 底部固定保存按钮 */
|
||||
.footer-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
background: #D4A853;
|
||||
}
|
||||
|
||||
.submit-btn:active {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.submit-btn-disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.submit-btn-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
const API = require('../../utils/api.js')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
profiles: [],
|
||||
loading: false
|
||||
},
|
||||
|
||||
// 用 onShow 而不是 onLoad:从新增/编辑页返回后需要刷新列表
|
||||
onShow() {
|
||||
this.loadProfiles()
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.loadProfiles().finally(() => {
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
|
||||
// 拉取当前登录用户的健康档案(就诊人)列表
|
||||
loadProfiles() {
|
||||
this.setData({
|
||||
loading: true
|
||||
})
|
||||
|
||||
return API.healthProfile.getMyProfiles({
|
||||
page: 1,
|
||||
pageSize: 50
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
wx.showToast({
|
||||
title: res.msg || '加载失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const list = (res.data && res.data.list) || []
|
||||
this.setData({
|
||||
profiles: list.map((item) => this.formatProfile(item))
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取健康档案失败', err)
|
||||
wx.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.setData({
|
||||
loading: false
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 后端返回的是嵌套结构,这里拍平成卡片展示需要的字段
|
||||
formatProfile(item) {
|
||||
const profile = item.profile || {}
|
||||
const health = item.health || {}
|
||||
|
||||
return {
|
||||
_id: item._id,
|
||||
name: profile.name || '未命名',
|
||||
sexText: profile.sex === 'male' ? '男' : (profile.sex === 'female' ? '女' : ''),
|
||||
birth: profile.birth || '',
|
||||
mobile: profile.mobile || '',
|
||||
idnumberText: this.maskIdNumber(profile.idnumber),
|
||||
remark: health.remark || ''
|
||||
}
|
||||
},
|
||||
|
||||
// 证件号脱敏:仅保留前 4 位与后 4 位
|
||||
maskIdNumber(idnumber) {
|
||||
const value = String(idnumber || '')
|
||||
if (!value) {
|
||||
return '未填写'
|
||||
}
|
||||
if (value.length <= 8) {
|
||||
return value
|
||||
}
|
||||
return `${value.slice(0, 4)}********${value.slice(-4)}`
|
||||
},
|
||||
|
||||
onAdd() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/health/profileedit'
|
||||
})
|
||||
},
|
||||
|
||||
onEdit(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: `/pages/health/profileedit?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
|
||||
wx.showModal({
|
||||
title: '删除确认',
|
||||
content: '删除后该就诊人信息将无法恢复,确定删除吗?',
|
||||
confirmColor: '#D4A853',
|
||||
success: (res) => {
|
||||
if (!res.confirm) {
|
||||
return
|
||||
}
|
||||
API.healthProfile.deleteMyProfile(id)
|
||||
.then((result) => {
|
||||
if (result.code !== 0) {
|
||||
wx.showToast({
|
||||
title: result.msg || '删除失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.showToast({
|
||||
title: '已删除',
|
||||
icon: 'success'
|
||||
})
|
||||
this.loadProfiles()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('删除健康档案失败', err)
|
||||
wx.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "健康档案",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<view class="container">
|
||||
|
||||
<!-- 顶部说明 -->
|
||||
<view class="page-tip" wx:if="{{profiles.length > 0}}">
|
||||
<t-icon name="info-circle" size="28rpx" color="#D4A853" />
|
||||
<text class="page-tip-text">下单时可直接选择已保存的就诊人,无需重复填写</text>
|
||||
</view>
|
||||
|
||||
<!-- 就诊人列表 -->
|
||||
<view class="profile-list" wx:if="{{profiles.length > 0}}">
|
||||
<view class="profile-card" wx:for="{{profiles}}" wx:key="_id" data-id="{{item._id}}" bindtap="onEdit">
|
||||
<view class="card-header">
|
||||
<view class="name-wrap">
|
||||
<text class="profile-name">{{item.name}}</text>
|
||||
<text class="sex-tag" wx:if="{{item.sexText}}">{{item.sexText}}</text>
|
||||
</view>
|
||||
<view class="delete-btn" data-id="{{item._id}}" catchtap="onDelete">
|
||||
<t-icon name="delete" size="32rpx" color="#9CA3AF" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-body">
|
||||
<view class="info-row">
|
||||
<text class="info-label">出生年月</text>
|
||||
<text class="info-value">{{item.birth || '未填写'}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">联系电话</text>
|
||||
<text class="info-value">{{item.mobile || '未填写'}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">证件号</text>
|
||||
<text class="info-value">{{item.idnumberText}}</text>
|
||||
</view>
|
||||
<view class="info-row" wx:if="{{item.remark}}">
|
||||
<text class="info-label">健康备注</text>
|
||||
<text class="info-value">{{item.remark}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" wx:if="{{!loading && profiles.length === 0}}">
|
||||
<t-icon name="file-safety" size="120rpx" color="#D1D5DB" />
|
||||
<text class="empty-text">还没有健康档案</text>
|
||||
<text class="empty-subtext">添加就诊人后,下单时可一键带入信息</text>
|
||||
</view>
|
||||
|
||||
<!-- 加载中 -->
|
||||
<view class="loading-wrap" wx:if="{{loading}}">
|
||||
<t-loading theme="circular" size="40rpx" text="加载中..." />
|
||||
</view>
|
||||
|
||||
<!-- 底部留白,避免被固定按钮遮挡 -->
|
||||
<view class="bottom-space"></view>
|
||||
|
||||
<!-- 新增按钮 -->
|
||||
<view class="footer-bar">
|
||||
<view class="add-btn" bindtap="onAdd">
|
||||
<t-icon name="add" size="34rpx" color="#FFFFFF" />
|
||||
<text class="add-btn-text">新增就诊人</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,166 @@
|
||||
page {
|
||||
background-color: #FAF6F1;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 顶部说明条 */
|
||||
.page-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 24rpx 24rpx 0;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FDF8EE;
|
||||
}
|
||||
|
||||
.page-tip-text {
|
||||
margin-left: 12rpx;
|
||||
font-size: 24rpx;
|
||||
color: #A1864B;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 就诊人列表 */
|
||||
.profile-list {
|
||||
padding: 20rpx 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.profile-card {
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.profile-card:active {
|
||||
background: #FDFCFA;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.name-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.profile-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
.sex-tag {
|
||||
margin-left: 16rpx;
|
||||
padding: 2rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #FDF8EE;
|
||||
color: #D4A853;
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
padding: 8rpx 0 8rpx 24rpx;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 26rpx;
|
||||
color: #9CA3AF;
|
||||
width: 140rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 26rpx;
|
||||
color: #374151;
|
||||
flex: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 30rpx;
|
||||
color: #9CA3AF;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.empty-subtext {
|
||||
font-size: 26rpx;
|
||||
color: #D1D5DB;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
/* 加载中 */
|
||||
.loading-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.bottom-space {
|
||||
height: 180rpx;
|
||||
}
|
||||
|
||||
/* 底部固定新增按钮 */
|
||||
.footer-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
background: #D4A853;
|
||||
}
|
||||
|
||||
.add-btn:active {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.add-btn-text {
|
||||
margin-left: 8rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
@@ -1,92 +1,180 @@
|
||||
const API = require('../../utils/api.js')
|
||||
|
||||
// 陪诊服务的展示配置:价格等以后端返回为准,这里只覆盖展示名。
|
||||
// 图标不走数据,而是按 id 映射到 index.wxss 里内嵌的细线 SVG(.assist-icon-1 ~ .assist-icon-8)
|
||||
// key 为后端 services 的 id,顺序即首页宫格的展示顺序
|
||||
const SERVICE_UI = {
|
||||
1: { name: '全天陪诊' },
|
||||
2: { name: '半天陪诊' },
|
||||
3: { name: '代问诊' },
|
||||
4: { name: '检查预约' },
|
||||
5: { name: '出入院代办' },
|
||||
6: { name: '跑腿服务' },
|
||||
7: { name: '陪诊套餐' },
|
||||
8: { name: '买药套餐' }
|
||||
}
|
||||
|
||||
// 陪诊服务的展示顺序(两行共 8 项)
|
||||
const SERVICE_ORDER = [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
|
||||
// 计入"待服务订单"的订单状态:待确认 / 已确认 / 进行中
|
||||
const PENDING_ORDER_STATUS = ['pending', 'confirmed', 'in_progress']
|
||||
|
||||
// 人工客服电话
|
||||
const SERVICE_PHONE = '18618162956'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
escortServices: [{
|
||||
id: 1,
|
||||
name: '陪诊',
|
||||
icon: 'heart',
|
||||
iconColor: '#E11D48',
|
||||
bgColor: '#FFF1F2'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '代问诊',
|
||||
icon: 'chat-heart',
|
||||
iconColor: '#EA580C',
|
||||
bgColor: '#FFF7ED'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '代办理',
|
||||
icon: 'fact-check',
|
||||
iconColor: '#059669',
|
||||
bgColor: '#ECFDF5'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '其他助诊',
|
||||
icon: 'app',
|
||||
iconColor: '#2563EB',
|
||||
bgColor: '#EFF6FF'
|
||||
}
|
||||
],
|
||||
otherServices: [{
|
||||
id: 1,
|
||||
name: '代探望',
|
||||
icon: 'apple',
|
||||
url: '',
|
||||
type: '',
|
||||
iconColor: '#7C3AED',
|
||||
bgColor: '#F5F3FF'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '企业陪诊',
|
||||
icon: 'city-8',
|
||||
url: '',
|
||||
type: '',
|
||||
iconColor: '#D97706',
|
||||
bgColor: '#FFFBEB'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '陪诊师入驻',
|
||||
icon: 'usergroup',
|
||||
url: '',
|
||||
type: '',
|
||||
iconColor: '#4F46E5',
|
||||
bgColor: '#EEF2FF'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '商务合作',
|
||||
icon: 'command',
|
||||
url: '',
|
||||
type: '',
|
||||
iconColor: '#0D9488',
|
||||
bgColor: '#F0FDFA'
|
||||
},
|
||||
],
|
||||
tools: [{
|
||||
id: 1,
|
||||
escortServices: [], // 陪诊服务(来自后端,最多 8 项)
|
||||
pendingCount: 0, // 待服务订单数,大于 0 时首页顶部展示状态条
|
||||
quickEntries: [{
|
||||
id: 'records',
|
||||
name: '预约记录',
|
||||
icon: 'assignment',
|
||||
url: 'pages/escort/recordlist',
|
||||
type: 'page',
|
||||
iconColor: '#0891B2',
|
||||
bgColor: '#ECFEFF'
|
||||
desc: '查看预约进度与历史',
|
||||
// 日历:与「健康档案」的人形图标形成明显形态差异(原先两个都是"文档+勾",缩小后难分辨)
|
||||
icon: 'calendar-1',
|
||||
url: '/pages/escort/recordlist'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
id: 'health',
|
||||
name: '健康档案',
|
||||
icon: 'attach',
|
||||
url: '',
|
||||
type: '',
|
||||
iconColor: '#DB2777',
|
||||
bgColor: '#FDF2F8'
|
||||
desc: '管理家人就诊信息',
|
||||
icon: 'user-checked',
|
||||
url: '/pages/health/profilelist'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.loadServices()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.refreshPendingCount()
|
||||
// 同步自定义 tabBar 选中态(首页为第 0 项)
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
selected: 0
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 读取后端服务列表,拼装成首页宫格所需的展示数据
|
||||
loadServices() {
|
||||
const app = getApp()
|
||||
// servicesReady 由 app.onLaunch 创建,兜底避免极端情况下取不到
|
||||
const ready = app.globalData.servicesReady || Promise.resolve(app.globalData.services || [])
|
||||
|
||||
ready.then((services) => {
|
||||
const serviceMap = {}
|
||||
;(services || []).forEach((service) => {
|
||||
serviceMap[service.id] = service
|
||||
})
|
||||
|
||||
const escortServices = SERVICE_ORDER
|
||||
.filter((id) => serviceMap[id])
|
||||
.map((id) => {
|
||||
const service = serviceMap[id]
|
||||
const ui = SERVICE_UI[id] || {}
|
||||
return {
|
||||
id,
|
||||
name: ui.name || service.title,
|
||||
// 图标类名:与 index.wxss 中 .assist-icon-{id} 对应
|
||||
iconClass: 'assist-icon-' + id
|
||||
}
|
||||
})
|
||||
|
||||
this.setData({
|
||||
escortServices
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 统计待服务订单:仅在登录信息就绪后请求,未就绪时稍后重试一次
|
||||
refreshPendingCount(retry) {
|
||||
const app = getApp()
|
||||
const user = app.globalData.user
|
||||
|
||||
if (!user || !user._id) {
|
||||
// 首次进入时 App 的登录请求可能还没返回,延迟重试一次即可
|
||||
if (!retry) {
|
||||
setTimeout(() => this.refreshPendingCount(1), 1500)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
API.escort.getMyRecords({
|
||||
userId: user._id,
|
||||
page: 1,
|
||||
pageSize: 50
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return
|
||||
}
|
||||
const records = (res.data && res.data.records) || []
|
||||
const pendingCount = records.filter((record) => PENDING_ORDER_STATUS.indexOf(record.status) > -1).length
|
||||
this.setData({
|
||||
pendingCount
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取待服务订单失败', err)
|
||||
})
|
||||
},
|
||||
|
||||
goToAiChat() {
|
||||
wx.switchTab({
|
||||
url: '/pages/ai/aichat'
|
||||
});
|
||||
},
|
||||
|
||||
// 页脚 B 端合作入口仍直接转服务电话
|
||||
goToContact() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: SERVICE_PHONE
|
||||
});
|
||||
},
|
||||
|
||||
// 「联系我们」卡片:进入独立联系页,页内再提供拨号/复制/工作时间
|
||||
goToContactPage() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/mine/contact'
|
||||
});
|
||||
},
|
||||
|
||||
// Hero 主按钮:先引导新用户了解服务,服务列表入口在指南页底部
|
||||
goToGuide() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/escort/guide'
|
||||
});
|
||||
},
|
||||
|
||||
// 点击陪诊服务,直达服务详情下单
|
||||
goToServiceDetail(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: `/pages/escort/itemdetail?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
// 常用功能:预约记录、健康档案
|
||||
onQuickEntryTap(e) {
|
||||
const entry = e.currentTarget.dataset.item
|
||||
if (!entry || !entry.url) {
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: entry.url
|
||||
})
|
||||
},
|
||||
|
||||
goToRecords() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/escort/recordlist'
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '暖橙陪诊', // 转发标题
|
||||
@@ -98,71 +186,5 @@ Page({
|
||||
return {
|
||||
title: '暖橙陪诊',
|
||||
}
|
||||
},
|
||||
|
||||
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/home/webview?url=' + encodeURIComponent(item.url)
|
||||
});
|
||||
break;
|
||||
case 'wxapp':
|
||||
wx.navigateToMiniProgram({
|
||||
shortLink: item.url,
|
||||
env: 'release'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
wx.showToast({
|
||||
title: '建设中...',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,110 +1,118 @@
|
||||
<view class="page-bg">
|
||||
<view class="container">
|
||||
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="nav-bar">
|
||||
<view class="nav-logo">
|
||||
<image class="logo-icon" src="/images/home-yellow.png" mode="aspectFit"></image>
|
||||
<text class="logo-text">暖橙陪诊</text>
|
||||
<!-- 顶部品牌行:左侧橙底白色品牌 Logo(心形线稿)+ 品牌名 -->
|
||||
<view class="topbar">
|
||||
<view class="brand">
|
||||
<view class="brand-mark">
|
||||
<image class="brand-logo" src="/images/home-w.png" mode="aspectFit" />
|
||||
</view>
|
||||
<text class="brand-name">暖橙陪诊</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Banner区域 -->
|
||||
<view class="banner-section">
|
||||
<view class="banner-card">
|
||||
<image class="banner-bg" src="/images/banner.jpg" mode="aspectFill"></image>
|
||||
<view class="banner-overlay"></view>
|
||||
<view class="banner-text">
|
||||
<text class="banner-title">专业陪诊</text>
|
||||
<text class="banner-en">让就医更简单,让客户更安心</text>
|
||||
</view>
|
||||
<!-- ① 头部:参考图的大字标题排版。去掉整块色面板,标题直接落在暖白纸面上,
|
||||
靠字号/字重建立重心,视觉更轻、更透气 -->
|
||||
<view class="hero">
|
||||
<view class="hero-title">
|
||||
<!-- 不用逗号断句:靠「暖橙强调 + 深墨正文」的色差自然切分两个短句 -->
|
||||
<text class="hero-title-accent">专业陪诊</text>
|
||||
<text class="hero-title-main">让就医更省心</text>
|
||||
</view>
|
||||
<text class="hero-sub">实名认证陪诊师 · 经验丰富 · 熟悉各大医院流程</text>
|
||||
<!-- 主行动按钮:通栏胶囊。首屏先引导新用户了解服务(陪诊指南),
|
||||
服务列表入口放在指南页底部,转化路径为「指南 → 查看服务」 -->
|
||||
<view class="hero-cta" bindtap="goToGuide">
|
||||
<text class="hero-cta-text">陪诊指南</text>
|
||||
<t-icon name="chevron-right" size="28rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务卡片 -->
|
||||
<view class="service-cards">
|
||||
<view class="service-card" bindtap="goToAiChat">
|
||||
<view class="card-content">
|
||||
<view class="card-badge">AI</view>
|
||||
<text class="card-title">客服咨询</text>
|
||||
<text class="card-en">Customer Service</text>
|
||||
<!-- ② 客服与联系:两张同款白卡并排,图标统一走浅橙衬底 -->
|
||||
<view class="contact-row">
|
||||
<view class="contact-card" bindtap="goToAiChat">
|
||||
<view class="contact-icon">
|
||||
<!-- 用品牌 AI 图标(气泡内 AI 字),已按调色板着色为 #9A3412 -->
|
||||
<image class="contact-icon-img" src="/images/ai-ink.png" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="card-icon-wrap">
|
||||
<image class="card-img" src="/images/ai-yellow.png" mode="aspectFit"></image>
|
||||
<view class="contact-info">
|
||||
<text class="contact-name">在线咨询</text>
|
||||
<text class="contact-en">AI 客服</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-card vip" bindtap="goToContact">
|
||||
<view class="card-content">
|
||||
<view class="card-badge vip-badge">24H</view>
|
||||
<text class="card-title">联系我们</text>
|
||||
<text class="card-en">Contact Us</text>
|
||||
<!-- 联系我们不再是直接拨号,改为进入独立页(页内可拨号/复制/看工作时间) -->
|
||||
<view class="contact-card" bindtap="goToContactPage">
|
||||
<view class="contact-icon">
|
||||
<t-icon name="call" size="32rpx" color="#9A3412" />
|
||||
</view>
|
||||
<view class="card-icon-wrap vip-icon-wrap">
|
||||
<image class="card-img" src="/images/call.png" mode="aspectFit"></image>
|
||||
<view class="contact-info">
|
||||
<text class="contact-name">联系我们</text>
|
||||
<text class="contact-en">人工客服</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 助诊服务 -->
|
||||
<view class="section-card">
|
||||
<view class="section-header">
|
||||
<view class="section-title-wrap">
|
||||
<view class="section-accent"></view>
|
||||
<text class="section-title">助诊服务</text>
|
||||
</view>
|
||||
<view class="section-more" bindtap="goToServiceList">
|
||||
<text>全部</text>
|
||||
<t-icon name="chevron-right" size="24rpx" class="more-icon"/>
|
||||
</view>
|
||||
<!-- ③ 陪诊服务:白卡内 4 列两项宫格,浅橙衬底 + 暖橙线图标 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">陪诊服务</text>
|
||||
</view>
|
||||
<view class="assist-grid">
|
||||
<view class="assist-item" wx:for="{{ escortServices }}" wx:key="id" bindtap="goToAssistDetail" data-id="{{ item.id }}">
|
||||
<view class="assist-icon-circle" style="background: {{ item.bgColor }}; border-color: {{ item.bgColor }};">
|
||||
<t-icon name="{{ item.icon }}" class="assist-icon" size="44rpx" color="{{ item.iconColor }}" />
|
||||
|
||||
<view class="assist-card">
|
||||
<view class="assist-grid">
|
||||
<view class="assist-item" wx:for="{{ escortServices }}" wx:key="id" data-id="{{ item.id }}" bindtap="goToServiceDetail">
|
||||
<!-- 细线图标:图形由 index.wxss 内嵌 SVG 提供,类名后缀是服务 id。
|
||||
不加衬底方块,避免 8 个同色浅橙块平铺 -->
|
||||
<view class="assist-icon {{ item.iconClass }}"></view>
|
||||
<text class="assist-name">{{ item.name }}</text>
|
||||
</view>
|
||||
<text class="assist-name">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 其他业务 -->
|
||||
<view class="section-card">
|
||||
<view class="section-header">
|
||||
<view class="section-title-wrap">
|
||||
<view class="section-accent"></view>
|
||||
<text class="section-title">其他业务</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="assist-grid">
|
||||
<view class="assist-item" wx:for="{{ otherServices }}" wx:key="id" bindtap="goToOtherServicesDetail" data-item="{{ item }}">
|
||||
<view class="assist-icon-circle" style="background: {{ item.bgColor }}; border-color: {{ item.bgColor }};">
|
||||
<t-icon name="{{ item.icon }}" class="assist-icon" size="44rpx" color="{{ item.iconColor }}" />
|
||||
</view>
|
||||
<text class="assist-name">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的 -->
|
||||
<view class="section-card">
|
||||
<view class="section-header">
|
||||
<view class="section-title-wrap">
|
||||
<view class="section-accent"></view>
|
||||
<text class="section-title">我的信息</text>
|
||||
</view>
|
||||
<!-- ④ 常用功能:待服务提醒 + 双列入口卡 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">常用功能</text>
|
||||
</view>
|
||||
<view class="assist-grid">
|
||||
<view class="assist-item" wx:for="{{ tools }}" wx:key="id" bindtap="goToOtherServicesDetail" data-item="{{ item }}">
|
||||
<view class="assist-icon-circle" style="background: {{ item.bgColor }}; border-color: {{ item.bgColor }};">
|
||||
<t-icon name="{{ item.icon }}" class="assist-icon" size="44rpx" color="{{ item.iconColor }}" />
|
||||
|
||||
<!-- 状态条:仅当存在待服务订单时展示 -->
|
||||
<view class="order-tip" wx:if="{{ pendingCount > 0 }}" bindtap="goToRecords">
|
||||
<view class="order-dot"></view>
|
||||
<text class="order-tip-text">您有 {{ pendingCount }} 个待服务订单</text>
|
||||
<t-icon name="chevron-right" size="26rpx" color="#0F766E" />
|
||||
</view>
|
||||
|
||||
<view class="quick-list">
|
||||
<view class="quick-item" wx:for="{{ quickEntries }}" wx:key="id" data-item="{{ item }}" bindtap="onQuickEntryTap">
|
||||
<!-- 两个入口统一走暖橙 + 浅橙衬底,不做色相区分 -->
|
||||
<view class="quick-icon">
|
||||
<t-icon name="{{ item.icon }}" size="34rpx" color="#9A3412" />
|
||||
</view>
|
||||
<view class="quick-info">
|
||||
<text class="quick-name">{{ item.name }}</text>
|
||||
<text class="quick-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
<text class="assist-name">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ⑤ 页脚:B 端合作入口(商务合作 / 陪诊师入驻 / 陪诊师考证),
|
||||
点击统一转服务电话,与「我的」页页脚同构 -->
|
||||
<view class="page-footer">
|
||||
<view class="footer-links">
|
||||
<text class="footer-link" bindtap="goToContact">商务合作</text>
|
||||
<text class="footer-sep">·</text>
|
||||
<text class="footer-link" bindtap="goToContact">陪诊师入驻</text>
|
||||
<text class="footer-sep">·</text>
|
||||
<text class="footer-link" bindtap="goToContact">陪诊师考证</text>
|
||||
</view>
|
||||
<text class="footer-note">WARM ESCORT · 用心陪好每一步</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部留白 -->
|
||||
<view class="footer-space"></view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,233 +1,263 @@
|
||||
/* ===== 首页 · 暖白纸面 × 单一暖橙(按参考图设计语言重做) =====
|
||||
参考图要点:
|
||||
- 暖白纸面 + 纯白圆角卡片 + 米色发丝边,阴影极轻,几乎只靠留白分层
|
||||
- 单一暖橙主色:实心按钮/标识走深一档,浅橙衬底承载图标与标签
|
||||
- 大量圆角方形衬底 + 彩色线图标
|
||||
- 大字号标题直接落在纸面上,不用整块色面板压首屏 */
|
||||
|
||||
page {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
/* 暖橙主色阶:strong 是实心块/按钮(白字需 ≥4.5:1、白图标需 ≥3:1),
|
||||
soft 是衬底,ink 是浅衬底上的文字与线图标 */
|
||||
--brand: #F97316; /* 主色:仅装饰性小色块 */
|
||||
--brand-strong: #C2410C; /* 实心按钮 / 选中态:白字 4.69:1,过 AA 正文 */
|
||||
--brand-soft: #FFF4E8; /* 图标衬底、标签底 */
|
||||
--brand-line: #FFE0C2; /* 浅橙衬底的描边 */
|
||||
--brand-ink: #9A3412; /* 浅橙衬底上的文字/图标:6.8:1,过 AA */
|
||||
|
||||
/* 状态色:全页唯一的冷色,只用在「待服务订单」提醒条上。
|
||||
作用是制造唯一焦点——整页暖橙平铺时需要一个"该看这里"的落点 */
|
||||
--status-soft: #ECF7F4;
|
||||
--status-line: #C7E5DF;
|
||||
--status-ink: #0F766E; /* #ECF7F4 上 5.0:1,过 AA 正文 */
|
||||
|
||||
/* 中性:暖灰阶,与暖白纸面同温(冷灰会让白卡边缘发青) */
|
||||
--ink: #2B2521;
|
||||
--ink-2: #4A4038;
|
||||
--muted: #7A7068; /* 白底 4.8:1,过 AA 正文 */
|
||||
--faint: #A79C92; /* 仅用于非文字装饰 */
|
||||
--line: #F0E9E0; /* 米色发丝边 */
|
||||
--paper: #FAF6F0; /* 暖白纸面 */
|
||||
--white: #FFFFFF;
|
||||
|
||||
--shadow-card: 0 2rpx 10rpx rgba(63, 43, 25, 0.04);
|
||||
--shadow-cta: 0 6rpx 16rpx rgba(194, 65, 12, 0.22);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: #F3F4F6;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 22rpx 22rpx;
|
||||
padding: 0 32rpx 40rpx;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
/* ===== 顶部品牌行 ===== */
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 120rpx 0 24rpx;
|
||||
padding: 120rpx 0 0;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo-icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: rgba(249, 115, 22, 0.8);
|
||||
margin-left: 14rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
/* Banner区域 */
|
||||
.banner-section {
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.banner-card {
|
||||
position: relative;
|
||||
border-radius: 28rpx;
|
||||
overflow: hidden;
|
||||
height: 320rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.banner-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.banner-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, rgba(249, 115, 22, 0.8) 0%, rgba(251, 146, 60, 0.5) 50%, rgba(251, 191, 36, 0.15) 100%);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.banner-text {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.banner-title {
|
||||
font-size: 50rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
letter-spacing: 6rpx;
|
||||
line-height: 1.2;
|
||||
text-shadow: 0 4rpx 16rpx rgba(234, 88, 12, 0.3);
|
||||
}
|
||||
|
||||
.banner-en {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
letter-spacing: 4rpx;
|
||||
margin-top: 16rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 服务卡片 */
|
||||
.service-cards {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
flex: 1;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 28rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.service-card:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.card-badge {
|
||||
align-self: flex-start;
|
||||
background: #FEF3C7;
|
||||
color: #D97706;
|
||||
font-size: 20rpx;
|
||||
font-weight: 700;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 14rpx;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.vip-badge {
|
||||
background: #DBEAFE;
|
||||
color: #2563EB;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #111827;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.card-en {
|
||||
font-size: 20rpx;
|
||||
color: #9CA3AF;
|
||||
line-height: 1.3;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.card-icon-wrap {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 22rpx;
|
||||
background: #FEF9C3;
|
||||
/* 品牌印记:实心暖橙圆角方块 + 白色品牌 Logo。
|
||||
Logo 是白色线稿(心形 + 圆点)、透明底,必须压在有色底上才可见,
|
||||
40rpx 是经真机像素验证后仍能辨认轮廓的最小尺寸 */
|
||||
.brand-mark {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 16rpx;
|
||||
background: var(--brand-strong);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4rpx 12rpx rgba(194, 65, 12, 0.22);
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
margin-left: 16rpx;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* 右上角胶囊标签:浅橙底 + 橙字,是参考图里「标签组件」的最小形态 */
|
||||
.topbar-tag {
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== ① 头部:大字标题直接落在纸面上 ===== */
|
||||
.hero {
|
||||
padding: 44rpx 0 0;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
display: block;
|
||||
/* 52rpx(26px) 仍在 WCAG"大字"门槛(18pt/24px)之上:
|
||||
深墨 #2B2521 压暖白纸面实测 13:1+,无论字重都稳过 AA */
|
||||
font-size: 52rpx;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2rpx;
|
||||
line-height: 1.36;
|
||||
}
|
||||
|
||||
/* 不用逗号断句:靠「暖橙强调 + 深墨正文」的色差切分两个短句。
|
||||
两段合计 11 字 × (52rpx + 2rpx 字距) + 10rpx 间隔 ≈ 604rpx,
|
||||
小于容器内宽 686rpx(750 - 32×2 页边距),不会折行 */
|
||||
.hero-title-accent {
|
||||
color: var(--brand-strong); /* 暖白纸面上 5.0:1,过 AA */
|
||||
}
|
||||
|
||||
.hero-title-main {
|
||||
color: var(--ink);
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.hero-sub {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* 主行动按钮:通栏胶囊,参考图的主按钮语言 */
|
||||
.hero-cta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 36rpx;
|
||||
padding: 26rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--brand-strong);
|
||||
box-shadow: var(--shadow-cta);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.hero-cta:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.hero-cta-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--white);
|
||||
letter-spacing: 2rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
/* ===== ② 客服与联系 ===== */
|
||||
.contact-row {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.contact-card {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 26rpx 22rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
/* 发丝边 + 紧阴影:白卡压在暖白纸面上时,仅靠阴影分不出边界 */
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.contact-card:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* 浅橙衬底的圆角方块:与参考图「软衬底 + 彩色线图标」一致 */
|
||||
.contact-icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.vip-icon-wrap {
|
||||
background: #DBEAFE;
|
||||
}
|
||||
|
||||
.card-img {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
/* 通用区块卡片 */
|
||||
.section-card {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
margin-top: 24rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.section-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.section-accent {
|
||||
width: 6rpx;
|
||||
/* AI 品牌图标是位图(无图标字体可用),按「联系我们」的 32rpx 图标对齐 */
|
||||
.contact-icon-img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
background: #F59E0B;
|
||||
}
|
||||
|
||||
.contact-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.contact-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.contact-en {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
margin-top: 4rpx;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 通用区块 ===== */
|
||||
.section {
|
||||
margin-top: 56rpx;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
|
||||
/* 区块标识:单竖条。原「实心橙方块 + 白图标」在页面上已是第三、四个橙色实心块,
|
||||
与顶部品牌印记撞语言,且 26rpx 的白图标过小看不清;改竖条后视觉更轻,
|
||||
把重心让给下方的服务宫格与功能卡。条高与 34rpx 标题齐平,避免细条显单薄 */
|
||||
.section-bar {
|
||||
width: 8rpx;
|
||||
height: 34rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 14rpx;
|
||||
background: var(--brand-strong);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #111827;
|
||||
letter-spacing: 2rpx;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.section-more {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #6B7280;
|
||||
font-weight: 500;
|
||||
/* ===== ③ 陪诊服务 ===== */
|
||||
.assist-card {
|
||||
padding: 16rpx 8rpx 20rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.more-icon {
|
||||
margin-left: 4rpx;
|
||||
color: #9CA3AF;
|
||||
}
|
||||
|
||||
/* 网格 */
|
||||
.assist-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -238,36 +268,197 @@ page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
padding: 26rpx 0;
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.assist-item:active {
|
||||
transform: scale(0.95);
|
||||
transform: scale(0.94);
|
||||
}
|
||||
|
||||
.assist-icon-circle {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
/* 纤细线图标:24x24 网格、stroke-width 1.5、暖橙 #C2410C,base64 内嵌避免引入图标字体。
|
||||
56rpx(28px) 是过 WCAG 非文本 3:1 后兼顾真机清晰度的尺寸。
|
||||
图标直接落在白卡上、不加衬底方块:8 个同色浅橙方块平铺会让整页变得均匀寡淡 */
|
||||
.assist-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
/* 1 全天陪诊:整圈表盘 + 指针 */
|
||||
.assist-icon-1 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4LjUiLz48cGF0aCBkPSJNMTIgNi42VjEybDMuOCAyLjIiLz48L3N2Zz4=");
|
||||
}
|
||||
|
||||
/* 2 半天陪诊:半月形表盘,与 1 形成"全 / 半"对照 */
|
||||
.assist-icon-2 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNMTIgMy41YTguNSA4LjUgMCAwIDEgMCAxN1oiLz48cGF0aCBkPSJNMTIgMTJoNC42Ii8+PC9zdmc+");
|
||||
}
|
||||
|
||||
/* 3 代问诊:对话气泡 + 医疗十字 */
|
||||
.assist-icon-3 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNMjAgMTQuNWEyLjUgMi41IDAgMCAxLTIuNSAyLjVIOGwtNCAzLjVWNmEyLjUgMi41IDAgMCAxIDIuNS0yLjVoMTFBMi41IDIuNSAwIDAgMSAyMCA2WiIvPjxwYXRoIGQ9Ik0xMiA3LjZ2NS4yTTkuNCAxMC4yaDUuMiIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
/* 4 检查预约:日历 + 对勾 */
|
||||
.assist-icon-4 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIzLjUiIHk9IjUiIHdpZHRoPSIxNyIgaGVpZ2h0PSIxNS41IiByeD0iMi41Ii8+PHBhdGggZD0iTTggM3Y0TTE2IDN2NE0zLjUgOS41aDE3Ii8+PHBhdGggZD0ibTkuNCAxNSAxLjkgMS45IDMuNy00Ii8+PC9zdmc+");
|
||||
}
|
||||
|
||||
/* 5 出入院代办:医院楼 + 地面 + 十字 */
|
||||
.assist-icon-5 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNNC41IDIwLjVWNi41YTIgMiAwIDAgMSAyLTJoMTFhMiAyIDAgMCAxIDIgMnYxNCIvPjxwYXRoIGQ9Ik0yLjUgMjAuNWgxOSIvPjxwYXRoIGQ9Ik0xMiA4LjZ2NU05LjUgMTEuMWg1Ii8+PC9zdmc+");
|
||||
}
|
||||
|
||||
/* 6 跑腿服务:包裹箱 */
|
||||
.assist-icon-6 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNMjAuNSA4LjJ2Ny42YTEuNiAxLjYgMCAwIDEtLjg0IDEuNDJsLTYuOSAzLjhhMS42IDEuNiAwIDAgMS0xLjUyIDBsLTYuOS0zLjhBMS42IDEuNiAwIDAgMSAzLjUgMTUuOFY4LjJhMS42IDEuNiAwIDAgMSAuODQtMS40Mmw2LjktMy44YTEuNiAxLjYgMCAwIDEgMS41MiAwbDYuOSAzLjhBMS42IDEuNiAwIDAgMSAyMC41IDguMloiLz48cGF0aCBkPSJNMy45IDcuMyAxMiAxMS43bDguMS00LjRNMTIgMTEuN1YyMSIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
/* 7 陪诊套餐:礼盒 */
|
||||
.assist-icon-7 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIzIiB5PSI3LjUiIHdpZHRoPSIxOCIgaGVpZ2h0PSI0LjUiIHJ4PSIxLjIiLz48cGF0aCBkPSJNNC41IDEydjcuNUExLjUgMS41IDAgMCAwIDYgMjFoMTJhMS41IDEuNSAwIDAgMCAxLjUtMS41VjEyIi8+PHBhdGggZD0iTTEyIDcuNVYyMSIvPjxwYXRoIGQ9Ik0xMiA3LjVIOS4yYTIuMyAyLjMgMCAxIDEgMC00LjZDMTAuNyAyLjkgMTIgNy41IDEyIDcuNVoiLz48cGF0aCBkPSJNMTIgNy41aDIuOGEyLjMgMi4zIDAgMSAwIDAtNC42QzEzLjMgMi45IDEyIDcuNSAxMiA3LjVaIi8+PC9zdmc+");
|
||||
}
|
||||
|
||||
/* 8 买药套餐:胶囊 */
|
||||
.assist-icon-8 {
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzI0MTBDIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIyLjUiIHk9IjkiIHdpZHRoPSIxOSIgaGVpZ2h0PSI2IiByeD0iMyIvPjxwYXRoIGQ9Ik0xMiA5djYiLz48L3N2Zz4=");
|
||||
}
|
||||
|
||||
/* 宫格项名统一走 28rpx 标题档(与 .contact-name / .quick-name 同级)。
|
||||
5 字项名「出入院代办」= 140rpx,小于列宽 167rpx,不折行 */
|
||||
.assist-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
|
||||
/* ===== ④ 常用功能 ===== */
|
||||
/* 全页唯一的状态色:这是唯一"需要用户行动"的信息,用它把视线钉住 */
|
||||
.order-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 22rpx 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--status-soft);
|
||||
border: 2rpx solid var(--status-line);
|
||||
}
|
||||
|
||||
.order-tip:active {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.order-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: var(--status-ink);
|
||||
margin-right: 14rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.order-tip-text {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--status-ink);
|
||||
}
|
||||
|
||||
/* 仅两个入口时,通栏列表右侧大面积留白;改为双列卡片,图标在上、文字在下 */
|
||||
.quick-list {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.quick-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 24rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.quick-item:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.quick-icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 16rpx;
|
||||
background: #F9FAFB;
|
||||
border: 2rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.assist-icon {
|
||||
color: #4B5563;
|
||||
.quick-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.assist-name {
|
||||
.quick-name {
|
||||
font-size: 28rpx;
|
||||
color: #4B5563;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 40rpx;
|
||||
.quick-desc {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
/* ===== ⑤ 页脚 ===== */
|
||||
.page-footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 64rpx;
|
||||
padding-top: 32rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
/* B 端合作文字链:低调但可读,点击转服务电话 */
|
||||
.footer-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.footer-link {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted); /* 暖白底 4.83:1,过 AA 正文 */
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.footer-link:active {
|
||||
color: var(--brand-strong);
|
||||
}
|
||||
|
||||
.footer-sep {
|
||||
font-size: 24rpx;
|
||||
color: var(--faint); /* 仅作装饰分隔,不承载信息 */
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
|
||||
.footer-note {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
/* 自定义 tabBar 是 fixed 脱离文档流的,这里补足它的高度,否则页脚会被盖住 */
|
||||
.footer-space {
|
||||
height: calc(140rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// 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: '暖橙陪诊'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "联系我们",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--pages/mine/contact.wxml-->
|
||||
<view class="page-bg">
|
||||
<view class="container">
|
||||
|
||||
<!-- 头部:小色带 + 白底(内页规范,不做整块主色面板) -->
|
||||
<view class="page-header">
|
||||
<view class="header-accent"></view>
|
||||
<text class="header-title">联系我们</text>
|
||||
<text class="header-subtitle">人工客服在线,有问题随时找我们</text>
|
||||
</view>
|
||||
|
||||
<!-- 联系方式:action 决定点击行为(call 拨号 / copy 复制) -->
|
||||
<view class="card">
|
||||
<view class="contact-item" wx:for="{{ contactItems }}" wx:key="label"
|
||||
data-action="{{ item.action }}" data-value="{{ item.value }}" bindtap="onItemTap">
|
||||
<view class="contact-icon">
|
||||
<t-icon name="{{ item.icon }}" size="32rpx" color="#9A3412" />
|
||||
</view>
|
||||
<view class="contact-info">
|
||||
<text class="contact-label">{{ item.label }}</text>
|
||||
<text class="contact-value">{{ item.value }}</text>
|
||||
</view>
|
||||
<text class="contact-action" wx:if="{{ item.action === 'call' }}">拨打</text>
|
||||
<text class="contact-action" wx:elif="{{ item.action === 'copy' }}">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示:非工作时间的兜底沟通方式 -->
|
||||
<view class="tips-card">
|
||||
<text class="tips-text">服务时间外如需帮助,可在「AI客服」留言,我们会在工作时间内回复您。</text>
|
||||
</view>
|
||||
|
||||
<view class="footer-space"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,145 @@
|
||||
/* pages/mine/contact.wxss
|
||||
与首页、陪诊指南页共用一套暖橙 + 暖白令牌,保证内页风格一致 */
|
||||
page {
|
||||
--brand-strong: #C2410C; /* 实心块/按钮:白字 4.69:1,过 AA 正文 */
|
||||
--brand-soft: #FFF4E8; /* 图标衬底、标签底 */
|
||||
--brand-line: #FFE0C2; /* 浅橙衬底描边 */
|
||||
--brand-ink: #9A3412; /* 浅橙衬底上的文字/图标:6.8:1,过 AA */
|
||||
|
||||
--ink: #2B2521;
|
||||
--muted: #7A7068; /* 白底 4.8:1,过 AA 正文 */
|
||||
--line: #F0E9E0; /* 米色发丝边 */
|
||||
--paper: #FAF6F0; /* 暖白纸面 */
|
||||
--white: #FFFFFF;
|
||||
|
||||
--shadow-card: 0 2rpx 10rpx rgba(63, 43, 25, 0.04);
|
||||
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
/* ===== 头部:小色带 + 深墨标题 ===== */
|
||||
.page-header {
|
||||
padding: 24rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.header-accent {
|
||||
width: 64rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
background: var(--brand-strong);
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 46rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 联系方式卡片 ===== */
|
||||
.card {
|
||||
margin-top: 32rpx;
|
||||
padding: 8rpx 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.contact-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 26rpx 0;
|
||||
border-bottom: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.contact-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.contact-item:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* 浅橙衬底圆角方块:与首页 .contact-icon 同构 */
|
||||
.contact-icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 18rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.contact-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.contact-label {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.contact-value {
|
||||
margin-top: 6rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 右侧动作标签:浅橙底 + 橙字,提示这一行可点 */
|
||||
.contact-action {
|
||||
flex-shrink: 0;
|
||||
margin-left: 16rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ===== 提示条 ===== */
|
||||
.tips-card {
|
||||
margin-top: 24rpx;
|
||||
padding: 24rpx 26rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.tips-text {
|
||||
font-size: 26rpx;
|
||||
color: var(--brand-ink);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 60rpx;
|
||||
}
|
||||
@@ -52,6 +52,12 @@ Page({
|
||||
|
||||
onShow() {
|
||||
this.loadUserInfo()
|
||||
// 同步自定义 tabBar 选中态(我的为第 2 项)
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
selected: 2
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
loadUserInfo() {
|
||||
@@ -126,7 +132,9 @@ Page({
|
||||
},
|
||||
|
||||
onTapHealth() {
|
||||
wx.showToast({ title: '正在建设中', icon: 'none' })
|
||||
wx.navigateTo({
|
||||
url: '/pages/health/profilelist'
|
||||
})
|
||||
},
|
||||
|
||||
onHealthClose() {
|
||||
@@ -149,6 +157,13 @@ Page({
|
||||
this.setData({ settingVisible: true })
|
||||
},
|
||||
|
||||
// 页脚 B 端合作链接:暂无独立页面,统一转接人工客服
|
||||
onFooterTap() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: '18618162956'
|
||||
})
|
||||
},
|
||||
|
||||
onSettingClose() {
|
||||
this.setData({ settingVisible: false })
|
||||
},
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
</view>
|
||||
|
||||
<view class="footer-section">
|
||||
<!-- B 端合作入口:从首页移入,避免干扰患者/家属的主流程 -->
|
||||
<view class="footer-links">
|
||||
<text class="footer-link" bindtap="onFooterTap">企业/机构合作</text>
|
||||
<text class="footer-sep">·</text>
|
||||
<text class="footer-link" bindtap="onFooterTap">陪诊师入驻</text>
|
||||
<text class="footer-sep">·</text>
|
||||
<text class="footer-link" bindtap="onFooterTap">商务合作</text>
|
||||
</view>
|
||||
<text class="version">版本号:V 1.1.3</text>
|
||||
<text class="copyright">© 2026 北京奕华盛科技 版权所有</text>
|
||||
</view>
|
||||
|
||||
@@ -7,6 +7,8 @@ page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* 给 fixed 的自定义 tabBar 留位,避免底部版权被盖住 */
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.header-card {
|
||||
@@ -141,6 +143,28 @@ page {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* B 端合作链接:从首页移入,样式沿用首页页脚的低调文字链 */
|
||||
.footer-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.footer-link {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.footer-link:active {
|
||||
color: #22A45D;
|
||||
}
|
||||
|
||||
.footer-sep {
|
||||
font-size: 24rpx;
|
||||
color: #D4D4D8;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: 24rpx;
|
||||
color: #B0B0B0;
|
||||
|
||||
@@ -18,6 +18,15 @@ const API = {
|
||||
deleteRecord: (id) => request.delete(`/health/escort-record/${id}`),
|
||||
},
|
||||
|
||||
// 健康档案(就诊人):后端强制以 token 中的用户为准,无需传 userId
|
||||
healthProfile: {
|
||||
getMyProfiles: (params) => request.get('/health/health-profile/mine', params),
|
||||
getMyProfileById: (id) => request.get(`/health/health-profile/mine/${id}`),
|
||||
createMyProfile: (data) => request.post('/health/health-profile/mine', data),
|
||||
updateMyProfile: (id, data) => request.put(`/health/health-profile/mine/${id}`, data),
|
||||
deleteMyProfile: (id) => request.delete(`/health/health-profile/mine/${id}`),
|
||||
},
|
||||
|
||||
resource: {
|
||||
getServices: (params) => request.get('/health/service', params),
|
||||
getAgreement: (params) => request.get('/health/agreement', params),
|
||||
|
||||