Commit 9bc4775c authored by xieyishang's avatar xieyishang

addxx

parent 07771cd6
...@@ -316,8 +316,20 @@ ...@@ -316,8 +316,20 @@
console.log(res,"goodsSpec") console.log(res,"goodsSpec")
if(res.code==0){ if(res.code==0){
this. goodsSpec_goodsType = res.data.goodsType; this.goodsSpec_goodsType = res.data.goodsType;
this. goodsSpec_info = res.data.info; this.goodsSpec_info = res.data.info;
if(res.data.info!=null){
if(res.data.info.length!=0){
this.type_id = res.data.info[0].type_id;
this.goodsSpec_goodsType.forEach((item,index)=>{
if(this.type_id == item.id){
console.info(item.name);
this.Typeindex = index;//设置下拉分类默认选中值
}
})
}
}
let endobjdata= res.data.info; let endobjdata= res.data.info;
endobjdata = endobjdata.map((item,index)=>{ endobjdata = endobjdata.map((item,index)=>{
...@@ -327,7 +339,9 @@ ...@@ -327,7 +339,9 @@
console.info(endobjdata,"endobjdata"); console.info(endobjdata,"endobjdata");
this.endobjdata = endobjdata;//res.data.info;//之前的数据 默认值 this.endobjdata = endobjdata;//res.data.info;//之前的数据 默认值
}else{ }else{
this.$api.msg(res.msg); this.$api.msg(res.msg);
} }
......
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