Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wbx-PCAndMobi
mobi
Commits
d633b502
Commit
d633b502
authored
May 07, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据打包命令展示对应的菜单(可自定义展示部分公共菜单),优化main.js中的子项目注册,
parent
31dae2ed
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
302 additions
and
154 deletions
+302
-154
main.js
src/main.js
+2
-42
documentsRoutes.json
src/router/documentsRoutes.json
+0
-1
getMicRouters.js
src/router/getMicRouters.js
+24
-35
huangpuRoutes.json
src/router/huangpuRoutes.json
+1
-56
routeByFilter.json
src/router/routeByFilter.json
+263
-0
api.js
src/server/api.js
+12
-20
No files found.
src/main.js
View file @
d633b502
...
...
@@ -196,51 +196,11 @@ let system //= micSystemsList
let
env
=
process
.
env
.
NODE_ENV
console
.
log
(
process
.
env
.
NODE_ENV
,
'NODE_ENV'
)
switch
(
env
)
{
// case env.indexOf('pudong') > -1: // 根据当前打包的项目调用该项目对应的路由
case
'sit'
:
system
=
micSystemsList
.
sit
break
case
'production'
:
system
=
micSystemsList
.
prod
break
case
'pudong-sit'
:
system
=
micSystemsList
.
sit
break
case
'pudong-prod'
:
if
(
env
.
indexOf
(
'prod'
)
!=
-
1
){
system
=
micSystemsList
.
prod
break
// case env.indexOf('xuhui') > -1:
case
'xuhui-sit'
:
system
=
micSystemsList
.
sit
break
case
'xuhui-prod'
:
system
=
micSystemsList
.
prod
break
case
'huangpu-sit'
:
system
=
micSystemsList
.
sit
break
case
'huangpu-prod'
:
system
=
micSystemsList
.
prod
break
case
'yangpu-sit'
:
system
=
micSystemsList
.
sit
break
case
'yangpu-prod'
:
system
=
micSystemsList
.
prod
break
default
:
// 当前仅可使用pudong / xuhui-sit/uat进行打包
}
else
{
system
=
micSystemsList
.
sit
break
}
let
projects
=
[]
...
...
src/router/documentsRoutes.json
View file @
d633b502
...
...
@@ -149,5 +149,4 @@
]
}
]}
\ No newline at end of file
src/router/getMicRouters.js
View file @
d633b502
...
...
@@ -7,58 +7,63 @@ import ajax from '@/server/ajax'
import
api
from
'@/server/api'
import
documents
from
'@/router/documentsRoutes.json'
import
defaultRoutes
from
'@/router/defaultRoutes.json'
// import removeRoutes from '@/router/getRoutesChoose.js'
import
routeByFilter
from
'@/router/routeByFilter.json'
import
Store
from
'@/store/index'
/**
*
* @param { defaultRoutes , documentsRoutes} 私有菜单(子项目) , 公共菜单(子项目)
* 1. 当打包命令没有指定对应的区局,选用默认私有菜单文件 defaultRoutes(空的菜单) , 在下方会耦合 documentsRoutes(公共菜单) 内的全部菜单做展示
* 2. 打包命令包含区局的情况下, 选用对应区局的私有菜单文件, 并在getRoutesChoose文件中过滤需要展示的documentsRoutes内的菜单,在下方耦合
*
*/
console
.
log
(
routeByFilter
)
async
function
GetRoutes
(
router
)
{
let
env
=
process
.
env
.
NODE_ENV
// console.log(env)
let
MicRouters
switch
(
env
)
{
// case env.indexOf('pudong') > -1: // 根据当前打包的项目调用该项目对应的路由
case
'sit'
:
MicRouters
=
defaultRoutes
break
case
'production'
:
MicRouters
=
defaultRoutes
break
case
'pudong-sit'
:
pudong
.
Layout
=
pudong
.
Layout
.
concat
(
'pudong'
in
routeByFilter
?
routeByFilter
.
pudong
:
documents
.
Layout
)
MicRouters
=
pudong
break
case
'pudong-prod'
:
pudong
.
Layout
=
pudong
.
Layout
.
concat
(
'pudong'
in
routeByFilter
?
routeByFilter
.
pudong
:
documents
.
Layout
)
MicRouters
=
pudong
break
// case env.indexOf('xuhui') > -1:
case
'xuhui-sit'
:
xuhui
.
Layout
=
xuhui
.
Layout
.
concat
(
'xuhui'
in
routeByFilter
?
routeByFilter
.
xuhui
:
documents
.
Layout
)
MicRouters
=
xuhui
break
case
'xuhui-prod'
:
xuhui
.
Layout
=
xuhui
.
Layout
.
concat
(
'xuhui'
in
routeByFilter
?
routeByFilter
.
xuhui
:
documents
.
Layout
)
MicRouters
=
xuhui
break
case
'huangpu-sit'
:
huangpu
.
Layout
=
huangpu
.
Layout
.
concat
(
'huangpu'
in
routeByFilter
?
routeByFilter
.
huangpu
:
documents
.
Layout
)
MicRouters
=
huangpu
break
case
'huangpu-prod'
:
huangpu
.
Layout
=
huangpu
.
Layout
.
concat
(
'huangpu'
in
routeByFilter
?
routeByFilter
.
huangpu
:
documents
.
Layout
)
MicRouters
=
huangpu
break
case
'yangpu-sit'
:
yangpu
.
Layout
=
yangpu
.
Layout
.
concat
(
'yangpu'
in
routeByFilter
?
routeByFilter
.
yangpu
:
documents
.
Layout
)
MicRouters
=
yangpu
break
case
'yangpu-prod'
:
yangpu
.
Layout
=
yangpu
.
Layout
.
concat
(
'yangpu'
in
routeByFilter
?
routeByFilter
.
yangpu
:
documents
.
Layout
)
MicRouters
=
yangpu
break
default
:
// 当前仅可使用pudong / xuhui-sit/uat进行打包
case
'development'
:
// 本地开发展示对应的子项目路由
xuhui
.
Layout
=
xuhui
.
Layout
.
concat
(
'xuhui'
in
routeByFilter
?
routeByFilter
.
xuhui
:
documents
.
Layout
)
MicRouters
=
xuhui
break
default
:
// 当命令没有指定的情况下会选用空的私有菜单
MicRouters
=
documents
break
}
await
function
()
{
...
...
@@ -96,22 +101,6 @@ async function GetRoutes(router) {
}
}
for
(
let
key
in
documents
)
{
for
(
let
i
=
0
;
i
<
documents
[
key
].
length
;
i
++
)
{
let
firstRouter
=
Object
.
assign
({},
documents
[
key
][
i
])
if
(
!!
firstRouter
.
meta
.
openMode
&&
firstRouter
.
meta
.
openMode
==
'outsite'
)
{
firstRouter
.
component
=
TipsOutsite
}
parent
.
children
.
push
(
Object
.
assign
({},
firstRouter
))
router
.
addRoutes
([
parent
])
}
}
// console.log(router)
}
export
default
GetRoutes
src/router/huangpuRoutes.json
View file @
d633b502
{
"Layout"
:
[
{
"path"
:
"/hp_order/month"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"检查单"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"children"
:[
{
"path"
:
"/hp_order/month/monthList"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"房办月查列表"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/hp_order/month/monthInfo"
,
"name"
:
"monthInfo"
,
"meta"
:
{
"title"
:
"检查详情"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/hp_question/repair"
,
"name"
:
"repairList"
,
"meta"
:
{
"title"
:
"应急报修"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"children"
:[
{
"path"
:
"/hp_question/repair/repairList"
,
"name"
:
"repairList"
,
"meta"
:
{
"title"
:
"应急报修列表"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
false
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/hp_question/repair/repairInfo"
,
"name"
:
"repairInfo"
,
"meta"
:
{
"title"
:
"报修详情"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/hp_question/tousu"
,
"name"
:
"tousu"
,
"meta"
:
{
"title"
:
"投诉信息"
,
"menuPath"
:
true
,
"menuIcon"
:
"profile"
,
"hideInBread"
:
true
},
"children"
:
[
{
"path"
:
"/hp_question/tousu/tousuQuestion"
,
"name"
:
"tousuQuestion"
,
"meta"
:
{
"title"
:
"投诉问题排行"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:[
{
"path"
:
"/hp_question/tousu/tousuQuestion/questionInfo"
,
"name"
:
"questionInfo"
,
"meta"
:
{
"title"
:
"投诉问题列表"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/hp_question/tousu/tousuQuestion/tousuDetails"
,
"name"
:
"tousuDetails"
,
"meta"
:
{
"title"
:
"投诉问题详情"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/hp_question/tousu/tousuDensity"
,
"name"
:
"tousuDensity"
,
"meta"
:
{
"title"
:
"投诉密度排行"
,
"menuPath"
:
true
,
"hideInBread"
:
false
}
}
]
}
]
}
\ No newline at end of file
src/router/routeByFilter.json
0 → 100644
View file @
d633b502
{
"pudong"
:
[
{
"path"
:
"/documents/fiveSearch"
,
"name"
:
"fiveSearch"
,
"meta"
:
{
"title"
:
"物业三查"
,
"menuPath"
:
true
,
"authCode"
:
"0007"
,
"menuIcon"
:
"profile"
,
"hideInBread"
:
true
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList"
,
"name"
:
"managerSelfCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查"
,
"menuPath"
:
true
,
"authCode"
:
"000701"
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckList"
,
"name"
:
"managerCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查检查单列表"
,
"authCode"
:
"000701"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckInfo"
,
"name"
:
"managerCheckInfo"
,
"meta"
:
{
"title"
:
"小区经理自查检查单详情"
,
"authCode"
:
"00070101"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070102"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList"
,
"name"
:
"doubleWeekCheckList"
,
"meta"
:
{
"title"
:
"物企双周查"
,
"authCode"
:
"000702"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckList"
,
"name"
:
"doubleCheckList"
,
"meta"
:
{
"title"
:
"物企双周查列表"
,
"authCode"
:
"000702"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckInfo"
,
"name"
:
"doubleCheckInfo"
,
"meta"
:
{
"title"
:
"物企双周查详情"
,
"authCode"
:
"00070201"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070202"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/monthList"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"房办月查"
,
"authCode"
:
"000704"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect"
,
"name"
:
"monthListSect"
,
"meta"
:
{
"title"
:
"房办月查小区列表"
,
"authCode"
:
"000704"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect/monthInfo"
,
"name"
:
"monthInfo"
,
"meta"
:
{
"title"
:
"检查详情"
,
"authCode"
:
"00070401"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/fiveSearch/mutableList"
,
"name"
:
"mutableList"
,
"meta"
:
{
"title"
:
"整改单列表"
,
"authCode"
:
"000703"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/mutableList/info"
,
"name"
:
"mutableInfo"
,
"meta"
:
{
"title"
:
"整改单详情"
,
"authCode"
:
"00070301"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/repair"
,
"name"
:
"repairList"
,
"meta"
:
{
"title"
:
"应急报修"
,
"authCode"
:
"0005"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairList"
,
"name"
:
"repairInnerList"
,
"meta"
:
{
"title"
:
"应急报修列表"
,
"authCode"
:
"000501"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairInfo"
,
"name"
:
"repairInfo"
,
"meta"
:
{
"title"
:
"报修详情"
,
"authCode"
:
"000501"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
}
],
"yangpu"
:
[
{
"path"
:
"/documents/fiveSearch"
,
"name"
:
"fiveSearch"
,
"meta"
:
{
"title"
:
"物业三查"
,
"menuPath"
:
true
,
"authCode"
:
"0007"
,
"menuIcon"
:
"profile"
,
"hideInBread"
:
true
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList"
,
"name"
:
"managerSelfCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查"
,
"menuPath"
:
true
,
"authCode"
:
"000701"
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckList"
,
"name"
:
"managerCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查检查单列表"
,
"authCode"
:
"000701"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckInfo"
,
"name"
:
"managerCheckInfo"
,
"meta"
:
{
"title"
:
"小区经理自查检查单详情"
,
"authCode"
:
"00070101"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070102"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList"
,
"name"
:
"doubleWeekCheckList"
,
"meta"
:
{
"title"
:
"物企双周查"
,
"authCode"
:
"000702"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckList"
,
"name"
:
"doubleCheckList"
,
"meta"
:
{
"title"
:
"物企双周查列表"
,
"authCode"
:
"000702"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckInfo"
,
"name"
:
"doubleCheckInfo"
,
"meta"
:
{
"title"
:
"物企双周查详情"
,
"authCode"
:
"00070201"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070202"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/monthList"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"房办月查"
,
"authCode"
:
"000704"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect"
,
"name"
:
"monthListSect"
,
"meta"
:
{
"title"
:
"房办月查小区列表"
,
"authCode"
:
"000704"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect/monthInfo"
,
"name"
:
"monthInfo"
,
"meta"
:
{
"title"
:
"检查详情"
,
"authCode"
:
"00070401"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/fiveSearch/mutableList"
,
"name"
:
"mutableList"
,
"meta"
:
{
"title"
:
"整改单列表"
,
"authCode"
:
"000703"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/mutableList/info"
,
"name"
:
"mutableInfo"
,
"meta"
:
{
"title"
:
"整改单详情"
,
"authCode"
:
"00070301"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/repair"
,
"name"
:
"repairList"
,
"meta"
:
{
"title"
:
"应急报修"
,
"authCode"
:
"0005"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairList"
,
"name"
:
"repairInnerList"
,
"meta"
:
{
"title"
:
"应急报修列表"
,
"authCode"
:
"000501"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairInfo"
,
"name"
:
"repairInfo"
,
"meta"
:
{
"title"
:
"报修详情"
,
"authCode"
:
"000501"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
}
],
"huangpu"
:
[
{
"path"
:
"/documents/fiveSearch"
,
"name"
:
"fiveSearch"
,
"meta"
:
{
"title"
:
"物业三查"
,
"menuPath"
:
true
,
"authCode"
:
"0007"
,
"menuIcon"
:
"profile"
,
"hideInBread"
:
true
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList"
,
"name"
:
"managerSelfCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查"
,
"menuPath"
:
true
,
"authCode"
:
"000701"
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckList"
,
"name"
:
"managerCheckList"
,
"meta"
:
{
"title"
:
"小区经理自查检查单列表"
,
"authCode"
:
"000701"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerCheckInfo"
,
"name"
:
"managerCheckInfo"
,
"meta"
:
{
"title"
:
"小区经理自查检查单详情"
,
"authCode"
:
"00070101"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/managerSelfCheckList/managerAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070102"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList"
,
"name"
:
"doubleWeekCheckList"
,
"meta"
:
{
"title"
:
"物企双周查"
,
"authCode"
:
"000702"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckList"
,
"name"
:
"doubleCheckList"
,
"meta"
:
{
"title"
:
"物企双周查列表"
,
"authCode"
:
"000702"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleCheckInfo"
,
"name"
:
"doubleCheckInfo"
,
"meta"
:
{
"title"
:
"物企双周查详情"
,
"authCode"
:
"00070201"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
},
{
"path"
:
"/documents/fiveSearch/doubleWeekCheckList/doubleAllIn"
,
"name"
:
"allIn"
,
"meta"
:
{
"title"
:
"街道检查情况汇总"
,
"authCode"
:
"00070202"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
},
{
"path"
:
"/documents/fiveSearch/monthList"
,
"name"
:
"month"
,
"meta"
:
{
"title"
:
"房办月查"
,
"authCode"
:
"000704"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect"
,
"name"
:
"monthListSect"
,
"meta"
:
{
"title"
:
"房办月查小区列表"
,
"authCode"
:
"000704"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/monthList/monthListSect/monthInfo"
,
"name"
:
"monthInfo"
,
"meta"
:
{
"title"
:
"检查详情"
,
"authCode"
:
"00070401"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/fiveSearch/mutableList"
,
"name"
:
"mutableList"
,
"meta"
:
{
"title"
:
"整改单列表"
,
"authCode"
:
"000703"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/fiveSearch/mutableList/info"
,
"name"
:
"mutableInfo"
,
"meta"
:
{
"title"
:
"整改单详情"
,
"authCode"
:
"00070301"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
},
{
"path"
:
"/documents/repair"
,
"name"
:
"repairList"
,
"meta"
:
{
"title"
:
"应急报修"
,
"authCode"
:
"0005"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairList"
,
"name"
:
"repairInnerList"
,
"meta"
:
{
"title"
:
"应急报修列表"
,
"authCode"
:
"000501"
,
"menuIcon"
:
"profile"
,
"menuPath"
:
true
,
"hideInBread"
:
false
},
"children"
:
[
{
"path"
:
"/documents/repair/repairInfo"
,
"name"
:
"repairInfo"
,
"meta"
:
{
"title"
:
"报修详情"
,
"authCode"
:
"000501"
,
"menuPath"
:
false
,
"hideInBread"
:
false
}
}
]
}
]
}
]
}
\ No newline at end of file
src/server/api.js
View file @
d633b502
let
BASE_URL
=
''
,
MOCK_URL
=
''
,
FANGDI_URL
=
'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
/**
* todo
* 1、此处配置当前项目在不同环境下的API请求前缀
* 2、前端服务间、后端服务间需做跨域处理
*/
/**
*
* 此处
为不同项目所使用的不同接口api
, 根据当前浏览器访问的地址来变更对应的接口地址
* 如果有新增的区局项目 需要将对应的接口地址放入此数组中
* 此处
配置当前项目在不同环境下的API请求前缀
, 根据当前浏览器访问的地址来变更对应的接口地址
* 如果有新增的区局项目 需要将对应的接口地址
前缀
放入此数组中
*/
const
apiList
=
[
'http://pudong.hm.omniview.pro/api/v2'
,
//浦东sit
'http://10.220.105.137:81/api'
,
//浦东prod
'http://xuhui.hm.omniview.pro/api/v2'
,
//徐汇sit
'http://31.0.161.39/apiv2'
,
//徐汇prod
'http://yangpu-hm.omniview.pro/api/v2'
,
//杨浦sit
'http://10.216.118.142/api'
,
//杨浦prod
'http://huangpu.hm.omniview.pro/api/v2'
,
//黄浦sit
'http://172.82.26.1/api'
,
//黄浦prod
'http://pudong.hm.omniview.pro/api/v2'
,
//
浦东sit
'http://10.220.105.137:81/api'
,
//
浦东prod
'http://xuhui.hm.omniview.pro/api/v2'
,
//
徐汇sit
'http://31.0.161.39/apiv2'
,
//
徐汇prod
'http://yangpu-hm.omniview.pro/api/v2'
,
//
杨浦sit
'http://10.216.118.142/api'
,
//
杨浦prod
'http://huangpu.hm.omniview.pro/api/v2'
,
//
黄浦sit
'http://172.82.26.1/api'
,
//
黄浦prod
]
MOCK_URL
=
'https://yapi.omniview.pro/mock/283'
// yapi上的mock地址
// 根据当前地址栏访问的地址来决定接口访问的前缀 (生产或测试环境)
//
1.
根据当前地址栏访问的地址来决定接口访问的前缀 (生产或测试环境)
if
(
apiList
.
find
(
item
=>
item
.
indexOf
(
window
.
location
.
origin
)
!=
-
1
))
{
BASE_URL
=
apiList
.
find
(
item
=>
item
.
indexOf
(
window
.
location
.
origin
)
!=
-
1
)
}
else
{
// 本地开发环境需要自行调整对应的接口地址
}
else
{
// 2.本地开发环境需要自行调整对应的接口地址前缀
// BASE_URL = 'http://31.0.161.39/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
...
...
@@ -37,7 +30,6 @@ if (apiList.find(item => item.indexOf(window.location.origin) != -1 )) {
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2'
}
console
.
log
(
BASE_URL
)
/**
* 此处配置本项目涉及到的所有
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment