Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
824c8309
authored
2023-03-21 14:18:00 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:测试
1 parent
0f706a21
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
21 deletions
public/config.json
src/api/user.js
src/main.js
src/permission.js
src/store/modules/permission.js
src/utils/asyncRouter.js
src/utils/request.js
src/utils/theme.js
vue.config.js
public/config.json
View file @
824c830
{
"TITLE"
:
"汉中市数据上报系统"
,
"THEME"
:
"jg"
}
\ No newline at end of file
"THEME"
:
"sb"
}
...
...
src/api/user.js
View file @
824c830
import
Vue
from
'vue'
import
request
from
'@/utils/request'
console
.
log
(
Vue
.
prototype
,
Vue
.
prototype
.
$
BASE_API
);
console
.
log
(
Vue
.
prototype
,
Vue
.
prototype
.
BASE_API
);
import
SERVER
from
'./config'
// 获取用户信息
export
function
getUserInfo
()
{
...
...
src/main.js
View file @
824c830
...
...
@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-01-16 09:10:12
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-2
0 13:11:42
* @LastEditTime: 2023-03-2
1 14:15:40
* @FilePath: \bdcjg-web\src\main.js
* @Description:
*
...
...
@@ -51,7 +51,7 @@ Vue.directive('fo', {
import
'./image/icons'
// icon
import
store
from
'./store'
import
router
from
'./router'
import
_
from
'lodash'
import
_
,
{
set
}
from
'lodash'
Vue
.
use
(
Element
,
{
size
:
'small'
,
zIndex
:
1000
})
Vue
.
use
(
Base
)
Vue
.
component
(
'icon'
,
Icon
);
...
...
@@ -61,12 +61,15 @@ axios.get("./config.json")
.
then
((
res
)
=>
{
Vue
.
prototype
.
BASE_API
=
res
.
data
require
(
'./permission'
)
new
Vue
({
el
:
'#app'
,
router
,
store
,
render
:
h
=>
h
(
App
)
})
setTimeout
(()
=>
{
new
Vue
({
el
:
'#app'
,
router
,
store
,
render
:
h
=>
h
(
App
)
})
},
20
)
})
...
...
src/permission.js
View file @
824c830
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-2
0 14:35:04
* @LastEditTime: 2023-03-2
1 13:52:58
*/
import
router
from
"./router"
;
import
store
from
"./store"
;
...
...
src/store/modules/permission.js
View file @
824c830
/*
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors:
xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-
13 09:03:16
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2023-03-
21 14:05:43
* @FilePath: \上报\bdcjg-web\src\store\modules\permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
Vue
from
'vue'
import
{
constantRoutes
}
from
'@/router'
import
asyncRouter
from
'@/utils/asyncRouter.js'
const
state
=
{
...
...
src/utils/asyncRouter.js
View file @
824c830
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-21
09:27:26
* @LastEditTime: 2023-03-21
14:16:48
*/
import
Layout
from
'@/layout'
import
Vue
from
'vue'
import
Layout
from
'@/layout1'
const
config
=
require
(
'/public/config.json'
)
console
.
log
(
config
,
'Vue.2222222222222.BASE_API'
);
export
default
function
filterAsyncRouter
(
routers
)
{
routers
.
forEach
(
item
=>
{
if
(
!
item
.
children
)
{
...
...
src/utils/request.js
View file @
824c830
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-
14 14:39:24
* @LastEditTime: 2023-03-
21 13:46:56
*/
/**
* 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
...
...
@@ -10,7 +10,6 @@ import axios from "axios";
import
{
Message
}
from
"element-ui"
;
import
{
endLoadingSubCount
}
from
"./requestLoading"
;
import
router
from
"../router"
;
// create an axios instance
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
...
...
src/utils/theme.js
View file @
824c830
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-2
0 16:53:52
* @LastEditTime: 2023-03-2
1 13:42:13
*/
import
Vue
from
'vue'
export
default
function
getTheme
(
theme
=
Vue
.
prototype
.
BASE_API
.
THEME
)
{
...
...
@@ -9,7 +9,7 @@ export default function getTheme (theme = Vue.prototype.BASE_API.THEME) {
'jg'
:
function
()
{
import
(
"@/styles/jgPublic.scss"
)
},
's
js
b'
:
function
()
{
'sb'
:
function
()
{
import
(
"@/styles/sbPublic.scss"
)
},
default
:
function
()
{
...
...
vue.config.js
View file @
824c830
'use strict'
const
path
=
require
(
'path'
)
const
defaultSettings
=
require
(
'./src/settings.js'
)
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
}
...
...
Please
register
or
sign in
to post a comment