Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xichonght
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
zhangdishen
xichonght
Commits
3a1bc474
Commit
3a1bc474
authored
Aug 19, 2019
by
qddidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式
parent
c4e44c70
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
15 deletions
+41
-15
axios.js
xichongSys/src/http/axios.js
+7
-1
index.js
xichongSys/src/router/index.js
+5
-0
global.js
xichongSys/src/utils/global.js
+4
-3
candode.vue
xichongSys/src/views/Core/candode.vue
+3
-2
authRecordphone.vue
xichongSys/src/views/Myvue/authRecordphone.vue
+22
-9
No files found.
xichongSys/src/http/axios.js
View file @
3a1bc474
...
@@ -18,6 +18,11 @@ export default function $axios(options) {
...
@@ -18,6 +18,11 @@ export default function $axios(options) {
// request 拦截器
// request 拦截器
instance
.
interceptors
.
request
.
use
(
instance
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
if
(
localStorage
.
getItem
(
"token"
)){
Cookies
.
set
(
'token'
,
localStorage
.
getItem
(
"token"
))
console
.
log
(
localStorage
.
getItem
(
"token"
))
}
let
token
=
Cookies
.
get
(
'token'
)
let
token
=
Cookies
.
get
(
'token'
)
// 1. 请求开始的时候可以结合 vuex 开启全屏 loading 动画
// 1. 请求开始的时候可以结合 vuex 开启全屏 loading 动画
// console.log(store.state.loading)
// console.log(store.state.loading)
...
@@ -25,8 +30,9 @@ export default function $axios(options) {
...
@@ -25,8 +30,9 @@ export default function $axios(options) {
// 2. 带上token
// 2. 带上token
if
(
token
)
{
if
(
token
)
{
config
.
headers
.
token
=
token
config
.
headers
.
token
=
token
}
else
{
}
else
{
console
.
log
(
"重定向到登录页面"
)
// 重定向到登录页面
// 重定向到登录页面
router
.
push
(
'/login'
)
router
.
push
(
'/login'
)
}
}
...
...
xichongSys/src/router/index.js
View file @
3a1bc474
...
@@ -203,6 +203,11 @@ router.beforeEach((to, from, next) => {
...
@@ -203,6 +203,11 @@ router.beforeEach((to, from, next) => {
// 登录界面登录成功之后,会把用户信息保存在会话
// 登录界面登录成功之后,会把用户信息保存在会话
// 存在时间为会话生命周期,页面关闭即失效。
// 存在时间为会话生命周期,页面关闭即失效。
if
(
localStorage
.
getItem
(
"token"
)){
Cookies
.
set
(
'token'
,
localStorage
.
getItem
(
"token"
))
}
let
token
=
Cookies
.
get
(
'token'
)
let
token
=
Cookies
.
get
(
'token'
)
let
userName
=
sessionStorage
.
getItem
(
'user'
)
let
userName
=
sessionStorage
.
getItem
(
'user'
)
if
(
to
.
path
===
'/login'
)
{
if
(
to
.
path
===
'/login'
)
{
...
...
xichongSys/src/utils/global.js
View file @
3a1bc474
...
@@ -5,10 +5,11 @@
...
@@ -5,10 +5,11 @@
*/
*/
// 后台管理系统服务器地址
// 后台管理系统服务器地址
// export const baseUrl2 = 'http://xclc.rensheju.com'
// //export const baseUrl = 'http://xc.rensheju.com'
// export const baseUrl = 'http://172.16.10.33:9002'
export
const
baseUrl2
=
'http://xclc.rensheju.com'
export
const
baseUrl2
=
'http://xclc.rensheju.com'
//export const baseUrl = 'http://xc.rensheju.com'
export
const
baseUrl
=
'http://xc.rensheju.com'
export
const
baseUrl
=
'http://172.16.10.33:9002'
export
default
{
export
default
{
baseUrl
,
baseUrl
,
...
...
xichongSys/src/views/Core/candode.vue
View file @
3a1bc474
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<div>
<div>
<el-cascader
<el-cascader
:props=
"
{
checkStrictly: true
}"
:props=
"
{
expandTrigger: 'hover'
}"
clearable
clearable
placeholder="请选择镇村"
placeholder="请选择镇村"
v-model="value"
v-model="value"
:options="options"
:options="options"
size="mini"
size="mini"
@change="handleChange">
</el-cascader>
@change="handleChange"
>
</el-cascader>
</div>
</div>
...
...
xichongSys/src/views/Myvue/authRecordphone.vue
View file @
3a1bc474
<
template
>
<
template
>
<div>
<div>
<div
class=
"sele"
>
<div
class=
"sele"
>
<Candode
v-on:childByValue=
"childByValue"
></Candode>
<Candode
v-on:childByValue=
"childByValue"
style=
"width:30%"
></Candode>
<el-input
v-model=
"idcard"
style=
"width:50%"
size=
"mini"
clearable
placeholder=
"请输入身份证号"
></el-input>
<el-input
v-model=
"idcard"
style=
"width:30%"
size=
"mini"
clearable
placeholder=
"请输入身份证号"
></el-input>
<el-button
type=
"primary"
size=
"mini"
style=
"background:#148A9B;margin-left:10px"
icon=
"el-icon-search"
@
click=
"serch"
>
搜索
</el-button>
<div
class=
"s"
style=
"width:30%"
>
<el-select
size=
"mini"
@
change=
"torz"
clearable
v-model=
"state"
placeholder=
"所有状态"
>
<el-option
v-for=
"item3 in stateList"
:key=
"item3.value"
:label=
"item3.label"
:value=
"item3.value"
>
</el-option>
</el-select>
</div>
<el-button
type=
"primary"
size=
"mini"
style=
"background:#148A9B;margin-left:10px"
icon=
"el-icon-search"
@
click=
"serch"
>
搜索
</el-button>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -33,20 +44,23 @@
...
@@ -33,20 +44,23 @@
</el-table>
</el-table>
<div
style=
"width:100%;height:80px;overflow:scroll;margin-bottom:20px"
>
<el-pagination
<el-pagination
class=
"pone"
class=
"pone"
:page-size=
'10'
:page-size=
'10'
layout=
"total, prev, pager, next
, jumper
"
layout=
"total, prev, pager, next"
:total=
"totals"
:total=
"totals"
:current-page
.
sync=
"Page"
:current-page
.
sync=
"Page"
@
current-change=
"current_change"
@
current-change=
"current_change"
small
>
>
</el-pagination>
</el-pagination>
</div>
</div>
</div>
</
template
>
</
template
>
<
style
>
<
style
scoped
>
.op
{
.op
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -76,11 +90,10 @@
...
@@ -76,11 +90,10 @@
.el-timeline
{
.el-timeline
{
padding-left
:
20px
padding-left
:
20px
}
}
.add
{
margin-left
:
20px
}
.sele
{
.sele
{
display
:
flex
display
:
flex
;
margin-top
:
10px
}
}
</
style
>
</
style
>
...
...
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