提交 feaf3405 authored 作者: 王天霸's avatar 王天霸

1

上级 4e148505
......@@ -63,7 +63,7 @@
商品图片最多上传7张,默认第一张为主图
<span style="margin-left: 20px;">单张图片需限制在2M以内,可上传png、jpg格式,尺寸要求为800 * 800</span>
</span>
<draggable :list="goodsImgFileList" group="article" class="dragArea">
<draggable :list="goodsImgFileList" group="article" class="dragArea" @end="handchange($event)">
<div v-for="(element,index) in goodsImgFileList" :key="index" class="list-complete-item" style="float:left;margin:0 10px;">
<div style="width:98px;height:98px;position: relative;" class="" @mouseover="showDelBtn(index)" @mouseleave="hiddenDelBtn">
<img v-if="element" :src="element.url" width="98" height="98" />
......@@ -315,6 +315,13 @@
this.getByCategoryFee(this.goodsInfoForm.categoryList)
},
methods: {
handchange(){//图片拖动结束
console.log(this.goodsImgFileList)
this.goodsInfoForm.imgs = []
this.goodsImgFileList.forEach(item=> {
this.goodsInfoForm.imgs.push(item.url)
})
},
delvideo(){
this.vediosrc = ''
this.goodsvedioFileList = []
......@@ -377,7 +384,7 @@
},
//显示删除图片的图标
showDelBtn(index) {
console.log(index)
this.currentDelBtn = index
},
//隐藏删除图片的图标
......
......@@ -279,7 +279,7 @@
}
}
this.parameterdata['specs_group'] = specs_group
debugger
// debugger
this.parameterdata['specs'] = res.data.specs;
this.parameterdata['shopTypes'] = goodsParametersList
......@@ -363,7 +363,7 @@
calcSpeTable(data) {
this.keyvalue++
this.parameterdata = data;
debugger
// debugger
},
// 只有点击完最后一级,才会有值
......@@ -460,7 +460,6 @@
// 商品信息 是否填写完整
let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm();
// 商品规格 无需校验
let spggRef = this.$refs.goodsspecifications;
let spggData = spggRef.speData;
......@@ -472,10 +471,10 @@
let goodsPriceMsg = '';
let spsjData1 = this.$refs.goodsparameter.singleSpecTable;
let spsjData2 = this.$refs.goodsparameter.parameterdata;
debugger
// debugger
// 如果有,则说明有规格组合数据
if ( this.radioguide==2&&spsjData2.specs_group && spsjData2.specs_group.length > 0 ) {
debugger
// debugger
for(let i = 0; i < spsjData2.specs_group.length; i++) {
let itemObj = spsjData2.specs_group[i][0];
for (let itemKey in itemObj) {
......@@ -560,9 +559,10 @@ debugger
// 所有校验通过,整理数据
// 获取 商品信息数据
let spxxData = this.$refs.goodsInfo.goodsInfoForm;
// 品牌处理 goods_brand
let brandOptions = this.$refs.goodsInfo.brandOptions;
debugger
// debugger
// goods_brand
if (Array.isArray(brandOptions) && brandOptions.length > 0) {
for(let bi = 0; bi < brandOptions.length; bi++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论