Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
operation-web-project
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8e7b5f73
authored
Sep 09, 2020
by
jack
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
2020-09-09
1 parent
f141c3bc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
36 deletions
.env
public/image/theme/logo/all.png
public/image/theme/logo/all11.png
src/api/sys.account.js
src/http/api.js
src/http/config.js
src/router/index.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/base.js
src/views/system/login/index.vue
vue.config.js
.env
View file @
8e7b5f7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
VUE_APP_TITLE=广联运营平台
VUE_APP_TITLE=广联运营平台
# 网络请求公用地址 http://tfims.glsx.com.cn/router
# 网络请求公用地址 http://tfims.glsx.com.cn/router
VUE_APP_API=
http://tfims.test.glsx.com.cn/router
VUE_APP_API=
http://qcwx.glsx.com.cn/admin-supplychain/
# 仓库地址
# 仓库地址
VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
...
...
public/image/theme/logo/all.png
View file @
8e7b5f7
6.34 KB
|
W:
|
H:
5.21 KB
|
W:
|
H:
2-up
Swipe
Onion skin
public/image/theme/logo/all11.png
0 → 100644
View file @
8e7b5f7
6.34 KB
src/api/sys.account.js
View file @
8e7b5f7
...
@@ -22,7 +22,7 @@ export const ROLE_LIST_URL = `${ROLE_PATH}list`
...
@@ -22,7 +22,7 @@ export const ROLE_LIST_URL = `${ROLE_PATH}list`
*/
*/
export
function
AccountLogin
(
data
)
{
export
function
AccountLogin
(
data
)
{
data
.
method
=
LOGIN_URL
data
.
method
=
LOGIN_URL
return
request
(
data
,
RequestMethods
.
POST
)
return
Promise
.
resolve
()
//
request(data, RequestMethods.POST)
}
}
/**
/**
...
@@ -163,7 +163,7 @@ export function RoleModify(data = {}) {
...
@@ -163,7 +163,7 @@ export function RoleModify(data = {}) {
*/
*/
export
function
RoleList
(
data
=
{})
{
export
function
RoleList
(
data
=
{})
{
data
.
method
=
ROLE_LIST_URL
data
.
method
=
ROLE_LIST_URL
return
request
(
data
,
RequestMethods
.
GET
)
return
Promise
.
resolve
()
//
request(data, RequestMethods.GET)
}
}
/**
/**
...
...
src/http/api.js
View file @
8e7b5f7
...
@@ -72,7 +72,7 @@ export default function $axios(options) {
...
@@ -72,7 +72,7 @@ export default function $axios(options) {
response
=>
{
response
=>
{
let
data
;
let
data
;
// Util.closeLoading();
// Util.closeLoading();
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
if
(
response
.
data
==
undefined
)
{
if
(
response
.
data
==
undefined
)
{
data
=
JSON
.
parse
(
response
.
request
.
responseText
)
data
=
JSON
.
parse
(
response
.
request
.
responseText
)
...
...
src/http/config.js
View file @
8e7b5f7
let
host
=
window
.
location
.
host
let
host
=
window
.
location
.
host
let
url
=
{
let
url
=
{
'qcwx.glsx.com.cn'
:
'https://qcwx.glsx.com.cn/
cow/mini
/'
,
'qcwx.glsx.com.cn'
:
'https://qcwx.glsx.com.cn/
admin-supplychain
/'
,
'wx.glsx.com.cn'
:
'https://wx.glsx.com.cn/cow/mini/'
,
'wx.glsx.com.cn'
:
'https://wx.glsx.com.cn/cow/mini/'
,
'localhost:9528'
:
'https://mng.sztyzj.com/api/'
,
'localhost:9528'
:
'https://mng.sztyzj.com/api/'
,
'devwx.glsx.com.cn'
:
'https://qcwx.glsx.com.cn/cow/mini/'
,
'devwx.glsx.com.cn'
:
'https://qcwx.glsx.com.cn/cow/mini/'
,
...
@@ -18,6 +18,7 @@ export default {
...
@@ -18,6 +18,7 @@ export default {
// baseURL: 'https://'+ baseUrl +'/cow/mini/',
// baseURL: 'https://'+ baseUrl +'/cow/mini/',
baseURL
:
'/admin-supplychain'
,
baseURL
:
'/admin-supplychain'
,
//baseURL: url[host],
// 请求头信息
// 请求头信息
headers
:
{
headers
:
{
...
...
src/router/index.js
View file @
8e7b5f7
...
@@ -46,6 +46,9 @@ router.beforeEach(async(to, from, next) => {
...
@@ -46,6 +46,9 @@ router.beforeEach(async(to, from, next) => {
NProgress
.
start
()
NProgress
.
start
()
// 关闭搜索面板
// 关闭搜索面板
store
.
commit
(
'd2admin/search/set'
,
false
)
store
.
commit
(
'd2admin/search/set'
,
false
)
//暂时屏蔽掉登录页面
store
.
dispatch
(
'd2admin/account/login'
,{
loginName
:
'155454'
,
password
:
'5541514'
,
method
:
'fims.user.loginTem'
});
if
(
from
.
name
===
null
&&
to
.
path
!==
'/login'
&&
!
source
)
{
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
if
(
from
.
name
===
null
&&
to
.
path
!==
'/login'
&&
!
source
)
{
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await
store
.
dispatch
(
'd2admin/auth/init'
)
await
store
.
dispatch
(
'd2admin/auth/init'
)
await
store
.
dispatch
(
'd2admin/account/load'
)
await
store
.
dispatch
(
'd2admin/account/load'
)
...
@@ -76,6 +79,8 @@ router.afterEach(to => {
...
@@ -76,6 +79,8 @@ router.afterEach(to => {
})
})
export
const
ResetRouter
=
()
=>
new
VueRouter
({
export
const
ResetRouter
=
()
=>
new
VueRouter
({
mode
:
'history'
,
base
:
'operation-web'
,
routes
routes
})
})
...
...
src/store/modules/d2admin/modules/account.js
View file @
8e7b5f7
...
@@ -16,7 +16,7 @@ export default {
...
@@ -16,7 +16,7 @@ export default {
// console.log(router.addRoutes);
// console.log(router.addRoutes);
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// 开始请求登录接口
// 开始请求登录接口
AccountLogin
(
p
).
then
(
async
(
data
=
{})
=>
{
AccountLogin
(
p
).
then
(
async
(
data
=
{
loginName
:
'555555'
})
=>
{
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 整个系统依赖这两个数据进行校验和存储
// 整个系统依赖这两个数据进行校验和存储
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
...
...
src/store/modules/d2admin/modules/base.js
View file @
8e7b5f7
...
@@ -34,21 +34,21 @@ export default {
...
@@ -34,21 +34,21 @@ export default {
* @param {*} param0
* @param {*} param0
*/
*/
init
({
state
,
dispatch
,
commit
})
{
init
({
state
,
dispatch
,
commit
})
{
return
new
Promise
(
async
resolve
=>
{
//
return new Promise(async resolve => {
Promise
.
all
([
//
Promise.all([
FetchRoleList
(),
//
FetchRoleList(),
BaseDataApi
({
[
TYPE_NAME
]:
ConfigType
.
STATION
}),
//
BaseDataApi({ [TYPE_NAME]: ConfigType.STATION }),
BaseDataApi
({
[
TYPE_NAME
]:
ConfigType
.
POST
}),
//
BaseDataApi({ [TYPE_NAME]: ConfigType.POST }),
BaseDataApi
({
[
TYPE_NAME
]:
ConfigType
.
SUBSYS
})
//
BaseDataApi({ [TYPE_NAME]: ConfigType.SUBSYS })
]).
then
(
async
([
role
,
station
,
post
,
subsys
])
=>
{
//
]).then(async([role, station, post, subsys]) => {
state
.
role
=
role
//
state.role = role
state
.
station
=
station
//
state.station = station
state
.
subsys
=
subsys
//
state.subsys = subsys
state
.
post
=
post
//
state.post = post
await
dispatch
(
'save2db'
,
{
name
:
''
,
value
:
state
})
//
await dispatch('save2db', { name: '', value: state })
resolve
(
state
)
//
resolve(state)
})
//
})
})
//
})
},
},
// 重置
// 重置
clear
({
state
,
dispatch
})
{
clear
({
state
,
dispatch
})
{
...
...
src/views/system/login/index.vue
View file @
8e7b5f7
...
@@ -88,7 +88,7 @@ import { mapActions } from 'vuex'
...
@@ -88,7 +88,7 @@ import { mapActions } from 'vuex'
import
{
LOGIN_TYPE
}
from
'@/common/constants'
import
{
LOGIN_TYPE
}
from
'@/common/constants'
export
default
{
export
default
{
components
:
{
components
:
{
DialogReg
:
()
=>
import
(
'./dialogReg'
)
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -139,11 +139,12 @@ export default {
...
@@ -139,11 +139,12 @@ export default {
// console.log(navigator.userAgent.toLocaleLowerCase())
// console.log(navigator.userAgent.toLocaleLowerCase())
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
const
{
browser
,
os
}
=
this
.
$store
.
state
.
d2admin
.
ua
.
data
//
const { browser, os } = this.$store.state.d2admin.ua.data
const
_p
=
{
const
_p
=
{
...
this
.
formLogin
,
...
this
.
formLogin
deviceCode
:
`
${
os
.
name
}${
os
.
version
}
-
${
browser
.
name
}${
browser
.
version
}
`
//
deviceCode: `${os.name}${os.version}-${browser.name}${browser.version}`
}
}
//this.$router.replace(this.$route.query.redirect || _current)
// 登录
// 登录
// 注意 这里的演示没有传验证码
// 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码
// 具体需要传递的数据请自行修改代码
...
...
vue.config.js
View file @
8e7b5f7
...
@@ -12,7 +12,7 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
...
@@ -12,7 +12,7 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
9528
// dev port
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
9528
// dev port
// 基础路径 注意发布之前要先修改这里
// 基础路径 注意发布之前要先修改这里
let
publicPath
=
'/'
let
publicPath
=
'/
operation-web/
'
const
CDN_DOMAIN
=
'https://cdn.bootcss.com'
const
CDN_DOMAIN
=
'https://cdn.bootcss.com'
const
cdn
=
{
const
cdn
=
{
css
:
[
css
:
[
...
@@ -47,16 +47,16 @@ module.exports = {
...
@@ -47,16 +47,16 @@ module.exports = {
warnings
:
false
,
warnings
:
false
,
errors
:
true
errors
:
true
},
},
proxy
:
{
//
proxy: {
'/admin-supplychain'
:
{
//
'/admin-supplychain': {
target
:
'http://192.168.3.174:9040/admin-supplychain/'
,
//
target: 'http://192.168.3.174:9040/admin-supplychain/',
changeOrigin
:
true
,
//
changeOrigin: true,
ws
:
true
,
//
ws: true,
pathRewrite
:
{
//
pathRewrite: {
'^/admin-supplychain'
:
''
//
'^/admin-supplychain': ''
}
//
}
}
//
}
}
//
}
},
},
css
:
{
css
:
{
loaderOptions
:
{
loaderOptions
:
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment