|
|
@@ -123,14 +123,15 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="圈子icon" prop="icon" required>
|
|
|
+ <div>仅可上传一张圈子icon图片</div>
|
|
|
<el-upload
|
|
|
:limit="1"
|
|
|
:file-list="iconfileList"
|
|
|
:action="iconAction"
|
|
|
- :before-upload="iconBeforeUpload"
|
|
|
:on-success="afterIconUploadSuccess"
|
|
|
:on-error="afterIconUploadFail"
|
|
|
:on-exceed="fileLimite"
|
|
|
+ :on-remove="iconDel"
|
|
|
list-type="picture-card"
|
|
|
>
|
|
|
<i class="el-icon-plus"></i>
|
|
|
@@ -162,6 +163,7 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分享图片" prop="share_icon" required>
|
|
|
+ <div>仅可上传一张圈子分享图片</div>
|
|
|
<el-upload
|
|
|
:limit="1"
|
|
|
ref="share_icon"
|
|
|
@@ -171,6 +173,7 @@
|
|
|
:on-success="afterShareImgUploadSuccess"
|
|
|
:on-error="afterIconUploadFail"
|
|
|
:on-exceed="fileLimite"
|
|
|
+ :on-remove="shareImgDel"
|
|
|
list-type="picture-card"
|
|
|
>
|
|
|
<i class="el-icon-plus"></i>
|
|
|
@@ -330,12 +333,12 @@ export default {
|
|
|
this.$refs["modalForm"].validate(valid => {
|
|
|
if (!valid) return;
|
|
|
|
|
|
- if(this.modalFormData.typeId){
|
|
|
- this.editDynamic()
|
|
|
- }else{
|
|
|
+ if (this.modalFormData.typeId) {
|
|
|
+ this.editDynamic();
|
|
|
+ } else {
|
|
|
this.createdDynamic();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.close();
|
|
|
});
|
|
|
},
|
|
|
@@ -463,7 +466,7 @@ export default {
|
|
|
share_url,
|
|
|
order
|
|
|
} = this.modalFormData;
|
|
|
- let res = await this.$post("/uapi/v1/m/dynamic/edit_user_dynamic_type", {
|
|
|
+ let res = await this.$post("/uapi/v1/m/dynamic/add_user_dynamic_type", {
|
|
|
typeId,
|
|
|
name,
|
|
|
desc,
|
|
|
@@ -492,7 +495,7 @@ export default {
|
|
|
name: file.name,
|
|
|
url: res.filename
|
|
|
};
|
|
|
- this.share_iconfileList.push(info);
|
|
|
+ this.share_iconfileList = [info];
|
|
|
this.modalFormData.share_icon = res.filename;
|
|
|
},
|
|
|
// icon 上传成功
|
|
|
@@ -501,9 +504,19 @@ export default {
|
|
|
name: file.name,
|
|
|
url: res.filename
|
|
|
};
|
|
|
- this.iconfileList.push(info);
|
|
|
+ this.iconfileList = [info];
|
|
|
this.modalFormData.icon = res.filename;
|
|
|
},
|
|
|
+
|
|
|
+ shareImgDel() {
|
|
|
+ this.share_iconfileList = [];
|
|
|
+ this.modalFormData.share_icon = "";
|
|
|
+ },
|
|
|
+
|
|
|
+ iconDel() {
|
|
|
+ this.iconfileList = [];
|
|
|
+ this.modalFormData.icon = "";
|
|
|
+ },
|
|
|
// icon 上传失败
|
|
|
afterIconUploadFail(err, file, fileList) {
|
|
|
// console.log(file, fileList);
|