Browse Source

历史引用重复推送bug修改

zhouna 5 năm trước cách đây
mục cha
commit
d47bf84397
1 tập tin đã thay đổi với 4 bổ sung17 xóa
  1. 4 17
      src/store/async-actions/historyTemplates.js

+ 4 - 17
src/store/async-actions/historyTemplates.js

@@ -7,7 +7,6 @@ import { billing } from '@store/async-actions/pushMessage';
 
 export const initItemList = (item) => {
   let baseList = store.getState();
-  // let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
   const param = {
       "hospitalId": state.hospitalId,
@@ -17,16 +16,6 @@ export const initItemList = (item) => {
       "current": 1,
       "size": 9999
     }
-    /*return (dispatch) => {
-        axios.json('/inquiryInfo/hisInquirys',param).then((res)=>{
-            const data =res.data;
-            if(data.code == 0){
-                dispatch(initHistory(data.data));
-            }else{
-                console.log(data)
-            }
-        })
-    }*/
     return axios.json('/inquiryInfo/hisInquirys',param);
 };
 export const getHistempDetail = (item) => {
@@ -38,13 +27,11 @@ export const getHistempDetail = (item) => {
             const data =res.data;
             if(data.code == 0){
                 let tmpData = data.data
-                // let tmpList = tmpData.inquiryDetailList
-                // tmpData.detailList = tmpList
-                // console.log(tmpData)
-                pushAllDataList(item.sign,'push',tmpData,'history')       //引用     
-                store.dispatch(billing());
+                pushAllDataList(item.sign,'push',tmpData,'history')       //引用
+                if(didPushParamChange()) {
+                  dispatch(billing());
+                }
             }else{
-                // console.log(data)
                 Notify.error(data.msg);
             }
         })