Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
campSite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨梦雪
campSite
Commits
0d845aa4
Commit
0d845aa4
authored
Oct 13, 2021
by
wuwangwolihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改调整
parent
67a3b0a3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
25 deletions
+28
-25
src/config/server.js
src/config/server.js
+2
-2
src/request/index/network.js
src/request/index/network.js
+14
-17
src/request/index/register.js
src/request/index/register.js
+6
-2
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+3
-1
vue.config.js
vue.config.js
+3
-3
No files found.
src/config/server.js
View file @
0d845aa4
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
// export const SERVER_WS_URL = "wss://123.56.237.167:20202"; // websocket
// export const SERVER_WS_URL = "wss://123.56.237.167:20202"; // websocket
// 官网
// 官网
export
const
SERVER_URL
=
'
http
s
://api1.testgate.cn
'
// 正式环境
export
const
SERVER_URL
=
'
http://api1.testgate.cn
'
// 正式环境
export
const
DEVELOPMENT_SERVER_URL
=
'
http
s
://api1.testgate.cn
'
// 开发环境
export
const
DEVELOPMENT_SERVER_URL
=
'
http://api1.testgate.cn
'
// 开发环境
export
const
SERVER_WS_URL
=
'
wss://api.thussat.com
'
// websocket
export
const
SERVER_WS_URL
=
'
wss://api.thussat.com
'
// websocket
// 剑桥官网
// 剑桥官网
// export const SERVER_URL = "https://api.testgate.cn"; // 正式环境
// export const SERVER_URL = "https://api.testgate.cn"; // 正式环境
...
...
src/request/index/network.js
View file @
0d845aa4
...
@@ -49,13 +49,6 @@ const allowRequest = function (reqList, url) {
...
@@ -49,13 +49,6 @@ const allowRequest = function (reqList, url) {
let
loadingInstance
=
null
let
loadingInstance
=
null
export
function
request
(
config
)
{
export
function
request
(
config
)
{
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
if
(
config
[
'
data
'
]){
config
[
'
data
'
][
'
identify
'
]
=
identity
;
}
else
if
(
config
[
'
param
'
]){
config
[
'
param
'
][
'
identify
'
]
=
identity
;
}
const
instance
=
axios
.
create
({
const
instance
=
axios
.
create
({
baseURL
:
process
.
env
.
NODE_ENV
===
'
development
'
?
baseURL
:
process
.
env
.
NODE_ENV
===
'
development
'
?
DEVELOPMENT_SERVER_URL
:
DEVELOPMENT_SERVER_URL
:
...
@@ -64,17 +57,21 @@ export function request(config) {
...
@@ -64,17 +57,21 @@ export function request(config) {
})
})
instance
.
interceptors
.
request
.
use
(
instance
.
interceptors
.
request
.
use
(
(
config
)
=>
{
(
config
)
=>
{
const
loginUrl
=
'
/web/auth/login
'
const
loginUrl
=
'
/web/auth/login
'
;
const
setAccountInfo
=
'
/web/register/setAccountInfo
'
const
setAccountInfo
=
'
/web/register/setAccountInfo
'
;
const
checkIdCard
=
'
/web/auth/checkIdCard
'
const
passMsgOld
=
'
/web/auth/changePassOld
'
;
const
passMsg
=
'
/web/auth/sendPassMsg
'
const
passMsgCode
=
'
/web/auth/changePassCode
'
;
const
loginOut
=
'
/web/auth/loginOut
'
const
registerCode
=
'
/web/code/registerCode
'
;
console
.
log
(
config
.
url
)
const
passwordCode
=
'
/web/code/passwordCode
'
;
const
loginOut
=
'
/web/auth/loginOut
'
;
console
.
log
(
config
)
if
(
if
(
config
.
url
==
loginUrl
||
config
.
url
.
indexOf
(
loginUrl
)
!=
-
1
||
config
.
url
==
passMsg
||
config
.
url
.
indexOf
(
setAccountInfo
)
!=
-
1
||
config
.
url
==
setAccountInfo
||
config
.
url
.
indexOf
(
passMsgOld
)
!=
-
1
||
config
.
url
==
checkIdCard
config
.
url
.
indexOf
(
passMsgCode
)
!=
-
1
||
config
.
url
.
indexOf
(
registerCode
)
!=
-
1
||
config
.
url
.
indexOf
(
passwordCode
)
!=
-
1
)
{
)
{
return
config
return
config
}
}
...
...
src/request/index/register.js
View file @
0d845aa4
...
@@ -4,18 +4,21 @@ import {
...
@@ -4,18 +4,21 @@ import {
request
request
}
from
'
./network
'
}
from
'
./network
'
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
// 发送注册时候验证码
// 发送注册时候验证码
export
function
registerCode
(
data
)
{
export
function
registerCode
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/code/registerCode
?phone=
'
+
data
url
:
'
/web/code/registerCode
'
,
data
})
})
}
}
// 填写注册信息
// 填写注册信息
export
function
setAccountInfo
(
data
)
{
export
function
setAccountInfo
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/register/setAccountInfo
'
,
url
:
'
/web/register/setAccountInfo
'
,
...
@@ -25,6 +28,7 @@ export function setAccountInfo(data) {
...
@@ -25,6 +28,7 @@ export function setAccountInfo(data) {
// 获取注册信息
// 获取注册信息
export
function
getAccountInfo
(
data
)
{
export
function
getAccountInfo
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/register/getAccountInfo
'
,
url
:
'
/web/register/getAccountInfo
'
,
...
...
src/views/index/login/Register.vue
View file @
0d845aa4
...
@@ -158,7 +158,9 @@
...
@@ -158,7 +158,9 @@
},
},
// 获取手机验证短信
// 获取手机验证短信
getCode
()
{
getCode
()
{
if
(
!
this
.
registerForm
.
phone
){
return
this
.
$message
.
error
(
'
请输入手机号
'
);
}
// 倒计时60s
// 倒计时60s
const
TIME_COUNT
=
60
;
const
TIME_COUNT
=
60
;
if
(
!
this
.
timer
)
{
if
(
!
this
.
timer
)
{
...
...
vue.config.js
View file @
0d845aa4
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
function
resolve
(
dir
)
{
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
return
path
.
join
(
__dirname
,
dir
)
}
}
...
@@ -23,8 +23,8 @@ module.exports = {
...
@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost',
// host: 'localhost',
// port: 8080, // 端口号
// port: 8080, // 端口号
// https: true, // https:{type:Boolean}
// https: true, // https:{type:Boolean}
//
open: true, // 配置自动启动浏览器
open
:
true
,
// 配置自动启动浏览器
// hotOnly: true
// 热更新
hotOnly
:
true
,
// 热更新
// // proxy: {
// // proxy: {
// // "/api": {
// // "/api": {
// // target: "http://127.0.0.1:8080/",
// // target: "http://127.0.0.1:8080/",
...
...
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