Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xgdlapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
李苏
xgdlapp
Commits
7729f276
Commit
7729f276
authored
May 06, 2023
by
王向前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4302da56
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
15 deletions
+25
-15
index.js
common/router/index.js
+1
-1
routes.js
common/router/modules/routes.js
+1
-1
config.service.js
common/service/config.service.js
+14
-5
login.vue
pages/login/login.vue
+9
-8
No files found.
common/router/index.js
View file @
7729f276
...
@@ -33,6 +33,6 @@ router.beforeEach((to, from, next) => {
...
@@ -33,6 +33,6 @@ router.beforeEach((to, from, next) => {
})
})
// 全局路由后置守卫
// 全局路由后置守卫
router
.
afterEach
((
to
,
from
)
=>
{
router
.
afterEach
((
to
,
from
)
=>
{
console
.
log
(
"afterEach"
);
})
})
export
default
router
;
export
default
router
;
\ No newline at end of file
common/router/modules/routes.js
View file @
7729f276
...
@@ -140,7 +140,7 @@ const routes = [
...
@@ -140,7 +140,7 @@ const routes = [
},
},
{
{
path
:
'/pages/dl_cmaterial/xzwlxx'
,
path
:
'/pages/dl_cmaterial/xzwlxx'
,
name
:
'xzwl'
,
name
:
'xzwl
xx
'
,
meta
:
{
meta
:
{
title
:
'选择物料信息'
,
title
:
'选择物料信息'
,
},
},
...
...
common/service/config.service.js
View file @
7729f276
let
BASE_URL
=
''
let
BASE_URL
=
""
let
fwq
=
""
// 修改
try
{
fwq
=
uni
.
getStorageSync
(
'fwq'
);
}
catch
(
e
)
{
// error
}
let
newUrl
=
'http://'
+
fwq
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
BASE_URL
=
'http://192.168.30.57:9080'
// 开发环境
BASE_URL
=
"http://192.168.30.57:9080/xgwcs"
}
else
{
}
else
{
BASE_URL
=
'http://192.168.30.57:9080'
// 生产环境
BASE_URL
=
"http://192.168.30.57:9080/xgwcs"
}
}
let
staticDomainURL
=
BASE_URL
+
'/sys/common/static'
;
let
staticDomainURL
=
BASE_URL
+
'/sys/common/static'
;
const
configService
=
{
const
configService
=
{
...
...
pages/login/login.vue
View file @
7729f276
...
@@ -224,8 +224,8 @@
...
@@ -224,8 +224,8 @@
})
})
}
}
uni
.
setStorage
({
uni
.
setStorage
({
key
:
'
Gtoken
'
,
key
:
'
url_ley
'
,
data
:
res
.
data
.
data
.
token
,
data
:
s
,
success
:
function
(){
success
:
function
(){
},
},
...
@@ -234,17 +234,18 @@
...
@@ -234,17 +234,18 @@
}
}
})
})
uni
.
setStorage
({
uni
.
setStorage
({
key
:
'
url_ley
'
,
key
:
'
Gtoken
'
,
data
:
s
,
data
:
res
.
data
.
data
.
token
,
success
:
function
(){
success
:
function
(){
that
.
$tip
.
success
(
'登录成功!'
)
that
.
$Router
.
replaceAll
({
path
:
'/pages/homepage/homepage'
})
},
},
fail
()
{
fail
()
{
}
}
})
})
this
.
$tip
.
success
(
'登录成功!'
)
this
.
$Router
.
replaceAll
({
path
:
'/pages/homepage/homepage'
})
}
else
{
}
else
{
this
.
$tip
.
alert
(
res
.
data
.
message
);
this
.
$tip
.
alert
(
res
.
data
.
message
);
}
}
...
...
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