|
@@ -120,6 +120,8 @@ export default {
|
|
|
if (rule.required) {
|
|
|
if (!value) {
|
|
|
return callback(new Error(rule.message));
|
|
|
+ }else{
|
|
|
+ callback();
|
|
|
}
|
|
|
} else {
|
|
|
callback();
|
|
@@ -192,7 +194,6 @@ export default {
|
|
|
return {
|
|
|
listData: {
|
|
|
coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
|
|
|
- certificateIds: [],
|
|
|
goodsType: "",
|
|
|
status: 1,
|
|
|
certificateTypeId: "",
|
|
@@ -581,7 +582,6 @@ export default {
|
|
|
* 表单验证
|
|
|
*/
|
|
|
submitForm(formName, int) {
|
|
|
- console.log(this.$refs[formName]);
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.submitApi(int);
|
|
@@ -653,7 +653,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
if (this.listData.goodsType === 3) {
|
|
|
- delete data.certificateIds;
|
|
|
this.$api
|
|
|
.addGoodsmake(data)
|
|
|
.then((res) => {
|
|
@@ -673,7 +672,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
if (this.listData.goodsType === 4) {
|
|
|
- delete data.certificateIds;
|
|
|
this.$api
|
|
|
.addGoodsfront(data)
|
|
|
.then((res) => {
|
|
@@ -756,8 +754,6 @@ export default {
|
|
|
sort: Number(item.sort),
|
|
|
};
|
|
|
});
|
|
|
- //证书数据格式转换
|
|
|
- data.certificateIds = data.certificateIds.toString();
|
|
|
resolve();
|
|
|
});
|
|
|
},
|
|
@@ -820,8 +816,6 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
- //题库类型不需要颁发证书,所有需要删除颁发证书字段-防止报错
|
|
|
- delete data.certificateIds;
|
|
|
resolve();
|
|
|
});
|
|
|
},
|
|
@@ -837,7 +831,6 @@ export default {
|
|
|
* 销毁公交
|
|
|
*/
|
|
|
beforeDestroy() {
|
|
|
- console.log(1);
|
|
|
this.$bus.$off("clearValidateFuncAdd");
|
|
|
this.$bus.$off("validateMakeId");
|
|
|
this.$bus.$off("validateCoverUrl");
|