diff --git a/components/custom-message/rx-open-fail-card.vue b/components/custom-message/rx-open-fail-card.vue
index 6b87ca9..7368240 100644
--- a/components/custom-message/rx-open-fail-card.vue
+++ b/components/custom-message/rx-open-fail-card.vue
@@ -17,6 +17,12 @@ import useElder from "@/hooks/useElder";
const { elderVarStyle } = storeToRefs(useElder());
+const ERROR_SOURCES = {
+ SYSTEM: "服务暂未响应",
+ HIS: "处方开具失败",
+ RATIONAL_DRUG: "合理用药审核不通过,请点击下方按钮修改信息",
+};
+
const props = defineProps({
extension: {
type: [Object, String],
@@ -49,7 +55,7 @@ const reason = computed(() => {
});
const errorSource = computed(() => {
- return ext.value && ext.value.source === 'HIS' ? '处方开具失败' : '服务暂未响应';
+ return ext.value && ERROR_SOURCES[ext.value.source] ? ERROR_SOURCES[ext.value.source] : ERROR_SOURCES['SYSTEM'];
});
onMounted(() => {
diff --git a/package.json b/package.json
index 4cbc361..cec1b21 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"title": "【开发】支付宝",
"env": {
"UNI_PLATFORM": "mp-alipay",
- "API_BASE_URL": "http://192.168.31.146:8080",
+ "API_BASE_URL": "http://192.168.31.160:8080",
"CORP_ID": "4G7H8J2K9L0M1N3P5Q6R7S8T9U",
"APP_ID": "2021004129669493",
"ORDER_SOURCE": "ALIPAY_MINI",
diff --git a/pages/consult/components/recommended-disease-popup.vue b/pages/consult/components/recommended-disease-popup.vue
new file mode 100644
index 0000000..33b395a
--- /dev/null
+++ b/pages/consult/components/recommended-disease-popup.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
diff --git a/pages/consult/history-drugs/history-drugs.vue b/pages/consult/history-drugs/history-drugs.vue
index 337c026..40e0d6f 100644
--- a/pages/consult/history-drugs/history-drugs.vue
+++ b/pages/consult/history-drugs/history-drugs.vue
@@ -80,7 +80,7 @@ function cancel() {
uni.navigateBack()
}
-function changeDrugs(list) {
+async function changeDrugs(list) {
visible.value = false;
const preDrugIds = order.value.drugs.map(i => i._id);
const drugIds = list.map(i => i._id);
@@ -93,7 +93,11 @@ function changeDrugs(list) {
order.value.drugs.push(i);
}
})
- autoFillDisease(newDrugIds);
+ try {
+ await autoFillDisease(newDrugIds);
+ } catch (error) {
+ console.error('获取药品推荐诊断失败:', error);
+ }
uni.navigateBack()
}
@@ -293,4 +297,4 @@ onLoad(() => {
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/consult/index.vue b/pages/consult/index.vue
index acda04a..2953fb0 100644
--- a/pages/consult/index.vue
+++ b/pages/consult/index.vue
@@ -148,20 +148,24 @@ async function scanInsuranceCode() {
try {
const scanResult = await scanCode();
const content = scanResult && typeof scanResult.result === 'string' ? scanResult.result : '';
- const [Name, IDNum, CardNum, CardIDCode] = content.split('|');
- if (!Name || !IDNum || !CardNum || !CardIDCode) {
+ const [source, encodedName, IDNum, value1, value2] = content.split('|');
+ if (!['SC', 'EC'].includes(source) || !encodedName || !IDNum || !value1 || (source === 'SC' && !value2)) {
+ scanning.value = false;
toast("医保信息不完整,请重新读卡");
return;
}
if (userInfo.value.certNo === IDNum) {
+ scanning.value = false;
toast("当前操作仅支持非本人医保码");
return;
}
set("current-scanned-card", {
- Name: decodeURIComponent(Name),
+ Source: source,
+ Name: decodeURIComponent(encodedName),
IDNum,
- CardNum,
- CardIDCode
+ ...(source === 'SC'
+ ? { CardNum: value1, CardIDCode: value2 }
+ : { ECToken: value1 }),
}, 300);
uni.navigateTo({
url: `/pages/member/detail?type=ybQrcode&feeType=${feeType.value}`,
diff --git a/pages/consult/info.vue b/pages/consult/info.vue
index 19a34d1..20c7549 100644
--- a/pages/consult/info.vue
+++ b/pages/consult/info.vue
@@ -134,10 +134,13 @@
@cancel="customConfirmData.onCancel" @close="customConfirmVisible = false" />
+