7e7a7241 by qingxiao

1

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