Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_manage
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
张伯涛
intel_promotion_manage
Commits
5db260ba
Commit
5db260ba
authored
Jul 11, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出调用接口,410问题修改
parent
d0de8dad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
10 deletions
+36
-10
login.js
src/api/login.js
+6
-0
header.vue
src/layout/components/header.vue
+8
-2
request.js
src/utils/request.js
+9
-0
index.vue
src/views/contentManagement/clickManagement/index.vue
+13
-8
No files found.
src/api/login.js
View file @
5db260ba
...
@@ -21,6 +21,12 @@ export function login(username, password, code, uuid,type) {
...
@@ -21,6 +21,12 @@ export function login(username, password, code, uuid,type) {
headers
:
{}
headers
:
{}
})
})
}
}
export
function
handleLogout
()
{
return
request
({
url
:
'/auth/logout'
,
method
:
'get'
})
}
// 刷新token
// 刷新token
export
function
refreshToken
(
params
)
{
export
function
refreshToken
(
params
)
{
return
request
({
return
request
({
...
...
src/layout/components/header.vue
View file @
5db260ba
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
<
script
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
Hamburger
from
'@/components/Hamburger'
import
Hamburger
from
'@/components/Hamburger'
import
{
handleLogout
}
from
'@/api/login'
export
default
{
export
default
{
components
:
{
components
:
{
Hamburger
Hamburger
...
@@ -117,8 +118,13 @@ export default {
...
@@ -117,8 +118,13 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
handleLogout
().
then
(
res
=>
{
location
.
reload
()
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'退出成功!'
)
this
.
$store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
location
.
reload
()
})
}
})
})
})
})
// await this.$store.dispatch('user/logout')
// await this.$store.dispatch('user/logout')
...
...
src/utils/request.js
View file @
5db260ba
...
@@ -4,6 +4,7 @@ import store from '@/store'
...
@@ -4,6 +4,7 @@ import store from '@/store'
import
Qs
from
'qs'
import
Qs
from
'qs'
import
{
getToken
,
setToken
}
from
'@/utils/auth'
import
{
getToken
,
setToken
}
from
'@/utils/auth'
import
SM4
from
'./gmUtil'
import
SM4
from
'./gmUtil'
import
router
from
'../router'
import
errorCode
from
'@/utils/errorCode'
import
errorCode
from
'@/utils/errorCode'
import
{
refreshToken
}
from
'@/api/login.js'
import
{
refreshToken
}
from
'@/api/login.js'
...
@@ -101,6 +102,14 @@ service.interceptors.response.use(res => {
...
@@ -101,6 +102,14 @@ service.interceptors.response.use(res => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
// })
// })
}
else
if
(
code
===
410
)
{
Message
({
message
:
'当前登录无权限,请重新登录'
,
type
:
'error'
})
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
location
.
reload
()
})
}
else
if
(
code
===
500
||
code
===
400
)
{
}
else
if
(
code
===
500
||
code
===
400
)
{
const
errMsg
=
res
.
data
.
data
||
res
.
data
.
message
||
res
.
data
.
msg
const
errMsg
=
res
.
data
.
data
||
res
.
data
.
message
||
res
.
data
.
msg
Message
({
Message
({
...
...
src/views/contentManagement/clickManagement/index.vue
View file @
5db260ba
...
@@ -796,7 +796,7 @@
...
@@ -796,7 +796,7 @@
<el-dialog
:title=
"formTitle"
:visible
.
sync=
"formOpen"
width=
"40%"
append-to-body
>
<el-dialog
:title=
"formTitle"
:visible
.
sync=
"formOpen"
width=
"40%"
append-to-body
>
<el-form
ref=
"formModel"
:model=
"formModel"
:rules=
"formRules"
label-width=
"auto"
>
<el-form
ref=
"formModel"
:model=
"formModel"
:rules=
"formRules"
label-width=
"auto"
>
<el-form-item
label=
"所属商家:"
prop=
"unitId"
>
<el-form-item
label=
"所属商家:"
prop=
"unitId"
>
<el-select
v-model=
"formModel.unitId"
clearable
filterable
placeholder=
"请选择所属商家"
style=
"width: 100%"
>
<el-select
v-model=
"formModel.unitId"
clearable
filterable
placeholder=
"请选择所属商家"
style=
"width: 100%"
@
change=
"handleChangeType"
>
<el-option
<el-option
v-for=
"(item,index) in deptList"
v-for=
"(item,index) in deptList"
:key=
"index"
:key=
"index"
...
@@ -878,7 +878,7 @@ import {
...
@@ -878,7 +878,7 @@ import {
cmspriceclickUpdate
cmspriceclickUpdate
}
from
'@/api/contentManagement/sysContentVideoInformation'
}
from
'@/api/contentManagement/sysContentVideoInformation'
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
{
listAllByUnitIdType
,
handleAddForm
,
handleImportTemplate
}
from
'@/api/clickManagement'
import
{
listAllByUnitIdType
,
handleAddForm
,
handleImportTemplate
}
from
'@/api/clickManagement'
export
default
{
export
default
{
name
:
'Index'
,
name
:
'Index'
,
data
()
{
data
()
{
...
@@ -1185,13 +1185,18 @@ export default {
...
@@ -1185,13 +1185,18 @@ export default {
},
},
/** 通过所属商家和类型获取标题下拉*/
/** 通过所属商家和类型获取标题下拉*/
handleChangeType
()
{
handleChangeType
()
{
const
params
=
{
if
(
this
.
formModel
.
type
&&
this
.
formModel
.
unitId
)
{
type
:
this
.
formModel
.
type
,
const
params
=
{
unitId
:
this
.
formModel
.
unitId
type
:
this
.
formModel
.
type
,
unitId
:
this
.
formModel
.
unitId
}
listAllByUnitIdType
(
params
).
then
(
res
=>
{
this
.
titleList
=
res
.
data
})
}
else
{
this
.
formModel
.
newsVideoId
=
''
this
.
titleList
=
[]
}
}
listAllByUnitIdType
(
params
).
then
(
res
=>
{
this
.
titleList
=
res
.
data
})
},
},
handleExport
()
{
handleExport
()
{
cmspriceclickExport
({
unitId
:
this
.
queryParams
.
unitId
}).
then
(
response
=>
{
cmspriceclickExport
({
unitId
:
this
.
queryParams
.
unitId
}).
then
(
response
=>
{
...
...
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