Compare commits

5 Commits
Author SHA1 Message Date
lik 0eef90c451 style(home): 放松首屏 header 的垂直节奏
标题与信任行贴到 12rpx、信任行与 CTA 只隔 28rpx,实心橙块还黏在文案区,
主按钮读起来像标题的一部分而不是可点行动;同时品牌行与 50rpx 大标题之间
只有 32rpx,logo 和标题抢同一层级。

调整:品牌行→标题 32→40rpx,标题→信任行 12→16rpx,信任行→CTA 28→40rpx,
CTA→培训横幅保持 24rpx(两者同属行动层)。首屏总长只增加约 12px。
2026-11-04 22:18:33 +08:00
lik 2ba45b515d feat(escort): 新增立即预约页并接入首页主按钮
首页「立即预约」此前跳到服务列表,用户仍需再选一次服务才能下单,
路径偏长。新增 pages/escort/itemorder 作为统一下单页:进来即可选陪诊项目、
选就诊人(姓名/电话由档案只读带入,避免手填出错)、填医院与时间后提交。

提交时按服务配置处理班次(固定班次走选择器,弹性时段走时间选择器),
需要寄件的跑腿类服务额外要求填写收货地址,并用同一幂等键保证重试不重复下单。
2026-11-04 22:18:24 +08:00
lik a3fa469369 feat(train): 培训页改版为双档价格与规格说明
首页培训横幅点进来后需要更快看到「多少钱、怎么考、怎么报名」,
因此把原来的首屏主卡换成两档价格并列,把「考位与证书」长卡
收敛为一张规格表,并新增「报考联系」区块承载老师二维码,
报名流程由四步收口为三步(去掉单独的客服审核环节)。

