About page&home/estate change

This commit is contained in:
saplf
2019-09-08 15:23:46 +08:00
parent 3825948c05
commit 130845d133
15 changed files with 235 additions and 24 deletions

View File

@@ -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());

View File

@@ -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,
});