Commit 28a3af17 authored by 刘帅阳's avatar 刘帅阳

Merge remote-tracking branch 'origin/master'

parents 9ce5e38a 796582f4
......@@ -21,6 +21,12 @@ export function login(username, password, code, uuid,type) {
headers: {}
})
}
export function handleLogout() {
return request({
url: '/auth/logout',
method: 'get'
})
}
// 刷新token
export function refreshToken(params) {
return request({
......
......@@ -66,6 +66,7 @@
<script>
import { mapGetters } from 'vuex'
import Hamburger from '@/components/Hamburger'
import { handleLogout } from '@/api/login'
export default {
components: {
Hamburger
......@@ -117,8 +118,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('FedLogOut').then(() => {
location.reload()
handleLogout().then(res => {
if (res.code === 200) {
this.$message.success('退出成功!')
this.$store.dispatch('FedLogOut').then(() => {
location.reload()
})
}
})
})
// await this.$store.dispatch('user/logout')
......
......@@ -7,11 +7,19 @@
<Header />
</div>
<div class="nav-container-two">
<div class="placeholder"></div>
<div class="placeholder" />
<tags-view />
<navbar />
</div>
<app-main />
<div class="footer">
<div class="titleText">Copyrights © 2024 All Rights Reserved by</div>
<div class="text_body">
<div class="textOne" @click="handleJumpTextOne">京ICP备2024075637号-1</div>
<img v-if="logo" :src="logo" class="bottomLogo">
<div class="textTwo" @click="handleJumpTextTwo">京公网安备</div>
</div>
</div>
<right-panel>
<settings />
</right-panel>
......@@ -37,6 +45,11 @@ export default {
settings
},
mixins: [ResizeMixin],
data() {
return {
logo: require('@/assets/image/policeDadgeIcon.png')
}
},
computed: {
sidebar() {
return this.$store.state.app.sidebar
......@@ -57,6 +70,12 @@ export default {
}
},
methods: {
handleJumpTextOne() {
window.open('https://beian.miit.gov.cn/#/Integrated/index', '_blank')
},
handleJumpTextTwo() {
window.open('https://beian.mps.gov.cn/#/query/webSearch?code=', '_blank')
},
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
......@@ -65,5 +84,31 @@ export default {
</script>
<style lang="scss" scoped>
.footer{
width: 100%;
height: 80px;
background-color: #F4F4F4;
.titleText{
padding: 15px 0;
text-align: center;
color: black;
}
.text_body{
display: flex;
justify-content: center;
.textOne{
cursor: pointer;
color: black;
}
.bottomLogo{
width: 20px;
height: 20px;
margin: 0 10px;
}
.textTwo{
cursor: pointer;
color: black;
}
}
}
</style>
......@@ -4,6 +4,7 @@ import store from '@/store'
import Qs from 'qs'
import { getToken, setToken } from '@/utils/auth'
import SM4 from './gmUtil'
import router from '../router'
import errorCode from '@/utils/errorCode'
import { refreshToken } from '@/api/login.js'
......@@ -101,6 +102,14 @@ service.interceptors.response.use(res => {
// 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) {
const errMsg = res.data.data || res.data.message || res.data.msg
Message({
......
......@@ -396,6 +396,7 @@
</div>
</template>
<script>
import { encryptTwo } from '@/utils/jsencrypt'
import {
getUserList,
delSysuser,
......@@ -897,7 +898,7 @@ export default {
this.reset()
this.isUnitAdmin = flag
this.open = true
this.form = row
this.form = JSON.parse(JSON.stringify(row))
const depIds = row.deptIdPrepares.split(',')
this.form.deptId = depIds.map(item => Number(item))
this.title = '修改代言人'
......@@ -913,7 +914,7 @@ export default {
this.$refs.ruleForm.validate(pass => {
if (pass) {
this.userRestLoading = true
resetSysUserPwd(this.ruleForm.row, this.ruleForm.newPassword).then(response => {
resetSysUserPwd(this.ruleForm.row, encryptTwo(this.ruleForm.newPassword)).then(response => {
if (response.code === 200) {
this.$message({
message: '修改成功',
......
......@@ -510,6 +510,7 @@ export default {
handleUpdate(row) {
this.reset()
this.form = { ...row }
this.imageUrl = row.url
this.open = true
this.title = '修改banner'
},
......
......@@ -796,7 +796,7 @@
<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-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
v-for="(item,index) in deptList"
:key="index"
......@@ -878,7 +878,7 @@ import {
cmspriceclickUpdate
} from '@/api/contentManagement/sysContentVideoInformation'
import { getToken } from '@/utils/auth'
import { listAllByUnitIdType, handleAddForm,handleImportTemplate } from '@/api/clickManagement'
import { listAllByUnitIdType, handleAddForm, handleImportTemplate } from '@/api/clickManagement'
export default {
name: 'Index',
data() {
......@@ -1185,13 +1185,18 @@ export default {
},
/** 通过所属商家和类型获取标题下拉*/
handleChangeType() {
const params = {
type: this.formModel.type,
unitId: this.formModel.unitId
if (this.formModel.type && this.formModel.unitId) {
const params = {
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() {
cmspriceclickExport({ unitId: this.queryParams.unitId }).then(response => {
......
......@@ -172,6 +172,7 @@ export default {
},
data() {
return {
uploadSucess: false,
videoShow: false,
isDelFile: false,
fileList: [],
......@@ -330,12 +331,14 @@ export default {
})
},
handleUploadVideo(file) {
this.uploadSucess = false
const formData = new FormData()
formData.append('file', file.file)
formData.append('temp', 'videoInformation')
uploadPublic(formData).then(res => {
console.log('handleUploadVideo', res)
this.$message.success('上传成功')
this.uploadSucess = true
this.videoUrl = res.data.businessId
this.form.videoUrlId = res.data.businessId
this.fileList = []
......@@ -496,54 +499,61 @@ export default {
},
// 发布方法
publish() {
// 拷贝form
const form = JSON.parse(JSON.stringify(this.form))
// 转换时间格式
this.pubLoading = true
this.$refs.deviceFormRef.validate(valid => {
if (valid) {
if (this.form.businessId !== undefined) {
// 编辑
form.videoType = '1'
form.unitId = this.$route.query.unitId
updateSysContentNewsInformation(form).then(res => {
if (res.code === 200) {
this.$message({
message: '保存成功',
type: 'success'
})
if (this.uploadSucess === true) {
// 拷贝form
const form = JSON.parse(JSON.stringify(this.form))
console.log('11111', this.form.videoUrlId)
// 转换时间格式
this.pubLoading = true
this.$refs.deviceFormRef.validate(valid => {
if (valid) {
if (this.form.businessId !== undefined) {
// 编辑
form.videoType = '1'
form.unitId = this.$route.query.unitId
updateSysContentNewsInformation(form).then(res => {
if (res.code === 200) {
this.$message({
message: '保存成功',
type: 'success'
})
this.pubLoading = false
this.$router.push({
path: '/contentManagement/videoInformation/index'
})
}
}).catch(() => {
this.pubLoading = false
this.$router.push({
path: '/contentManagement/videoInformation/index'
})
}
}).catch(() => {
this.pubLoading = false
})
} else {
form.videoType = '1'
form.tenant = this.userId
form.unitId = this.$route.query.unitId
addSysContentNewsInformation(form).then(res => {
if (res.code === 200) {
this.$message({
message: '保存成功',
type: 'success'
})
})
} else {
form.videoType = '1'
form.tenant = this.userId
form.unitId = this.$route.query.unitId
addSysContentNewsInformation(form).then(res => {
if (res.code === 200) {
this.$message({
message: '保存成功',
type: 'success'
})
this.pubLoading = false
this.$router.push({
path: '/contentManagement/videoInformation/index'
})
}
}).catch(() => {
this.pubLoading = false
this.$router.push({
path: '/contentManagement/videoInformation/index'
})
}
}).catch(() => {
this.pubLoading = false
})
})
}
} else {
this.pubLoading = false
}
} else {
this.pubLoading = false
}
})
})
} else {
this.$message({
type: 'error',
message: '请等上传完视频再发布'
})
}
}
}
}
......
......@@ -108,6 +108,14 @@
</el-form>
<!-- 底部 -->
<div class="el-login-footer" />
<div class="footer">
<div class="titleText">Copyrights © 2024 All Rights Reserved by</div>
<div class="text_body">
<div class="textOne" @click="handleJumpTextOne">京ICP备2024075637号-1</div>
<img v-if="logo" :src="logo" class="bottomLogo">
<div class="textTwo" @click="handleJumpTextTwo">京公网安备</div>
</div>
</div>
</div>
</template>
......@@ -122,6 +130,7 @@ export default {
components: { Verify },
data() {
return {
logo: require('@/assets/image/policeDadgeIcon.png'),
reLocation: '',
codeUrl: '',
cookiePassword: '',
......@@ -154,6 +163,12 @@ export default {
this.getCookie()
},
methods: {
handleJumpTextOne() {
window.open('https://beian.miit.gov.cn/#/Integrated/index', '_blank')
},
handleJumpTextTwo() {
window.open('https://beian.mps.gov.cn/#/query/webSearch?code=', '_blank')
},
goDetail(path) {
this.$router.push({
path: path,
......@@ -576,3 +591,38 @@ export default {
}
</style>
<style lang="scss" scoped>
.footer{
font-size: 14px;
width: 100%;
height: 80px;
background-color: #214E90;
position: fixed;
bottom: 0;
text-align: center;
color: #fff;
letter-spacing: 1px;
.titleText{
padding: 15px 0;
text-align: center;
color: #FFFFFF;
}
.text_body{
display: flex;
justify-content: center;
.textOne{
cursor: pointer;
color: #FFFFFF;
}
.bottomLogo{
width: 20px;
height: 20px;
margin: 0 10px;
}
.textTwo{
cursor: pointer;
color: #FFFFFF;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment