7e7a7241 by qingxiao

1

1 parent cddc0651
......@@ -27,7 +27,7 @@ export default {
return {
imageUrl: this.value,
uploadUrl: "https://api.k.wxpai.cn/bizproxy/kdapi/file/upload",
tips: "只能上传jpg/png文件,且不超过500kb",
tips: "只能上传jpg/png文件,且不超过2MB",
tipsError: false,
uploadInterval: 0
};
......@@ -38,7 +38,7 @@ export default {
},
beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg" || file.type === "image/png";
const isLt2M = file.size / 1024 < 500;
const isLt2M = file.size / 1024 < 2000;
if (!isJPG) {
this.tipsError = true;
......@@ -47,7 +47,7 @@ export default {
}
if (!isLt2M) {
this.tipsError = true;
this.tips = "上传图片大小不能超过 500kb!";
this.tips = "上传图片大小不能超过 2MB!";
}
return isJPG && isLt2M;
......@@ -89,7 +89,7 @@ export default {
},
uploadEnd() {
clearInterval(this.uploadInterval);
this.tips = "只能上传jpg/png文件,且不超过500kb";
this.tips = "只能上传jpg/png文件,且不超过2MB";
}
},
computed: {
......
......@@ -27,7 +27,7 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-link type="primary" @click="deleteOneStepImage(scope.row.oneStepCode)">删除</el-link>
<el-link type="primary" @click="deleteOneStepImage(scope.row.oneStepImageCode)">删除</el-link>
<el-link type="primary" @click="editOneStepImage(scope.row)">编辑</el-link>
<el-link type="primary" v-show="scope.$index!==0"
@click="changeImage(scope.row,oneStepImageList[scope.$index-1])"><i
......@@ -86,7 +86,8 @@
oneStepListUrl: '/tianbao_edu_api/admin/oneStep/list',
oneStepImageListUrl: '/tianbao_edu_api/admin/oneStepImage/list',
changeUrl: '/tianbao_edu_api/admin/oneStepImage/change',
oneStepImageSaveUrl: '/tianbao_edu_api/admin/oneStepImage/save'
oneStepImageSaveUrl: '/tianbao_edu_api/admin/oneStepImage/save',
oneStepImageDelUrl: '/tianbao_edu_api/admin/oneStepImage/delete'
}
export default {
components: {UploadItem},
......@@ -161,7 +162,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
request.post(urls.oneStepDelUrl, {oneStepCode: code}).then(response => {
request.post(urls.oneStepImageDelUrl, {oneStepImageCode: code}).then(response => {
this.initOneStepImage()
this.$message.success("删除成功")
}).catch(() => {
......