diff --git a/pages/chat/consult-head.vue b/pages/chat/consult-head.vue
index d39b0d9..0ab6ed7 100644
--- a/pages/chat/consult-head.vue
+++ b/pages/chat/consult-head.vue
@@ -146,7 +146,6 @@ function viewSummary() {
}
.doctor-title {
- margin-left: 10rpx;
color: #999;
// 长辈模式样式
diff --git a/pages/chat/input-bar.vue b/pages/chat/input-bar.vue
index 81a62f8..db4c378 100644
--- a/pages/chat/input-bar.vue
+++ b/pages/chat/input-bar.vue
@@ -9,7 +9,13 @@
confirm-type="send"
@confirm="send"
/>
- 发送
+ 发送
{
const emits = defineEmits(["sendMessage", "sendImage"]);
const showTool = ref(false);
const txt = ref("");
+const lastTouchSendAt = ref(0);
const showSend = computed(() => txt.value.trim() !== "");
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) {
emits("sendImage", source);
showTool.value = false;
@@ -225,4 +243,4 @@ function chooseImage(source) {
font-size: 36rpx; // 字体放大 (28rpx → 36rpx)
}
}
-
\ No newline at end of file
+
diff --git a/pages/consult/info.vue b/pages/consult/info.vue
index 2368f61..11341ff 100644
--- a/pages/consult/info.vue
+++ b/pages/consult/info.vue
@@ -91,7 +91,13 @@
已在实体医疗机构确诊的疾病
- {{ disease }}
+
+ {{ disease }}
+
+
+
+
+ 添加
@@ -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() {
loading('获取药品信息...')
const { success, message, data } = await checkOnlineDrugInfoStock({
@@ -628,6 +639,26 @@ onMounted(() => {
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 {
color: red !important;
}
diff --git a/pages/home/home.vue b/pages/home/home.vue
index a4c7e92..5397e94 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -56,8 +56,7 @@
-
+
@@ -66,9 +65,7 @@
import { ref, onUnmounted } from "vue";
import { onLoad, onHide } from "@dcloudio/uni-app";
import useUser from "@/hooks/useUser";
-import { autoAddHlwPatient } from '@/utils/api'
-import ybPlugin from "@/utils/insurance-plugin";
-
+import { autoAddHlwPatient, isDoctorOnline } from '@/utils/api'
import fullPage from "@/components/full-page.vue";
import confirmPopup from "./confirm-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 count = ref({ rxUnpay: 0 });
const confirmVisible = ref(false);
@@ -136,6 +133,7 @@ async function checkLogin() {
async function handleMainMenuClick(item) {
await checkLogin();
+ await checkCanBuy()
await autoAddPatient();
feeType.value = item.key;
confirmVisible.value = true;
@@ -150,6 +148,7 @@ async function handleConfirmYes() {
cleanupConfirmPromise();
}
}
+
function confirmStoreInfo() {
visible.value = false
confirmAuth();
@@ -167,10 +166,13 @@ function cleanupConfirmPromise() {
confirmResolve.value = null;
confirmReject.value = null;
}
-
-async function ybAuth() {
- const authCode = await getAuthCode("nhsamp");
- const psnToken = await ybPlugin.getArchiveToken(authCode);
+async function checkCanBuy() {
+ const res = await isDoctorOnline()
+ if (res.data === true) {
+ return
+ }
+ toast('很抱歉!互联网问诊医生因线下门诊等原因暂时不在线!请稍后再试!')
+ return Promise.reject('no online doctor')
}
async function gotoPage(item) {
@@ -196,7 +198,6 @@ onLoad((opts) => {
}
const systemInfo = uni.getSystemInfoSync();
statusBarHeight.value = systemInfo.statusBarHeight || 20;
- // ybPlugin.init()
});
onHide(() => {
diff --git a/pages/record/consult-record.vue b/pages/record/consult-record.vue
index f76890a..b8c8801 100644
--- a/pages/record/consult-record.vue
+++ b/pages/record/consult-record.vue
@@ -45,7 +45,7 @@