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

update

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