提交 65de5e1b authored 作者: huaxinzhu's avatar huaxinzhu

添加商品,bug修复01

上级 d7bb2b7b
......@@ -215,16 +215,25 @@
},
mounted() {
//debugger
//深拷贝一份最开始的数据,为初始化准备
//this.goodsInfoDataClone = this.deepClone(this.goodsinfodata);
this.goodsInfoForm = this.goodsinfodata;
if( this.goodsInfoForm.imgs.length > 0 ) {
this.goodsInfoForm.imgs.forEach( (item )=> {
let objImg = { 'url': '' }
objImg.url = item;
this.goodsImgFileList.push(objImg);
})
if(this.goodsinfodata.goods_id) {
this.goodsInfoForm = this.goodsinfodata;
if( this.goodsInfoForm.imgs.length > 0 ) {
this.goodsInfoForm.imgs.forEach( (item )=> {
let objImg = { 'url': '' }
objImg.url = item;
this.goodsImgFileList.push(objImg);
})
}
}else {
this.goodsInfoForm.categoryStr = this.goodsinfodata.categoryStr;
this.goodsInfoForm.categoryList = this.goodsinfodata.categoryList;
}
//console.log("tup",this.goodsImgFileList)
// 获取 省
this.getArea();
......
......@@ -86,6 +86,12 @@
export default {
name: 'Index',
props: {
option: {
type: Number,
required: true
}
},
components: {
Goodsinfomation,
GoodsSpecifications,
......@@ -93,12 +99,6 @@
Goodsimg,
Goodsaftersale,
},
props: {
option: {
type: Number,
required: true
}
},
data() {
return {
loading: false,
......@@ -155,6 +155,7 @@
created() {
// option 商品的id
//debugger
if( this.option && this.option !== 0 ) {
let data = { goodsId: this.option};
getGoodsNew(data).then(res => {
......@@ -690,6 +691,9 @@
.blue-block-goods-title {
margin: 0 20px 0 0;
}
.good-details-body {
height: 100%;
}
/deep/.good-details-body .el-card__body {
height: 100%;
padding: 15px 20px 0px 20px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论