Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e77faf9e
authored
Nov 21, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化流程
parent
15b01415
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
.env.production
+1
-1
mock/user.js
+3
-3
src/api/user.js
+4
-4
src/utils/requestMock.js
+1
-1
src/views/template/template-add-detail.vue
+0
-0
No files found.
.env.production
View file @
e77faf9e
...
...
@@ -2,5 +2,5 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '
/prod-api
'
VUE_APP_BASE_API = '
https://manager.bdideal.com
'
mock/user.js
View file @
e77faf9e
...
...
@@ -26,7 +26,7 @@ const users = {
export
default
[
// user login
{
url
:
'/
user
/login'
,
url
:
'/
publics
/login'
,
type
:
'post'
,
response
:
config
=>
{
const
{
username
}
=
config
.
body
...
...
@@ -49,7 +49,7 @@ export default [
// get user info
{
url
:
'/
user
/info\.*'
,
url
:
'/
publics/get
/info\.*'
,
type
:
'get'
,
response
:
config
=>
{
const
{
token
}
=
config
.
query
...
...
@@ -72,7 +72,7 @@ export default [
// user logout
{
url
:
'/
user
/logout'
,
url
:
'/
publics
/logout'
,
type
:
'post'
,
response
:
_
=>
{
return
{
...
...
src/api/user.js
View file @
e77faf9e
import
request
from
'@/utils/request
Mock.js
'
import
request
from
'@/utils/request'
export
function
login
(
data
)
{
return
request
({
url
:
'/
user
/login'
,
url
:
'/
publics
/login'
,
method
:
'post'
,
data
})
...
...
@@ -10,7 +10,7 @@ export function login(data) {
export
function
getInfo
(
token
)
{
return
request
({
url
:
'/
user
/info'
,
url
:
'/
publics/get
/info'
,
method
:
'get'
,
params
:
{
token
}
})
...
...
@@ -18,7 +18,7 @@ export function getInfo(token) {
export
function
logout
()
{
return
request
({
url
:
'/
user
/logout'
,
url
:
'/
publics
/logout'
,
method
:
'post'
})
}
src/utils/requestMock.js
View file @
e77faf9e
...
...
@@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
// create an axios instance
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API_MOCK
,
// url = base url + request url
baseURL
:
process
.
env
.
VUE_APP_BASE_API_MOCK
||
''
,
// url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout
:
10000
// request timeout
})
...
...
src/views/template/template-add-detail.vue
View file @
e77faf9e
This diff is collapsed.
Click to expand it.
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