@@ -268,14 +268,18 @@ export default {
let flag = true;
//如果图片类型为封面图片, 切图片状态为开, 则查询后台是否存在图片状态为开的数据, 不存在返回true, 存在返回false
if (this.form.imgType === "1" && this.form.imgSwitch === "switch_on") {
- isCover().then(res => {
- if (res.data) {
- flag = false;
- this.$modal.msgError("封面图片只能存在一张, 请先关闭其他封面图片");
- }else{
- this.isSubmit();
- }
- })
+ if(this.form.id != null){
+ this.isSubmit();
+ }else{
+ isCover().then(res => {
+ if (res.data) {
+ flag = false;
+ this.$modal.msgError("封面图片只能存在一张, 请先关闭其他封面图片");
+ }
+ })
}else{
this.isSubmit();
}