提交 07a5c2f3 authored 作者: lihuihui's avatar lihuihui

update

上级 8fcc6cba
...@@ -126,15 +126,15 @@ export default { ...@@ -126,15 +126,15 @@ export default {
}, },
// 更新状态 // 更新状态
updateStatus(row) { updateStatus(row) {
const params = row const params = JSON.parse(JSON.stringify(row))
params.status = row.status ? '1' : '0' params.status = params.status ? '1' : '0'
updateBanner(row).then(res => { updateBanner(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success' type: 'success'
}) })
this.$refs.list.refetch(true) // this.$refs.list.refetch(true)
} }
}) })
}, },
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="upload-img-box"> <div class="upload-img-box">
<upload-image v-model="ruleForm.picture"></upload-image> <upload-image v-model="ruleForm.picture"></upload-image>
<div class="upload-img-tips"> <div class="upload-img-tips">
<div>只能上传jpg/png文件,且不超过500kb</div> <div>建议上传jpg/png文件,且不超过500kb</div>
<div>建议banner图片上传尺寸 750×592</div> <div>建议banner图片上传尺寸 750×592</div>
<div>建议banner内容区尺寸 750×320</div> <div>建议banner内容区尺寸 750×320</div>
</div> </div>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<el-form-item> <el-form-item>
<div style="padding-top: 20px"> <div style="padding-top: 20px">
<el-button type="primary" @click="submitForm">确认</el-button> <el-button type="primary" @click="submitForm">确认</el-button>
<el-button @click="drawer = true">取消</el-button> <el-button @click="$router.go(-1)">取消</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -349,6 +349,8 @@ export default { ...@@ -349,6 +349,8 @@ export default {
.title { .title {
font-size: 16px; font-size: 16px;
color: #000000; color: #000000;
width: 150px;
line-height: 20px;
} }
.tool-btn { .tool-btn {
display: flex; display: flex;
......
...@@ -113,10 +113,11 @@ export default { ...@@ -113,10 +113,11 @@ export default {
updateInfo(item) { updateInfo(item) {
updateInfo(item).then(res => { updateInfo(item).then(res => {
this.$message({ this.$message({
message: '保存成功', message: '',
type: 'success' type: 'success'
}) })
}) })
console.log(item, 'item')
} }
} }
} }
......
...@@ -57,7 +57,7 @@ httpRequest.interceptors.response.use( ...@@ -57,7 +57,7 @@ httpRequest.interceptors.response.use(
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}` window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}`
} }
// 没有权限 // 没有权限
if (data.code === 4008) { if (data.code === 400) {
router.push('/401') router.push('/401')
} }
Message({ message: data.message, type: 'error' }) Message({ message: data.message, type: 'error' })
...@@ -69,6 +69,11 @@ httpRequest.interceptors.response.use( ...@@ -69,6 +69,11 @@ httpRequest.interceptors.response.use(
// 未登录 // 未登录
if (status === 403) { if (status === 403) {
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}` window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}`
} else if (status === 400) {
Message.error(message || error.response.data)
setTimeout(() => {
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}`
}, 1000)
} else { } else {
Message.error(message || error.response.data) Message.error(message || error.response.data)
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论