Browse Source

fix: 页面增加loading效果

周玉环 21 hours ago
parent
commit
d7d83a7e2f

+ 2 - 0
xinkeaboard-admin/src/pages/manage/product/cate_lists.js

@@ -289,6 +289,7 @@ export default class CateLists extends Component {
   get_list = (params, grade = '', updateFlag = false) => {
   get_list = (params, grade = '', updateFlag = false) => {
     const { dispatch } = this.props;
     const { dispatch } = this.props;
     let { data, expandedRowKeys } = this.state;
     let { data, expandedRowKeys } = this.state;
+    this.setState({loading: true})
     dispatch({
     dispatch({
       type: 'product/get_cate_list_by_id',
       type: 'product/get_cate_list_by_id',
       payload: {...params,pageSize:pageSize},
       payload: {...params,pageSize:pageSize},
@@ -329,6 +330,7 @@ export default class CateLists extends Component {
         }
         }
         this.setState({
         this.setState({
           data: data,
           data: data,
+          loading: false
         });
         });
       },
       },
     });
     });

+ 2 - 1
xinkeaboard-admin/src/pages/manage/product/goods_setting.js

@@ -43,6 +43,7 @@ export default class GoodsSetting extends Component {
   get_setting = () => {
   get_setting = () => {
     const { dispatch } = this.props;
     const { dispatch } = this.props;
     let { info_data } = this.state;
     let { info_data } = this.state;
+    this.setState({initLoading: true})
     // let str_info = 'goods_publish_need_audit,goods_sort_weight_sale,goods_sort_weight_view';
     // let str_info = 'goods_publish_need_audit,goods_sort_weight_sale,goods_sort_weight_view';
     let str_info = 'goods_publish_need_audit';
     let str_info = 'goods_publish_need_audit';
     dispatch({
     dispatch({
@@ -77,7 +78,7 @@ export default class GoodsSetting extends Component {
             info_data.push(sld_config_save_btn);
             info_data.push(sld_config_save_btn);
           }
           }
         }
         }
-        this.setState({ info_data, flag: 1 });
+        this.setState({ info_data, flag: 1, initLoading: false });
       },
       },
     });
     });
   };
   };

+ 2 - 1
xinkeaboard-admin/src/pages/sysset/base/about_us.js

@@ -41,6 +41,7 @@ export default class SiteInfo extends Component {
   get_siet_base_info = () => {
   get_siet_base_info = () => {
     const { dispatch } = this.props;
     const { dispatch } = this.props;
     let { info_data } = this.state;
     let { info_data } = this.state;
+    this.setState({initLoading: true})
     dispatch({
     dispatch({
       type: 'sldsetting/get_site_base_info',
       type: 'sldsetting/get_site_base_info',
       callback: (res) => {
       callback: (res) => {
@@ -88,7 +89,7 @@ export default class SiteInfo extends Component {
             });
             });
           }
           }
         }
         }
-        this.setState({ info_data, flag: 1 });
+        this.setState({ info_data, flag: 1, initLoading: false });
       },
       },
     });
     });
   };
   };

+ 2 - 1
xinkeaboard-admin/src/pages/sysset/base/site_info.js

@@ -40,6 +40,7 @@ export default class SiteInfo extends Component {
   get_siet_base_info = () => {
   get_siet_base_info = () => {
     const { dispatch } = this.props;
     const { dispatch } = this.props;
     let { info_data } = this.state;
     let { info_data } = this.state;
+    this.setState({initLoading: true})
     dispatch({
     dispatch({
       type: 'sldsetting/get_site_base_info',
       type: 'sldsetting/get_site_base_info',
       callback: (res) => {
       callback: (res) => {
@@ -82,7 +83,7 @@ export default class SiteInfo extends Component {
             info_data.push(sld_config_save_btn);
             info_data.push(sld_config_save_btn);
           }
           }
         }
         }
-        this.setState({ info_data, flag: 1 });
+        this.setState({ info_data, flag: 1, initLoading: false });
       },
       },
     });
     });
   };
   };