fix: 问题修复
This commit is contained in:
parent
402f60beba
commit
a9e3bc244e
@ -118,6 +118,7 @@ const reconnectAttempts = ref(0); // 重连尝试次数
|
||||
const MAX_RECONNECT_ATTEMPTS = 5; // 最大重连次数
|
||||
const POLLING_INTERVAL = 10000; // 轮询间隔 10 秒
|
||||
const infoVisible = ref(false);
|
||||
const prePage = ref('');
|
||||
|
||||
// 消息接收超时检测相关变量
|
||||
const lastMessageTime = ref(Date.now()); // 最后一次收到消息的时间
|
||||
@ -555,6 +556,7 @@ function endRtcSession() {
|
||||
|
||||
// 页面加载
|
||||
onLoad(async (options) => {
|
||||
prePage.value = options.prePage || '';
|
||||
uni.$on('autoRxFail', () => {
|
||||
footerBtnMode.value = 'reEdit';
|
||||
canReEdit.value = true;
|
||||
@ -638,6 +640,13 @@ onUnload(() => {
|
||||
// 结束可能存在的视频问诊:交由插件自身的 onHangup/onError 事件处理,不在页面卸载时强制挂断,
|
||||
// 避免与插件的接听/通话流程冲突导致刚接通就被立即挂断。
|
||||
endRtcSession();
|
||||
if (prePage.value === 'createOrder') {
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/record/order-detail?orderId=${consult.value?.orderId || orderId.value}&prePage=createOrder`
|
||||
})
|
||||
}, 750)
|
||||
}
|
||||
});
|
||||
|
||||
// 页面隐藏或返回上一页时,也确保挂断并清理通话状态
|
||||
|
||||
@ -66,6 +66,7 @@ import ConfirmPopup from './confirm-popup.vue';
|
||||
import EmptyComponent from '@/components/empty.vue';
|
||||
|
||||
const { order } = storeToRefs(orderStore());
|
||||
const { autoFillDisease } = orderStore();
|
||||
const { elderClass, elderVarStyle } = useElder();
|
||||
const tabs = [{ label: '本院历史处方', value: 'history-prescription' }, { label: '医保购药记录', value: 'purchase-record' }];
|
||||
const activeTab = ref('history-prescription');
|
||||
@ -81,6 +82,9 @@ function cancel() {
|
||||
|
||||
function changeDrugs(list) {
|
||||
visible.value = false;
|
||||
const preDrugIds = order.value.drugs.map(i => i._id);
|
||||
const drugIds = list.map(i => i._id);
|
||||
const newDrugIds = drugIds.filter(i => !preDrugIds.includes(i));
|
||||
list.forEach(i => {
|
||||
const index = order.value.drugs.findIndex(j => j.insurance_code === i.insurance_code);
|
||||
if (index >= 0) {
|
||||
@ -89,6 +93,7 @@ function changeDrugs(list) {
|
||||
order.value.drugs.push(i);
|
||||
}
|
||||
})
|
||||
autoFillDisease(newDrugIds);
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
|
||||
@ -435,7 +435,7 @@ async function enterRoom() {
|
||||
await imStore.enterConversation(conversationID);
|
||||
hideLoading();
|
||||
uni.redirectTo({
|
||||
url: `/pages/chat/index?conversationID=${conversationID}&orderId=${orderId.value}`,
|
||||
url: `/pages/chat/index?conversationID=${conversationID}&orderId=${orderId.value}&prePage=createOrder`,
|
||||
});
|
||||
} catch (error) {
|
||||
hideLoading();
|
||||
|
||||
@ -66,6 +66,7 @@ import { ref, onUnmounted } from "vue";
|
||||
import { onLoad, onHide } from "@dcloudio/uni-app";
|
||||
import useUser from "@/hooks/useUser";
|
||||
import { autoAddHlwPatient, isDoctorOnline } from '@/utils/api'
|
||||
import { toast } from "@/utils/widget";
|
||||
import fullPage from "@/components/full-page.vue";
|
||||
import confirmPopup from "./confirm-popup.vue";
|
||||
import storePopup from "./store-popup.vue";
|
||||
|
||||
@ -25,10 +25,6 @@
|
||||
<view class="text-info">
|
||||
<view class="name-bar" :class="{ 'name-bar--elder': elderMode }">
|
||||
<view class="name">{{ item.maskName }}</view>
|
||||
<!-- <view class="tag-group" :class="{ 'tag-group--elder': elderMode }">
|
||||
<view class="user-tag user-tag--warning">已实名</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<view class="mobile">{{ item.maskMobile }}</view>
|
||||
</view>
|
||||
@ -59,7 +55,7 @@ const { userInfo, logined, patientList, loadPatientList } = useUser();
|
||||
// 适老化模式状态
|
||||
const elderMode = ref(false);
|
||||
const selfPatient = computed(() => patientList.value.find(item => item.isSelf) || null);
|
||||
const otherPatients = computed(() => patientList.value.filter(item => !item.isSelf));
|
||||
const otherPatients = computed(() => patientList.value.filter(item => !item.isSelf && !item.isTemporary));
|
||||
|
||||
onMounted(() => {
|
||||
// 从本地存储读取适老化模式状态
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<view v-if="diagnosis" class="order-form" :class="{ 'order-form--elder': elderMode }">
|
||||
<view class="order-form-row" :class="{ 'order-form-row--elder': elderMode }" @click="viewSumarry()">
|
||||
<text class="order-form-label" :class="{ 'order-form-label--elder': elderMode }">病历概要:</text>
|
||||
<text style="color:$theme-brown-primary" :class="{ 'link-text--elder': elderMode }">点击查看</text>
|
||||
<text style="link-text" :class="{ 'link-text--elder': elderMode }">点击查看</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-form" :class="{ 'order-form--elder': elderMode }">
|
||||
@ -104,13 +104,14 @@ const msg = ref("");
|
||||
const pay = useYbPay(null, reload);
|
||||
const diagnosis = ref(null)
|
||||
const timer = ref(null)
|
||||
const prePage = ref('');
|
||||
|
||||
// 适老化模式状态
|
||||
const elderMode = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
// 从本地存储读取适老化模式状态
|
||||
const savedElderMode = uni.getStorageSync('elderMode')||false;
|
||||
const savedElderMode = uni.getStorageSync('elderMode') || false;
|
||||
|
||||
if (savedElderMode !== null && savedElderMode !== undefined) {
|
||||
elderMode.value = !!savedElderMode
|
||||
@ -118,12 +119,18 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
onLoad((e) => {
|
||||
prePage.value = e.prePage;
|
||||
if (e.orderId) {
|
||||
getOrderDetail(e.orderId);
|
||||
}
|
||||
});
|
||||
onUnload(() => {
|
||||
timer.value && clearInterval(timer.value)
|
||||
if (prePage.value === 'createOrder') {
|
||||
uni.redirectTo({
|
||||
url: `/pages/record/consult-record`
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function reload() {
|
||||
@ -396,6 +403,10 @@ text {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.link-text {
|
||||
color: $theme-brown-primary;
|
||||
}
|
||||
|
||||
.link-text--elder {
|
||||
font-size: 39rpx !important; // 28 * 1.4
|
||||
font-weight: bold;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user