Commit 8279c110 authored by zhengke's avatar zhengke

修改

parent 45888fdd
......@@ -281,7 +281,7 @@
<div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex"
:class="data.catPosition==='left'?'goods-cat-list':''">
<div style="display: inline-block;" :style="cGoodsItemWidth">
<div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;">
<div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;border:1px solid rgb(226, 226, 226)">
<div class="goods-pic"
:class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill"
:style="'background-image: url('+getIconLink(goods.picUrl)+')'">
......@@ -292,7 +292,7 @@
</div>
<div flex="box:last">
<div class="goods-price">
<template>{{goods.price}}</template>
<!-- <template>¥{{goods.price}}</template> -->
</div>
<div>
<template v-if="cShowBuyBtn">
......@@ -321,17 +321,17 @@
<div class="diy-component-edit" v-if="zxData.isCked">
<el-form label-width='150px' @submit.native.prevent>
<template>
<el-form-item label="商品添加">
<el-radio v-model="data.addGoodsType" :label="0">最新</el-radio>
<el-radio v-model="data.addGoodsType" :label="1">自定义</el-radio>
<el-form-item label="资讯添加">
<el-radio v-model="data.addGoodsType" :label="0">自定义</el-radio>
<el-radio v-model="data.addGoodsType" :label="1">最新</el-radio>
</el-form-item>
<el-form-item v-show="data.addGoodsType == 0" label="商品数量">
<el-form-item v-show="data.addGoodsType == 1" label="资讯数量">
<el-input size="small" v-model.number="data.goodsLength" type="number"></el-input>
</el-form-item>
<el-form-item v-show="data.addGoodsType == 1" label="商品列表">
<el-form-item v-show="data.addGoodsType == 0" label="资讯列表">
<draggable v-model="data.list" class="goods-list" style="display:flex;">
<div class="goods-item" v-for="(goods,goodsIndex) in data.list" :key="goodsIndex">
<el-tooltip effect="dark" content="移除商品" placement="top">
<el-tooltip effect="dark" content="移除资讯" placement="top">
<el-button @click="deleteGoods(goodsIndex,null)" circle class="goods-delete" type="danger"
icon="el-icon-close"></el-button>
</el-tooltip>
......@@ -388,8 +388,8 @@
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choiceGood ref="choiceGood"></choiceGood>
<el-dialog title="选择资讯" :visible.sync="isShowGoods" width="800px">
<choicezx ref="choiceGood"></choicezx>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowGoods=false">取 消</el-button>
<el-button size="small" type="danger" @click="getGoodsChoice()">确 定</el-button>
......@@ -401,14 +401,14 @@
<script>
import draggable from "vuedraggable"
import ChooseImg from "@/components/global/ChooseImg.vue";
import choiceGood from "../../common/choiceGood.vue";
import choicezx from "../../common/choicezx.vue";
export default {
props: ["zxData", "index", "dataLeng"],
components: {
draggable,
ChooseImg,
choiceGood
choicezx
},
data() {
return {
......@@ -446,7 +446,7 @@
} else {
const defaultGoodsItem = {
id: 0,
name: '商品名称',
name: '资讯名称',
picUrl: '',
price: '100.00',
};
......@@ -497,14 +497,14 @@
//选择商品
getGoodsChoice() {
var ckedArr = this.$refs.choiceGood.getChoicedGoods();
console.log(ckedArr,'ckedarrrr');
var myArray = [];
if (ckedArr && ckedArr.length > 0) {
ckedArr.forEach(element => {
myArray.push({
id: element.Id,
id: element.ID,
name: element.Name,
picUrl: element.CoverImage,
price: element.SellingPrice
picUrl: element.ArticlePic
});
});
}
......
......@@ -241,7 +241,7 @@
<div v-for="(goods,goodsIndex) in cCatGoodsList(cat, catIndex)" class="goods-item" :key="goodsIndex"
:class="data.catPosition==='left'?'goods-cat-list':''">
<div style="display: inline-block;" :style="cGoodsItemWidth">
<div :style="cGoodsItemStyle" :flex="cGoodsItemFlex" style="position: relative;">
<div :style="{'borderRadius':data.SearchFilletPX+'px'}" :flex="cGoodsItemFlex" style="position: relative;border:1px solid rgb(226, 226, 226)">
<div class="goods-pic"
:class="'goods-pic-'+data.goodsCoverProportion+' goods-pic-fill-'+data.fill"
:style="'background-image: url('+getIconLink(goods.picUrl)+')'">
......@@ -263,10 +263,10 @@
<div class="diy-component-edit" v-if="cusData.isCked">
<el-form label-width='150px' @submit.native.prevent>
<template>
<el-form-item label="商品数量">
<el-form-item label="自定义数量">
<el-input size="small" v-model.number="data.goodsLength" type="number"></el-input>
</el-form-item>
<el-form-item label="商品列表">
<el-form-item label="自定义列表">
<div flex="dir:top">
<div class="education-edit-item" v-for="(item,index) in data.list" :key="index">
<div class="education-edit-options">
......@@ -298,7 +298,7 @@
</div>
</div>
</div>
<el-button size="small" @click="addBanner()">添加商品</el-button>
<el-button size="small" @click="addBanner()">添加自定义</el-button>
</el-form-item>
</template>
<hr>
......@@ -306,7 +306,7 @@
<el-radio v-model="data.listStyle" :label="-1">列表模式</el-radio>
<el-radio v-model="data.listStyle" :label="0">左右滑动</el-radio>
<el-radio v-model="data.listStyle" :label="1">一行一个</el-radio>
<el-radio v-model="data.listStyle" :label="3">一行三</el-radio>
<el-radio v-model="data.listStyle" :label="2">一行两</el-radio>
</el-form-item>
<el-form-item label="背景颜色">
<div class="input-color" flex="dir:left cross:center">
......@@ -426,7 +426,7 @@
},
//选择图片
SelectId(msg) {
this.data.list[this.commonIndex].picUrl=msg.url;
this.data.list[this.commonIndex].picUrl=this.getIconLink(msg.url);
this.choicImg=false;
},
//选择商品
......@@ -474,7 +474,21 @@
picUrl:'', //商品图片
linkUrl:'' //链接
}
if(this.data.list.length<this.data.goodsLength){
if(this.data.list.length>0){
this.data.list.forEach(x=>{
if(x.linkUrl==''){
this.Error('请选择链接');
}else{
this.data.list.push(obj);
}
})
}else{
this.data.list.push(obj);
}
}else{
this.Error('超出自定义数量');
}
},
//获取选择链接
getChoiceLink(){
......
......@@ -938,6 +938,13 @@
this.ScoreArr.push(val);
this.ScoreArr.push(val);
this.$forceUpdate();
},
"data.listStyle"(val){
if(val==4){
this.data.showBuyBtn=false;
}else{
this.data.showBuyBtn=true;
}
}
},
......
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