From ae5f070e62ea58f99308af145a304c860a232405 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期一, 28 四月 2025 14:20:55 +0800
Subject: [PATCH] xg营养管理需求
---
.env.development | 4 ++--
src/views/home/components/patient_file.vue | 6 +++---
src/utils/request.ts | 6 +++---
src/views/login/component/account.vue | 2 +-
src/api/login/index.ts | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.env.development b/.env.development
index 4db89da..f6a2c27 100644
--- a/.env.development
+++ b/.env.development
@@ -2,5 +2,5 @@
ENV = development
# 本地环境接口地址
-# VITE_API_URL = 'http://testbs.ihemodialysis.com/'
-VITE_API_URL = 'https://hemobs.icoldchain.cn/'
+VITE_API_URL = 'http://testbs.ihemodialysis.com/'
+# VITE_API_URL = 'https://hemobs.icoldchain.cn/'
diff --git a/src/api/login/index.ts b/src/api/login/index.ts
index c516072..77c1b09 100644
--- a/src/api/login/index.ts
+++ b/src/api/login/index.ts
@@ -7,7 +7,7 @@
*/
export function signIn(params: string) {
return request({
- url: '/user/info/login',
+ url: '/user/info/loginForNutrition',
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 792f154..d68919b 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -66,13 +66,13 @@
ElMessage.error('网络连接错误');
} else if (error.message.indexOf('status code 401') != -1) {
ElMessage.error('token 过期了');
- Session.clear(); // 清除浏览器全部临时缓存
- window.location.href = '/'; // 去登录页
+ // Session.clear(); // 清除浏览器全部临时缓存
+ // window.location.href = '/'; // 去登录页
}else {
if (error.response.data) ElMessage.error(error.response.statusText);
else ElMessage.error('接口路径找不到');
}
- console.log
+ console.log(error)
return Promise.reject(error);
}
);
diff --git a/src/views/home/components/patient_file.vue b/src/views/home/components/patient_file.vue
index ff61df9..8a7de67 100644
--- a/src/views/home/components/patient_file.vue
+++ b/src/views/home/components/patient_file.vue
@@ -87,9 +87,9 @@
</tr>
<tr>
- <td>电话号码:{{ patientsInfo.patientTelNo }}</td>
- <td>家属电话:{{ patientsInfo.patientTelNoRelative }}</td>
- <td colspan="3">家庭地址:{{ patientsInfo.patientAddress }}</td>
+ <td>电话号码:{{ state.patientData.电话号码 }}</td>
+ <td>家属电话:{{ state.patientData.亲属手机号 }}</td>
+ <td colspan="3">家庭地址:{{ state.patientData.家庭住址 }}</td>
</tr>
<tr>
diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue
index ce9288f..fe3b991 100644
--- a/src/views/login/component/account.vue
+++ b/src/views/login/component/account.vue
@@ -120,7 +120,7 @@
} else { //第一次登录没有选择到客户
state.loading.signIn = true;
- const signInRes = await signIn(`user_no=${state.ruleForm.userName}&user_password=${state.ruleForm.password}`);
+ const signInRes = await signIn(`userno=${state.ruleForm.userName}&password=${state.ruleForm.password}`);
if (signInRes.data) {
// 存储 token 到浏览器缓存
Session.set('token', signInRes.data);
--
Gitblit v1.8.0