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) { ...@@ -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({
......
...@@ -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')
......
...@@ -7,11 +7,19 @@ ...@@ -7,11 +7,19 @@
<Header /> <Header />
</div> </div>
<div class="nav-container-two"> <div class="nav-container-two">
<div class="placeholder"></div> <div class="placeholder" />
<tags-view /> <tags-view />
<navbar /> <navbar />
</div> </div>
<app-main /> <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> <right-panel>
<settings /> <settings />
</right-panel> </right-panel>
...@@ -37,6 +45,11 @@ export default { ...@@ -37,6 +45,11 @@ export default {
settings settings
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
data() {
return {
logo: require('@/assets/image/policeDadgeIcon.png')
}
},
computed: { computed: {
sidebar() { sidebar() {
return this.$store.state.app.sidebar return this.$store.state.app.sidebar
...@@ -57,6 +70,12 @@ export default { ...@@ -57,6 +70,12 @@ export default {
} }
}, },
methods: { 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() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
} }
...@@ -65,5 +84,31 @@ export default { ...@@ -65,5 +84,31 @@ export default {
</script> </script>
<style lang="scss" scoped> <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> </style>
...@@ -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({
......
...@@ -396,6 +396,7 @@ ...@@ -396,6 +396,7 @@
</div> </div>
</template> </template>
<script> <script>
import { encryptTwo } from '@/utils/jsencrypt'
import { import {
getUserList, getUserList,
delSysuser, delSysuser,
...@@ -897,7 +898,7 @@ export default { ...@@ -897,7 +898,7 @@ export default {
this.reset() this.reset()
this.isUnitAdmin = flag this.isUnitAdmin = flag
this.open = true this.open = true
this.form = row this.form = JSON.parse(JSON.stringify(row))
const depIds = row.deptIdPrepares.split(',') const depIds = row.deptIdPrepares.split(',')
this.form.deptId = depIds.map(item => Number(item)) this.form.deptId = depIds.map(item => Number(item))
this.title = '修改代言人' this.title = '修改代言人'
...@@ -913,7 +914,7 @@ export default { ...@@ -913,7 +914,7 @@ export default {
this.$refs.ruleForm.validate(pass => { this.$refs.ruleForm.validate(pass => {
if (pass) { if (pass) {
this.userRestLoading = true 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) { if (response.code === 200) {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
......
...@@ -510,6 +510,7 @@ export default { ...@@ -510,6 +510,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
this.form = { ...row } this.form = { ...row }
this.imageUrl = row.url
this.open = true this.open = true
this.title = '修改banner' this.title = '修改banner'
}, },
......
...@@ -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 => {
......
...@@ -172,6 +172,7 @@ export default { ...@@ -172,6 +172,7 @@ export default {
}, },
data() { data() {
return { return {
uploadSucess: false,
videoShow: false, videoShow: false,
isDelFile: false, isDelFile: false,
fileList: [], fileList: [],
...@@ -330,12 +331,14 @@ export default { ...@@ -330,12 +331,14 @@ export default {
}) })
}, },
handleUploadVideo(file) { handleUploadVideo(file) {
this.uploadSucess = false
const formData = new FormData() const formData = new FormData()
formData.append('file', file.file) formData.append('file', file.file)
formData.append('temp', 'videoInformation') formData.append('temp', 'videoInformation')
uploadPublic(formData).then(res => { uploadPublic(formData).then(res => {
console.log('handleUploadVideo', res) console.log('handleUploadVideo', res)
this.$message.success('上传成功') this.$message.success('上传成功')
this.uploadSucess = true
this.videoUrl = res.data.businessId this.videoUrl = res.data.businessId
this.form.videoUrlId = res.data.businessId this.form.videoUrlId = res.data.businessId
this.fileList = [] this.fileList = []
...@@ -496,54 +499,61 @@ export default { ...@@ -496,54 +499,61 @@ export default {
}, },
// 发布方法 // 发布方法
publish() { publish() {
// 拷贝form if (this.uploadSucess === true) {
const form = JSON.parse(JSON.stringify(this.form)) // 拷贝form
const form = JSON.parse(JSON.stringify(this.form))
// 转换时间格式 console.log('11111', this.form.videoUrlId)
this.pubLoading = true // 转换时间格式
this.$refs.deviceFormRef.validate(valid => { this.pubLoading = true
if (valid) { this.$refs.deviceFormRef.validate(valid => {
if (this.form.businessId !== undefined) { if (valid) {
// 编辑 if (this.form.businessId !== undefined) {
form.videoType = '1' // 编辑
form.unitId = this.$route.query.unitId form.videoType = '1'
updateSysContentNewsInformation(form).then(res => { form.unitId = this.$route.query.unitId
if (res.code === 200) { updateSysContentNewsInformation(form).then(res => {
this.$message({ if (res.code === 200) {
message: '保存成功', this.$message({
type: 'success' message: '保存成功',
}) type: 'success'
})
this.pubLoading = false
this.$router.push({
path: '/contentManagement/videoInformation/index'
})
}
}).catch(() => {
this.pubLoading = false this.pubLoading = false
this.$router.push({ })
path: '/contentManagement/videoInformation/index' } else {
}) form.videoType = '1'
} form.tenant = this.userId
}).catch(() => { form.unitId = this.$route.query.unitId
this.pubLoading = false addSysContentNewsInformation(form).then(res => {
}) if (res.code === 200) {
} else { this.$message({
form.videoType = '1' message: '保存成功',
form.tenant = this.userId type: 'success'
form.unitId = this.$route.query.unitId })
addSysContentNewsInformation(form).then(res => { this.pubLoading = false
if (res.code === 200) { this.$router.push({
this.$message({ path: '/contentManagement/videoInformation/index'
message: '保存成功', })
type: 'success' }
}) }).catch(() => {
this.pubLoading = false this.pubLoading = false
this.$router.push({ })
path: '/contentManagement/videoInformation/index' }
}) } else {
} this.pubLoading = false
}).catch(() => {
this.pubLoading = false
})
} }
} else { })
this.pubLoading = false } else {
} this.$message({
}) type: 'error',
message: '请等上传完视频再发布'
})
}
} }
} }
} }
......
...@@ -108,6 +108,14 @@ ...@@ -108,6 +108,14 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer" /> <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> </div>
</template> </template>
...@@ -122,6 +130,7 @@ export default { ...@@ -122,6 +130,7 @@ export default {
components: { Verify }, components: { Verify },
data() { data() {
return { return {
logo: require('@/assets/image/policeDadgeIcon.png'),
reLocation: '', reLocation: '',
codeUrl: '', codeUrl: '',
cookiePassword: '', cookiePassword: '',
...@@ -154,6 +163,12 @@ export default { ...@@ -154,6 +163,12 @@ export default {
this.getCookie() this.getCookie()
}, },
methods: { 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) { goDetail(path) {
this.$router.push({ this.$router.push({
path: path, path: path,
...@@ -576,3 +591,38 @@ export default { ...@@ -576,3 +591,38 @@ export default {
} }
</style> </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