| | |
| | | <el-tab-pane label="主界面" name="0"></el-tab-pane> |
| | | <el-tab-pane label="PK效果" name="1"></el-tab-pane> |
| | | <el-tab-pane label="搜索效果" name="2"></el-tab-pane> |
| | | <el-tab-pane label="商品列表" name="3"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | |
| | | <div class="prediv-content"> |
| | | <div class="content" :style="contentStyle"> |
| | | <img :src="form.topImg.type ? form.topImg.imgurl : defaultBanner" alt=""> |
| | | <template v-if="type != 1"> |
| | | <template v-if="type != 1 && type !=3"> |
| | | <div> |
| | | <div class="commodityFrom_head" :style="tableHeaderStyle"> |
| | | <!-- @mouseenter="mouseenter" @mouseleave="mouseleave" --> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div class="productPage" v-if="type == 1"> |
| | | <div class="productPage" v-if="type == 1 || type ==3"> |
| | | <div class="productPage_head" :style="tableHeaderStyle"> |
| | | <div class="productPage_head_item" @mouseenter="mouseenterHead" @mouseleave="mouseleaveHead"> |
| | | <span>属性1</span> |
| | |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <template v-if="type ==1"> |
| | | <div class="productPage_pk"> |
| | | <div class="productPage_pk_shop"> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-if="type==3"> |
| | | <div class="productPage_shop" > |
| | | <div class="productPage_shop_item" v-for="(item, index) in productList" :style="{...selectList}" :key="index" > |
| | | <div class="productPage_shop_item_img"> |
| | | <img :src="item.img" mode="widthFix"/> |
| | | </div> |
| | | |
| | | <span :style="{...selProNameStyle}">{{item.name}}</span> |
| | | </div> |
| | | <div class="productPage_shop_zw"></div> |
| | | <div class="productPage_shop_zw"></div> |
| | | <div class="productPage_shop_zw"></div> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="search" v-if="type == 2"> |
| | |
| | | </template> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="列表字体颜色"> |
| | | <el-form-item label="品类列表字体"> |
| | | <div class="color-select-item"> |
| | | <el-radio-group v-model="form.listname.selType" @change="selectListName"> |
| | | 颜色 <el-radio-group v-model="form.listname.selType" @change="selectListName" style="margin-left: 15px"> |
| | | <el-radio :label="0">默认</el-radio> |
| | | <el-radio :label="1">自定义</el-radio> |
| | | </el-radio-group> |
| | | <template v-if="form.listname.selType == 1"> |
| | | <el-color-picker v-model="form.listname.selColor" size="mini" style="margin-right: 10px; margin-left: 10px;"></el-color-picker> |
| | | 不透明度:<el-input v-model="form.listname.selAlpha" type="number" style="width: 100px;"></el-input> % |
| | | 不透明度 <el-input v-model="form.listname.selAlpha" type="number" style="width: 100px;"></el-input> % |
| | | </template> |
| | | </div> |
| | | <div > |
| | | <div class="color-select-item" style="margin-top: 10px"> |
| | | 大小<el-input v-model="form.listname.fontSize" type="number" style="width: 80px;margin-left: 15px"></el-input> px (默认16px) |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="商品列表字体"> |
| | | <div class="color-select-item"> |
| | | 颜色 <el-radio-group v-model="form.listproname.selType" @change="selectproName" style="margin-left: 15px"> |
| | | <el-radio :label="0">默认</el-radio> |
| | | <el-radio :label="1">自定义</el-radio> |
| | | </el-radio-group> |
| | | <template v-if="form.listproname.selType == 1"> |
| | | <el-color-picker v-model="form.listproname.selColor" size="mini" style="margin-right: 10px; margin-left: 10px;"></el-color-picker> |
| | | 不透明度 <el-input v-model="form.listproname.selAlpha" type="number" style="width: 100px;"></el-input> % |
| | | </template> |
| | | </div> |
| | | <div > |
| | | <div class="color-select-item" style="margin-top: 10px"> |
| | | 大小<el-input v-model="form.listproname.fontSize" type="number" style="width: 80px;margin-left: 15px"></el-input> px (默认16px) |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | this.form.listname.selAlpha = '100' |
| | | } |
| | | }, |
| | | selectproName(v) { |
| | | if (v == 0) { |
| | | this.form.listproname.selColor = '#ffffff' |
| | | this.form.listproname.selAlpha = '100' |
| | | } |
| | | }, |
| | | selectCategroy(v) { |
| | | if (v == 0) { |
| | | this.form.category.bgColor = '#899FC5' |
| | |
| | | if (res.newParam) { |
| | | var param= JSON.parse(res.newParam) |
| | | for (const key in this.form) { |
| | | this.form[key] =param[key]||{} |
| | | if(param[key]){ |
| | | this.form[key] = param[key] |
| | | } |
| | | } |
| | | // this.form = JSON.parse(res.newParam) |
| | | } |
| | | console.log(this.form) |
| | | }) |
| | | }, |
| | | |
| | |
| | | { img: require('@/assets/images/category/ic_xiwanji@2x.png'), name: '洗碗机' }, |
| | | { img: require('@/assets/images/category/ic_jinshui@2x.png'), name: '净水器' }, |
| | | { img: require('@/assets/images/category/ic_qita@2x.png'), name: '其他' }, |
| | | ], |
| | | productList: [ |
| | | { img: require('@/assets/images/product/1a.png'), name: '卡萨帝' }, |
| | | { img: require('@/assets/images/product/2a.png'), name: '大海豹' }, |
| | | { img: require('@/assets/images/product/3a.png'), name: '小白桃' }, |
| | | { img: require('@/assets/images/product/4a.png'), name: '白珍珠' }, |
| | | { img: require('@/assets/images/product/5a.png'), name: '东芝58' }, |
| | | { img: require('@/assets/images/product/6a.png'), name: '东芝59' }, |
| | | { img: require('@/assets/images/product/7a.png'), name: '松下50' }, |
| | | { img: require('@/assets/images/product/8a.png'), name: '美的55' }, |
| | | { img: require('@/assets/images/product/9a.png'), name: '海尔57' }, |
| | | { img: require('@/assets/images/product/10a.png'), name: '美的46' }, |
| | | { img: require('@/assets/images/product/1a.png'), name: '卡萨帝' }, |
| | | { img: require('@/assets/images/product/2a.png'), name: '大海豹' }, |
| | | { img: require('@/assets/images/product/3a.png'), name: '小白桃' }, |
| | | { img: require('@/assets/images/product/4a.png'), name: '白珍珠' }, |
| | | { img: require('@/assets/images/product/5a.png'), name: '东芝58' }, |
| | | { img: require('@/assets/images/product/6a.png'), name: '东芝59' }, |
| | | { img: require('@/assets/images/product/7a.png'), name: '松下50' }, |
| | | { img: require('@/assets/images/product/8a.png'), name: '美的55' }, |
| | | { img: require('@/assets/images/product/9a.png'), name: '海尔57' }, |
| | | { img: require('@/assets/images/product/10a.png'), name: '美的46' }, |
| | | { img: require('@/assets/images/product/1a.png'), name: '卡萨帝' }, |
| | | { img: require('@/assets/images/product/2a.png'), name: '大海豹' }, |
| | | { img: require('@/assets/images/product/3a.png'), name: '小白桃' }, |
| | | { img: require('@/assets/images/product/4a.png'), name: '白珍珠' }, |
| | | { img: require('@/assets/images/product/5a.png'), name: '东芝58' }, |
| | | { img: require('@/assets/images/product/6a.png'), name: '东芝59' }, |
| | | { img: require('@/assets/images/product/7a.png'), name: '松下50' }, |
| | | { img: require('@/assets/images/product/8a.png'), name: '美的55' }, |
| | | { img: require('@/assets/images/product/9a.png'), name: '海尔57' }, |
| | | { img: require('@/assets/images/product/10a.png'), name: '美的46' }, |
| | | ], |
| | | action: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | defaultBanner: require('@/assets/images/banner_defult.png'), |
| | |
| | | }, |
| | | selType:0, |
| | | listname: { |
| | | bgType: 0, |
| | | bgColor: '#6C82AA', |
| | | bgAlpha: '100', |
| | | fontType: 0, |
| | | fontSize: '16', |
| | | selType: '0', |
| | | selColor: '#ffffff', |
| | | selAlpha: '100' |
| | | }, |
| | | listproname: { |
| | | fontType: 0, |
| | | fontSize: '16', |
| | | selType: 0, |
| | | selColor: '#ffffff', |
| | | selAlpha: '100' |
| | | }, |
| | |
| | | return selStyle |
| | | }, |
| | | selListNameStyle() { |
| | | let selListNameStyle = {} |
| | | let alpha = +(this.form.listname.selAlpha * 2.55).toFixed(0) |
| | | selListNameStyle.color = this.form.listname.selColor + (alpha==0?"00":alpha.toString(16)) |
| | | let color = this.form.listname.selColor + (alpha==0?"00":alpha.toString(16)) |
| | | let selListNameStyle = {color: color,'font-size':(this.form.listname.fontSize || '16')+'px'} |
| | | return selListNameStyle |
| | | }, |
| | | selProNameStyle() { |
| | | let alpha = +(this.form.listproname.selAlpha * 2.55).toFixed(0) |
| | | let color = this.form.listproname.selColor + (alpha==0?"00":alpha.toString(16)) |
| | | let selProNameStyle = {color: color,'font-size':(this.form.listproname.fontSize || '16')+'px'} |
| | | return selProNameStyle |
| | | }, |
| | | searchStyle() { |
| | | let alpha = +(this.form.search.bgAlpha * 2.55).toFixed(0) |
| | |
| | | }, |
| | | created() { |
| | | this.getDesc() |
| | | console.log(this.form.listname) |
| | | console.log(this.form.listname.selType) |
| | | } |
| | | } |
| | | /** |
| | |
| | | flex-wrap: wrap; |
| | | |
| | | .productPage_shop_zw { |
| | | width: 168px; |
| | | width: 15%; |
| | | height: 0; |
| | | } |
| | | |
| | | .productPage_shop_item { |
| | | width: 168px; |
| | | width: 15%; |
| | | // height: 204px; |
| | | margin-bottom: 12px; |
| | | cursor: pointer; |
| | |
| | | } |
| | | |
| | | .productPage_shop_item_img { |
| | | width: 136px; |
| | | height: 136px; |
| | | width: 50px; |
| | | height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .productPage_shop { |
| | | width: 100%; |
| | | margin-top: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | .productPage_shop_zw { |
| | | width: 15%; |
| | | height: 0; |
| | | } |
| | | .productPage_shop_item { |
| | | width: 15%; |
| | | margin-bottom: 12px; |
| | | cursor: pointer; |
| | | background: rgba(0,224,255,0.18); |
| | | border-radius: 8px; |
| | | display: flex; |
| | | transition: .5s; |
| | | padding: 15px; |
| | | box-sizing: border-box; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | white-space: pre-wrap; |
| | | word-break: break-all; |
| | | text-align: center; |
| | | &:hover { |
| | | background: linear-gradient(180deg, rgba(0,224,255,0.3) 0%, rgba(255,255,255,0.41) 100%); |
| | | border-radius: 8px; |
| | | border: 2px solid #FFFFFF; |
| | | box-sizing: border-box; |
| | | } |
| | | .productPage_shop_item_img { |
| | | width: 136px; |
| | | height: 136px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | text { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | font-size: 16px; |
| | | font-family: SourceHanSansSC-Normal, SourceHanSansSC; |
| | | font-weight: 400; |
| | | color: #FFFFFF; |
| | | margin-top: 12px; |
| | | } |
| | | } |
| | | } |
| | | </style> |