Compare commits
1
Commits
136b3111cf
...
179b059250
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
179b059250 |
@@ -35,36 +35,6 @@ App({
|
||||
})
|
||||
})
|
||||
|
||||
this.globalData.hospitalInfoReady = new Promise((resolve) => {
|
||||
API.resource.getHospitalInfo().then((data) => {
|
||||
this.globalData.hospitalInfo = data.data.hospitalInfo
|
||||
resolve(data.data.hospitalInfo)
|
||||
}).catch((err) => {
|
||||
console.error('获取医院信息失败', err)
|
||||
resolve([])
|
||||
})
|
||||
})
|
||||
|
||||
this.globalData.hospitalRankingReady = new Promise((resolve) => {
|
||||
API.resource.getHospitalRanking().then((data) => {
|
||||
this.globalData.hospitalRanking = data.data.hospitalRanking
|
||||
resolve(data.data.hospitalRanking)
|
||||
}).catch((err) => {
|
||||
console.error('获取医院排名失败', err)
|
||||
resolve([])
|
||||
})
|
||||
})
|
||||
|
||||
this.globalData.departmentRankingsReady = new Promise((resolve) => {
|
||||
API.resource.getDepartmentRankings().then((data) => {
|
||||
this.globalData.departmentRankings = data.data.departmentRankings
|
||||
resolve(data.data.departmentRankings)
|
||||
}).catch((err) => {
|
||||
console.error('获取科室排名失败', err)
|
||||
resolve([])
|
||||
})
|
||||
})
|
||||
|
||||
this.checkUpdate();
|
||||
},
|
||||
|
||||
@@ -188,8 +158,5 @@ App({
|
||||
chatSocket: null,
|
||||
services: [],
|
||||
agreement: null,
|
||||
hospitalInfo: [],
|
||||
hospitalRanking: [],
|
||||
departmentRankings: [],
|
||||
}
|
||||
})
|
||||
@@ -17,9 +17,8 @@
|
||||
"pages/mine/addressedit",
|
||||
"pages/mine/about",
|
||||
"pages/mine/contact",
|
||||
"pages/hospital/contact",
|
||||
"pages/hospital/ranking",
|
||||
"pages/home/webview"
|
||||
"pages/home/webview",
|
||||
"pages/mine/business"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
||||
@@ -49,8 +49,7 @@ doc/
|
||||
| `pages/mine/mine` | 我的 |
|
||||
| `pages/mine/about` | 关于 |
|
||||
| `pages/mine/contact` | 联系我们 |
|
||||
| `pages/hospital/contact` | 医院联系 |
|
||||
| `pages/hospital/ranking` | 医院排行 |
|
||||
| `pages/mine/business` | 合作与入驻(商务合作 / 陪诊师入驻 / 陪诊师培训,入口自首页与「我的」页页脚) |
|
||||
| `pages/home/webview` | 网页容器 |
|
||||
|
||||
## 约定
|
||||
@@ -58,4 +57,4 @@ doc/
|
||||
- **配色**:见 `doc/DESIGN.md`。色板令牌集中在 `app.wxss` 的 `page{}`,改配色只改这一处。
|
||||
- **接口**:统一走 `utils/request.js`,基址 `https://api.huashengtec.com`(本地调试可改用文件内注释的 `127.0.0.1:9004`);请求自动携带 `appId=wxapp-escort` 与登录 token。
|
||||
- **登录**:`app.js` 的 `onShow` 调 `wx.login` 换 token,存于 `globalData.user`。
|
||||
- **全局数据**:服务列表 / 协议 / 医院信息 / 排行在 `onLaunch` 预取,挂到 `globalData` 供各页取用。
|
||||
- **全局数据**:服务列表 / 协议在 `onLaunch` 预取,挂到 `globalData` 供各页取用。
|
||||
+21
-19
@@ -9,7 +9,27 @@
|
||||
<text class="header-subtitle">第一次用陪诊?三分钟看懂全流程</text>
|
||||
</view>
|
||||
|
||||
<!-- ① 服务流程:下单到完成的通用环节 -->
|
||||
<!-- ① 就诊前准备:到院前建议提前办妥或备齐的事项。
|
||||
放在服务流程之前——用户打开指南时最急的是"我该带什么、先办什么",
|
||||
流程是读完之后才需要的背景 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<!-- 原 info-circle 只是个「信息」圆标,与「准备清单」无关;
|
||||
换成 task-checked(勾选清单),与卡内逐条勾对的读法一致 -->
|
||||
<t-icon name="task-checked" size="26rpx" color="#9B4508" />
|
||||
</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">
|
||||
<!-- 卡片头标识走全站「浅橙衬底 + 暖橙图标」语言,实心橙只留给底部 CTA(DESIGN.md §2.1)。
|
||||
@@ -32,24 +52,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ② 就诊前准备:到院前建议提前办妥或备齐的事项 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<!-- 原 info-circle 只是个「信息」圆标,与「准备清单」无关;
|
||||
换成 task-checked(勾选清单),与卡内逐条勾对的读法一致 -->
|
||||
<t-icon name="task-checked" size="26rpx" color="#9B4508" />
|
||||
</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">
|
||||
|
||||
+5
-14
@@ -22,9 +22,6 @@ const SERVICE_ORDER = [1, 2, 7, 3, 4, 5, 8, 6]
|
||||
// 计入"待服务订单"的订单状态:待确认 / 已确认 / 进行中
|
||||
const PENDING_ORDER_STATUS = ['pending', 'confirmed', 'in_progress']
|
||||
|
||||
// 人工客服电话
|
||||
const SERVICE_PHONE = '18618162956'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
escortServices: [], // 陪诊服务(来自后端,按 SERVICE_ORDER 展示)
|
||||
@@ -138,10 +135,11 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 页脚 B 端合作入口仍直接转服务电话
|
||||
goToContact() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: SERVICE_PHONE
|
||||
// 页脚三个 B 端入口:都进「合作与入驻」页,用 section 定位到各自的卡片
|
||||
goToBusiness(e) {
|
||||
const section = e.currentTarget.dataset.section || ''
|
||||
wx.navigateTo({
|
||||
url: `/pages/mine/business?section=${section}`
|
||||
});
|
||||
},
|
||||
|
||||
@@ -160,13 +158,6 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
// 介绍卡信任行:「实名专业陪诊师」→ 陪诊师公示页
|
||||
goToAttendants() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/attendant/attendantlist'
|
||||
});
|
||||
},
|
||||
|
||||
// 点击陪诊服务,直达服务详情下单
|
||||
goToServiceDetail(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
|
||||
+9
-12
@@ -81,15 +81,11 @@
|
||||
<view class="intro-card">
|
||||
<text class="intro-desc">做你和医生之间,最省心的那座桥。</text>
|
||||
<!-- 信任行:三项信任背书单行小字,从首屏下沉至此。
|
||||
"专业"是定性描述,故不称"可验证事实" -->
|
||||
"专业"是定性描述,故不称"可验证事实"。
|
||||
三项现状均纯展示不可点——「实名专业陪诊师」原先带 chevron 跳陪诊师公示页,
|
||||
现已摘掉入口,故连 chevron 一并去掉,否则会留一个点了没反应的点击暗示 -->
|
||||
<view class="intro-trust">
|
||||
<!-- 「实名专业陪诊师」是陪诊师公示页的入口。
|
||||
按全站约定「可点项必须有显性暗示」,故在其后补一个 chevron;
|
||||
另两项保持纯展示 -->
|
||||
<view class="intro-trust-link" bindtap="goToAttendants">
|
||||
<text class="intro-trust-item">实名专业陪诊师</text>
|
||||
<t-icon name="chevron-right" size="22rpx" color="#6F655C" />
|
||||
</view>
|
||||
<text class="intro-trust-item">实名专业陪诊师</text>
|
||||
<view class="intro-trust-sep"></view>
|
||||
<text class="intro-trust-item">熟悉医院流程</text>
|
||||
<view class="intro-trust-sep"></view>
|
||||
@@ -132,14 +128,15 @@
|
||||
</view>
|
||||
|
||||
<!-- ④ 页脚:B 端合作入口(商务合作 / 陪诊师入驻 / 陪诊师考证),
|
||||
点击统一转服务电话,与「我的」页页脚同构 -->
|
||||
三条都进「合作与入驻」页,各自用 section 定位到对应卡片。
|
||||
该页底部再转「联系我们」——咨询出口只保留一个,避免同一意图两个入口 -->
|
||||
<view class="page-footer">
|
||||
<view class="footer-links">
|
||||
<text class="footer-link" bindtap="goToContact">商务合作</text>
|
||||
<text class="footer-link" data-section="sec-biz" bindtap="goToBusiness">商务合作</text>
|
||||
<view class="footer-sep"></view>
|
||||
<text class="footer-link" bindtap="goToContact">陪诊师入驻</text>
|
||||
<text class="footer-link" data-section="sec-join" bindtap="goToBusiness">陪诊师入驻</text>
|
||||
<view class="footer-sep"></view>
|
||||
<text class="footer-link" bindtap="goToContact">陪诊师考证</text>
|
||||
<text class="footer-link" data-section="sec-train" bindtap="goToBusiness">陪诊师考证</text>
|
||||
</view>
|
||||
<text class="footer-note">WARM ESCORT · 用心陪好每一步</text>
|
||||
</view>
|
||||
|
||||
@@ -214,24 +214,6 @@ page {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 信任行里唯一的可点项:「实名专业陪诊师」→ 陪诊师公示页。
|
||||
用 padding 16rpx 把热区撑到 56rpx(28px),再配等量负外边距抵消,
|
||||
信任行的行高与另两项保持完全不变 */
|
||||
.intro-trust-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
margin: -16rpx 0;
|
||||
}
|
||||
|
||||
.intro-trust-link:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.intro-trust-link .intro-trust-item {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
/* ===== 通用区块 ===== */
|
||||
.section {
|
||||
margin-top: 56rpx;
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
const app = getApp()
|
||||
|
||||
Page({
|
||||
data: {
|
||||
hospitalInfo: [],
|
||||
loading: true,
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.loadhospitalInfo()
|
||||
},
|
||||
|
||||
loadhospitalInfo() {
|
||||
const appData = app.globalData
|
||||
if (appData.hospitalInfo && appData.hospitalInfo.length > 0) {
|
||||
this.setData({
|
||||
hospitalInfo: appData.hospitalInfo,
|
||||
loading: false,
|
||||
})
|
||||
} else if (appData.hospitalInfoReady) {
|
||||
appData.hospitalInfoReady.then((data) => {
|
||||
this.setData({
|
||||
hospitalInfo: data || [],
|
||||
loading: false,
|
||||
})
|
||||
}).catch(() => {
|
||||
this.setData({
|
||||
hospitalInfo: [],
|
||||
loading: false,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
hospitalInfo: [],
|
||||
loading: false,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onCallPhone(e) {
|
||||
const phone = e.currentTarget.dataset.phone
|
||||
if (!phone) return
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
fail: (err) => {
|
||||
console.error('拨打电话失败', err)
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '医院联系电话',
|
||||
path: '/pages/hospital/contact',
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">主要医院联系电话</text>
|
||||
<text class="subtitle">持续更新中, 仅供参考</text>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{loading}}" class="loading">
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
|
||||
<view wx:elif="{{hospitalInfo.length === 0}}" class="empty">
|
||||
<text>暂无医院信息</text>
|
||||
</view>
|
||||
|
||||
<view wx:else class="list">
|
||||
<view
|
||||
class="item"
|
||||
wx:for="{{hospitalInfo}}"
|
||||
wx:key="id"
|
||||
>
|
||||
<view class="info">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<view class="phones">
|
||||
<view
|
||||
class="phone-wrap"
|
||||
wx:for="{{item.phone}}"
|
||||
wx:for-item="phone"
|
||||
wx:key="*this"
|
||||
data-phone="{{phone.number}}"
|
||||
bindtap="onCallPhone"
|
||||
>
|
||||
<text class="phone">{{phone.number}} </text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,132 +0,0 @@
|
||||
page {
|
||||
background-color: #F5F7F6;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 32rpx;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 120rpx 32rpx 20rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #1F2937;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
/* Header区域 */
|
||||
.header {
|
||||
background: #FFFFFF;
|
||||
padding: 16rpx 24rpx 20rpx 24rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #6B8E7B;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
/* 加载和空状态 */
|
||||
.loading,
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 80rpx 24rpx;
|
||||
color: #6B7280;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
/* 列表区域 */
|
||||
.list {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 12rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #1F2937;
|
||||
line-height: 1.3;
|
||||
margin-bottom: 10rpx;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.phones {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.phone-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
padding: 8rpx 14rpx;
|
||||
background: #FAFAFA;
|
||||
border-radius: 8rpx;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.phone {
|
||||
font-size: 26rpx;
|
||||
color: #2D6A4F;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.action {
|
||||
margin-left: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
// pages/hospital/ranking.js
|
||||
const app = getApp()
|
||||
|
||||
Page({
|
||||
data: {
|
||||
activeTab: 'overall',
|
||||
searchKeyword: '',
|
||||
selectedDepartment: '',
|
||||
rankingYear: '',
|
||||
rankingNote: '',
|
||||
departmentList: [],
|
||||
allHospitals: [],
|
||||
filteredHospitals: [],
|
||||
currentDepartmentRanking: {
|
||||
top10: [],
|
||||
nominated: []
|
||||
},
|
||||
hospitalRankingData: null,
|
||||
departmentRankingsData: null
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (!this.data.hospitalRankingData || !this.data.departmentRankingsData) {
|
||||
this.loadData()
|
||||
}
|
||||
},
|
||||
|
||||
async loadData() {
|
||||
try {
|
||||
const appData = app.globalData
|
||||
|
||||
let hospitalRanking = appData.hospitalRanking
|
||||
let departmentRankings = appData.departmentRankings
|
||||
|
||||
if (!hospitalRanking) {
|
||||
hospitalRanking = await appData.hospitalRankingReady
|
||||
}
|
||||
if (!departmentRankings) {
|
||||
departmentRankings = await appData.departmentRankingsReady
|
||||
}
|
||||
|
||||
this.setData({
|
||||
hospitalRankingData: hospitalRanking,
|
||||
departmentRankingsData: departmentRankings
|
||||
})
|
||||
|
||||
this.processHospitalRanking(hospitalRanking)
|
||||
this.processDepartmentRankings(departmentRankings)
|
||||
} catch (err) {
|
||||
console.error('加载排行榜数据失败', err)
|
||||
wx.showToast({
|
||||
title: '数据加载失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
processHospitalRanking(data) {
|
||||
if (!data || !data.rankings) return
|
||||
|
||||
const gradeClassMap = {
|
||||
'A+++++': 'grade-a5',
|
||||
'A++++': 'grade-a4',
|
||||
'A+++': 'grade-a3',
|
||||
'A++': 'grade-a2',
|
||||
'A+': 'grade-a1'
|
||||
}
|
||||
|
||||
const hospitals = data.rankings.map(item => {
|
||||
const allDeps = (item.depart || [])
|
||||
.sort((a, b) => a.rank - b.rank)
|
||||
return {
|
||||
...item,
|
||||
gradeClass: gradeClassMap[item.grade] || 'grade-a1',
|
||||
topDepartments: allDeps,
|
||||
expanded: false
|
||||
}
|
||||
})
|
||||
|
||||
this.setData({
|
||||
rankingYear: data.year || '',
|
||||
rankingNote: data.note || '',
|
||||
allHospitals: hospitals,
|
||||
filteredHospitals: hospitals
|
||||
})
|
||||
},
|
||||
|
||||
processDepartmentRankings(data) {
|
||||
if (!data || !data.departments) return
|
||||
|
||||
const departments = Object.keys(data.departments)
|
||||
const firstDept = departments[0] || ''
|
||||
|
||||
this.setData({
|
||||
departmentList: departments,
|
||||
selectedDepartment: firstDept
|
||||
})
|
||||
|
||||
if (firstDept) {
|
||||
this.updateCurrentDepartmentRanking(firstDept)
|
||||
}
|
||||
},
|
||||
|
||||
updateCurrentDepartmentRanking(deptName) {
|
||||
const data = this.data.departmentRankingsData
|
||||
if (!data || !data.departments || !data.departments[deptName]) {
|
||||
this.setData({
|
||||
currentDepartmentRanking: { top10: [], nominated: [] }
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const deptData = data.departments[deptName]
|
||||
this.setData({
|
||||
currentDepartmentRanking: {
|
||||
top10: deptData.top10 || [],
|
||||
nominated: deptData.nominated || []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
switchTab(e) {
|
||||
const tab = e.currentTarget.dataset.tab
|
||||
if (tab === this.data.activeTab) return
|
||||
this.setData({ activeTab: tab })
|
||||
},
|
||||
|
||||
selectDepartment(e) {
|
||||
const dept = e.currentTarget.dataset.dept
|
||||
this.setData({ selectedDepartment: dept })
|
||||
this.updateCurrentDepartmentRanking(dept)
|
||||
},
|
||||
|
||||
onSearchInput(e) {
|
||||
const keyword = e.detail.value
|
||||
this.setData({ searchKeyword: keyword })
|
||||
this.filterHospitals(keyword)
|
||||
},
|
||||
|
||||
onSearch(e) {
|
||||
const keyword = e.detail.value
|
||||
this.filterHospitals(keyword)
|
||||
},
|
||||
|
||||
clearSearch() {
|
||||
this.setData({ searchKeyword: '' })
|
||||
this.filterHospitals('')
|
||||
},
|
||||
|
||||
filterHospitals(keyword) {
|
||||
let result = this.data.allHospitals
|
||||
|
||||
if (keyword && keyword.trim()) {
|
||||
const lowerKeyword = keyword.trim().toLowerCase()
|
||||
result = result.filter(item => {
|
||||
const nameMatch = item.name && item.name.toLowerCase().includes(lowerKeyword)
|
||||
const deptMatch = item.depart && item.depart.some(d => d.name && d.name.toLowerCase().includes(lowerKeyword))
|
||||
return nameMatch || deptMatch
|
||||
})
|
||||
}
|
||||
|
||||
this.setData({ filteredHospitals: result })
|
||||
},
|
||||
|
||||
toggleHospital(e) {
|
||||
const name = e.currentTarget.dataset.name
|
||||
const hospitals = this.data.filteredHospitals.map(item => {
|
||||
if (item.name === name) {
|
||||
return { ...item, expanded: !item.expanded }
|
||||
}
|
||||
return item
|
||||
})
|
||||
this.setData({ filteredHospitals: hospitals })
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.loadData().finally(() => {
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '复旦中国医院排行榜',
|
||||
path: '/pages/hospital/ranking'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark",
|
||||
"navigationBarTitleText": "医院排行榜"
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
<!--pages/hospital/ranking.wxml-->
|
||||
<view class="container">
|
||||
<!-- 顶部标题 -->
|
||||
<view class="header">
|
||||
<text class="header-title">{{rankingYear}}复旦中国医院排行榜</text>
|
||||
<text class="header-note">{{rankingNote}}</text>
|
||||
</view>
|
||||
|
||||
<!-- Tab 切换 -->
|
||||
<view class="tab-bar">
|
||||
<view class="tab-item {{activeTab === 'overall' ? 'active' : ''}}" bindtap="switchTab" data-tab="overall">
|
||||
<text class="tab-text">综合榜</text>
|
||||
<view class="tab-line" wx:if="{{activeTab === 'overall'}}"></view>
|
||||
</view>
|
||||
<view class="tab-item {{activeTab === 'department' ? 'active' : ''}}" bindtap="switchTab" data-tab="department">
|
||||
<text class="tab-text">专科榜</text>
|
||||
<view class="tab-line" wx:if="{{activeTab === 'department'}}"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 综合榜内容 -->
|
||||
<view class="content" wx:if="{{activeTab === 'overall'}}">
|
||||
<!-- 医院列表 -->
|
||||
<view class="hospital-list">
|
||||
<view class="hospital-card" wx:for="{{filteredHospitals}}" wx:key="name" bindtap="toggleHospital" data-name="{{item.name}}">
|
||||
<view class="hospital-rank-badge">
|
||||
<text class="rank-grade {{item.gradeClass}}">{{item.grade}}</text>
|
||||
</view>
|
||||
<view class="hospital-header">
|
||||
<view class="hospital-info">
|
||||
<text class="hospital-name">{{item.name}}</text>
|
||||
<view class="hospital-tags">
|
||||
<text class="tag" wx:for="{{item.topDepartments}}" wx:for-item="dep" wx:key="name">{{dep.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hospital-arrow">
|
||||
<t-icon name="chevron-down" size="36rpx" color="#999" class="{{item.expanded ? 'arrow-up' : ''}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 展开详情 -->
|
||||
<view class="hospital-detail" wx:if="{{item.expanded}}">
|
||||
<view class="detail-title">专科排名详情</view>
|
||||
<view class="dept-grid">
|
||||
<view class="dept-item" wx:for="{{item.depart}}" wx:for-item="dep" wx:key="name">
|
||||
<text class="dept-name">{{dep.name}}</text>
|
||||
<view class="dept-rank">
|
||||
<text class="rank-num">第{{dep.rank}}名</text>
|
||||
<text class="rank-score">{{dep.score}}分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 专科榜内容 -->
|
||||
<view class="content" wx:if="{{activeTab === 'department'}}">
|
||||
<!-- 科室筛选 -->
|
||||
<scroll-view class="dept-filter" scroll-y enhanced show-scrollbar="{{true}}" style="height: calc(100vh - 340rpx);">
|
||||
<view class="dept-sidebar">
|
||||
<view class="sidebar-item {{selectedDepartment === item ? 'active' : ''}}" wx:for="{{departmentList}}" wx:key="*this" bindtap="selectDepartment" data-dept="{{item}}">
|
||||
<text class="sidebar-text">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 科室排名详情 -->
|
||||
<view class="dept-ranking-content">
|
||||
<view class="dept-ranking-header">
|
||||
<text class="dept-ranking-title">{{selectedDepartment}}</text>
|
||||
<text class="dept-ranking-subtitle">{{rankingYear}}年度专科声誉排名</text>
|
||||
</view>
|
||||
|
||||
<!-- Top10 列表 -->
|
||||
<view class="top10-list">
|
||||
<view class="top10-item {{index < 3 ? 'top3' : ''}}" wx:for="{{currentDepartmentRanking.top10}}" wx:key="name">
|
||||
<view class="top10-rank">
|
||||
<text class="rank-badge" wx:if="{{index < 3}}">{{item.rank}}</text>
|
||||
<text class="rank-num" wx:else>{{item.rank}}</text>
|
||||
</view>
|
||||
<view class="top10-info">
|
||||
<text class="top10-name">{{item.name}}</text>
|
||||
<text class="top10-score">{{item.score}}分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 获提名医院 -->
|
||||
<view class="nominated-section" wx:if="{{currentDepartmentRanking.nominated && currentDepartmentRanking.nominated.length > 0}}">
|
||||
<view class="nominated-title">获提名医院</view>
|
||||
<view class="nominated-list">
|
||||
<text class="nominated-item" wx:for="{{currentDepartmentRanking.nominated}}" wx:key="*this">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" wx:if="{{activeTab === 'overall' && filteredHospitals.length === 0}}">
|
||||
<t-icon name="info-circle" size="80rpx" color="#ccc"/>
|
||||
<text class="empty-text">未找到匹配的医院</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,450 +0,0 @@
|
||||
/* pages/hospital/ranking.wxss */
|
||||
page {
|
||||
background-color: #F5F7F6;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 60rpx;
|
||||
}
|
||||
|
||||
/* ========== 顶部标题 ========== */
|
||||
.header {
|
||||
padding: 32rpx 32rpx 16rpx 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #1F2937;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header-note {
|
||||
font-size: 24rpx;
|
||||
color: #6B8E7B;
|
||||
margin-top: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ========== 搜索栏 ========== */
|
||||
.search-bar {
|
||||
padding: 16rpx 32rpx;
|
||||
}
|
||||
|
||||
.search-input-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
border-radius: 40rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #1F2937;
|
||||
margin-left: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.search-input::placeholder {
|
||||
color: #6B7280;
|
||||
}
|
||||
|
||||
.search-clear {
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
/* ========== Tab 切换 ========== */
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 32rpx;
|
||||
margin-top: 8rpx;
|
||||
border-bottom: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
position: relative;
|
||||
padding: 24rpx 48rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tab-text {
|
||||
font-size: 30rpx;
|
||||
color: #6B7280;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-text {
|
||||
color: #2D6A4F;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tab-line {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
background: #2D6A4F;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
/* ========== 综合榜内容 ========== */
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
/* 医院列表 */
|
||||
.hospital-list {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.hospital-card {
|
||||
position: relative;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 16rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hospital-rank-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.hospital-rank-badge .rank-grade {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 0 20rpx 0 12rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
min-width: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hospital-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 100rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.rank-grade {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 12rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
min-width: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rank-grade.grade-a5 {
|
||||
background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
|
||||
color: #92400E;
|
||||
}
|
||||
|
||||
.rank-grade.grade-a4 {
|
||||
background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
|
||||
color: #1E40AF;
|
||||
}
|
||||
|
||||
.rank-grade.grade-a3 {
|
||||
background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
|
||||
color: #065F46;
|
||||
}
|
||||
|
||||
.rank-grade.grade-a2 {
|
||||
background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
|
||||
color: #3730A3;
|
||||
}
|
||||
|
||||
.rank-grade.grade-a1 {
|
||||
background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
|
||||
color: #6B21A8;
|
||||
}
|
||||
|
||||
.hospital-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.hospital-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #1F2937;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hospital-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 8rpx;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 24rpx;
|
||||
color: #2D6A4F;
|
||||
background: rgba(45, 106, 79, 0.08);
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.hospital-arrow {
|
||||
margin-left: 16rpx;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.arrow-up {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* 医院详情展开 */
|
||||
.hospital-detail {
|
||||
padding: 0 24rpx 24rpx 24rpx;
|
||||
border-top: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #374151;
|
||||
padding: 16rpx 0 12rpx 0;
|
||||
}
|
||||
|
||||
.dept-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.dept-item {
|
||||
background: #F9FAFB;
|
||||
border-radius: 12rpx;
|
||||
padding: 12rpx 16rpx;
|
||||
flex: 1;
|
||||
min-width: 200rpx;
|
||||
max-width: calc(50% - 6rpx);
|
||||
}
|
||||
|
||||
.dept-name {
|
||||
font-size: 24rpx;
|
||||
color: #4B5563;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dept-rank {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.rank-num {
|
||||
font-size: 22rpx;
|
||||
color: #2D6A4F;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rank-score {
|
||||
font-size: 22rpx;
|
||||
color: #9CA3AF;
|
||||
}
|
||||
|
||||
/* ========== 专科榜内容 ========== */
|
||||
.content:has(.dept-filter) {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dept-filter {
|
||||
width: 200rpx;
|
||||
background: #FFFFFF;
|
||||
border-right: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.dept-sidebar {
|
||||
padding: 8rpx 0;
|
||||
}
|
||||
|
||||
.sidebar-item {
|
||||
padding: 24rpx 16rpx;
|
||||
text-align: center;
|
||||
border-left: 4rpx solid transparent;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.sidebar-item.active {
|
||||
background: #F0FDF4;
|
||||
border-left-color: #2D6A4F;
|
||||
}
|
||||
|
||||
.sidebar-text {
|
||||
font-size: 26rpx;
|
||||
color: #4B5563;
|
||||
}
|
||||
|
||||
.sidebar-item.active .sidebar-text {
|
||||
color: #2D6A4F;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dept-ranking-content {
|
||||
flex: 1;
|
||||
padding: 16rpx 24rpx 24rpx 24rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dept-ranking-header {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.dept-ranking-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #1F2937;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dept-ranking-subtitle {
|
||||
font-size: 24rpx;
|
||||
color: #6B8E7B;
|
||||
margin-top: 4rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Top10 列表 */
|
||||
.top10-list {
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.top10-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 24rpx;
|
||||
border-bottom: 1rpx solid #F3F4F6;
|
||||
}
|
||||
|
||||
.top10-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.top10-item.top3 {
|
||||
background: linear-gradient(90deg, rgba(254, 243, 199, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.top10-rank {
|
||||
margin-right: 20rpx;
|
||||
min-width: 56rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rank-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 50%;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.top10-item:nth-child(1) .rank-badge {
|
||||
background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
|
||||
}
|
||||
|
||||
.top10-item:nth-child(2) .rank-badge {
|
||||
background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
|
||||
}
|
||||
|
||||
.top10-item:nth-child(3) .rank-badge {
|
||||
background: linear-gradient(135deg, #B45309 0%, #92400E 100%);
|
||||
}
|
||||
|
||||
.rank-num {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #6B7280;
|
||||
}
|
||||
|
||||
.top10-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.top10-name {
|
||||
font-size: 28rpx;
|
||||
color: #1F2937;
|
||||
font-weight: 500;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.top10-score {
|
||||
font-size: 24rpx;
|
||||
color: #6B7280;
|
||||
margin-top: 4rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 获提名医院 */
|
||||
.nominated-section {
|
||||
margin-top: 24rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.nominated-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #374151;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.nominated-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.nominated-item {
|
||||
font-size: 24rpx;
|
||||
color: #4B5563;
|
||||
background: #F9FAFB;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* ========== 空状态 ========== */
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 120rpx 32rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #6B7280;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
// pages/mine/business.js
|
||||
|
||||
// 商务合作 / 陪诊师入驻 / 陪诊师培训 三个方向共用本页:入口分别来自首页与
|
||||
// 「我的」页页脚,靠 ?section= 定位到对应卡片(对应 wxml 里 wx:for 的 id)。
|
||||
//
|
||||
// 规则口径只写两类内容:国家标准 GB/T 47801—2026《社会化陪同就医服务 基本要求》
|
||||
// 第 4.2 章(服务管理)、第 7 章(服务人员)已明确的要求,以及平台的通用流程。
|
||||
// 不写任何未公示的收费标准——费用与排期一律指向客服确认,避免出现未公示费项。
|
||||
//
|
||||
// 培训卡里的证书口径:发证主体是国家开放大学培训中心,不是本平台,故只陈述
|
||||
// 证书名称、颁发主体与证书性质(培训合格证明),不写"国家认可""全国通用"
|
||||
// "持证上岗"等评价性或承诺性表述——那类说法无法核实,且涉嫌虚假宣传。
|
||||
|
||||
// 三个锚点白名单:?section= 来自页面路径,只接受这三张卡自己的 id
|
||||
const SECTION_IDS = ['sec-biz', 'sec-join', 'sec-train']
|
||||
|
||||
Page({
|
||||
data: {
|
||||
// 三张卡的数据源:改文案只改这里,wxml 结构不动
|
||||
sections: [{
|
||||
id: 'sec-biz',
|
||||
icon: 'user-business',
|
||||
title: '商务合作',
|
||||
points: [
|
||||
'合作对象:医疗机构、社区、健康管理及养老服务机构,以及有员工就医协助需求的企业',
|
||||
'合作方式:具体事项请联系客服沟通'
|
||||
],
|
||||
note: '以上为通用说明,具体合作方案请联系客服沟通'
|
||||
},
|
||||
{
|
||||
id: 'sec-join',
|
||||
icon: 'user-add',
|
||||
title: '陪诊师入驻',
|
||||
points: [
|
||||
'基本条件:持有效健康证明,遵守医院规定,不干预医务人员判断',
|
||||
'上岗要求:完成岗前培训并考核通过,上岗后定期参加专项培训',
|
||||
'职业素养:守时、有责任心,尊重服务对象,保护其隐私',
|
||||
'入驻流程:联系客服沟通'
|
||||
],
|
||||
note: '以上依据国家标准 GB/T 47801—2026《社会化陪同就医服务 基本要求》第 7 章,最终以资料核验结果为准'
|
||||
},
|
||||
{
|
||||
id: 'sec-train',
|
||||
icon: 'education',
|
||||
title: '陪诊师培训',
|
||||
points: [
|
||||
'培训内容:操作、专业能力、安全应急、心理健康、人文素养',
|
||||
'专业知识:挂号流程、科室分布、设备使用与应急常识',
|
||||
'培训证书:国家开放大学培训中心《医疗陪诊顾问职业技能培训证书》(培训合格证明,非职业资格证书)',
|
||||
'培训费用:980 元,报名请联系客服确认'
|
||||
],
|
||||
note: '本页仅作说明,不办理报名与收费'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// 从哪个入口进来就定位到哪张卡,避免点「陪诊师培训」却落在页首自己找
|
||||
onLoad(options) {
|
||||
const section = options && options.section
|
||||
this.sectionId = SECTION_IDS.indexOf(section) > -1 ? section : ''
|
||||
},
|
||||
|
||||
onReady() {
|
||||
if (!this.sectionId) {
|
||||
return
|
||||
}
|
||||
wx.pageScrollTo({
|
||||
selector: `#${this.sectionId}`,
|
||||
duration: 0
|
||||
})
|
||||
},
|
||||
|
||||
// 底部出口:合作咨询统一转联系我们页(热线、微信、邮箱都在那一页,
|
||||
// 不在此页重复铺一遍联系方式,避免同一意图两个入口)
|
||||
goToContact() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/mine/contact'
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 合作与入驻',
|
||||
path: '/pages/mine/business'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "合作与入驻",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--pages/mine/business.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>
|
||||
|
||||
<!-- 三个方向各一张白卡,结构完全相同:图标 + 标题 + 圆点规则 + 尾注。
|
||||
区分只靠图标与标题,不靠颜色(DESIGN.md 硬约束 3「需区分时先改结构」) -->
|
||||
<view class="card" wx:for="{{ sections }}" wx:key="id" id="{{ item.id }}">
|
||||
<view class="card-head">
|
||||
<!-- 卡头标识走全站「浅橙衬底 + 暖橙图标」语言;
|
||||
t-icon 的 color 读不到 CSS 变量,硬编码对应 --brand-ink #9B4508 -->
|
||||
<view class="card-mark">
|
||||
<t-icon name="{{ item.icon }}" size="26rpx" color="#9B4508" />
|
||||
</view>
|
||||
<text class="card-title">{{ item.title }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 规则条目用陪诊指南页同一套圆点语言 -->
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ item.points }}" wx:for-item="point" wx:key="*this">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ point }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 尾注:与条目用发丝线分开,说明口径而非补充规则 -->
|
||||
<text class="card-note">{{ item.note }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部出口:浅橙入口卡(--brand-soft + 2rpx 描边托形 + 去阴影,
|
||||
同 about 页「联系我们」配方)。整卡可点,右侧 chevron 作点击暗示。
|
||||
chevron 用 muted 而非暖橙——项目里 chevron 一律 muted,不抢主色焦点 -->
|
||||
<view class="contact-entry" bindtap="goToContact" hover-class="contact-entry-hover">
|
||||
<!-- 一行两段:前半句作说明、后半"联系我们"留暖橙主色形成指向。
|
||||
两段之间的间隙交给 .entry-title 的 margin-left,不靠空白字符——
|
||||
text 节点内外的空白在 WXML 编译时会被压缩,不可靠 -->
|
||||
<text class="entry-prefix">具体事项,请直接</text><text class="entry-title">联系我们</text>
|
||||
<t-icon class="entry-arrow" name="chevron-right" size="28rpx" color="#6F655C" />
|
||||
</view>
|
||||
|
||||
<view class="footer-space"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,165 @@
|
||||
/* pages/mine/business.wxss
|
||||
配色令牌来自 app.wxss(全站唯一来源),本页不留副本;
|
||||
卡片、卡头标识、圆点清单与陪诊指南页同一套语言,保证内页风格一致 */
|
||||
page {
|
||||
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;
|
||||
}
|
||||
|
||||
/* 卡头标识:浅橙衬底 + 2rpx 描边托形,不用实心橙(全页无实心大色块) */
|
||||
.card-mark {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 12rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
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;
|
||||
}
|
||||
|
||||
/* ===== 规则条目:与陪诊指南页同一套圆点语言 ===== */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* 尾注:与条目用发丝线切开,读到的是口径说明而非又一条规则 */
|
||||
.card-note {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ===== 底部出口:浅橙入口卡(同 about 页「联系我们」配方)=====
|
||||
靠 2rpx --brand-line 描边托形,不加阴影 */
|
||||
.contact-entry {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 48rpx;
|
||||
padding: 28rpx 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.contact-entry:active,
|
||||
.contact-entry-hover {
|
||||
transform: scale(0.99);
|
||||
}
|
||||
|
||||
/* chevron 绝对定位贴右缘:只作点击暗示,不参与居中计算,
|
||||
否则会把文字往左挤偏半个箭头宽 */
|
||||
.entry-arrow {
|
||||
position: absolute;
|
||||
right: 26rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
/* 说明句:比主色文字小一号(26rpx)并转灰,退到背景层;
|
||||
--muted 在浅橙底上 5.24:1,过 AA;26rpx 高于中文最小字号 24rpx */
|
||||
.entry-prefix {
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 落在"联系我们"上,保留暖橙主色与字重,成为这行文字的指向;
|
||||
--brand-ink 就是为「浅橙底上的文字」定义的令牌(浅橙底 5.96:1,过 AA)。
|
||||
margin-left 是两段之间的唯一间隙来源(不靠空白字符),
|
||||
8rpx 约半个汉字宽,够断开语气又不至于把一句话读散 */
|
||||
.entry-title {
|
||||
margin-left: 8rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 60rpx;
|
||||
}
|
||||
+5
-4
@@ -188,10 +188,11 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 页脚 B 端合作链接:暂无独立页面,统一转接人工客服
|
||||
onFooterTap() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: '18618162956'
|
||||
// 页脚三个 B 端入口:都进「合作与入驻」页,用 section 定位到各自的卡片
|
||||
onFooterTap(e) {
|
||||
const section = e.currentTarget.dataset.section || ''
|
||||
wx.navigateTo({
|
||||
url: `/pages/mine/business?section=${section}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -85,16 +85,17 @@
|
||||
</view>
|
||||
|
||||
<view class="footer-section">
|
||||
<!-- B 端合作入口:与首页页脚取同一组三条。
|
||||
<!-- B 端合作入口:与首页页脚取同一组三条,且同样都进「合作与入驻」页
|
||||
(各自用 section 定位),咨询出口由该页底部统一转「联系我们」。
|
||||
原先本页是「企业/机构合作 · 陪诊师入驻 · 商务合作」,
|
||||
其中前两条同义(都转同一个服务电话),
|
||||
违反「同一意图只保留一个入口」,故整体对齐首页那组 -->
|
||||
<view class="footer-links">
|
||||
<text class="footer-link" bindtap="onFooterTap">商务合作</text>
|
||||
<text class="footer-link" data-section="sec-biz" bindtap="onFooterTap">商务合作</text>
|
||||
<view class="footer-sep"></view>
|
||||
<text class="footer-link" bindtap="onFooterTap">陪诊师入驻</text>
|
||||
<text class="footer-link" data-section="sec-join" bindtap="onFooterTap">陪诊师入驻</text>
|
||||
<view class="footer-sep"></view>
|
||||
<text class="footer-link" bindtap="onFooterTap">陪诊师考证</text>
|
||||
<text class="footer-link" data-section="sec-train" bindtap="onFooterTap">陪诊师考证</text>
|
||||
</view>
|
||||
<!-- 版本与版权合并为一行:两行元信息体量都很小,分行只制造空白;
|
||||
中间复用 .footer-sep 细竖线,与上方链接行同一分隔语言(不用中点字符) -->
|
||||
|
||||
@@ -37,9 +37,6 @@ const API = {
|
||||
resource: {
|
||||
getServices: (params) => request.get('/health/service', params),
|
||||
getAgreement: (params) => request.get('/health/agreement', params),
|
||||
getHospitalInfo: (params) => request.get('/health/hospital-info', params),
|
||||
getHospitalRanking: (params) => request.get('/health/hospital-ranking', params),
|
||||
getDepartmentRankings: (params) => request.get('/health/department-rankings', params),
|
||||
getAiQuickQuestions: (params) => request.get('/health/ai-quick-questions', params),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user