去掉页面底部固定报名条与「立即报名」按钮:报名改为长按联系老师,
再留一个指向提交表单的按钮会与二维码路径冲突。
2026-11-04 22:17:59 +08:00
lik fd676984d8 修改了微信联系人二维码图片 2026-11-03 20:41:01 +08:00
lik 31943e9987 feat(training): 新增培训宣传与考位报名入口 2026-11-03 20:22:57 +08:00
22 changed files with 1869 additions and 15 deletions
+4 -1
View File
@@ -11,10 +11,13 @@
"pages/health/profilelist",
"pages/health/profileedit",
"pages/mine/mine",
"pages/train/index",
"pages/train/apply",
"pages/mine/profileedit",
"pages/mine/about",
"pages/mine/contact",
"pages/mine/business"
"pages/mine/business",
"pages/escort/itemorder"
],
"window": {
"backgroundTextStyle": "light",
+2
View File
@@ -45,6 +45,8 @@ doc/
| `pages/health/profilelist` | 就诊人列表 |
| `pages/health/profileedit` | 就诊人编辑 |
| `pages/mine/mine` | 我的 |
| `pages/train/index` | 陪诊师培训宣传页(首页「立即预约」下方横幅进入,底栏转报名) |
| `pages/train/apply` | 2026 考位报名表(考位信息、蓝底照片与身份证电子版上传、提交回执) |
| `pages/mine/about` | 关于 |
| `pages/mine/contact` | 联系我们 |
| `pages/mine/business` | 合作与入驻(商务合作 / 陪诊师入驻 / 陪诊师培训,入口自首页与「我的」页页脚) |
Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 34 KiB

+312
View File
@@ -0,0 +1,312 @@
const API = require('../../utils/api.js')
const { formatDate } = require('../../utils/date.js')
Page({
data: {
services: [],
serviceOptions: [],
serviceIndex: 0,
service: {},
serviceIcon: 'user-business',
totalPrice: '0.00',
pageLoading: true,
pageError: '',
submitting: false,
profiles: [],
selectedProfileId: '',
patientName: '',
patientPhone: '',
selectedPatient: null,
province: '',
provinceIndex: 0,
provinces: [],
hospital: '',
appointmentDate: '',
appointmentTime: '',
minAppointmentDate: '',
fixedTime: false,
timeOptions: [],
sessionIndex: 0,
timeStart: '',
timeEnd: '',
remark: '',
shippingAddress: '',
requiresAddress: false,
gender: '不限',
genderIndex: 0,
genderOptions: ['不限', '男', '女']
},
onLoad(options) {
this.requestedServiceId = Number(options.id)
this.idempotencyKey = this.createIdempotencyKey()
this.initializePage()
},
onShow() {
// 从新增/编辑就诊人页返回时刷新档案,首次进入由 initializePage 加载。
if (this.pageReady && getApp().globalData.user?._id) this.loadProfiles()
},
async initializePage() {
this.pageReady = false
this.setData({ pageLoading: true, pageError: '' })
const services = await getApp().loadServices()
if (!services || services.length === 0) {
this.setData({ pageLoading: false, pageError: '服务加载失败,请重试' })
return
}
const requestedIndex = services.findIndex((item) => item.id === this.requestedServiceId)
const consultationIndex = services.findIndex((item) => item.title.includes('问诊'))
const serviceIndex = requestedIndex >= 0 ? requestedIndex : (consultationIndex >= 0 ? consultationIndex : 0)
this.setData({
services,
serviceOptions: services.map((item) => item.title)
})
this.applyService(services[serviceIndex], serviceIndex)
this.setData({ pageLoading: false })
this.pageReady = true
const app = getApp()
await app.waitForAuth()
if (app.globalData.user?._id) this.loadProfiles()
},
retryLoad() {
this.initializePage()
},
createIdempotencyKey() {
return `order_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 12)}`
},
applyService(service, serviceIndex) {
const booking = service.booking || {}
const sessions = booking.sessions || []
const fixedTime = sessions.length > 0 && sessions.every((item) => !item.flexible)
const firstSession = sessions[0] || {}
const minDate = new Date()
minDate.setDate(minDate.getDate() + Number(booking.advanceDays || 0))
let timeEnd = firstSession.end || ''
if (!fixedTime && firstSession.end && booking.durationMinutes) {
const [hour, minute] = firstSession.end.split(':').map(Number)
const latest = hour * 60 + minute - booking.durationMinutes
timeEnd = `${String(Math.floor(latest / 60)).padStart(2, '0')}:${String(latest % 60).padStart(2, '0')}`
}
const provinces = service.areas || []
this.setData({
service,
serviceIndex,
serviceIcon: this.getServiceIcon(service.title),
totalPrice: service.price,
minAppointmentDate: formatDate(minDate),
fixedTime,
timeOptions: sessions.map((item) => `${item.start} - ${item.end}`),
sessionIndex: 0,
timeStart: firstSession.start || '',
timeEnd,
provinces,
province: provinces[0] || '',
provinceIndex: 0,
appointmentDate: '',
appointmentTime: '',
shippingAddress: '',
requiresAddress: !!booking.requiresAddress
})
},
onServiceChange(e) {
const index = Number(e.detail.value)
const service = this.data.services[index]
if (!service || index === this.data.serviceIndex) return
this.applyService(service, index)
},
getServiceIcon(title) {
if (title.includes('夜间')) return 'moon'
if (title.includes('陪诊')) return 'time'
return 'user-business'
},
async ensureLogin() {
const app = getApp()
await app.waitForAuth()
if (app.globalData.user?._id) return true
const modal = await new Promise((resolve) => {
wx.showModal({
title: '登录后预约',
content: '登录成功后将继续预约',
confirmText: '去登录',
confirmColor: '#B8520A',
success: resolve,
fail: (err) => {
console.log('登录提示弹窗失败', err)
resolve({ confirm: false })
}
})
})
if (!modal.confirm) return null
wx.removeStorageSync('has_logout')
return app.silentSignin()
},
loadProfiles() {
return API.healthProfile.getMyProfiles({ page: 1, pageSize: 50 })
.then((res) => {
if (res.code !== 0) throw new Error(res.msg || '就诊人加载失败')
const profiles = (res.data?.list || []).map((item) => ({
_id: item._id,
name: item.profile?.name || '',
mobile: item.profile?.mobile || '',
sex: item.profile?.sex || '',
birth: item.profile?.birth || ''
}))
this.setData({ profiles })
})
.catch((err) => {
console.log('获取就诊人列表失败', err)
wx.showToast({ title: '就诊人加载失败,请重试', icon: 'none' })
})
},
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,
selectedPatient: profile
})
},
goToAddProfile() {
wx.navigateTo({ url: '/pages/health/profileedit' })
},
onProvinceChange(e) {
const index = Number(e.detail.value)
this.setData({ provinceIndex: index, province: this.data.provinces[index] })
},
onHospitalChange(e) {
this.setData({ hospital: e.detail.value })
},
onDateChange(e) {
this.setData({ appointmentDate: e.detail.value })
},
onTimeChange(e) {
if (this.data.fixedTime) {
const index = Number(e.detail.value)
const session = this.data.service.booking.sessions[index]
this.setData({ sessionIndex: index, appointmentTime: session.start })
return
}
this.setData({ appointmentTime: e.detail.value })
},
onGenderChange(e) {
const index = Number(e.detail.value)
this.setData({ genderIndex: index, gender: this.data.genderOptions[index] })
},
onRemarkChange(e) {
this.setData({ remark: e.detail.value })
},
onShippingAddressChange(e) {
this.setData({ shippingAddress: e.detail.value })
},
validateOrder() {
const data = this.data
if (!data.selectedProfileId || !data.selectedPatient) return '请选择就诊人'
if (!data.hospital.trim()) return '请输入就诊医院'
if (!data.appointmentDate) return '请选择预约日期'
if (!data.appointmentTime) return '请选择预约时间'
if (data.requiresAddress && !data.shippingAddress.trim()) return '请填写完整收货地址'
if (!/^1[3-9]\d{9}$/.test(data.selectedPatient.mobile.trim())) {
return '就诊人手机号有误,请到就诊人档案修改'
}
return ''
},
async submitOrder() {
if (this.data.submitting) return
this.setData({ submitting: true })
try {
const loggedIn = await this.ensureLogin()
if (loggedIn === null) return
if (!loggedIn || !getApp().globalData.user?._id) {
wx.showToast({ title: '登录失败,请重试', icon: 'none' })
return
}
if (this.data.profiles.length === 0) await this.loadProfiles()
const error = this.validateOrder()
if (error) {
wx.showToast({ title: error, icon: 'none' })
return
}
const data = this.data
const sexMap = { 男: 'male', 女: 'female' }
const orderData = {
idempotencyKey: this.idempotencyKey,
healthProfileId: data.selectedProfileId,
escort: {
serviceId: data.service.id,
sexRequirement: sexMap[data.gender] || 'none'
},
hospital: {
province: data.province,
name: data.hospital.trim()
},
schedule: {
date: data.appointmentDate,
startTime: data.appointmentTime
},
shippingAddress: { address: data.shippingAddress.trim() },
notes: { patientNote: data.remark.trim() }
}
// 网络重试沿用同一幂等键,服务端只创建一笔订单。
const res = await API.escort.createRecord(orderData)
if (res.code !== 0) throw new Error(res.msg || '下单失败')
wx.showToast({ title: '下单成功', icon: 'success' })
this.resetForm()
wx.navigateTo({ url: '/pages/escort/recordlist?tab=ongoing' })
} catch (err) {
console.log('下单失败', err)
wx.showToast({ title: err.message || '网络请求失败,请重试', icon: 'none' })
} finally {
this.setData({ submitting: false })
}
},
resetForm() {
const provinces = this.data.provinces
this.setData({
selectedProfileId: '',
patientName: '',
patientPhone: '',
selectedPatient: null,
province: provinces[0] || '',
provinceIndex: 0,
hospital: '',
appointmentDate: '',
appointmentTime: '',
sessionIndex: 0,
gender: '不限',
genderIndex: 0,
remark: '',
shippingAddress: ''
})
this.idempotencyKey = this.createIdempotencyKey()
}
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon",
"t-loading": "tdesign-miniprogram/loading/loading"
},
"navigationBarTitleText": "立即预约"
}
+134
View File
@@ -0,0 +1,134 @@
<!--pages/escort/itemorder.wxml-->
<view class="page-bg">
<view class="container" wx:if="{{service.id}}">
<view class="page-header">
<view class="header-accent"></view>
<text class="header-title">立即预约</text>
<text class="header-subtitle">选择陪诊项目,填写信息后即可提交预约</text>
</view>
<view class="booking-form">
<!-- 陪诊项目:切换后同步更新服务的预约规则 -->
<view class="service-picker-row">
<text class="order-label">陪诊项目</text>
<picker class="service-picker" mode="selector" range="{{serviceOptions}}" value="{{serviceIndex}}"
disabled="{{submitting}}" bindchange="onServiceChange">
<view class="order-service-info">
<view class="order-service-mark">
<t-icon name="{{serviceIcon}}" size="48rpx" color="#9B4508" />
</view>
<view class="order-service-text">
<text class="order-service-title">{{service.title}}</text>
<text class="order-service-price">¥{{service.price}}/次</text>
</view>
<view class="service-picker-arrow">
<t-icon name="chevron-down" size="40rpx" color="#9B4508" />
</view>
</view>
</picker>
</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>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</view>
<!-- 就诊人姓名/电话只读,与所选档案严格一致 -->
<view class="order-row">
<text class="order-label">就诊人姓名</text>
<text class="order-value {{patientName ? '' : 'placeholder'}}">{{patientName || '请先选择就诊人'}}</text>
</view>
<view class="order-row">
<text class="order-label">联系电话</text>
<text class="order-value {{patientPhone ? '' : 'placeholder'}}">{{patientPhone || '请先选择就诊人'}}</text>
</view>
<view class="order-row">
<text class="order-label">就诊省份</text>
<picker class="order-picker" mode="selector" range="{{provinces}}" value="{{provinceIndex}}" bindchange="onProvinceChange">
<view class="picker-value {{province ? '' : 'placeholder'}}">{{province || '请选择省份'}}</view>
</picker>
</view>
<view class="order-row">
<text class="order-label">就诊医院</text>
<input class="order-input" value="{{hospital}}" placeholder="请输入就诊医院" placeholder-class="input-placeholder" bindinput="onHospitalChange" />
</view>
<view class="order-row">
<text class="order-label">陪诊师性别</text>
<picker class="order-picker" mode="selector" range="{{genderOptions}}" value="{{genderIndex}}" bindchange="onGenderChange">
<view class="picker-value {{gender ? '' : 'placeholder'}}">{{gender || '请选择性别要求'}}</view>
</picker>
</view>
<view class="order-row">
<text class="order-label">预约日期</text>
<picker class="order-picker" mode="date" value="{{appointmentDate}}" start="{{minAppointmentDate}}" bindchange="onDateChange">
<view class="picker-value {{appointmentDate ? '' : 'placeholder'}}">{{appointmentDate || '请选择预约日期'}}</view>
</picker>
</view>
<view class="order-row">
<text class="order-label">预约时间</text>
<picker wx:if="{{fixedTime}}" class="order-picker" mode="selector" range="{{timeOptions}}" value="{{sessionIndex}}" bindchange="onTimeChange">
<view class="picker-value {{appointmentTime ? '' : 'placeholder'}}">
{{appointmentTime ? timeOptions[sessionIndex] : '请选择服务班次'}}
</view>
</picker>
<picker wx:else class="order-picker" mode="time" value="{{appointmentTime}}" start="{{timeStart}}" end="{{timeEnd}}" bindchange="onTimeChange">
<view class="picker-value {{appointmentTime ? '' : 'placeholder'}}">{{appointmentTime || '请选择预约时间'}}</view>
</picker>
</view>
<!-- 收货地址仅对快递/跑腿服务展示,随订单保存快照 -->
<view class="order-row column" wx:if="{{requiresAddress}}">
<text class="order-label">收货地址</text>
<textarea class="order-textarea" value="{{shippingAddress}}" placeholder="请输入省市区、街道门牌等完整收货地址" maxlength="200" placeholder-class="input-placeholder" bindinput="onShippingAddressChange" />
<text class="address-tip">收货人与联系电话使用所选就诊人信息</text>
</view>
<view class="order-row column">
<text class="order-label">备注说明</text>
<textarea class="order-textarea" value="{{remark}}" placeholder="请输入其他需求或备注信息" maxlength="200" placeholder-class="input-placeholder" bindinput="onRemarkChange" />
<text class="textarea-count">{{remark.length}}/200</text>
</view>
</view>
<view class="bottom-placeholder"></view>
<view class="bottom-bar">
<view class="bottom-price">
<text class="bottom-price-label">合计</text>
<text class="price-sym">¥</text>
<text class="bottom-price-value">{{totalPrice}}</text>
</view>
<button class="submit-btn" bindtap="submitOrder" disabled="{{submitting}}" loading="{{submitting}}">{{submitting ? '提交中' : '提交预约'}}</button>
</view>
</view>
<view class="page-state" wx:if="{{pageLoading}}">
<t-loading theme="circular" size="40rpx" text="加载中..." />
</view>
<view class="page-state" wx:if="{{!pageLoading && pageError}}">
<text class="page-state-text">{{pageError}}</text>
<button class="page-retry" bindtap="retryLoad">重新加载</button>
</view>
</view>
+384
View File
@@ -0,0 +1,384 @@
/* pages/escort/itemorder.wxss */
page {
--shadow-bar: 0 -2rpx 8rpx rgba(63, 43, 25, 0.07);
background: var(--paper);
}
.page-bg {
min-height: 100vh;
background: var(--paper);
}
.container {
padding: 0 32rpx calc(40rpx + env(safe-area-inset-bottom));
}
.page-header {
padding-top: 32rpx;
}
.header-accent {
width: 64rpx;
height: 8rpx;
border-radius: 4rpx;
background: var(--brand-strong);
}
.header-title {
display: block;
margin-top: 22rpx;
color: var(--ink);
font-size: 48rpx;
font-weight: 700;
letter-spacing: 1rpx;
line-height: 1.3;
}
.header-subtitle {
display: block;
margin-top: 12rpx;
color: var(--muted);
font-size: 28rpx;
line-height: 1.6;
}
.booking-form {
margin-top: 32rpx;
padding: 0 28rpx;
border-radius: 28rpx;
background: var(--white);
box-shadow: var(--shadow-card);
}
.service-picker-row {
padding: 24rpx 0;
border-bottom: 2rpx solid var(--line);
}
.service-picker {
display: block;
margin-top: 16rpx;
}
.order-service-info {
display: flex;
align-items: center;
padding: 20rpx 24rpx;
border: 2rpx solid var(--brand-line);
border-radius: 20rpx;
background: var(--brand-soft);
}
.order-service-mark {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 80rpx;
height: 80rpx;
}
.order-service-text {
flex: 1;
min-width: 0;
margin: 0 16rpx 0 12rpx;
}
.order-service-title {
display: block;
color: var(--ink);
font-size: 30rpx;
font-weight: 700;
line-height: 1.4;
}
.order-service-price {
display: block;
margin-top: 6rpx;
color: var(--brand-ink);
font-size: 26rpx;
font-weight: 700;
}
.service-picker-arrow {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
border: 2rpx solid var(--brand-line);
border-radius: 50%;
background: var(--white);
}
.order-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 0;
border-bottom: 2rpx solid var(--line);
}
.order-row:last-child {
border-bottom: none;
}
.order-row.column {
flex-direction: column;
align-items: stretch;
justify-content: flex-start;
}
.order-label {
flex-shrink: 0;
color: var(--muted);
font-size: 28rpx;
letter-spacing: 1rpx;
}
.order-input,
.order-value {
flex: 1;
min-width: 0;
margin-left: 24rpx;
color: var(--ink);
font-size: 28rpx;
font-weight: 700;
text-align: right;
}
.input-placeholder,
.order-value.placeholder,
.picker-value.placeholder {
color: var(--muted);
font-weight: 400;
}
.order-picker {
flex: 1;
min-width: 0;
margin-left: 24rpx;
}
.picker-value {
display: block;
color: var(--ink);
font-size: 28rpx;
font-weight: 700;
text-align: right;
}
.order-textarea {
box-sizing: border-box;
width: 100%;
height: 160rpx;
margin-top: 16rpx;
padding: 20rpx;
border: 2rpx solid var(--line);
border-radius: 12rpx;
background: var(--paper);
color: var(--ink);
font-size: 28rpx;
line-height: 1.5;
}
.textarea-count {
align-self: flex-end;
margin-top: 10rpx;
color: var(--muted);
font-size: 24rpx;
}
.address-tip {
align-self: flex-start;
margin-top: 10rpx;
color: var(--muted);
font-size: 24rpx;
line-height: 1.6;
}
.patient-scroll {
width: 100%;
margin-top: 16rpx;
white-space: nowrap;
}
.patient-chips {
display: inline-flex;
gap: 16rpx;
}
.patient-chip {
display: inline-flex;
flex-direction: column;
box-sizing: border-box;
min-width: 180rpx;
padding: 16rpx 24rpx;
border: 2rpx solid var(--line);
border-radius: 16rpx;
background: var(--paper);
transition: opacity 0.15s ease;
}
.patient-chip:active,
.add-profile-tip:active {
opacity: 0.7;
}
.patient-chip.active {
border-color: var(--brand-strong);
background: var(--brand-soft);
}
.patient-chip-name {
color: var(--ink-2);
font-size: 26rpx;
font-weight: 700;
}
.patient-chip.active .patient-chip-name,
.patient-chip-add .patient-chip-name {
color: var(--brand-ink);
}
.patient-chip-phone {
margin-top: 6rpx;
color: var(--muted);
font-size: 24rpx;
}
.patient-chip-add {
justify-content: center;
}
.add-profile-tip {
display: flex;
align-items: center;
box-sizing: border-box;
width: 100%;
margin-top: 16rpx;
padding: 22rpx 24rpx;
border: 2rpx solid var(--brand-line);
border-radius: 16rpx;
background: var(--brand-soft);
transition: opacity 0.15s ease;
}
.add-profile-tip-text {
flex: 1;
min-width: 0;
margin-right: 8rpx;
color: var(--brand-ink);
font-size: 24rpx;
font-weight: 700;
}
.bottom-placeholder {
height: 152rpx;
}
.bottom-bar {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 32rpx;
padding-bottom: calc(20rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
border-top: 2rpx solid var(--line);
background: var(--white);
box-shadow: var(--shadow-bar);
}
.bottom-price {
display: flex;
align-items: baseline;
}
.bottom-price-label {
margin-right: 8rpx;
color: var(--muted);
font-size: 26rpx;
}
.price-sym {
color: var(--brand-strong);
font-size: 28rpx;
font-weight: 700;
}
.bottom-price-value {
margin-left: 2rpx;
color: var(--brand-strong);
font-size: 44rpx;
font-weight: 700;
}
.submit-btn {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin: 0;
padding: 22rpx 48rpx;
border: none;
border-radius: 999rpx;
background: var(--brand-strong);
box-shadow: var(--shadow-cta);
color: var(--white);
font-size: 30rpx;
font-weight: 700;
letter-spacing: 2rpx;
line-height: 1.4;
transition: transform 0.15s ease;
}
.submit-btn::after,
.page-retry::after {
border: none;
}
.submit-btn:active {
transform: scale(0.98);
}
.page-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-height: 70vh;
padding: 48rpx 32rpx;
}
.page-state-text {
color: var(--muted);
font-size: 28rpx;
line-height: 1.6;
}
.page-retry {
margin: 28rpx 0 0;
padding: 12rpx 36rpx;
border: 2rpx solid var(--brand-strong);
border-radius: 999rpx;
background: transparent;
color: var(--brand-strong);
font-size: 28rpx;
font-weight: 500;
line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
.patient-chip,
.add-profile-tip,
.submit-btn {
transition: none;
}
}
+9 -2
View File
@@ -205,10 +205,17 @@ Page({
});
},
// Hero 主按钮:直达服务列表,缩短「了解 → 下单」路径
// Hero 主按钮:直达立即预约页
goToBooking() {
wx.navigateTo({
url: '/pages/escort/itemlist'
url: '/pages/escort/itemorder'
});
},
// 培训考证宣传横幅:直达培训宣传页,再由宣传页转报名
goToTraining() {
wx.navigateTo({
url: '/pages/train/index'
});
},
+18
View File
@@ -40,6 +40,24 @@
<t-icon name="chevron-right" size="28rpx" color="#FFFFFF" />
</view>
<!-- 培训考证宣传横幅:紧跟主 CTA,承接陪诊师「培训 → 报名」这条 B 端路径。
与上方实心 CTA 区分:本块走浅橙面 + 描边(纸面上靠描边托形、去阴影),
右侧按钮用白底 + 暖橙环,不给首屏增加第二个实心橙色块。
整块可点,按钮是它的点击暗示;真正报名仍进宣传页再转报名页,不在此处直接开表单 -->
<view class="hero-promo" bindtap="goToTraining" hover-class="hero-promo-hover">
<view class="promo-mark">
<t-icon name="education" size="32rpx" color="#9B4508" />
</view>
<view class="promo-body">
<text class="promo-title">陪诊师培训考证</text>
<text class="promo-desc">医疗陪诊顾问(高级)证书</text>
</view>
<view class="promo-btn">
<text class="promo-btn-text">了解详情</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</view>
<!-- 未完成预约预览:不设卡头(无「未完成预约」标题、无数量、无「查看全部」),
每条预约单独一张卡,卡内给出日期 / 就诊人 / 医院 / 服务项目,最多 3 条。
不把全部未完成预约铺在首屏:首屏优先保住主 CTA 与服务入口,
+95 -9
View File
@@ -64,10 +64,11 @@ page {
}
/* ===== ① 头部:大字标题直接落在纸面上 ===== */
/* 留白加码:44→56rpx 上、+16rpx 下(下方 .section 自带 56rpx,合计 72rpx 到"陪诊服务")。
topbar 的 120rpx 不能动,那是给微信胶囊/状态栏让位的安全距,不是设计留白 */
/* 品牌行 → 大标题:40rpx。主标题是首屏第一视觉,logo 只做身份标识,
靠 40rpx 把它压到次要层级。
topbar 的 120rpx 保留用于微信胶囊/状态栏安全距,不作为视觉留白压缩 */
.hero {
padding: 56rpx 0 16rpx;
padding: 40rpx 0 0;
}
.hero-title {
@@ -80,8 +81,8 @@ page {
font-size: 50rpx;
font-weight: 700;
letter-spacing: 3rpx;
/* 1.36 → 1.45:标题自身也松一口气,配合下方三段 gap 一起降密度 */
line-height: 1.45;
/* 单行标题使用紧凑行高,减少上下附加空白 */
line-height: 1.3;
}
/* 不用逗号断句:靠「暖橙强调 + 深墨正文」的色差切分两个短句。
@@ -104,8 +105,9 @@ page {
文字 --brand-ink(纸面 6.10:1,过 AA);整行不可点,靠右侧箭头缺位、
竖线分隔与通栏 CTA 的对比来区分「展示」与「行动」 */
.hero-trust-wrap {
/* 16rpx:比常规块间距紧一档,让三项背书贴住标题、
与 CTA 的 40rpx 拉开「说明 → 行动」的层级 */
/* 贴住标题,作为标题的补充说明。
12rpx(6px)对 26rpx 副行太黏,两行会读成一整块;
16rpx 仍是「同一句话」的观感,但标题与副行各自独立成行 */
margin-top: 16rpx;
text-align: center;
}
@@ -135,12 +137,14 @@ page {
}
/* 主行动按钮:通栏胶囊,直达服务列表。
40rpx 上间距:信任行是一行紧贴标题的小字,CTA 需要与它断开层级,
但不必再拉开一条空带;内边距维持 30rpx 让它在纸面上立得住 */
与信任行保留适度间距,同时避免首屏被空白拉长 */
.hero-cta {
display: flex;
align-items: center;
justify-content: center;
/* 40rpx:CTA 要从「标题文案块」里独立出来,成为明确的可点行动。
28rpx 时实心橙块紧贴信任行,标题与按钮挤在同一视觉组里,
读起来像文案的一部分而不是按钮 */
margin-top: 40rpx;
padding: 30rpx;
border-radius: 999rpx;
@@ -161,6 +165,88 @@ page {
margin-right: 6rpx;
}
/* ===== 培训考证宣传横幅 =====
位置:主 CTA 正下方、未完成预约预览之前——它承接首屏的第二条路径
(陪诊师培训 → 报名),与「立即预约」构成「患者端 / 从业者端」两条入口。
配色:浅橙面 + 2rpx --brand-line 描边 + 24rpx 圆角 + 去阴影
(--brand-soft 落纸面只差约 1.03:1,托形全靠描边,配方同 .quick-item-full)。
内部按钮不再铺浅橙:白底 + 2rpx --brand-strong 环,既与浅橙底区分,
又保住非文本 3:1;全页实心橙仍只留给上方「立即预约」一处 */
.hero-promo {
display: flex;
align-items: center;
margin-top: 24rpx;
padding: 24rpx 22rpx;
border-radius: 24rpx;
background: var(--brand-soft);
border: 2rpx solid var(--brand-line);
transition: transform 0.15s ease;
}
.hero-promo:active,
.hero-promo-hover {
transform: scale(0.99);
}
/* 衬底方块走白面:浅橙底上再叠浅橙衬底等于没有衬底(同 .quick-item-full 的处理) */
.promo-mark {
width: 64rpx;
height: 64rpx;
border-radius: 18rpx;
background: var(--white);
border: 2rpx solid var(--brand-line);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.promo-body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
margin-left: 16rpx;
}
.promo-title {
font-size: 30rpx;
font-weight: 700;
color: var(--ink);
letter-spacing: 1rpx;
}
/* 浅橙底上的次要文字走 --muted(5.24:1,过 AA) */
.promo-desc {
margin-top: 6rpx;
font-size: 24rpx;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 按钮:白底 + 暖橙环。2rpx 细环已有 4.66:1,足以在白/浅橙两种底上托出轮廓;
字走 --brand-ink(白底 6.46:1),不用 --brand-strong 以免小字压线 */
.promo-btn {
display: flex;
align-items: center;
flex-shrink: 0;
margin-left: 12rpx;
padding: 12rpx 16rpx;
border-radius: 999rpx;
background: var(--white);
border: 2rpx solid var(--brand-strong);
}
.promo-btn-text {
margin-right: 4rpx;
font-size: 24rpx;
font-weight: 700;
color: var(--brand-ink);
letter-spacing: 1rpx;
}
/* 未完成预约预览:去掉卡头后,每条预约独立成一卡。
整卡铺淡绿状态底(status-soft)+ 2rpx status-line 描边,
与下方白卡服务宫格明显区分——返回用户一眼先看到「还有事没办完」。
+10 -3
View File
@@ -46,10 +46,11 @@ Page({
points: [
'培训内容:操作、专业能力、安全应急、心理健康、人文素养',
'专业知识:挂号流程、科室分布、设备使用与应急常识',
'培训证书:国家开放大学培训中心《医疗陪诊顾问职业技能培训证书》(培训合格证明,非职业资格证书)',
'培训费用:980 元,报名请联系客服确认'
'培训证书:医疗陪诊顾问(高级)证书(国家开放大学培训中心,培训合格证明,非职业资格证书)',
'报名材料:2 寸蓝底照片电子版、身份证电子版'
],
note: '本页仅作说明,不办理报名与收费'
note: '2026 年考位信息可在培训页提交,具体考位与考试安排以客服确认为准',
action: { label: '进入培训页报名', url: '/pages/train/index' }
}
]
},
@@ -84,6 +85,12 @@ Page({
})
},
// 培训卡 → 培训宣传页(再转考位报名);其余卡仍统一联系客服
goToAction(e) {
const { url } = e.currentTarget.dataset
if (url) wx.navigateTo({ url })
},
onShareAppMessage() {
return {
title: '暖橙陪诊 · 合作与入驻',
+4
View File
@@ -31,6 +31,10 @@
<!-- 尾注:与条目用发丝线分开,说明口径而非补充规则 -->
<text class="card-note">{{ item.note }}</text>
<view class="card-action" wx:if="{{ item.action }}" data-url="{{ item.action.url }}" bindtap="goToAction">
<text class="card-action-text">{{ item.action.label }}</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</view>
<!-- 底部出口:浅橙入口卡(--brand-soft + 2rpx 描边托形 + 去阴影,
+23
View File
@@ -113,6 +113,29 @@ page {
line-height: 1.7;
}
/* 培训卡的报名入口:软填充胶囊,不与其他实心主按钮争层级 */
.card-action {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20rpx;
padding: 18rpx 24rpx;
border-radius: 999rpx;
background: var(--brand-soft);
border: 2rpx solid var(--brand-line);
}
.card-action:active {
transform: scale(0.99);
}
.card-action-text {
margin-right: 6rpx;
font-size: 26rpx;
font-weight: 700;
color: var(--brand-ink);
}
/* ===== 底部出口:浅橙入口卡(同 about 页「联系我们」配方)=====
靠 2rpx --brand-line 描边托形,不加阴影 */
.contact-entry {
+211
View File
@@ -0,0 +1,211 @@
// pages/train/apply.js
// 2026 医疗陪诊顾问(高级)考位报名。图片 base64 只放实例变量,
// 不进 setData,避免大字符串造成渲染与未保存快照的性能问题。
import API from '../../utils/api'
import { setUnsavedGuard, disableUnsavedGuard } from '../../utils/form'
const MAX_IMAGE_BYTES = 5 * 1024 * 1024
Page({
data: {
educationOptions: ['初中及以下', '高中/中专', '大专', '本科', '硕士及以上'],
educationIndex: -1,
form: {
name: '',
idNumber: '',
mobile: '',
education: '',
examMonth: ''
},
photoPath: '',
idCardPath: '',
errors: {},
saving: false,
submitted: false,
successDesc: '',
application: null
},
onLoad() {
this.materialFiles = { photo: null, idCard: null }
this.captureInitialForm()
// 授权登录后预填姓名和手机号;用户已开始填写则不覆盖
getApp().waitForAuth().then(() => {
if (this.isDirty()) return
const profile = getApp().globalData.user?.profile || {}
this.setData({
'form.name': String(profile.name || '').trim(),
'form.mobile': String(profile.mobile || '').trim()
})
this.captureInitialForm()
}).catch(() => {})
},
onUnload() {
disableUnsavedGuard()
},
getSnapshot() {
const { form, photoPath, idCardPath } = this.data
return JSON.stringify({ form, photoPath, idCardPath })
},
captureInitialForm() {
this.initialSnapshot = this.getSnapshot()
this.syncUnsavedGuard()
},
isDirty() {
return this.getSnapshot() !== this.initialSnapshot
},
syncUnsavedGuard() {
setUnsavedGuard(this.isDirty())
},
onInput(e) {
const { field } = e.currentTarget.dataset
this.setData({
[`form.${field}`]: e.detail.value,
[`errors.${field}`]: ''
})
this.syncUnsavedGuard()
},
onEducationChange(e) {
const index = Number(e.detail.value)
this.setData({
educationIndex: index,
'form.education': this.data.educationOptions[index],
'errors.education': ''
})
this.syncUnsavedGuard()
},
onExamMonthChange(e) {
this.setData({ 'form.examMonth': e.detail.value, 'errors.examMonth': '' })
this.syncUnsavedGuard()
},
onChooseImage(e) {
const { kind } = e.currentTarget.dataset
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
sizeType: ['compressed'],
success: (res) => {
const file = res.tempFiles && res.tempFiles[0]
if (!file) return
if (file.size > MAX_IMAGE_BYTES) {
wx.showToast({ title: '图片不能超过 5MB', icon: 'none' })
return
}
this.materialFiles[kind] = file
this.setData({
[`${kind}Path`]: file.tempFilePath,
[`errors.${kind}`]: ''
})
this.syncUnsavedGuard()
},
fail: () => {}
})
},
readImage(kind) {
const file = this.materialFiles[kind]
if (!file) return Promise.reject(new Error('未选择图片'))
const mime = file.tempFilePath.toLowerCase().endsWith('.png') ? 'image/png' : 'image/jpeg'
return new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: file.tempFilePath,
encoding: 'base64',
success: (res) => resolve(`data:${mime};base64,${res.data}`),
fail: () => reject(new Error('图片读取失败,请重新选择'))
})
})
},
validate() {
const { form, photoPath, idCardPath } = this.data
const errors = {}
if (!form.name.trim()) errors.name = '请填写姓名'
if (!/^\d{17}[\dXx]$/.test(form.idNumber.trim())) errors.idNumber = '请填写 18 位身份证号,末位可为 X'
if (!/^1[3-9]\d{9}$/.test(form.mobile.trim())) errors.mobile = '请填写正确的 11 位手机号'
if (!form.education) errors.education = '请选择学历'
if (!form.examMonth) errors.examMonth = '请选择考试月份'
if (!photoPath) errors.photo = '请上传 2 寸蓝底照片电子版'
if (!idCardPath) errors.idCard = '请上传身份证电子版'
return errors
},
async onSubmit() {
if (this.data.saving) return
const errors = this.validate()
this.setData({ errors })
if (Object.keys(errors).length) {
wx.showToast({ title: Object.values(errors)[0], icon: 'none' })
return
}
this.setData({ saving: true })
wx.showLoading({ title: '提交中...', mask: true })
try {
await getApp().waitForAuth()
const [photo, idCard] = await Promise.all([
this.readImage('photo'),
this.readImage('idCard')
])
const { form } = this.data
const res = await API.training.createApplication({
applicant: {
name: form.name.trim(),
idNumber: form.idNumber.trim().toUpperCase(),
mobile: form.mobile.trim(),
education: form.education
},
examMonth: form.examMonth,
materials: { photo, idCard }
})
if (res.code !== 0) {
wx.showToast({ title: res.msg || '提交失败,请重试', icon: 'none' })
return
}
const serverApplication = res.data?.application
const application = serverApplication || {
applicant: {
name: form.name.trim(),
mobile: form.mobile.trim(),
education: form.education
},
examMonth: form.examMonth,
course: { name: '医疗陪诊顾问(高级)', issuer: '国家开放大学培训中心' }
}
setUnsavedGuard(false)
this.setData({
submitted: true,
application,
successDesc: res.msg === '你已提交过报名,客服会尽快联系你'
? res.msg
: '报名资料已提交,客服会尽快与你核对考位和考试安排,请保持手机畅通。'
})
wx.hideLoading()
wx.showToast({ title: '报名已提交', icon: 'success' })
} catch (err) {
wx.showToast({ title: err?.message || '网络异常,请稍后重试', icon: 'none' })
} finally {
wx.hideLoading()
this.setData({ saving: false })
}
},
goToContact() {
wx.navigateTo({ url: '/pages/mine/contact' })
},
goHome() {
wx.switchTab({ url: '/pages/home/index' })
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "考位报名",
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}
+130
View File
@@ -0,0 +1,130 @@
<view class="page-bg">
<!-- 提交成功后整页替换为回执,避免用户在表单上重复提交 -->
<view class="container success-page" wx:if="{{submitted && application}}">
<view class="success-mark">
<t-icon name="task-checked" size="64rpx" color="#9B4508" />
</view>
<text class="success-title">考位报名已提交</text>
<text class="success-desc">{{successDesc}}</text>
<view class="success-card">
<view class="success-row"><text class="success-label">姓名</text><text class="success-value">{{application.applicant.name}}</text></view>
<view class="success-row"><text class="success-label">手机号</text><text class="success-value">{{application.applicant.mobile}}</text></view>
<view class="success-row"><text class="success-label">学历</text><text class="success-value">{{application.applicant.education}}</text></view>
<view class="success-row"><text class="success-label">考试月份</text><text class="success-value">{{application.examMonth}}</text></view>
<view class="success-row"><text class="success-label">报考项目</text><text class="success-value">{{application.course.name}}</text></view>
</view>
<view class="success-primary" bindtap="goToContact">联系客服</view>
<view class="success-secondary" bindtap="goHome">返回首页</view>
</view>
<view class="container" wx:else>
<view class="page-header">
<view class="header-accent"></view>
<text class="header-title">考位信息表</text>
<text class="header-subtitle">2026 年国开培训中心 · 医疗陪诊顾问(高级)</text>
</view>
<view class="course-card">
<view class="course-mark"><t-icon name="education" size="34rpx" color="#9B4508" /></view>
<view class="course-body">
<text class="course-name">医疗陪诊顾问(高级)</text>
<text class="course-issuer">培训单位:国家开放大学培训中心</text>
</view>
</view>
<!-- 通栏白表单块:行距、标签与错误态沿用就诊人表单的排版基准 -->
<view class="form-card">
<view class="form-row">
<text class="form-label">姓名</text>
<view class="form-control">
<input class="form-input" placeholder="请填写真实姓名" maxlength="20" value="{{form.name}}" data-field="name" bindinput="onInput" />
<text class="form-error" wx:if="{{errors.name}}">{{errors.name}}</text>
</view>
</view>
<view class="form-row">
<text class="form-label">身份证号</text>
<view class="form-control">
<input class="form-input" placeholder="18 位身份证号" maxlength="18" value="{{form.idNumber}}" data-field="idNumber" bindinput="onInput" />
<text class="form-error" wx:if="{{errors.idNumber}}">{{errors.idNumber}}</text>
</view>
</view>
<view class="form-row">
<text class="form-label">手机号</text>
<view class="form-control">
<input class="form-input" type="number" placeholder="用于客服联系" maxlength="11" value="{{form.mobile}}" data-field="mobile" bindinput="onInput" />
<text class="form-error" wx:if="{{errors.mobile}}">{{errors.mobile}}</text>
</view>
</view>
<view class="form-row">
<text class="form-label">学历</text>
<view class="form-control">
<picker mode="selector" range="{{educationOptions}}" value="{{educationIndex}}" bindchange="onEducationChange">
<view class="form-picker {{form.education ? '' : 'placeholder'}}">{{form.education || '请选择学历'}}</view>
</picker>
<text class="form-error" wx:if="{{errors.education}}">{{errors.education}}</text>
</view>
</view>
<view class="form-row">
<text class="form-label">考试月份</text>
<view class="form-control">
<picker mode="date" fields="month" start="2026-01" end="2026-12" value="{{form.examMonth}}" bindchange="onExamMonthChange">
<view class="form-picker {{form.examMonth ? '' : 'placeholder'}}">{{form.examMonth || '请选择 2026 年考试月份'}}</view>
</picker>
<text class="field-tip">每月 25、26、27 日考试,28、29 日补考</text>
<text class="form-error" wx:if="{{errors.examMonth}}">{{errors.examMonth}}</text>
</view>
</view>
<view class="form-row">
<text class="form-label">报考项目</text>
<text class="form-static">医疗陪诊顾问(高级)</text>
</view>
<view class="form-row">
<text class="form-label">培训单位</text>
<text class="form-static">国家开放大学培训中心</text>
</view>
</view>
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">报名材料</text>
</view>
<view class="material-tip">请上传清晰的 JPG/PNG 图片,单张不超过 5MB</view>
<view class="material-grid">
<view class="material-item">
<view class="upload-box {{photoPath ? 'has-image' : ''}}" data-kind="photo" bindtap="onChooseImage">
<image wx:if="{{photoPath}}" class="upload-image" src="{{photoPath}}" mode="aspectFill" />
<block wx:else>
<text class="upload-plus">+</text>
<text class="upload-action">上传照片</text>
</block>
</view>
<text class="material-name">2寸蓝底照片电子版</text>
<text class="form-error material-error" wx:if="{{errors.photo}}">{{errors.photo}}</text>
</view>
<view class="material-item">
<view class="upload-box {{idCardPath ? 'has-image' : ''}}" data-kind="idCard" bindtap="onChooseImage">
<image wx:if="{{idCardPath}}" class="upload-image" src="{{idCardPath}}" mode="aspectFill" />
<block wx:else>
<text class="upload-plus">+</text>
<text class="upload-action">上传证件</text>
</block>
</view>
<text class="material-name">身份证电子版</text>
<text class="form-error material-error" wx:if="{{errors.idCard}}">{{errors.idCard}}</text>
</view>
</view>
<view class="privacy-tip">
<t-icon name="lock-on" size="26rpx" color="#A89684" />
<text class="privacy-text">以上信息仅用于考位报名、资料审核与证书办理,我们会严格保密。</text>
</view>
<view class="bottom-placeholder"></view>
</view>
<view class="bottom-bar" wx:if="{{!submitted}}">
<button class="btn-primary" disabled="{{saving}}" bindtap="onSubmit">提交考位报名</button>
</view>
</view>
+71
View File
@@ -0,0 +1,71 @@
/* pages/train/apply.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: 44rpx; font-weight: 700; color: var(--ink); line-height: 1.35; letter-spacing: 1rpx; }
.header-subtitle { display: block; margin-top: 10rpx; font-size: 26rpx; color: var(--muted); line-height: 1.6; }
.course-card,
.form-card,
.success-card {
background: var(--white);
border: 2rpx solid var(--line);
border-radius: 28rpx;
box-shadow: var(--shadow-card);
}
.course-card { display: flex; align-items: center; margin-top: 32rpx; padding: 24rpx 26rpx; }
.course-mark { width: 64rpx; height: 64rpx; border-radius: 18rpx; background: var(--brand-soft); border: 2rpx solid var(--brand-line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.course-body { flex: 1; min-width: 0; margin-left: 20rpx; }
.course-name { display: block; font-size: 30rpx; font-weight: 700; color: var(--ink); }
.course-issuer { display: block; margin-top: 6rpx; font-size: 24rpx; color: var(--muted); }
.form-card { margin-top: 24rpx; padding: 6rpx 26rpx; }
.form-row { display: flex; align-items: flex-start; padding: 24rpx 0; border-bottom: 2rpx solid var(--line); }
.form-row:last-child { border-bottom: none; }
.form-label { width: 168rpx; flex-shrink: 0; padding-top: 8rpx; font-size: 28rpx; color: var(--ink-2); }
.form-control { flex: 1; min-width: 0; }
.form-input { height: 48rpx; font-size: 28rpx; color: var(--ink); text-align: right; }
.form-picker { min-height: 48rpx; font-size: 28rpx; color: var(--ink); text-align: right; line-height: 48rpx; }
.form-picker.placeholder { color: var(--faint); }
.field-tip { display: block; margin-top: 8rpx; font-size: 24rpx; color: var(--muted); line-height: 1.5; text-align: right; }
.form-static { flex: 1; min-width: 0; padding-top: 8rpx; font-size: 28rpx; font-weight: 700; color: var(--ink); text-align: right; line-height: 1.6; }
.form-error { display: block; margin-top: 8rpx; font-size: 24rpx; color: var(--danger); line-height: 1.5; text-align: right; }
.section-head { display: flex; align-items: center; margin-top: 40rpx; }
.section-bar { width: 8rpx; height: 36rpx; border-radius: 4rpx; background: var(--brand-strong); flex-shrink: 0; }
.section-title { margin-left: 16rpx; font-size: 36rpx; font-weight: 700; color: var(--ink); line-height: 1.4; letter-spacing: 1rpx; }
.material-tip { margin-top: 12rpx; font-size: 24rpx; color: var(--muted); line-height: 1.6; }
.material-grid { display: flex; gap: 24rpx; margin-top: 20rpx; }
.material-item { flex: 1; min-width: 0; }
.upload-box { height: 300rpx; border-radius: 24rpx; border: 2rpx dashed var(--brand-strong); background: var(--brand-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.upload-box:active { transform: scale(0.99); }
.upload-box.has-image { border-style: solid; border-color: var(--line); background: var(--white); }
.upload-image { width: 100%; height: 100%; }
.upload-plus { font-size: 52rpx; font-weight: 300; color: var(--brand-ink); line-height: 1; }
.upload-action { margin-top: 16rpx; font-size: 26rpx; font-weight: 700; color: var(--brand-ink); }
.material-name { display: block; margin-top: 14rpx; font-size: 26rpx; color: var(--ink-2); text-align: center; }
.material-error { text-align: center; }
.privacy-tip { display: flex; align-items: flex-start; gap: 10rpx; margin-top: 32rpx; padding: 0 4rpx; }
.privacy-text { flex: 1; font-size: 24rpx; color: var(--muted); line-height: 1.6; }
.bottom-placeholder { height: calc(170rpx + env(safe-area-inset-bottom)); }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 20rpx 32rpx calc(20rpx + env(safe-area-inset-bottom)); background: var(--white); box-shadow: 0 -2rpx 8rpx rgba(63, 43, 25, 0.07); }
.btn-primary { width: 100%; padding: 26rpx 0; border-radius: 999rpx; background: var(--brand-strong); box-shadow: var(--shadow-cta); font-size: 32rpx; font-weight: 700; color: var(--white); letter-spacing: 2rpx; border: none; line-height: 1.5; }
.btn-primary::after { border: none; }
.btn-primary:active { transform: scale(0.99); }
/* 提交回执 */
.success-page { display: flex; flex-direction: column; align-items: center; padding-top: 100rpx; }
.success-mark { width: 112rpx; height: 112rpx; border-radius: 50%; background: var(--brand-soft); border: 2rpx solid var(--brand-line); display: flex; align-items: center; justify-content: center; }
.success-title { margin-top: 28rpx; font-size: 42rpx; font-weight: 700; color: var(--ink); }
.success-desc { margin-top: 16rpx; max-width: 580rpx; font-size: 26rpx; color: var(--muted); line-height: 1.7; text-align: center; }
.success-card { width: 100%; box-sizing: border-box; margin-top: 40rpx; padding: 6rpx 26rpx; }
.success-row { display: flex; padding: 22rpx 0; border-bottom: 2rpx solid var(--line); }
.success-row:last-child { border-bottom: none; }
.success-label { width: 160rpx; flex-shrink: 0; font-size: 26rpx; color: var(--muted); }
.success-value { flex: 1; font-size: 28rpx; font-weight: 700; color: var(--ink); text-align: right; }
.success-primary { width: 100%; box-sizing: border-box; margin-top: 40rpx; padding: 24rpx 0; border-radius: 999rpx; background: var(--brand-strong); box-shadow: var(--shadow-cta); font-size: 30rpx; font-weight: 700; color: var(--white); text-align: center; }
.success-secondary { margin-top: 24rpx; padding: 16rpx 32rpx; font-size: 28rpx; color: var(--muted); }
+60
View File
@@ -0,0 +1,60 @@
// pages/train/index.js
// 陪诊师培训宣传页:只陈述课程、考位、证书性质与所需材料;
// 班期与审核结果以客服确认为准,不作职业资格或就业承诺。
const config = require('../../utils/config.js')
Page({
data: {
certificateSampleUrl: `${config.BASE_URL}/health/static/certificate_sample.jpg`,
steps: [
{ title: '联系老师报名', desc: '添加老师微信,提交资料与意向考试月份' },
{ title: '培训与考核', desc: '按通知完成课程学习与结业考核' },
{ title: '领取证书', desc: '考核通过后,由培训单位办理下发' }
],
faqs: [
{
q: '证书是职业资格证书吗?',
a: '不是。本证书的培训单位为国家开放大学培训中心,属于职业技能培训证书,用于证明完成相应培训与考核。'
},
{
q: '报名需要准备哪些材料?',
a: '需要姓名、身份证号、手机号、学历、考试月份,以及 2 寸蓝底照片电子版和身份证电子版。'
},
{
q: '学习和考试怎么进行?',
a: '学习和考试均支持手机或电脑,随时随地都能完成。'
}
]
},
goToContact() {
wx.navigateTo({ url: '/pages/mine/contact' })
},
// 证书样本支持放大查看
previewCertificateSample() {
wx.previewImage({
current: this.data.certificateSampleUrl,
urls: [this.data.certificateSampleUrl]
})
},
// 小程序内不能直接打开外部网页,复制官方查询地址后可在浏览器访问
copyCertificateUrl() {
wx.setClipboardData({
data: 'https://www.xiangxue8.com',
success: () => wx.showToast({ title: '查询网址已复制', icon: 'success' })
})
},
onShareAppMessage() {
return {
title: '2026 医疗陪诊顾问(高级)培训考证报名',
path: '/pages/train/index'
}
},
onShareTimeline() {
return { title: '2026 医疗陪诊顾问(高级)培训考证报名' }
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "陪诊师培训",
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}
+150
View File
@@ -0,0 +1,150 @@
<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">国家开放大学培训中心 · 2026 年考位报名</text>
</view>
<!-- 首屏主卡:两档价格并列 -->
<view class="intro-card">
<view class="plan-row">
<view class="plan-item">
<text class="plan-tag">纯考证</text>
<view class="plan-price">
<text class="price-symbol">¥</text>
<text class="price-number">780</text>
</view>
<text class="price-origin">原价 ¥1580</text>
</view>
<view class="plan-divider"></view>
<view class="plan-item">
<text class="plan-tag">含带练 1 次</text>
<view class="plan-price">
<text class="price-symbol">¥</text>
<text class="price-number">980</text>
</view>
<text class="price-origin">原价 ¥1780</text>
</view>
</view>
</view>
<!-- 培训与考试:合并三张长卡为一张规格表,左标签右取值 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">培训与考试</text>
<text class="section-en">PROGRAM</text>
</view>
<view class="list-card spec-card">
<view class="spec-row">
<text class="spec-label">培训单位</text>
<text class="spec-value">国家开放大学培训中心</text>
</view>
<view class="spec-row">
<text class="spec-label">培训形式</text>
<text class="spec-value">线上培训,共 40 课时</text>
</view>
<view class="spec-row">
<text class="spec-label">报考条件</text>
<text class="spec-value">学完 80% 以上即可报考</text>
</view>
<view class="spec-row">
<text class="spec-label">正式考试</text>
<text class="spec-value">每月 25、26、27 日</text>
</view>
<view class="spec-row">
<text class="spec-label">补考安排</text>
<text class="spec-value">每月 28、29 日</text>
</view>
<view class="spec-row">
<text class="spec-label">成绩公布</text>
<text class="spec-value">考完 30 分钟内出成绩</text>
</view>
<view class="spec-row">
<text class="spec-label">证书下发</text>
<text class="spec-value">电子版约 1 周,纸质版约 45 天</text>
</view>
<view class="spec-row spec-row-link" bindtap="copyCertificateUrl" aria-role="button" aria-label="复制证书查询网址">
<text class="spec-label">证书查询</text>
<text class="spec-value spec-link">国开享学吧</text>
</view>
<text class="card-note">具体考位与证书安排以客服和培训单位通知为准。</text>
</view>
</view>
<!-- 报考联系:紧接培训与考试,先联系老师再走流程 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">报考联系</text>
<text class="section-en">CONTACT</text>
</view>
<view class="list-card contact-card">
<view class="contact-main">
<text class="contact-lead">长按联系老师报名</text>
<view class="contact-link" bindtap="goToContact" aria-role="button" aria-label="查看其他联系方式">
<text class="contact-link-text">查看其他联系方式</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</view>
<image class="contact-qr" src="/images/wechat_code.jpg" mode="aspectFit" show-menu-by-longpress="{{ true }}" />
</view>
</view>
<!-- 报名流程:三步收口,去掉单独一步的客服审核 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">报名流程</text>
<text class="section-en">PROCESS</text>
</view>
<view class="list-card step-card">
<view class="step" wx:for="{{steps}}" wx:key="title">
<view class="step-rail">
<view class="step-dot {{index === 0 ? 'step-dot-active' : ''}}">{{index + 1}}</view>
<view class="step-line" wx:if="{{index < steps.length - 1}}"></view>
</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="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">常见问题</text>
<text class="section-en">FAQ</text>
</view>
<view class="list-card faq-card">
<view class="faq-item" wx:for="{{faqs}}" wx:key="q">
<view class="faq-q-row">
<text class="faq-badge">问</text>
<text class="faq-q">{{item.q}}</text>
</view>
<text class="faq-a">{{item.a}}</text>
</view>
</view>
</view>
<!-- 证书样本:限宽居中,避免整幅图占满一屏 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">证书样本</text>
<text class="section-en">SAMPLE</text>
</view>
<view class="list-card sample-card">
<view class="sample-frame">
<image class="sample-image" src="{{certificateSampleUrl}}" mode="widthFix" lazy-load bindtap="previewCertificateSample" />
</view>
<text class="sample-note">样本仅供参考,以实际下发为准(点击可放大)</text>
</view>
</view>
</view>
</view>
+227
View File
@@ -0,0 +1,227 @@
/* pages/train/index.wxss:配色令牌来自 app.wxss,本页不留副本
===== 版式顺序 =====
价格 → 培训与考试 → 报考联系 → 报名流程 → 常见问题 → 证书样本。
区块合并、间距收紧,靠发丝线与留白分层,不靠卡片堆叠。
===== 字体系统 =====
字体栈与 app.wxss 一致:iOS 落到苹方、Windows/安卓落到雅黑或系统黑体,
都属同一类无衬线,不强行加载外部字体,避免首屏体积与闪烁问题。
字号、字重、字距全部收在下方的 --t-* / --tracking-* 令牌里,
页面内不再出现散落的 font-size 字面量:
展示数字 88 / 页面标题 44 / 区块标题 36 / 卡片主值 32 / 正文 28 / 注释 26
中文只用 400、700 两档字重;大字标题字距为 0,小号英文标反而放宽到 4rpx,
让"大标题紧、小标签松"形成对比,这是最省力的秩序感来源。
价格等数字统一 tabular-nums,切数与位数变化时不会左右跳。
===== 行高 =====
单行标题 1.4–1.45,多行正文 1.7–1.75;中文方块字低于 1.4 发挤、高于 1.8 发散 */
.page-bg {
min-height: 100vh;
background: var(--paper);
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
-webkit-font-smoothing: antialiased;
--t-display: 88rpx;
--t-h1: 44rpx;
--t-h2: 36rpx;
--t-title: 32rpx;
--t-body: 28rpx;
--t-caption: 26rpx;
--tracking-tight: -1rpx;
--tracking-title: 1rpx;
--tracking-label: 4rpx;
}
.container { padding: 32rpx 32rpx calc(48rpx + env(safe-area-inset-bottom)); }
/* ===== 页首 ===== */
.page-header { padding: 24rpx 0 8rpx; }
/* 短横色标:页面级记号(首页 .page-accent 同一支),区块级留给竖条 */
.header-accent { width: 64rpx; height: 8rpx; border-radius: 4rpx; background: var(--brand-strong); }
.header-title {
display: block; margin-top: 20rpx;
font-size: var(--t-h1); font-weight: 700; line-height: 1.35;
letter-spacing: 0; color: var(--ink);
}
.header-subtitle {
display: block; margin-top: 10rpx;
font-size: var(--t-body); font-weight: 400; line-height: 1.6;
letter-spacing: 0; color: var(--muted);
}
/* 首屏主卡:两档价格并列,整卡走暖橙衬底,成为全页唯一的暖色块
价格文字用 --brand-ink(浅橙底 5.96:1,过 AA),分隔线用 --brand-line */
.intro-card,
.list-card {
background: var(--white);
border: 2rpx solid var(--line);
box-shadow: var(--shadow-card);
}
.intro-card {
margin-top: 32rpx; padding: 40rpx 24rpx; border-radius: 28rpx;
background: var(--brand-soft); border-color: var(--brand-line);
}
/* 两栏等宽,数字同样大小,中缝一条 --brand-line 竖线 */
.plan-row { display: flex; align-items: stretch; }
.plan-item { flex: 1; min-width: 0; padding: 0 20rpx; text-align: center; }
.plan-divider { width: 2rpx; flex-shrink: 0; background: var(--brand-line); }
.plan-tag {
display: block;
font-size: var(--t-body); font-weight: 700; line-height: 1.4;
letter-spacing: 0; color: var(--muted);
}
.plan-price { display: flex; align-items: baseline; justify-content: center; margin-top: 18rpx; }
.price-symbol {
margin-right: 4rpx;
font-size: var(--t-title); font-weight: 700; line-height: 1;
color: var(--brand-ink);
}
.price-number {
font-size: var(--t-display); font-weight: 700; line-height: 1;
letter-spacing: var(--tracking-tight);
font-variant-numeric: tabular-nums;
color: var(--brand-ink);
}
.price-origin {
display: block; margin-top: 14rpx;
font-size: var(--t-body); font-weight: 400; line-height: 1.4;
color: var(--muted); text-decoration: line-through;
font-variant-numeric: tabular-nums;
}
/* ===== 区块标题 =====
竖条高 = 标题字号(36rpx),与首页 / itemlist 同一支记号;
右侧英文小标只做节奏与秩序感,宽字距 + muted,不与中文标题争层级 */
.section { margin-top: 44rpx; }
.section-head { display: flex; align-items: baseline; margin-bottom: 20rpx; }
.section-bar { width: 8rpx; height: 36rpx; border-radius: 4rpx; background: var(--brand-strong); flex-shrink: 0; align-self: center; }
.section-title {
margin-left: 16rpx;
font-size: var(--t-h2); font-weight: 700; line-height: 1.4;
letter-spacing: var(--tracking-title); color: var(--ink);
}
.section-en {
margin-left: 14rpx;
font-size: var(--t-caption); font-weight: 700; line-height: 1.4;
letter-spacing: var(--tracking-label); color: var(--muted);
}
/* ===== 白卡 ===== */
.list-card { padding: 6rpx 26rpx; border-radius: 28rpx; }
/* ===== 培训与考试:规格表 =====
左标签 muted 小字、右取值 ink 粗体,一行一条,横向扫读最快 */
.spec-card { padding-top: 4rpx; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; padding: 24rpx 0; border-bottom: 2rpx solid var(--line); }
.spec-row:last-of-type { border-bottom: none; }
.spec-label {
flex-shrink: 0;
font-size: var(--t-body); font-weight: 400; line-height: 1.5;
letter-spacing: 0; color: var(--muted);
}
.spec-value {
flex: 1; min-width: 0; margin-left: 32rpx; text-align: right;
font-size: var(--t-title); font-weight: 700; line-height: 1.5;
letter-spacing: 0; color: var(--ink); word-break: break-word;
font-variant-numeric: tabular-nums;
}
.spec-row-link { transition: background-color 0.15s ease; }
.spec-row-link:active { background: var(--brand-soft); }
.spec-link { color: var(--brand-ink); }
.spec-link::after { content: ' ↗'; font-size: var(--t-caption); }
/* 卡片尾部说明:--muted 注释字号,比正文轻一档,是"以…为准"的免责声明 */
.card-note {
display: block; padding: 22rpx 0;
font-size: var(--t-caption); font-weight: 400; line-height: 1.7;
letter-spacing: 0; color: var(--muted);
}
/* ===== 报名流程(时间轴)===== */
.step-card { padding-top: 28rpx; padding-bottom: 28rpx; }
.step { display: flex; }
.step-rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.step-dot {
width: 44rpx; height: 44rpx; border-radius: 50%; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
background: var(--brand-soft); border: 2rpx solid var(--brand-line);
font-size: var(--t-caption); font-weight: 700; line-height: 1;
color: var(--brand-ink);
}
.step-dot-active { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--white); box-shadow: var(--shadow-cta); }
.step-line { width: 2rpx; flex: 1; min-height: 34rpx; background: var(--sep); }
.step-body { flex: 1; min-width: 0; margin-left: 20rpx; padding-bottom: 26rpx; }
.step:last-child .step-body { padding-bottom: 0; }
.step-title {
display: block;
font-size: var(--t-title); font-weight: 700; line-height: 1.45;
letter-spacing: 0; color: var(--ink);
}
.step-desc {
display: block; margin-top: 6rpx;
font-size: var(--t-body); font-weight: 400; line-height: 1.7;
letter-spacing: 0; color: var(--muted);
}
/* ===== 报考联系:文字与二维码并排 =====
二维码不必独占一行,说明与入口压在同一张卡里 */
.contact-card { display: flex; align-items: center; padding: 20rpx 24rpx; }
.contact-main { flex: 1; min-width: 0; padding-right: 24rpx; }
.contact-lead {
display: block;
font-size: var(--t-title); font-weight: 700; line-height: 1.45;
letter-spacing: 0; color: var(--ink);
}
/* 客服入口:暖橙文字 + chevron 点击暗示,与本站其他入口同一口径 */
.contact-link { display: flex; align-items: center; margin-top: 20rpx; }
.contact-link-text {
font-size: var(--t-body); font-weight: 700; line-height: 1.5;
letter-spacing: 0; color: var(--brand-ink);
}
.contact-qr { width: 280rpx; height: 260rpx; flex-shrink: 0; border-radius: 16rpx; }
/* ===== 常见问题 =====
问:一行粗体墨色;答:缩进到问句正文左缘,常规字重 ink-2 */
.faq-card { padding-top: 4rpx; padding-bottom: 4rpx; }
.faq-item { padding: 26rpx 0; border-bottom: 2rpx solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-q-row { display: flex; align-items: flex-start; }
.faq-badge {
flex-shrink: 0; width: 44rpx; height: 44rpx; margin-right: 16rpx; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
background: var(--brand-soft); border: 2rpx solid var(--brand-line);
font-size: var(--t-caption); font-weight: 700; line-height: 1;
color: var(--brand-ink);
}
.faq-q {
flex: 1;
font-size: var(--t-title); font-weight: 700; line-height: 1.45;
letter-spacing: 0; color: var(--ink);
}
/* 答案缩进 60rpx:与问句正文左缘对齐(徽标 44 + 间距 16),读成一问一答 */
.faq-a {
display: block; margin-top: 12rpx; padding-left: 60rpx;
font-size: var(--t-body); font-weight: 400; line-height: 1.75;
letter-spacing: 0; color: var(--ink-2);
}
/* ===== 证书样本 =====
样本图限宽居中,不必铺满整卡,否则一张图吃掉大半屏 */
.sample-card { padding: 20rpx; }
.sample-frame { padding: 12rpx; border-radius: 20rpx; background: var(--paper); border: 2rpx dashed var(--sep); }
.sample-image { display: block; width: 100%; max-width: 380rpx; margin: 0 auto; border-radius: 12rpx; background: var(--brand-soft); }
.sample-note {
display: block; margin-top: 16rpx;
font-size: var(--t-caption); font-weight: 400; line-height: 1.6;
letter-spacing: 0; color: var(--muted); text-align: center;
}
/* ===== 页面收尾 =====
无固定底栏,页尾留一段安全距离即可 */
@media (prefers-reduced-motion: reduce) {
.spec-row-link { transition: none; }
}
+6
View File
@@ -26,6 +26,12 @@ const API = {
getAttendantById: (id) => request.get(`/health/attendant/${id}`),
},
// 陪诊师培训考证报名
training: {
createApplication: (data) => request.post('/health/training-application', data),
getMyApplication: () => request.get('/health/training-application/mine'),
},
// 就诊人:后端强制以 token 中的用户为准,无需传 userId
healthProfile: {
getMyProfiles: (params) => request.get('/health/health-profile/mine', params),