Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
recruiting-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
recruiting-management
Commits
2743827d
Commit
2743827d
authored
Jul 20, 2019
by
zhangderong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
a7bced1c
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
493 additions
and
188 deletions
+493
-188
interview.server.js
src/api/interview.server.js
+43
-1
resume.server.js
src/api/resume.server.js
+7
-0
changepsd.vue
src/components/changepsd.vue
+127
-0
interview.vue
src/page/Interview/interview.vue
+229
-119
login.vue
src/page/login/login.vue
+5
-1
updatePsd.vue
src/page/login/updatePsd.vue
+2
-4
allResume.vue
src/page/resume/allResume.vue
+19
-5
account.vue
src/page/system/account.vue
+7
-6
index.js
src/router/index.js
+9
-7
http.service.js
src/service/http.service.js
+45
-45
No files found.
src/api/interview.server.js
View file @
2743827d
...
@@ -2,4 +2,46 @@ import axios from '../service/http.service'
...
@@ -2,4 +2,46 @@ import axios from '../service/http.service'
import
{
import
{
baseApi
,
contractApi
baseApi
,
contractApi
}
from
'
../config/env.config
'
}
from
'
../config/env.config
'
import
qs
from
'
qs
'
import
qs
from
'
qs
'
\ No newline at end of file
// 更改约面信息
export
function
changeinterviewMassage
(
parmars
)
{
return
axios
.
post
(
`/text/api/resumeInterview/update`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
// 重启面试
export
function
oppenInterview
()
{
return
axios
.
post
(
`/text/api/resumeFlow/reset/14/TO_SEE`
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
// 终止面试
export
function
SInterview
(
parmars
)
{
return
axios
.
post
(
`/text/api/resumeFlow/end/14`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
// 面试管理查询
export
function
SerchList
(
parmars
)
{
return
axios
.
post
(
`/text/api/interview/findListByQueryVO`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
//面试官查询
export
function
Serchinterviewor
()
{
return
axios
.
post
(
`/text/api/interview/findInterviewerList`
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
//邀约人查询
export
function
SerchInvitationOwer
()
{
return
axios
.
post
(
`/text/api/interview/findInviterList`
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
//新增约面信息
export
function
NewAddInterview
(
parmars
)
{
return
axios
.
post
(
`/text/api/resumeInterview/add`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/json;
'
,
}})
}
\ No newline at end of file
src/api/resume.server.js
View file @
2743827d
...
@@ -8,4 +8,11 @@ export function serchList(parmars){
...
@@ -8,4 +8,11 @@ export function serchList(parmars){
return
axios
.
post
(
`/text/api/resume/findList`
,
parmars
,{
headers
:
{
return
axios
.
post
(
`/text/api/resume/findList`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/json
'
'
Content-Type
'
:
'
application/json
'
}})
}})
}
// 下载简历(单条)
export
function
downloadone
(
parmars
)
{
parmars
=
qs
.
stringify
(
parmars
)
return
axios
.
post
(
`/text/api/resumeFile/download/formatted/one`
,
parmars
,{
headers
:
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
}})
}
}
\ No newline at end of file
src/components/changepsd.vue
0 → 100644
View file @
2743827d
<
template
>
<div>
<div
class=
"login"
>
<div
class=
"login-content"
>
<div
class=
"loginContent-left"
>
<img
src=
"../../assets/login.jpg"
>
</div>
<div
class=
"loginContent-right"
>
<div
class=
"logo"
>
<img
src=
"../../assets/log.png"
>
<h3>
首次登录请修改密码
</h3>
</div>
<div
class=
"login_content"
>
<Form
ref=
"formInline"
:model=
"formInline"
:rules=
"ruleInline"
>
<FormItem
prop=
"user"
>
<Input
type=
"text"
v-model=
"formInline.user"
placeholder=
"Username"
class=
"wordStyle"
/>
<Icon
type=
"ios-person-outline"
slot=
"prepend"
></Icon>
</FormItem>
<FormItem
prop=
"password"
>
<Input
type=
"password"
v-model=
"formInline.password"
placeholder=
"Password"
class=
"wordStyle"
/>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</FormItem>
<FormItem>
<button
style=
"width:440px;margin-left:30px; border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)"
>
登录
</button>
</FormItem>
</Form>
</div>
<div
class=
"copy"
>
<p>
量化派为你提供全程服务
</p>
<p>
量化派版权所有
</p>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
formInline
:
{
user
:
''
,
password
:
''
},
ruleInline
:
{
user
:
[
{
required
:
true
,
message
:
'
请输入正确的手机号
'
,
trigger
:
'
blur
'
}
],
password
:
[
{
required
:
true
,
message
:
'
请输入正确的密码
'
,
trigger
:
'
blur
'
},
{
type
:
'
string
'
,
min
:
4
,
message
:
''
,
trigger
:
'
blur
'
}
]
}
}
},
methods
:
{
handleSubmit
(
name
)
{
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$Message
.
success
(
'
Success!
'
);
}
else
{
this
.
$Message
.
error
(
'
Fail!
'
);
}
})
}
}
}
</
script
>
<
style
>
.login
{
width
:
100%
;
height
:
100%
;
background
:
#EAEAEA
;
}
.login-content
{
width
:
1100px
;
height
:
1000px
;
margin-left
:
500px
}
.loginContent-left
{
float
:
left
;
width
:
600px
;
height
:
800px
}
.loginContent-right
{
float
:
left
;
width
:
500px
;
height
:
800px
;
background
:
#ffffff
}
.loginContent-left
img
{
width
:
100%
;
height
:
100%
;
}
.logo
{
width
:
100%
;
height
:
140px
;
margin-top
:
80px
;
}
.logo
img
{
width
:
100px
;
height
:
60px
;
margin-left
:
30px
}
.logo
h3
{
font-size
:
25px
;
color
:
black
;
margin-left
:
40px
}
.login_content
{
height
:
200px
;
width
:
100%
;
}
.copy
{
width
:
100%
;
height
:
100px
;
margin-top
:
200px
;
}
.copy
p
{
margin-left
:
30px
}
.wordStyle
{
width
:
440px
;
margin-left
:
30px
}
</
style
>
src/page/Interview/interview.vue
View file @
2743827d
This diff is collapsed.
Click to expand it.
src/page/login/login.vue
View file @
2743827d
...
@@ -70,9 +70,13 @@ export default {
...
@@ -70,9 +70,13 @@ export default {
userCode
:
this
.
formInline
.
user
,
userCode
:
this
.
formInline
.
user
,
password
:
this
.
formInline
.
password
password
:
this
.
formInline
.
password
}
}
// if(this.formInline.password=='123456'){
// this.$router.push({name:'updatePsd'})
// return
// }
login
(
params
).
then
(
res
=>
{
login
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
!==
''
){
if
(
res
.
data
.
success
==
true
){
this
.
$router
.
push
({
name
:
"
allResume
"
})
this
.
$router
.
push
({
name
:
"
allResume
"
})
}
}
})
})
...
...
src/page/login/updatePsd.vue
View file @
2743827d
...
@@ -13,14 +13,12 @@
...
@@ -13,14 +13,12 @@
<div
class=
"login_content"
>
<div
class=
"login_content"
>
<Form
ref=
"formInline"
:model=
"formInline"
:rules=
"ruleInline"
>
<Form
ref=
"formInline"
:model=
"formInline"
:rules=
"ruleInline"
>
<FormItem
prop=
"user"
>
<FormItem
prop=
"user"
>
<Input
type=
"text"
v-model=
"formInline.user"
placeholder=
"Username"
class=
"wordStyle"
>
<Input
type=
"text"
v-model=
"formInline.user"
placeholder=
"Username"
class=
"wordStyle"
/
>
<Icon
type=
"ios-person-outline"
slot=
"prepend"
></Icon>
<Icon
type=
"ios-person-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</FormItem>
<FormItem
prop=
"password"
>
<FormItem
prop=
"password"
>
<Input
type=
"password"
v-model=
"formInline.password"
placeholder=
"Password"
class=
"wordStyle"
>
<Input
type=
"password"
v-model=
"formInline.password"
placeholder=
"Password"
class=
"wordStyle"
/
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</FormItem>
<FormItem>
<FormItem>
<button
style=
"width:440px;margin-left:30px; border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)"
>
登录
</button>
<button
style=
"width:440px;margin-left:30px; border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)"
>
登录
</button>
...
...
src/page/resume/allResume.vue
View file @
2743827d
...
@@ -90,14 +90,16 @@
...
@@ -90,14 +90,16 @@
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus=='TO_SENT_OFFER'"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
已发Offer
</span></span>
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus=='TO_SENT_OFFER'"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
已发Offer
</span></span>
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus=='TO_ENTRY('"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
代入职
</span></span>
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus=='TO_ENTRY('"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
代入职
</span></span>
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus==' HAS_ENTRY'"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
已入职
</span></span>
<span
style=
"margin-right:30px;margin-top:5px"
v-else-if=
"item.flowStatus==' HAS_ENTRY'"
><Icon
type=
"ios-radio-button-on"
style=
"color:#43CD80"
/><span
style=
"margin-left:10px"
>
已入职
</span></span>
<select
name=
"1"
id=
"a"
style=
"margin-right:20px;margin-top:5px"
@
change=
"selectFn($event)"
v-else-if=
"item.
s
tatus=='TO_DO'"
>
<select
name=
"1"
id=
"a"
style=
"margin-right:20px;margin-top:5px"
@
change=
"selectFn($event)"
v-else-if=
"item.
flowS
tatus=='TO_DO'"
>
<option
value=
"1"
>
待处理
</option>
<option
value=
"1"
>
待处理
</option>
<option
value=
"2"
>
pass
</option>
<option
value=
"2"
>
pass
</option>
<option
value=
"3"
>
准备约面
</option>
<option
value=
"3"
>
准备约面
</option>
<option
value=
"4"
>
备选
</option>
<option
value=
"4"
>
备选
</option>
</select>
</select>
<p
style=
"font-size:18px;margin:5px 35px 0 0"
><span><Icon
type=
"md-download"
/></span>
<p
style=
"font-size:18px;margin:5px 35px 0 0"
>
<span
><Icon
type=
"md-trash"
/></span></p>
<span><Icon
type=
"md-download"
@
click=
"downLoad(item.id)"
/></span>
<span
><Icon
type=
"md-trash"
/></span>
</p>
</div>
</div>
<div
style=
"width:190px;float:left;height:60px;margin-left:40px"
>
<div
style=
"width:190px;float:left;height:60px;margin-left:40px"
>
<span
style=
"margin:10px 0 0 10px;display:inline-block"
>
最后操作人 |
</span><span
style=
"margin-left:13px"
>
{{
item
.
modifier
}}
</span><br>
<span
style=
"margin:10px 0 0 10px;display:inline-block"
>
最后操作人 |
</span><span
style=
"margin-left:13px"
>
{{
item
.
modifier
}}
</span><br>
...
@@ -163,7 +165,7 @@
...
@@ -163,7 +165,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
serchList
}
from
'
../../api/resume.server.js
'
import
{
serchList
,
downloadone
}
from
'
../../api/resume.server.js
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -229,6 +231,7 @@ import { serchList} from '../../api/resume.server.js'
...
@@ -229,6 +231,7 @@ import { serchList} from '../../api/resume.server.js'
this
.
modal2
=
true
this
.
modal2
=
true
}
}
},
},
// *****************************************
// *****************************************
ok
()
{
ok
()
{
this
.
$Message
.
info
(
'
Clicked ok
'
);
this
.
$Message
.
info
(
'
Clicked ok
'
);
...
@@ -247,7 +250,7 @@ import { serchList} from '../../api/resume.server.js'
...
@@ -247,7 +250,7 @@ import { serchList} from '../../api/resume.server.js'
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
.
success
==
true
){
if
(
res
.
data
.
success
==
true
){
console
.
log
(
res
.
data
.
body
.
items
)
console
.
log
(
res
.
data
.
body
.
items
)
this
.
ajaxData
=
res
.
items
.
map
((
item
,
index
)
=>
{
this
.
ajaxData
=
res
.
data
.
body
.
items
.
map
((
item
,
index
)
=>
{
item
.
ownerName
=
item
.
ownerName
item
.
ownerName
=
item
.
ownerName
item
.
ownerSex
=
item
.
ownerSex
item
.
ownerSex
=
item
.
ownerSex
item
.
belongs
=
item
.
belongs
item
.
belongs
=
item
.
belongs
...
@@ -283,6 +286,17 @@ import { serchList} from '../../api/resume.server.js'
...
@@ -283,6 +286,17 @@ import { serchList} from '../../api/resume.server.js'
this
.
clickIndex3
=
Tindex
this
.
clickIndex3
=
Tindex
console
.
log
(
Item
)
console
.
log
(
Item
)
},
},
//下载单条简历
downLoad
(
ID
){
let
parmars
=
{
resumeId
:
ID
}
downloadone
(
parmars
).
then
(
res
=>
{
if
(
res
.
data
.
success
=
true
){
this
.
$Message
.
success
(
'
下载成功
'
)
}
})
},
},
},
mounted
(){
mounted
(){
this
.
SearchList
()
this
.
SearchList
()
...
...
src/page/system/account.vue
View file @
2743827d
...
@@ -139,12 +139,12 @@ export default {
...
@@ -139,12 +139,12 @@ export default {
return
return
}
}
addAccount
(
parmars
).
then
(
res
=>
{
addAccount
(
parmars
).
then
(
res
=>
{
//
if(res.data.success==true){
if
(
res
.
data
.
success
==
true
){
this
.
$Message
.
success
(
'
添加成功
'
)
this
.
$Message
.
success
(
'
添加成功
'
)
this
.
SearchList
()
this
.
SearchList
()
this
.
formInline
.
PhoneNumber
=
''
this
.
formInline
.
PhoneNumber
=
''
this
.
formInline
.
PerName
=
''
this
.
formInline
.
PerName
=
''
//
}
}
})
})
}
,
}
,
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
}
}
queryaccountList
(
parmars
).
then
(
res
=>
{
queryaccountList
(
parmars
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
!==
''
){
if
(
res
.
data
.
success
==
true
){
// console.log(res.data.body.items)
// console.log(res.data.body.items)
this
.
ajaxData
=
res
.
data
.
body
.
items
.
map
((
item
,
index
)
=>
{
this
.
ajaxData
=
res
.
data
.
body
.
items
.
map
((
item
,
index
)
=>
{
item
.
id
=
item
.
id
item
.
id
=
item
.
id
...
@@ -181,9 +181,10 @@ export default {
...
@@ -181,9 +181,10 @@ export default {
id
:
this
.
I
id
:
this
.
I
}
}
Delateaccount
(
parmars
).
then
(
res
=>
{
Delateaccount
(
parmars
).
then
(
res
=>
{
// if(res.data.success==true){
if
(
res
.
data
.
success
==
true
){
// this.SearchList()
this
.
modal2
=
false
// }
this
.
SearchList
()
}
this
.
SearchList
()
this
.
SearchList
()
})
})
},
},
...
...
src/router/index.js
View file @
2743827d
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
Router
from
'
vue-router
'
;
import
Router
from
'
vue-router
'
;
const
home
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/components/home.vue
'
)),
'
home
'
);
const
home
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/components/home.vue
'
)),
'
home
'
);
// const
login = r => require.ensure([], () => r(require('@/components/login.vue')), 'login
');
// const
changepsd = r => require.ensure([], () => r(require('@/components/changepsd.vue')), 'changepsd
');
const
login
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/login/login.vue
'
)),
'
login
'
);
const
login
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/login/login.vue
'
)),
'
login
'
);
const
interview
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/interview/interview.vue
'
)),
'
interview
'
);
const
interview
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/interview/interview.vue
'
)),
'
interview
'
);
const
allResume
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/resume/allResume.vue
'
)),
'
allResume
'
);
const
allResume
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/resume/allResume.vue
'
)),
'
allResume
'
);
...
@@ -10,7 +10,7 @@ const account = r => require.ensure([], () => r(require('@/page/system/account.v
...
@@ -10,7 +10,7 @@ const account = r => require.ensure([], () => r(require('@/page/system/account.v
const
emailMange
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/system/emailMange.vue
'
)),
'
emailMange
'
);
const
emailMange
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/system/emailMange.vue
'
)),
'
emailMange
'
);
const
QRcode
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/system/QRcode.vue
'
)),
'
QRcode
'
);
const
QRcode
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/system/QRcode.vue
'
)),
'
QRcode
'
);
const
upload
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/upload/upload.vue
'
)),
'
upload
'
);
const
upload
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/upload/upload.vue
'
)),
'
upload
'
);
const
text
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/login/text.vue
'
)),
'
text
'
);
...
@@ -26,11 +26,13 @@ export default new Router({
...
@@ -26,11 +26,13 @@ export default new Router({
path
:
'
/login
'
,
path
:
'
/login
'
,
name
:
'
login
'
,
name
:
'
login
'
,
component
:
login
,
component
:
login
,
},{
},
path
:
'
/text
'
,
// {
name
:
'
text
'
,
// path: '/changepsd',
component
:
text
// name: 'changepsd',
},{
// component: changepsd
// },
{
path
:
'
/home
'
,
path
:
'
/home
'
,
name
:
'
home
'
,
name
:
'
home
'
,
component
:
home
,
component
:
home
,
...
...
src/service/http.service.js
View file @
2743827d
import
axios
from
'
axios
'
import
axios
from
'
axios
'
import
Promise
from
'
./promise.service.js
'
//
import Promise from './promise.service.js'
import
{
Notice
}
from
'
iview
'
//
import {Notice} from 'iview'
import
Vue
from
'
vue
'
//
import Vue from 'vue'
var
instance
=
axios
.
create
({});
//
var instance = axios.create({});
instance
.
defaults
.
timeout
=
2500
;
//
instance.defaults.timeout = 2500;
//instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
//
//
instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
instance
.
defaults
.
headers
.
post
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
;
//
instance.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
instance
.
defaults
.
headers
[
'
X-Requested-With
'
]
=
'
XMLHttpRequest
'
//
instance.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'
instance
.
defaults
.
headers
[
'
X-auth-Token
'
]
=
'
XMLHttpRequest
'
//
instance.defaults.headers['X-auth-Token'] = 'XMLHttpRequest'
instance
.
interceptors
.
request
.
use
(
function
(
config
)
{
//
instance.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
//
// 在发送请求之前做些什么
if
(
!
config
.
headers
[
'
Content-Type
'
])
{
//
if (!config.headers['Content-Type']) {
config
.
headers
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
//
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
}
//
}
return
config
;
//
return config;
},
function
(
error
)
{
//
}, function (error) {
// 对请求错误做些什么
//
// 对请求错误做些什么
return
Promise
.
reject
(
error
);
//
return Promise.reject(error);
});
//
});
instance
.
interceptors
.
response
.
use
(
function
(
response
)
{
//
instance.interceptors.response.use(function (response) {
// 在发送请求之前做些什么
//
// 在发送请求之前做些什么
if
(
response
.
status
>=
200
&&
response
.
status
<
300
){
//
if(response.status >= 200 && response.status < 300){
if
(
response
.
data
.
success
){
//
if(response.data.success){
return
Promise
.
resolve
(
response
.
data
.
body
)
//
return Promise.resolve(response.data.body)
}
else
{
//
} else {
if
(
response
.
data
.
body
.
message
){
//
if (response.data.body.message){
Notice
.
error
({
desc
:
`
${
response
.
data
.
body
.
message
}
`
})
//
Notice.error({desc:`${response.data.body.message}`})
}
//
}
return
Promise
.
reject
(
response
.
data
);
//
return Promise.reject(response.data);
}
//
}
}
else
{
//
} else {
return
Promise
.
reject
(
response
.
data
);
//
return Promise.reject(response.data);
}
//
}
if
(
resopnse
.
status
==
403
||
resopnse
.
status
==
401
){
//
if (resopnse.status == 403 || resopnse.status == 401){
if
(
response
.
data
.
body
.
message
){
//
if (response.data.body.message){
Notice
.
error
({
desc
:
`
${
response
.
data
.
body
.
messag
}
`
})
//
Notice.error({desc:`${response.data.body.messag}`})
}
//
}
window
.
location
.
replace
=
`
${
window
.
location
.
origin
}
/login`
//
window.location.replace = `${window.location.origin}/login`
}
//
}
return
response
;
//
return response;
},
error
=>
{
//
}, error => {
console
.
log
(
error
)
//
console.log(error)
});
//
});
export
default
instance
//
export default instance
//
export default axios
export
default
axios
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