Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aeafe2131d | ||
|
|
0615b8934f | ||
|
|
1472835f79 |
@@ -1,17 +1,10 @@
|
||||
/**app.wxss**/
|
||||
|
||||
/* 图标字体随包发布,避免运行时依赖远程字体域名。
|
||||
使用独立字体族覆盖 apply-shared 的 TDesign 图标组件,不修改会被 npm 重建的依赖文件。 */
|
||||
@font-face {
|
||||
font-family: 'escort-icons';
|
||||
src: url('/assets/fonts/t.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.t-icon {
|
||||
font-family: 'escort-icons' !important;
|
||||
}
|
||||
/* 图标字体(TDesign t 图标族)已以 base64 形式内嵌在
|
||||
miniprogram_npm/tdesign-miniprogram/icon/icon.wxss 的 @font-face 中,
|
||||
不再请求远程域名 tdesign.gtimg.com,也不走本地路径(真机不支持)。
|
||||
注意:该文件会在「构建 npm」时被 node_modules 覆盖回远程地址,
|
||||
重建后需重新替换 src 为 base64(脚本步骤见 doc/review.md Q-P3-3)。 */
|
||||
|
||||
page {
|
||||
/* ===== 全站配色令牌 · 唯一来源(改配色只改这里)=====
|
||||
|
||||
@@ -603,6 +603,16 @@ token 失效、服务错误和断线均不会永久转圈;清空或重进后
|
||||
|
||||
发布前确认下载域名白名单;字体失败不能导致全站图标空白。优先自托管或提供本地兜底,并在开发者工具断网/资源失败场景验证。
|
||||
|
||||
(已整改:`icon.wxss` 的 `@font-face` 改为 base64 内嵌 `assets/fonts/t.woff`(data URI),不再请求 `tdesign.gtimg.com`。微信不允许组件 wxss 里用本地路径加载字体(报错带 `-do-not-use-local-path-` 标记),真机也不支持,故放弃本地路径方案;`app.wxss` 原有的 `escort-icons` 本地路径覆盖块已一并移除,字体唯一来源收敛到组件内嵌。注意 `miniprogram_npm` 会在「构建 npm」时由 `node_modules` 重新生成,重建后控制台若再次出现远程字体请求,需重新把 `icon.wxss` 的 `src` 替换为 base64:
|
||||
|
||||
```powershell
|
||||
$b64=[Convert]::ToBase64String([IO.File]::ReadAllBytes("ui/wxapp_escort/assets/fonts/t.woff"))
|
||||
$p="ui/wxapp_escort/miniprogram_npm/tdesign-miniprogram/icon/icon.wxss"
|
||||
$c=[IO.File]::ReadAllText($p)
|
||||
$c=[regex]::Replace($c,'src:url\([^)]*\)\s*format\(''woff''\),"src:url(data:font/woff;base64,$b64) format('woff')")
|
||||
[IO.File]::WriteAllText($p,$c)
|
||||
```)
|
||||
|
||||
## Q-P3-4 其他小项
|
||||
|
||||
- `itemdetail.js`:`calculateTotal` 忽略入参、恒定返回价格,是无效抽象。
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -90,7 +90,10 @@ Page({
|
||||
const service = services.find(entry => entry.id === item.escort?.serviceId) || null
|
||||
const record = this.formatRecord(item)
|
||||
// 服务已下架时仍可查看历史订单,但不能再按失效规则修改订单。
|
||||
if (!service) record.canEditOrder = false
|
||||
if (!service) {
|
||||
record.canEditBooking = false
|
||||
record.canEditNote = false
|
||||
}
|
||||
this.setData({ record, service })
|
||||
if (service) this.applyBookingConfig(service)
|
||||
if (record.healthProfileId) this.loadProfileSnapshot(record.healthProfileId)
|
||||
@@ -180,7 +183,9 @@ Page({
|
||||
&& (status === 'pending' || status === 'confirmed' || status === 'cancelled')
|
||||
const canRebook = (status === 'completed' || status === 'cancelled') && item.escort?.serviceId > 0
|
||||
// 终态单据只读:医院预约与陪诊需求不允许回改(就诊人「修改」改的是档案,不在此列)
|
||||
const canEditOrder = status !== 'completed' && status !== 'cancelled'
|
||||
// 进行中服务已开始:排期与医院不允许用户单方变更,仅保留就诊人备注(与后端字段白名单一致)
|
||||
const canEditBooking = status === 'pending' || status === 'confirmed'
|
||||
const canEditNote = canEditBooking || status === 'in_progress'
|
||||
|
||||
// 就诊人字段先落到局部变量:摘要行(patientMeta)与首字牌(patientInitial)
|
||||
// 都从同一批值派生,口径不在 WXML 与 JS 两处各写一份
|
||||
@@ -247,7 +252,8 @@ Page({
|
||||
canCancel,
|
||||
canDelete,
|
||||
canRebook,
|
||||
canEditOrder,
|
||||
canEditBooking,
|
||||
canEditNote,
|
||||
// 底栏只在确实有按钮时出现,避免无动作状态空留一条白栏
|
||||
showBottomBar: canCancel || canDelete || canRebook,
|
||||
createTime: item.meta?.createtime ? formatDateTime(item.meta.createtime) : '',
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">医院预约信息</text>
|
||||
<view class="section-link" wx:if="{{record.canEditOrder}}" bindtap="onEditHospital">
|
||||
<view class="section-link" wx:if="{{record.canEditBooking}}" bindtap="onEditHospital">
|
||||
<text class="section-link-text">修改</text>
|
||||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
@@ -106,7 +106,7 @@
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">陪诊需求与症状</text>
|
||||
<view class="section-link" wx:if="{{record.canEditOrder}}" bindtap="onEditPatientNote">
|
||||
<view class="section-link" wx:if="{{record.canEditNote}}" bindtap="onEditPatientNote">
|
||||
<text class="section-link-text">修改</text>
|
||||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user