Skip to content

Commit 67d0fc5

Browse files
committed
update: delete duplicate configuration file
1 parent 5f478d1 commit 67d0fc5

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/config/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ const API = {
44
};
55

66
export default {
7+
// 项目api配置
78
api: {
89
host: API.HOST,
910
path: API.PATH,
1011
url: API.HOST + API.PATH
11-
}
12+
},
13+
// 项目当前版本号
14+
version: '1.0.0'
1215
};

src/dc/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import pathToRegexp from 'path-to-regexp';
22
import request from '../utils/request';
3-
import CONFIG from '../config/index';
3+
import config from '../config/index';
44

55
const METHOD_EMUN = ['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT'];
66

77
export default (oOption = {}, fnDataModel) => {
8-
oOption.url = CONFIG.api.url + oOption.url;
8+
oOption.url = config.api.url + oOption.url;
99
if (oOption.urlData) {
1010
oOption.url = fnCompileDynamicUrl(oOption.url, oOption.urlData);
1111
}

src/pages/about/about.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { version } from '../../utils/config';
1+
import config from '../../config/index';
22

33
Page({
44
data: {
55
aContentList: [
66
{
77
header: '当前版本',
8-
content: `v${version}`
8+
content: `v${config.version}`
99
},
1010
{
1111
header: '项目开源主页',

src/utils/config.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)