feat: 患者端挂号预约流程改造与就诊人选择
- 挂号预约:register-info 流程重构、确认步骤/患者选择步骤组件、我的预约(myappiont)页对接 - 接口:register.js 补充挂号相关接口,api.js 调整 - 就诊人:claim-patient-modal 复用弹窗 - 医生信息:doctor-detail/doctor-userinfo 配合排班展示 - 规范:新增 Api-Module-Split.mdc 接口模块拆分规则
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<view v-for="(item, index) in homeZones" :key="index" class="zone-item" @click="goZoneList(item)">
|
||||
<view class="zone-icon-box">
|
||||
<image
|
||||
:src="item.icon || ((storeType === '1' || storeType === 1) ? 'https://img.icons8.com/fluency/48/pill.png' : 'https://img.icons8.com/fluency/48/doctor-male.png')"
|
||||
:src="item.display_icon"
|
||||
class="zone-img"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
@@ -113,7 +113,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单提醒:后台可配一行两列卡片 / 金刚区图标 -->
|
||||
<!-- 订单待办:后台可配一行两列卡片 / 图标入口 -->
|
||||
<view
|
||||
v-if="visibleOrderReminds.length > 0 && orderRemindStyle === 'grid'"
|
||||
class="order-remind-grid"
|
||||
@@ -161,7 +161,13 @@
|
||||
'order-remind-zone-icon--arrived': item.key === 'arrived'
|
||||
}"
|
||||
>
|
||||
<text :class="'iconfont ' + item.icon"></text>
|
||||
<image
|
||||
v-if="item.display_icon"
|
||||
:src="item.display_icon"
|
||||
class="zone-img"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text v-else :class="'iconfont ' + item.icon"></text>
|
||||
<text v-if="item.count > 0" class="order-remind-badge">{{ item.count }}</text>
|
||||
</view>
|
||||
<text class="zone-text">{{ item.title }}</text>
|
||||
@@ -388,6 +394,23 @@ import { registerImageCompressPopup } from '@/utils/image-compress-modal.js';
|
||||
import { setGuestMode, isGuestMode, isLoggedIn } from '@/common/utils/auth.js';
|
||||
import {silentLogin} from "@/utils/login";
|
||||
|
||||
/** 待办入口默认图:后台未上传时用本地精致矢量透明 PNG */
|
||||
const REMIND_FALLBACK_ICON = {
|
||||
unpaid_register: '/static/home/remind/unpaid_register.png',
|
||||
unpaid_product: '/static/home/remind/unpaid_product.png',
|
||||
shipped: '/static/home/remind/shipped.png',
|
||||
arrived: '/static/home/remind/arrived.png',
|
||||
};
|
||||
/** 药品专区默认入口图:专区未配 icon 时按 type 回落 */
|
||||
const ZONE_FALLBACK_ICON = {
|
||||
otc: '/static/home/zones/otc.png',
|
||||
prescription: '/static/home/zones/prescription.png',
|
||||
health_food: '/static/home/zones/health_food.png',
|
||||
service_package: '/static/home/zones/service_package.png',
|
||||
non_drug: '/static/home/zones/non_drug.png',
|
||||
medical_device: '/static/home/zones/medical_device.png',
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MessageNotification,
|
||||
@@ -424,9 +447,9 @@ export default {
|
||||
statusBarHeight: 20,
|
||||
isSticky: false,
|
||||
|
||||
// 金刚区布局:scroll 横滑 / wrap 一行五个 / wrap2 一行两个(后台可配)
|
||||
// 待办入口排布:scroll 横滑 / wrap 一行五个 / wrap2 一行两个(后台可配)
|
||||
zoneLayoutMode: 'scroll',
|
||||
// 订单提醒:grid 一行两列 / zone 金刚区(后台可配)
|
||||
// 订单待办:grid 一行两列 / zone 图标入口(后台可配)
|
||||
orderRemindStyle: 'grid',
|
||||
orderRemindItems: [],
|
||||
|
||||
@@ -510,7 +533,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 拉取首页展示样式(游客/登录都要,金刚区布局跟配置走)
|
||||
* 拉取首页展示样式(游客/登录都要,待办入口排布跟配置走)
|
||||
*/
|
||||
async fetchHomeDisplayConfig() {
|
||||
try {
|
||||
@@ -551,7 +574,14 @@ export default {
|
||||
if (payload.order_remind_style === 'grid' || payload.order_remind_style === 'zone') {
|
||||
this.orderRemindStyle = payload.order_remind_style;
|
||||
}
|
||||
this.orderRemindItems = payload.items || [];
|
||||
this.orderRemindItems = (payload.items || []).map((item) => {
|
||||
const key = item && item.key ? item.key : '';
|
||||
const uploaded = item && item.icon_url ? item.icon_url : '';
|
||||
return {
|
||||
...item,
|
||||
display_icon: uploaded || REMIND_FALLBACK_ICON[key] || '',
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('fetchOrderReminds', e);
|
||||
this.orderRemindItems = [];
|
||||
@@ -891,7 +921,15 @@ export default {
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}).then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.homeZones = res.data.result || res.data.data || [];
|
||||
const list = res.data.result || [];
|
||||
this.homeZones = list.map((z) => {
|
||||
const type = z && z.type ? z.type : '';
|
||||
const icon = z && z.icon ? z.icon : '';
|
||||
return {
|
||||
...z,
|
||||
display_icon: icon || ZONE_FALLBACK_ICON[type] || ZONE_FALLBACK_ICON.otc,
|
||||
};
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
// 仅尚无数据时清空,避免刷新失败抹掉已有专区
|
||||
@@ -903,7 +941,7 @@ export default {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 下拉刷新:清空金刚区与卡片,重新走骨架后再拉数
|
||||
* 下拉刷新:清空待办入口与卡片,重新走骨架后再拉数
|
||||
* 为什么:用户期望刷新时看到加载态,而不是短暂保留旧数据
|
||||
*/
|
||||
refreshHomeContent() {
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function getHomeZonesApi(params) {
|
||||
return await get('/product/home-zones', params, 3)
|
||||
}
|
||||
/**
|
||||
* 首页展示样式(金刚区布局 + 订单提醒样式)
|
||||
* 首页展示样式(待办入口排布 + 订单待办样式)
|
||||
* xk-api GET /product/home-display-config;游客态 request.js 会改写到 guest
|
||||
*/
|
||||
export async function getHomeDisplayConfigApi() {
|
||||
|
||||
Reference in New Issue
Block a user