Commit abda1cd8 by 陈浩建

修复部分字段为空replace报错问题

parent 852bd420
......@@ -558,9 +558,9 @@ export default {
const schools = res.data.schoolsData
that.modelData.schools = (schools == undefined ? [] : schools);
that.modelData.universityId= university.universityId
that.productIntroduction =this.HTMLEncode(product.productIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.productSetMealIntroduction = this.HTMLEncode(product.productSetMealIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.productRf2 =this.HTMLEncode(product.productRf2.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.productIntroduction =this.HTMLEncode(product.productIntroduction == null ? "" : product.productIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.productSetMealIntroduction = this.HTMLEncode(product.productSetMealIntroduction == null ? "" : product.productSetMealIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.productRf2 =this.HTMLEncode(product.productRf2 ==null ? "" : product.productRf2.replace(/&lt/g, '<').replace(/&gt/g, '>'));
that.modelData.productMealPrice = product.productMealPrice
that.modelData.productUniversity = product.productUniversity
that.modelData.productRhPrice=product.productRhPrice
......
......@@ -340,13 +340,12 @@
},0)
},
modifyfunction(data){
console.log(data);
this.modifyForm.id=data.id
this.fileid={
id:data.id
}
let url=this.baseuploadUrl()+"app/ciop"+data.advImg.replace("enclosure","ciop")
if (!(data.advImg == null || data.advImg=="")) {
let url = this.baseuploadUrl()+"app/ciop"+data.advImg.replace("enclosure","ciop")
//下载图片浏览
this.fileList.push({
uid: this.getuuid(),
......
......@@ -199,8 +199,8 @@
modifyvisible: false,
add: true,
productIntroduction: "",
productSetMealIntroduction: '',
productRf2:'',
productSetMealIntroduction: "",
productRf2:"",
subNames: [],
schoolNames: [],
queryParam: {
......@@ -358,9 +358,9 @@
}
})
if (data != undefined) {
this.productIntroduction = data.productIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.productSetMealIntroduction = data.productSetMealIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.productRf2 = data.productRf2.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.productIntroduction = data.productIntroduction == null ? "":data.productIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.productSetMealIntroduction = data.productSetMealIntroduction == null ? "":data.productSetMealIntroduction.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.productRf2 = data.productRf2 == null ? "":data.productRf2.replace(/&lt/g, '<').replace(/&gt/g, '>')
this.modelData.productMealPrice = data.productMealPrice
this.modelData.productUniversity = data.productUniversity
this.modelData.productRhPrice=data.productRhPrice
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment