From 6d18c43fd6ef535a3b0bbd726f2e43d59c0170c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com>
Date: Tue, 8 Jul 2025 13:07:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/page/jou_gucon.vue | 33 ++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/components/page/jou_gucon.vue b/src/components/page/jou_gucon.vue
index 06d80be..362730f 100644
--- a/src/components/page/jou_gucon.vue
+++ b/src/components/page/jou_gucon.vue
@@ -17,6 +17,14 @@
+
+
+
+
+
+
@@ -228,6 +236,7 @@
id: -1,
link_Total: 0,
imageUrl: '',
+ SpecialImageUrl: '',
IMGdo_Url: this.IMGdoURL,
IMGup_Url: this.IMGupURL,
editVisible: false,
@@ -312,6 +321,8 @@
if (res.code == 0) {
this.baseForm = res.data.special;
+ this.SpecialImageUrl = res.data.special.icon?res.data.special.icon:'';
+
this.baseForm.first_name = res.data.editors[0].first_name;
this.baseForm.last_name = res.data.editors[0].last_name;
this.baseForm.email = res.data.editors[0].email;
@@ -352,6 +363,11 @@
saveBase(baseForm) {
this.$refs.base_Form.validate((valid) => {
if (valid) {
+ if(this.baseForm.icon==''){
+ this.$message.error(`请上传图片`);
+ return false
+ }
+
this.$api
.post('master/Special/editSpecialBasic', this.baseForm)
.then(res => {
@@ -531,7 +547,15 @@
});
},
-
+//上传图片
+handleImageSuccess(res, file) {
+ if (res.code == 0) {
+ this.baseForm.icon = res.upurl;
+ } else {
+ this.$message.error(res.msg);
+ }
+ this.SpecialImageUrl = URL.createObjectURL(file.raw);
+ },
//上传图片
handleAvatarSuccess(res, file) {
if (res.code == 0) {
@@ -552,6 +576,13 @@
handleAvatarError(res, file) {
// this.$message.error(res);
},
+ beforeImageUpload(file) {
+ const isLt2M = file.size / 1024 / 1024 < 5;
+ if (!isLt2M) {
+ this.$message.error('图片大小不能超过 5M!');
+ }
+ return isLt2M;
+ },
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 1;
if (!isLt2M) {