fix:问题修复

This commit is contained in:
huxuejian 2026-08-07 10:50:56 +08:00
parent f97c59c7c0
commit 402f60beba
5 changed files with 67 additions and 18 deletions

View File

@ -146,7 +146,6 @@ function viewSummary() {
} }
.doctor-title { .doctor-title {
margin-left: 10rpx;
color: #999; color: #999;
// //

View File

@ -9,7 +9,13 @@
confirm-type="send" confirm-type="send"
@confirm="send" @confirm="send"
/> />
<view v-if="showSend" class="send-button" :class="{ 'send-button--elder': elderMode }" @click="send">发送</view> <view
v-if="showSend"
class="send-button"
:class="{ 'send-button--elder': elderMode }"
@touchstart.stop.prevent="sendByTouchStart"
@click.stop="sendByClick"
>发送</view>
<image <image
v-else v-else
class="more-tool" class="more-tool"
@ -83,6 +89,7 @@ onUnmounted(() => {
const emits = defineEmits(["sendMessage", "sendImage"]); const emits = defineEmits(["sendMessage", "sendImage"]);
const showTool = ref(false); const showTool = ref(false);
const txt = ref(""); const txt = ref("");
const lastTouchSendAt = ref(0);
const showSend = computed(() => txt.value.trim() !== ""); const showSend = computed(() => txt.value.trim() !== "");
function send() { function send() {
@ -93,6 +100,17 @@ function send() {
} }
} }
function sendByTouchStart() {
lastTouchSendAt.value = Date.now();
send();
}
function sendByClick() {
// touchstart click
if (Date.now() - lastTouchSendAt.value < 500) return;
send();
}
function chooseImage(source) { function chooseImage(source) {
emits("sendImage", source); emits("sendImage", source);
showTool.value = false; showTool.value = false;

View File

@ -91,7 +91,13 @@
<text>已在实体医疗机构确诊的疾病</text> <text>已在实体医疗机构确诊的疾病</text>
</view> </view>
<view class="disease-list"> <view class="disease-list">
<view v-for="disease in order.diseases" :key="disease" class="disease-item">{{ disease }}</view> <view v-for="(disease, index) in order.diseases" :key="disease" class="disease-item">
<text>{{ disease }}</text>
<view class="disease-remove" :class="{ 'disease-remove--elder': elderMode }"
@click.stop="removeDisease(index)">
<uni-icons type="closeempty" :color="themeColor" :size="elderMode ? 22 : 16" />
</view>
</view>
<view class="disease-add" @click="toAddDisease()">+ 添加</view> <view class="disease-add" @click="toAddDisease()">+ 添加</view>
</view> </view>
</view> </view>
@ -272,6 +278,11 @@ function onDiseaseSelected(disease) {
} }
} }
function removeDisease(index) {
if (!Array.isArray(order.value.diseases)) return;
order.value.diseases.splice(index, 1);
}
async function checkStock() { async function checkStock() {
loading('获取药品信息...') loading('获取药品信息...')
const { success, message, data } = await checkOnlineDrugInfoStock({ const { success, message, data } = await checkOnlineDrugInfoStock({
@ -628,6 +639,26 @@ onMounted(() => {
color: $theme-brown-primary; color: $theme-brown-primary;
} }
.disease-item {
display: flex;
align-items: center;
padding-right: 8rpx;
}
.disease-remove {
display: flex;
align-items: center;
justify-content: center;
width: 44rpx;
height: 44rpx;
margin-left: 4rpx;
}
.disease-remove--elder {
width: 56rpx;
height: 56rpx;
}
.drug-spec--error { .drug-spec--error {
color: red !important; color: red !important;
} }

View File

@ -56,8 +56,7 @@
</view> </view>
</full-page> </full-page>
<store-popup :drugStore="drugStore" :visible="visible" @confirm="confirmStoreInfo()" <store-popup :drugStore="drugStore" :visible="visible" @confirm="confirmStoreInfo()" @close="visible = false" />
@close="visible = false" />
<confirm-popup title="提示" content="您是否半年内在医院就诊过?" cancelText="否" confirmText="是" :visible="confirmVisible" <confirm-popup title="提示" content="您是否半年内在医院就诊过?" cancelText="否" confirmText="是" :visible="confirmVisible"
@confirm="handleConfirmYes" @cancel="handleConfirmNo" @close="confirmVisible = false" /> @confirm="handleConfirmYes" @cancel="handleConfirmNo" @close="confirmVisible = false" />
</template> </template>
@ -66,9 +65,7 @@
import { ref, onUnmounted } from "vue"; import { ref, onUnmounted } from "vue";
import { onLoad, onHide } from "@dcloudio/uni-app"; import { onLoad, onHide } from "@dcloudio/uni-app";
import useUser from "@/hooks/useUser"; import useUser from "@/hooks/useUser";
import { autoAddHlwPatient } from '@/utils/api' import { autoAddHlwPatient, isDoctorOnline } from '@/utils/api'
import ybPlugin from "@/utils/insurance-plugin";
import fullPage from "@/components/full-page.vue"; import fullPage from "@/components/full-page.vue";
import confirmPopup from "./confirm-popup.vue"; import confirmPopup from "./confirm-popup.vue";
import storePopup from "./store-popup.vue"; import storePopup from "./store-popup.vue";
@ -109,7 +106,7 @@ const menuList = [
}, },
]; ];
const { userInfo, logined, login, loginout, getAuthCode, drugStore, getStore, storeId } = useUser(); const { userInfo, logined, login, loginout, drugStore, getStore, storeId } = useUser();
const statusBarHeight = ref(20); const statusBarHeight = ref(20);
const count = ref({ rxUnpay: 0 }); const count = ref({ rxUnpay: 0 });
const confirmVisible = ref(false); const confirmVisible = ref(false);
@ -136,6 +133,7 @@ async function checkLogin() {
async function handleMainMenuClick(item) { async function handleMainMenuClick(item) {
await checkLogin(); await checkLogin();
await checkCanBuy()
await autoAddPatient(); await autoAddPatient();
feeType.value = item.key; feeType.value = item.key;
confirmVisible.value = true; confirmVisible.value = true;
@ -150,6 +148,7 @@ async function handleConfirmYes() {
cleanupConfirmPromise(); cleanupConfirmPromise();
} }
} }
function confirmStoreInfo() { function confirmStoreInfo() {
visible.value = false visible.value = false
confirmAuth(); confirmAuth();
@ -167,10 +166,13 @@ function cleanupConfirmPromise() {
confirmResolve.value = null; confirmResolve.value = null;
confirmReject.value = null; confirmReject.value = null;
} }
async function checkCanBuy() {
async function ybAuth() { const res = await isDoctorOnline()
const authCode = await getAuthCode("nhsamp"); if (res.data === true) {
const psnToken = await ybPlugin.getArchiveToken(authCode); return
}
toast('很抱歉!互联网问诊医生因线下门诊等原因暂时不在线!请稍后再试!')
return Promise.reject('no online doctor')
} }
async function gotoPage(item) { async function gotoPage(item) {
@ -196,7 +198,6 @@ onLoad((opts) => {
} }
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
statusBarHeight.value = systemInfo.statusBarHeight || 20; statusBarHeight.value = systemInfo.statusBarHeight || 20;
// ybPlugin.init()
}); });
onHide(() => { onHide(() => {

View File

@ -45,7 +45,7 @@
</view> </view>
<view class="card_footer info-row-end" :class="{ 'card_footer--elder': elderMode }"> <view class="card_footer info-row-end" :class="{ 'card_footer--elder': elderMode }">
<view :class="{ 'footer-type--elder': elderMode }"> <view :class="{ 'footer-type--elder': elderMode }">
{{ item.consultType == 'onlineMedicinePurchase' ? "在线配药" : "在线复诊" }} {{ item.feeType == 'YB' ? "医保处方" : "自费处方" }}
</view> </view>
<view v-if="item.showFooter" class="footer-item"> <view v-if="item.showFooter" class="footer-item">
<view v-if="item.showRefund" class="import-btn" :class="{ 'import-btn--elder': elderMode }" <view v-if="item.showRefund" class="import-btn" :class="{ 'import-btn--elder': elderMode }"
@ -100,10 +100,10 @@ const list = ref([]);
const more = ref(false); const more = ref(false);
const loading = ref(false); const loading = ref(false);
// //
const tabs = ["全部", "待支付", "处理中", "已结束", "已取消"]; const tabs = ["全部", "处理中", "已结束", "已取消"];
const tabFilters = [ const tabFilters = [
{}, {},
{ payStatus: "pending", orderStatus: "pending" }, // { payStatus: "pending", orderStatus: "pending" },
{ {
payStatus: "success", payStatus: "success",
orderStatuses: ["pending", "processing", "completed"], orderStatuses: ["pending", "processing", "completed"],