Commit 11dc43b16d65a780f38154c4b887b1699356bd6e

Authored by chenxt
1 parent 7e1c776a

路由返回

src/routes/mobile/IndexMobile.js
@@ -38,7 +38,8 @@ import * as commonFunc from '../../components/Common/commonFunc'; @@ -38,7 +38,8 @@ import * as commonFunc from '../../components/Common/commonFunc';
38 // import AppUtil from '../../utils/AppUtil'; 38 // import AppUtil from '../../utils/AppUtil';
39 import * as commonBusiness from "../../components/Common/commonBusiness"; 39 import * as commonBusiness from "../../components/Common/commonBusiness";
40 import commonConfig from '@/utils/config'; 40 import commonConfig from '@/utils/config';
41 - 41 +import VConsole from 'vconsole';
  42 +let vConsole;
42 // eslint-disable-next-line prefer-destructuring 43 // eslint-disable-next-line prefer-destructuring
43 const alert = Modal.alert; 44 const alert = Modal.alert;
44 class IndexMobile extends React.Component { 45 class IndexMobile extends React.Component {
@@ -115,7 +116,12 @@ class IndexMobile extends React.Component { @@ -115,7 +116,12 @@ class IndexMobile extends React.Component {
115 setTimeout(() => { this.backPressedOnce = false; }, 2000); 116 setTimeout(() => { this.backPressedOnce = false; }, 2000);
116 } 117 }
117 } else { 118 } else {
  119 + // window.history.back(-1);
118 window.history.back(-1); 120 window.history.back(-1);
  121 + setTimeout(() => {
  122 + this.props.dispatch({ type: "app/refreshPage" });
  123 + // history.push(location.pathname);
  124 + }, 100);
119 } 125 }
120 }); 126 });
121 } 127 }
@@ -299,6 +305,7 @@ class IndexMobile extends React.Component { @@ -299,6 +305,7 @@ class IndexMobile extends React.Component {
299 const device = commonFunc.showLocalMessage(this.props, 'device', '设备'); 305 const device = commonFunc.showLocalMessage(this.props, 'device', '设备');
300 const quotation = commonFunc.showLocalMessage(this.props, 'quotation', '报价下单'); 306 const quotation = commonFunc.showLocalMessage(this.props, 'quotation', '报价下单');
301 const mine = commonFunc.showLocalMessage(this.props, 'mine', '我的'); 307 const mine = commonFunc.showLocalMessage(this.props, 'mine', '我的');
  308 + // vConsole = new VConsole();
302 return ( 309 return (
303 <div id="tab-bar" className={styles.demo}> 310 <div id="tab-bar" className={styles.demo}>
304 <div className="demoName"> 311 <div className="demoName">