About page&home/estate change
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { dispatch, getState } from './utils';
|
||||
import { routerRedux } from 'dva';
|
||||
import config from '@/config';
|
||||
|
||||
const isApp = () => {
|
||||
const r = typeof window.plus !== 'undefined';
|
||||
@@ -32,13 +33,6 @@ const scan = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const firstPaths = [
|
||||
'/check',
|
||||
'/home/estate',
|
||||
'/home/fund',
|
||||
'/home/market',
|
||||
'/home/profile',
|
||||
];
|
||||
const backButtonHandler = () => {
|
||||
const barcode = window.plus.barcode.getBarcodeById(barcodeId);
|
||||
if (barcode) {
|
||||
@@ -46,7 +40,7 @@ const backButtonHandler = () => {
|
||||
return;
|
||||
}
|
||||
const { pathname } = getState().router.location;
|
||||
if (firstPaths.includes(pathname)) {
|
||||
if (config.exitPaths.includes(pathname)) {
|
||||
window.plus.runtime.quit();
|
||||
} else {
|
||||
dispatch(routerRedux.goBack());
|
||||
|
||||
@@ -3,6 +3,7 @@ import { formatMessage } from 'umi-plugin-locale';
|
||||
import _ from 'lodash';
|
||||
import { globalState } from '@/services/common';
|
||||
import { isDev, dispatch } from './utils';
|
||||
import config from '@/config';
|
||||
|
||||
export interface AppResp<T = any> {
|
||||
ok: boolean,
|
||||
@@ -19,8 +20,7 @@ const errorMap = {
|
||||
403: 'common.403',
|
||||
};
|
||||
|
||||
const baseURL = 'https://server.fiv.tacever.org/v1';
|
||||
// const baseURL = 'http://yapi.faronear.org/mock/20/v1';
|
||||
const { baseURL } = config;
|
||||
const instance = axios.create({
|
||||
baseURL,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user