瀏覽代碼

getHospitalInfo接口参数名修改,模式默认值bug修改

zhouna 6 年之前
父節點
當前提交
3cfedb65e8
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/store/async-actions/patInfo.js

+ 3 - 3
src/store/async-actions/patInfo.js

@@ -7,6 +7,7 @@ import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
 import {ISREAD,MODI_LOADING} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
+import config from '@config/index';
 
 const api = {
     getPatInfo: '/patientInfo/getTopPatientInfo',
@@ -19,8 +20,7 @@ export const initHospitalInfo = (dispatch, getState) => {
     let baseList = getState();
     let state = baseList.patInfo.message;
     json(api.getHospitalInfo, {
-        "code": getUrlArgObject('hospitalId'),
-        "id":state.hospitalId
+        "hospitalCode": getUrlArgObject('hospitalId'),
     }).then((res) => {
         const data = res.data;
         if (data.code == 0) {
@@ -118,7 +118,7 @@ export async function getPatientMessage(dispatch, getState){
   //设置初始模式
   dispatch({
     type: CONFIRM_TYPE,
-    confirmType:data1.modeValue
+    confirmType:data1.modeValue||config.defaultValue.mode
   });
   dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
   dispatch(getCommonList(5));     //获取常用化验标签列表