This commit is contained in:
liuye
2022-05-09 08:43:37 +08:00
parent 70557adefd
commit 61de1da32d

View File

@@ -148,7 +148,7 @@ export default {
submit() {
this.$refs.ruleForm.validate(v => {
if (v) {
if(this.form.pictureUrlList.length) {
if(this.form.pictureUrlList && this.form.pictureUrlList.length) {
this.form.pictureUrl = this.form.pictureUrlList[0].url
}
this.instance.post(`/app/apppublicityinfo/addOrUpdate`, this.form).then(res => {
@@ -166,6 +166,7 @@ export default {
params: {id}
}).then(res => {
if (res?.data) {
res.data.pictureUrlList = []
if(res.data.pictureUrl) {
res.data.pictureUrlList = [{url: res.data.pictureUrl}]
}