| | |
| | | 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/' |
| | |
| | | */ |
| | | 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' |
| | |
| | | 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); |
| | | } |
| | | ); |
| | |
| | | |
| | | </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> |
| | |
| | | |
| | | } 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); |