feat: 新增楼层装修 更改部分买家端UI

master
Yer 2023-07-06 17:21:38 +08:00
commit 3c296ea011
58 changed files with 4459 additions and 583 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -10,20 +10,28 @@ $warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #e4393c;
$theme_color: #F31947;
$border_color: #dddee1;
$title_color: #8c8c8c;
$light_title_color: #1c2438;
$light_content_color: #495060;
$light_sub_color: #80848f;
$light_background_color: #f8f8f9;
$light_background_color: #F5F5F7;
$light_white_background_color: #fff;
//
$dark_background_color: #141414;
$dark_sub_background_color: #1d1d1d; //
$dark_content_color: #d5d5d5;
.wes-2 {
/* 适用于webkit内核和移动端 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
//
@ -283,10 +291,24 @@ li {
left: auto;
}
}
.flex{
display: flex;
}
.flex-a-c{
align-items: center;
}
.flex-j-sb{
justify-content: space-between;
}
.flex-j-c{
justify-content: center;
}
.width_1200_auto {
width: 1184px;
margin: 0 auto;
}

View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="container">
<div class="navbar" :class="{'small-search-box':useClass == 'fixed-show'}">
<div class="container width_1200_auto flex flex-a-c">
<img
:src="$store.state.logoImg"
v-if="showLogo"
@ -8,6 +8,7 @@
alt=""
@click="$router.push('/')"
/>
<div :class="{'small-search-box':useClass == 'fixed-show'}" class="search-box">
<i-input
v-model="searchData"
size="large"
@ -15,7 +16,10 @@
placeholder="输入你想查找的商品"
@keyup.enter.native="search"
>
<Button v-if="!store" slot="append" @click="search"></Button>
<div class="search-icon" slot="append" @click="search">
<Icon type="ios-search" size="21"/>
</div>
</i-input>
<div v-if="store" class="btn-div">
<Button class="store-search" type="warning" @click="searchStore"></Button>
@ -23,23 +27,25 @@
</div>
<template v-if="showTag">
<div style="height:12px" v-if="promotionTags.length === 0"></div>
<div v-else>
<Tag
<div v-else class="history-list flex">
<div
v-for="(item, index) in promotionTags"
:key="index"
class="mr_10"
>
<span class="hover-color" @click="selectTags(item)">{{ item }}</span>
</Tag>
<span class="history-item" @click="selectTags(item)">{{ item }}</span>
</div>
</div>
</template>
</div>
</div>
</div>
</template>
<script>
import storage from '@/plugins/storage.js'
import {hotWords} from '@/api/goods.js'
export default {
name: 'search',
props: {
@ -58,6 +64,10 @@ export default {
hover: {
type: Boolean,
default: false
},
useClass:{
type:null,
default:''
}
},
data() {
@ -116,27 +126,61 @@ export default {
};
</script>
<style scoped lang="scss">
.container {
margin: 30px auto;
width: 460px;
position: relative;
.navbar {
height: 113px;
background: #fff;
}
.small-search-box{
height: 60px;
margin: 0 !important;
}
.container {
position: relative;
height: 100%;
}
.search {
width: 778.4px;
margin: 10px 0px 5px 0;
border-radius: 18.9px;
/deep/ .ivu-input.ivu-input-large {
border: 2px solid $theme_color;
font-size: 12px;
height: 34px;
border: 1.4px solid $theme_color;
box-sizing: border-box;
border-radius: 19.6px;
position: relative;
padding-left: 26px;
font-size: 14px;
font-weight: normal;
height: 37.8px;
color: #999;
&:focus {
box-shadow: none;
}
}
/deep/ .ivu-input-group-append {
border: 1px solid $theme_color;
border-left: none;
height: 30px;
border-radius: 19.6px !important;
cursor: pointer;
box-sizing: border-box;
border: 1.4px solid $theme_color;
width: 67.2px;
height: 37.8px;
position: absolute;
right: 0;
display: flex;
align-items: center;
justify-content: center;
top: 0;
z-index: 99;
background-color: $theme_color;
color: #ffffff;
button {
font-size: 14px;
font-weight: 600;
@ -144,28 +188,46 @@ export default {
}
}
}
.search-box{
margin-left: 28px;
}
.logo-img {
position: absolute;
left: -360px;
top: -9px;
max-width: 150px;
cursor: pointer;
}
.store-search {
width: 55.6px;
padding: 0 9px;
border-radius: 0;
border-radius: 3px;
&:nth-child(2) {
width: 55px;
margin-left: -2px;
border-radius: 3px;
}
}
.btn-div {
position: relative;
height: 0px;
top: -38px;
left: 352px;
}
.history-list {
margin-top: 2px;
margin-left: 28px;
}
.history-item {
font-size: 13px;
font-weight: normal;
line-height: 16px;
letter-spacing: 0px;
margin-right: 17px;
color: #666666;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<div class="shadow-box">
<div class="shadow-item flex flex-a-c flex-j-c" v-for="(item,index) in iconList" @click="handleClickIcon(item)" :key="index">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)">
<div class="shadow-label">{{item.label}}</div>
<div class="line" v-if="iconList.length-1 !=index"></div>
</div>
</div>
</template>
<script>
export default {
name: "fixed-index",
data(){
return{
iconList:[
{
icon:"user",
label:"会员中心",
path:"/home"
},
{
icon:"carts",
label:"购物车",
path:"/cart"
},
{
icon:"notification",
label:"消息",
path:"/home/MsgList"
},
{
icon:"collage",
label:"收藏",
path:"/home/Favorites"
},
{
icon:"back",
label:"顶部",
path:"back"
},
],
isScrolling:false,
timeoutId:"",
}
},
mounted() {
//
window.addEventListener('wheel', function() {
if (this.isScrolling) {
// isScrolling false
window.cancelAnimationFrame(this.timeoutId);
}
});
},
methods:{
scrollToTop() {
const c = document.documentElement.scrollTop || document.body.scrollTop;
if (c > 0) {
this.timeoutId = window.requestAnimationFrame(this.scrollToTop);
window.scrollTo(0, c - c / 4);
this.isScrolling = true;
}else {
this.isScrolling = false;
}
},
handleClickIcon(val){
if(val.path === 'back'){
this.scrollToTop()
}else{
this.$router.push(val.path)
}
}
}
}
</script>
<style scoped lang="scss">
.shadow-box{
width: 64px;
height: 354px;
border-radius: 10px;
opacity: 1;
background: #FFFFFF;
box-shadow: 0px 1px 10px 0px rgba(154, 154, 154, 0.5);
}
.shadow-label{
font-size: 13px;
font-weight: normal;
line-height: 16px;
text-align: center;
letter-spacing: 0px;
color: #666666;
}
.icon{
margin-top: 15px;
width: 20px;
height: 20px;
margin-bottom: 5px;
}
.shadow-item{
cursor: pointer;
flex-direction: column;
height: 70px;
>.line{
width: 34px;
height: 1px;
opacity: 1;
margin-top: 17px;
border: 0.7px solid #EAEAEA;
}
}
</style>

View File

@ -3,20 +3,20 @@
<footer class="footer">
<div class="clearfix"></div>
<div class="icon-row">
<div class="footer-icon">
<h5 class="footer-icon-child"></h5>
<div class="footer-icon flex flex-a-c">
<h5 class="footer-icon-child"></h5>
<span class="footer-icon-text">品类齐全轻松购物</span>
</div>
<div class="footer-icon">
<h5 class="footer-icon-child footer-icon-child-2"></h5>
<div class="footer-icon flex flex-a-c">
<h5 class="footer-icon-child footer-icon-child-2"></h5>
<span class="footer-icon-text">多仓直发极速配送</span>
</div>
<div class="footer-icon">
<h5 class="footer-icon-child footer-icon-child-3"></h5>
<div class="footer-icon flex flex-a-c">
<h5 class="footer-icon-child footer-icon-child-3"></h5>
<span class="footer-icon-text">正品行货精致服务</span>
</div>
<div class="footer-icon">
<h5 class="footer-icon-child footer-icon-child-4"></h5>
<div class="footer-icon flex flex-a-c">
<h5 class="footer-icon-child footer-icon-child-4"></h5>
<span class="footer-icon-text">天天低价畅选无忧</span>
</div>
</div>
@ -37,6 +37,11 @@
</li>
</ul>
</div>
</div>
<div class="information footer-bottmom">
<div class="icp">
<li v-if="config.icpCard">
<a :href='"https://tsm.miit.gov.cn/dxxzsp/xkz/xkzgl/resource/qiyesearch.jsp?num="+config.icpCard+"&type=xuke"' target="_blank">
@ -49,15 +54,11 @@
</a>
</li>
</div>
</div>
<div class="information footer-bottmom">
<a class="flex " :href="config.company.href">
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
</a>
</div>
</div>
<div class="clearfix"></div>
<div class="copyright">
<p>Copyright © {{year}} {{config.title}}</p>
@ -77,7 +78,7 @@ export default {
guideArr: [
//
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
["配送方式", "上门自提", "配送查询", "收取标准", "物流规则"],
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
],
@ -101,40 +102,36 @@ export default {
/*****************************底 部 开 始*****************************/
.footer {
width: 100%;
padding-top: 30px;
@include background_color($light_background_color);
height: 370px;
background: #FFFFFF;
}
.icon-row {
margin: 15px auto;
padding-top: 8px;
width: 1000px;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
width: 1056px;
height: 71px;
margin: 0 auto;
}
.footer-icon {
margin-left: 17px;
margin-right: 17px;
float: left;
}
.footer-icon-child {
margin-top: 10px;
overflow: hidden;
position: absolute;
width: 36px;
height: 42px;
background-image: url("../../assets/images/footer/ico_service.png");
text-indent: -999px;
}
.footer-icon-child-2 {
background-position: 0 -43px;
}
.footer-icon-child-3 {
background-position: 0 -86px;
}
.footer-icon-child-4 {
background-position: 0 -129px;
width: 36.4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18.2px;
font-weight: normal;
color: #333;
height: 36.4px;
border: 1.4px solid #CECECE;
border-radius: 50%;
}
.icp {
margin-right: 30px !important;
>*{
margin: 0 4px;
}
@ -148,59 +145,69 @@ export default {
}
}
.footer-icon-text {
margin-left: 45px;
font-size: 18px;
font-weight: bold;
line-height: 64px;
margin-left: 11px;
font-size: 16px;
font-weight: normal;
text-align: center;
}
.service-intro {
width: 100%;
border-top: 1px solid $border_color;
}
.servece-type {
margin: 15px auto;
width: 800px;
width: 952px;
margin: 22px auto 10px auto;
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
.servece-type-info{
}
.servece-type-info ul {
list-style: none;
}
.servece-type-info li {
font-size: 14px;
font-size: 12px;
cursor: pointer;
line-height: 26px;
}
.servece-type-info li:hover{
color:#b8b8be;
font-weight: normal;
line-height: 15px;
text-align: center;
margin-bottom: 13px;
color: #333;
}
.servece-type-info li:first-child {
font-size: 16px;
line-height: 28px;
font-weight: bold;
}
.servece-type-info li:first-child:hover{
// font-size:15px;
// font-weight: bold;
color:#b8b8be;
font-size: 14.82px;
font-weight: normal;
line-height: 18px;
letter-spacing: 0px;
margin-bottom: 17px;
color: #333333;
}
.friend-link {
display: flex;
align-items: flex-start;
justify-content: space-between;
justify-content: center;
width: 908px;
padding: 10px 0;
margin: 0px auto;
border-top: 1px solid $border_color;
}
.information {
margin-top: 23px;
margin-bottom: 21px;
display: flex;
flex-direction: column;
> * {
margin: 2px 0;
justify-content: center;
}
a{
color: #3457FF;
}
.zhizhao {
width: 20px;
@ -213,35 +220,38 @@ export default {
.friend-link-item li {
padding: 5px 0px;
float: left;
margin-right: 59px;
font-weight: normal;
line-height: 13px;
color: #333333;
}
.friend-link-item li:hover{
color:#b8b8be;
margin-top:-2px;
}
.footer-bottmom:hover{
margin-top:0 !important;
}
.footer-bottmom>a:hover{
color:#e4393c;
}
.link-item {
padding: 0px 8px;
cursor: pointer;
border-right: 1px solid $border_color;
}
.link-last-item {
border: none;
}
.copyright {
width: 100%;
line-height: 30px;
cursor: pointer;
text-align: center;
height:25px;
opacity: 1;
margin-bottom: 12px;
font-size: 12px;
font-weight: normal;
line-height: 13px;
letter-spacing: 0px;
color: #959595;
}
.copyright a {
color: #232323;
font-size: 20px;
}
.footer-icon-text {
@include title_color($light_title_color);
}

View File

@ -1,25 +1,32 @@
<template>
<div class="box">
<div class="nav">
<ul class="location">
<li v-if="$route.path.includes('home')" style="margin-left:10px"><router-link to="/"></router-link></li>
</ul>
<ul class="detail">
<div class="nav width_1200_auto">
<ul class="location flex">
<li v-if="$route.path.includes('home')" style="margin-left:10px">
<router-link to="/">首页</router-link>
</li>
<ul class="flex">
<li>Hi欢迎来到{{ config.title }}</li>
<li class="first" v-show="!userInfo.username">
<router-link :to="`/signUp`">
<span style="border:none">立即注册</span>
<router-link :to="`/signUp`" class="nav-item">
<span>立即注册</span>
</router-link>
</li>
<li v-show="!userInfo.username">
<router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
<span style="border:none">请登录</span>
<router-link class="nav-item" :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
<span>请登录</span>
</router-link>
</li>
</ul>
</ul>
<ul class="detail flex">
<li v-show="!!userInfo.username">
<div class="username-p">
<div>
<Avatar class="person-icon" :src="userInfo.face" icon="person" size="small"/>
<span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span>
<span class="username">{{
userInfo.nickName ? userInfo.nickName : userInfo.username | secrecyMobile
}}</span>
</div>
<transition name='fade'>
<ul class="drop-items">
@ -31,16 +38,15 @@
</transition>
</div>
</li>
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item hover-color">我的消息</span></li>
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item">我的消息</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;">
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start">
<router-link to="/cart" target="_blank">
<span @mouseenter="getCartList">
<span class="nav-item" @mouseenter="getCartList">
<Icon size="18" type="ios-cart-outline"></Icon>
购物车
购物车{{ cartNum < 100 ? cartNum : '99' }}
</span>
</router-link>
<DropdownMenu slot="list">
@ -59,18 +65,18 @@
<p class="hover-pointer goods-title ellipsis">{{ item.goodsSku.goodsName }}</p>
</div>
<div class="shopping-cart-detail">
<p>
<div>
数量:
<span class="shopping-cart-text">{{ item.num }}</span>
价钱:
<span class="shopping-cart-text">{{ item.purchasePrice | unitPrice('¥') }}</span>
</p>
</div>
<div class="shopping-price">
{{ item.purchasePrice | unitPrice('¥') }}
</div>
</div>
</div>
<div class="go-to-buy">
<Button type="error" size="small" @click="goToPay"></Button>
</div>
</div>
</DropdownMenu>
</Dropdown>
@ -78,6 +84,7 @@
<li>
<span class="nav-item" @click="shopEntry"></span>
</li>
</ul>
</div>
</div>
@ -87,6 +94,8 @@
import storage from '@/plugins/storage.js';
import {cartGoodsAll} from '@/api/cart.js';
import {logout} from '@/api/account.js';
export default {
name: 'M-Header',
created() {
@ -97,6 +106,7 @@ export default {
data() {
return {
config: require('@/config'),
userInfo: {}, //
shoppingCart: [] //
};
@ -179,106 +189,88 @@ export default {
</script>
<style scoped lang="scss">
.shopping-cart-detail,
.shopping-cart-text,
.shopping-cart-info,
.nav a,
.location,
.first,
.username,
.shopping-cart-null span {
}
.box {
width: 100%;
font-size: 12px !important;
// height: 35px;
@include background_color($light_white_background_color);
height: 36px;
background: #333;
color: #fff;
}
.nav {
margin: 0 auto;
width: 1200px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.nav ul {
list-style: none;
}
.nav li {
cursor: pointer;
float: left;
font-size: 12px;
line-height: 35px;
margin-right: 10px;
font-weight: bold;
line-height: 36px;
margin-right: 15px;
}
.nav a,
.nav-item {
font-size: 13px;
font-weight: normal;
text-decoration: none;
padding-left: 14px;
border-left: 1px solid #ccc;
color: #999;
cursor: pointer;
color: #fff;
}
.nav-item {
padding-left: 20px;
}
.location a {
border-left: none;
}
.nav a:hover {
color: $theme_color;
}
.icon {
color: gray;
vertical-align: middle;
}
.first a:first-child {
padding-left: 3px;
border-left: none;
}
.city {
padding: 10px 15px;
}
.city-item {
font-weight: bold;
cursor: pointer;
padding: 5px;
}
.city-item:hover {
color: $theme_color;
}
.person-icon {
color: $theme_color;
background-color: #f0cdb2;
}
.shopping-cart-list {
padding: 10px 15px;
box-sizing: border-box;
max-height: 300px;
overflow: scroll;
}
.shopping-cart-box {
margin: 8px 0px;
margin-top: 15px;
padding-bottom: 15px;
height: 40px;
display: flex;
align-items: center;
border-bottom: 1px #ccc dotted;
}
.shopping-cart-box:first-child {
margin-top: 8px;
}
.shopping-cart-img {
margin-right: 15px;
width: 40px;
height: 40px;
}
.shopping-cart-img img {
width: 100%;
}
.shopping-cart-info {
display: flex;
flex-direction: column;
@ -290,10 +282,7 @@ export default {
line-height: 20px;
}
.go-to-buy {
display: flex;
justify-content: flex-end;
}
.shopping-cart-null {
padding: 15px;
display: flex;
@ -301,22 +290,28 @@ export default {
align-items: center;
justify-content: center;
}
.cart-null-icon {
font-size: 38px;
margin-bottom: 15px;
}
.shopping-cart-null span {
font-size: 12px;
line-height: 16px;
}
.username-p {
position: relative;
div {
cursor: pointer;
> span {
margin-left: 5px;
}
}
.drop-items {
position: absolute;
display: none;
@ -338,9 +333,11 @@ export default {
border-bottom: 1px solid rgb(207, 206, 206);
font-weight: normal;
text-align: center;
&:last-child {
border: none;
}
&:hover {
cursor: pointer;
color: $theme_color;
@ -367,6 +364,7 @@ export default {
left: 0;
}
}
&:hover {
.drop-items {
display: block;
@ -382,11 +380,13 @@ export default {
justify-content: center;
align-items: center;
}
.my-page a {
margin: 0px;
padding: 0px;
border: none;
}
.my-info {
padding: 5px;
width: 50%;
@ -394,15 +394,19 @@ export default {
text-align: center;
cursor: pointer;
}
.my-info:hover {
box-shadow: 0px 0px 5px #ccc;
}
.my-info i {
font-size: 28px;
}
.my-info p {
font-size: 12px;
}
.sign-out {
padding: 5px;
width: 50%;
@ -410,18 +414,23 @@ export default {
text-align: center;
cursor: pointer;
}
.sign-out:hover {
box-shadow: 0px 0px 5px $border_color;
}
.sign-out i {
font-size: 28px;
}
.sign-out p {
font-size: 12px;
}
.goods-title:hover {
color: $theme_color;
}
.cart-badge {
position: absolute;
right: -8px;
@ -437,4 +446,34 @@ export default {
z-index: 3;
top: 3px;
}
.shopping-cart-box {
padding: 8px 0;
cursor: pointer;
display: flex;
align-items: center;
border-bottom: 1px #ccc dotted;
}
.shopping-cart-list {
padding: 10px 10px;
box-sizing: border-box;
max-height: 300px;
overflow-y: scroll;
color: #333;
}
.shopping-cart-detail {
color: #999;
font-size: 12px;
}
.shopping-price {
color: $theme_color;
font-size: 14px;
font-weight: bold;
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<div class="shop-box">
<div class="shop-container">
<div class="shop-title-content">
<img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
<p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
<div class="ml_20" v-html="storeDetail.storeDesc"></div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ShopHeader',
props: {
detail: {
type: Object,
default: null
}
},
computed: {
storeDetail () { //
return this.detail;
}
}
};
</script>
<style scoped>
/* 店铺介绍 */
.shop-box {
width: 100%;
height: 50px;
background-color: #484848;
}
.shop-container {
width: 1200px;
height: 100%;
margin: 0px auto;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
color: #fff;
}
.shop-title-content {
display: flex;
align-items: center;
}
.shop-title-content p {
font-size: 20px;
margin-left: 20px;
}
.shop-title-content a {
color: #fff;
}
</style>

View File

@ -1,13 +1,17 @@
<template>
<div class="scroll-show">
<div class="content clearfix">
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
<cateNav class="cate" :hover="true" :showNavBar="false"
useClass="fixed-show"></cateNav>
<Search
class="search-con"
:hover="true"
ref="search"
:showLogo="false"
:showTag="false"
useClass="fixed-show"
></Search>
<div class="flex flex-a-c cart">
<Icon
type="ios-cart-outline"
@click="goCartList"
@ -16,7 +20,8 @@
/>
<i class="cart-badge">{{ cartNum < 100 ? cartNum : "99" }}</i>
</div>
<hr class="hr"/>
</div>
</div>
</template>
<script>
@ -53,6 +58,7 @@ export default {
},
},
mounted() {
if (storage.getItem("userInfo")) {
this.userInfo = JSON.parse(storage.getItem("userInfo"));
}
@ -60,14 +66,11 @@ export default {
};
</script>
<style lang="scss" scoped>
.hr{
height:1px;
background:$theme_color;
}
.content {
width: 1200px;
height: 40px;
margin: 10px auto;
margin: 0 auto;
position: relative;
}
.cate {
@ -80,11 +83,14 @@ export default {
overflow: hidden;
margin-top: -27px;
}
.cart{
height: 60px;
}
.cart-icon {
width: 30px;
float: left;
font-size: 25px;
margin-top: 8px;
color: $theme_color;
z-index: 1;
position: relative;
@ -106,6 +112,6 @@ export default {
line-height: 17px;
text-align: center;
z-index: 5;
top: 3px;
top: 10px;
}
</style>

View File

@ -81,6 +81,27 @@
<template v-if="element.type == 'recommend'">
<recommend :data="element" class="mb_20 width_1200_auto"></recommend>
</template>
<!-- 一行三列 -->
<template v-if="element.type == 'oneRowThreeColumns'">
<oneRowThreeColumns :data="element" class="mb_20 width_1200_auto"></oneRowThreeColumns>
</template>
<!-- 商品模块 -->
<template v-if="element.type == 'goodsType'">
<goodsAndType :paramData="element" class="mb_20 width_1200_auto"></goodsAndType>
</template>
<!-- 商品模块 -->
<template v-if="element.type == 'onlyGoodsModel'">
<onlyGoodsModel :data="element" class="mb_20 width_1200_auto"></onlyGoodsModel>
</template>
<!-- 混合模块 -->
<template v-if="element.type == 'mixModel'">
<mixModel :data="element" class="mb_20 width_1200_auto"></mixModel>
</template>
<!-- 混合模块 -->
<template v-if="element.type == 'forYour'">
<forYour :data="element" class="mb_20 width_1200_auto"></forYour>
</template>
<!-- 新品排行 -->
<template v-if="element.type == 'newGoodsSort'">
<new-goods-sort
@ -100,7 +121,7 @@
<div style="width: 100%; text-align: center">
<img
width="1200"
class="hover-pointer mb_20"
class="hover-pointer mb_20 bannerAd"
@click="linkTo(element.options.url)"
:src="element.options.img"
alt=""
@ -126,6 +147,12 @@ import NewGoodsSort from "./modelList/NewGoodsSort.vue";
import Recommend from "./modelList/Recommend.vue";
import NotEnough from "./modelList/NotEnough.vue";
import Seckill from "./modelList/Seckill.vue";
import oneRowThreeColumns from "./modelList/oneRowThreeColumns.vue";
import goodsAndType from "./modelList/goodsAndType.vue";
import onlyGoodsModel from "./modelList/onlyGoodsModel.vue";
import mixModel from "./modelList/mixModel.vue";
import forYour from "./modelList/forYour.vue";
export default {
name: "modelFormItem",
@ -139,6 +166,11 @@ export default {
FirstPageAdvert,
NotEnough,
Seckill,
oneRowThreeColumns,
goodsAndType,
onlyGoodsModel,
mixModel,
forYour
},
data() {
return {
@ -153,7 +185,11 @@ export default {
position: relative;
margin-bottom: 10px;
}
.bannerAd{
width: 1183px;
height: 166.6px;
border-radius: 10px;
}
/** 热门广告 */
.advert-list {
background: $theme_color;
@ -198,9 +234,4 @@ export default {
}
}
.width_1200_auto {
width: 1200px;
margin: 0 auto;
background-color: #fff;
}
</style>

View File

@ -5,14 +5,13 @@
<div class="nav-side"></div>
<div class="nav-content">
<!-- 轮播图 -->
<Carousel autoplay>
<!-- autoplay autoplay-speed="10000"-->
<Carousel :height="333.9" >
<CarouselItem v-for="(item, index) in data.options.list" :key="index">
<div style="overflow: hidden">
<div class="swiper-img" >
<img
:src="item.img"
width="790"
@click="linkTo(item.url)"
height="340"
class="hover-pointer"
/>
</div>
@ -20,48 +19,65 @@
</Carousel>
</div>
<div class="nav-right">
<div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
<div>
<div class="person-msg" @click="entryControl({ path: 'home' })">
<img class="user-face" :src="userInfo.face || defaultAvatar" alt />
<div class="welcome">
Hi, {{
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
}}
</div>
<div v-if="userInfo.id">
<Button class="btns" shape="circle" @click="$router.push('home')"
>会员中心</Button
<div class="icon-list"></div>
<!-- #TODO 后续增加 -->
<!-- <div class="icon-list flex flex-j-sb" >
<div class="icon-item" :key="index" @click="entryControl(item)" v-for="(item,index) in recentList">
<div class="value">
{{ item.value}}
</div>
<div class="label">
{{ item.label}}
</div>
</div>
</div> -->
</div>
<div v-else class="flex flex-a-c ">
<div class="btns" @click="$router.push('login')" shape="circle"
>登录</div
>
<div class="btns sign-up" @click="$router.push('signUp')" shape="circle"
>注册</div
>
</div>
<div v-else>
<Button class="btns" @click="$router.push('login')" shape="circle"
>请登录</Button
>
</div>
</div>
<div class="shop-msg">
<div class="gray-line"></div>
<div class="icon-list flex flex-j-sb" >
<div class="icon-item" @click="entryControl(item)" :key="index" v-for="(item, index) in entranceList">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)">
<div>
<span>常见问题</span>
<ul class="article-list">
<li
class="ellipsis"
:alt="article.title"
v-for="(article, index) in articleList"
:key="index"
@click="goArticle(article.id)"
>
{{ article.title }}
</li>
</ul>
{{ item.label }}
</div>
</div>
</div>
<div class="icon-list flex flex-j-sb" >
<div class="icon-item" :key="index" @click="entryControl(item)" v-for="(item, index) in appendList">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)">
<div>
{{ item.label }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { articleList } from "@/api/common.js";
import storage from "@/plugins/storage";
export default {
name: "modelCarousel",
@ -69,60 +85,251 @@ export default {
data() {
return {
config: require("@/config"),
defaultAvatar: require("@/assets/images/default.png"),
userInfo: {}, //
articleList: [], //
params: {
//
pageNumber: 1,
pageSize: 5,
type: "ANNOUNCEMENT",
sort: "sort",
entranceList: [
{
icon: "collage",
label: "宝贝收藏",
path: "/home/Favorites"
},
{
icon: "shop",
label: "收藏店铺",
path: "/home/Favorites?type=STORE"
},
{
icon: "carts",
label: "购物车",
path: "/cart"
},
{
icon: "story",
label: "我的足迹",
path: "/home/MyTracks"
},
],
appendList: [
{
icon: "support",
label: "帮助中心",
path: "/article"
},
{
icon: "feedback",
label: "我的评论",
path: "/home/CommentList"
},
{
icon: "notice",
label: "收货地址",
path: "/home/MyAddress"
},
{
icon: "notification",
label: "我的消息",
path: "/home/MsgList"
},
],
recentList: [
{
value: "0",
label: "购物车"
},
{
value: "0",
label: "待收货"
},
{
value: "0",
label: "待发货"
},
{
value: "0",
label: "代付款"
},
],
};
},
methods: {
getArticleList() {
//
articleList(this.params).then((res) => {
if (res.success) {
this.articleList = res.result.records;
}
});
},
goArticle(id) {
//
let routeUrl = this.$router.resolve({
path: "/article",
query: { id },
});
window.open(routeUrl.href, "_blank");
//
entryControl(val) {
this.$router.push(val.path)
},
},
mounted() {
if (storage.getItem("userInfo"))
this.userInfo = JSON.parse(storage.getItem("userInfo"));
this.getArticleList();
},
};
</script>
<style scoped lang="scss">
.label {
font-size: 12px;
font-weight: normal;
line-height: 14px;
text-align: center;
letter-spacing: 0px;
color: #666666;
}
.swiper-img {
overflow: hidden;
width: 637px;
height: 329.9px;
}
.icon-list {
width: 216px
}
.icon-list:nth-last-of-type(1) {
margin-top: 20px;
}
.hot-box {
margin-top: 35px;
width: 216px;
}
.hot-tag {
margin-right: 6px;
width: 36px;
height: 18px;
border-radius: 4px;
opacity: 1;
font-size: 12px;
border: 1px solid $theme_color;
color: $theme_color;
text-align: center;
line-height: 18px;
}
.gray-line {
width: 216px;
height: 1px;
border: 1px solid #E5E5E5;
margin-bottom: 13px;
}
.icon {
width: 20px !important;
height: 20px !important;
margin-bottom: 7px;
}
.icon-item {
cursor: pointer;
text-align: center;
>div {
font-size: 11px;
font-weight: normal;
line-height: 13px;
text-align: center;
letter-spacing: 0px;
color: #666666;
}
>.value {
font-size: 14px;
line-height: 17px;
text-align: center;
font-weight: 400;
letter-spacing: 0px;
margin-bottom: 3px;
color: $theme_color;
}
>.label {
font-weight: 400;
font-size: 12px;
line-height: 14px;
text-align: center;
letter-spacing: 0px;
color: #666666;
margin-bottom: 13px;
}
}
.model-carousel {
width: 1200px;
height: 340px;
overflow: hidden;
}
.hover-pointer {
//display: block;
//width: 100%;
//height: 100%;
width: 637px;
height: 329.9px;
object-fit: cover;
border-radius: 10px;
}
.welcome {
font-size: 14px;
font-weight: normal;
line-height: 17px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.hr {
width: 216px;
height: 1px;
border: 1px solid #E5E5E5;
}
.btns {
background-color:#363634 ;
line-height:30px;
color: white !important;
margin-top: 21px;
margin-bottom: 13px;
width: 77px;
height: 28px;
border-radius: 14px;
opacity: 1;
font-size: 13px;
font-weight: normal;
line-height: 28px;
text-align: center;
cursor: pointer;
letter-spacing: 0px;
color: #FFFFFF;
background: $theme_color;
}
.btns:hover {
background-color: #363634;
line-height:32px !important;
color: #e5d790 !important;
.sign-up {
background: #F39519;
margin-left: 10px;
}
.avatar {
margin-bottom: 13px;
}
.user-face {
margin-bottom: 12px;
width: 70px;
height: 70px;
border-radius: 50%;
}
/* 导航主体 */
.nav-body {
width: 1200px;
@ -131,67 +338,78 @@ export default {
}
.nav-side {
height: 100%;
width: 200px;
height: 334px;
width: 263.2px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
float: left;
padding: 0px;
color: #fff;
background-color: #6e6568;
// background-color: #6e6568;
}
/*导航内容*/
.nav-content {
width: 790px;
overflow: hidden;
width: 637px;
margin-left: 10.8px;
margin-top: 10px;
height: 333.9px;
float: left;
position: relative;
}
.nav-right {
float: left;
width: 210px;
margin-top: 10px;
width: 263.2px;
margin-left: 10px;
border-radius: 10px;
background: #FFFFFF;
.person-msg {
cursor: pointer;
height: 333px;
display: flex;
align-items: center;
flex-direction: column;
margin: 20px auto;
button {
height: 30px !important;
margin-top: 10px;
line-height: 30px;
border: none;
}
.ivu-btn-default {
// color: $theme_color;
// border-color: $theme_color;
}
img {
margin-bottom: 10px;
width: 80px;
height: 80px;
border-radius: 50%;
}
padding-top: 28px;
padding-bottom: 25px;
}
.shop-msg {
div {
width: 100%;
margin: 10px 27px;
span {
cursor: pointer;
text-align: center;
font-weight: bold;
margin-left: 5px;
}
span:nth-child(1) {
@include content_color($theme_color);
margin-left: 0;
}
span:nth-child(2) {
font-weight: normal;
}
span:nth-child(3):hover {
color: $theme_color;
}
}
ul {
li {
cursor: pointer;
@ -199,6 +417,7 @@ export default {
color: #999395;
width: 150px;
font-size: 12px;
&:hover {
color: $theme_color;
}

View File

@ -65,12 +65,12 @@ export default {
handleScrollx(){
// console.log('',window.pageYOffset) //
// console.log(this.$refs.obtain.getBoundingClientRect().top) //
this.scrollHieght = Number(window.pageYOffset);//
this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); //
this.topSearchShow = true; //
if(this.scrollTops < -660){ //
this.topSearchShow = false;
}
// this.scrollHieght = Number(window.pageYOffset);//
// this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); //
// this.topSearchShow = true; //
// if(this.scrollTops < -660){ //
// this.topSearchShow = false;
// }
},
toguid(path,id){
var path =path;

View File

@ -1,5 +1,6 @@
<template>
<div class="seckill" v-if="goodsList.length">
<!-- v-if="goodsList.length"-->
<div class="seckill">
<div class="aside hover-pointer" @click="goToSeckill">
<div class="title">{{ actName }}</div>
<div class="hour">

View File

@ -0,0 +1,228 @@
<template>
<div class="model" v-if="data">
<div class="for-your">{{ data.options.title }}</div>
<div class="flex card">
<div class="left">
<img :src="data.options.data.image.src" alt="" />
</div>
<div class="right flex">
<!-- 商品区 -->
<div class="goods-list">
<div
class="goods-item"
:key="index"
v-for="(item, index) in data.options.data.list"
@click="linkTo(item.url)"
>
<div>
<div class="goods-name">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<img class="goods-img" :src="item.img" alt="" />
</div>
</div>
<!-- 热卖区 -->
<div class="hot-list">
<div class="hot-title">{{ data.options.data.hot.title }}</div>
<div
class="hot-item flex flex-a-c"
v-for="(item, index) in data.options.data.hot.list"
:key="index"
@click="linkTo(item.url)"
>
<img :src="item.img" alt="" />
<div class="hot-goods">
<div class="hot-goods-title">{{ item.title }}</div>
<div>
<div class="hot-price">{{ item.price | unitPrice }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "forYour",
data() {
return {
current: "",
};
},
props: {
data: {
type: Object,
default: {},
},
},
mounted() {},
methods: {},
};
</script>
<style scoped lang="scss">
.goods-list {
display: flex;
width: 558px;
flex-wrap: wrap;
}
.goods-item {
width: 278px;
height: 277px;
text-align: center;
box-sizing: border-box;
cursor: pointer;
border-right: 1.4px solid #e2e2e2;
&:nth-of-type(3) {
border-top: 1.4px solid #e2e2e2;
}
&:nth-of-type(4) {
border-top: 1.4px solid #e2e2e2;
}
&:hover {
/deep/ .goods-name {
color: $theme_color;
}
/deep/ .goods-desc {
color: $theme_color;
}
}
}
.goods-name {
margin-top: 23px;
font-size: 25px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-img {
width: 190px;
height: 156px;
margin-top: 19px;
border-radius: 10px;
}
.goods-desc {
font-size: 14px;
font-weight: normal;
line-height: 17px;
text-align: center;
margin-top: 11px;
letter-spacing: 0px;
color: #333333;
}
.for-your {
font-size: 35px;
font-weight: normal;
line-height: 42px;
text-align: center;
letter-spacing: 0px;
margin-bottom: 32px;
color: #333333;
}
.card,
.right-card {
opacity: 1;
background: #ffffff;
border-radius: 10px;
position: relative;
box-shadow: 0px 1px 13px 0px #E5E5E5;
&:hover {
.setup-box {
display: block;
}
}
}
.modal-tab-bar {
> .flex {
align-items: center;
margin: 10px 0;
}
}
.draggable {
> .flex {
align-items: center;
}
}
.left {
width: 346px;
height: 554px;
border-radius: 9.8px 0px 0px 9.8px;
> img {
max-width: 100%;
height: 100%;
}
}
.right {
width: 839px;
height: 554px;
border-radius: 0px 9.8px 9.8px 0px;
}
.hot-list {
width: 279px;
}
.hot-title {
margin-left: 25px;
line-height: 63px;
font-size: 17px;
font-weight: normal;
letter-spacing: 0px;
color: #333333;
height: 63px;
}
.hot-item {
cursor: pointer;
box-sizing: border-box;
border-top: 1.4px solid #e2e2e2;
height: 122px;
padding:0 14px;
align-items: center;
&:hover {
> .hot-goods {
> .hot-goods-title {
color: $theme_color;
}
}
}
> img {
width: 76.3px;
height: 77.7px;
}
}
.hot-goods {
margin-left: 14px;
}
.hot-goods-title {
font-size: 13px;
font-weight: normal;
line-height: 16px;
letter-spacing: 0px;
color: #333333;
}
.hot-price {
margin-top: 10.3px;
font-size: 24px;
font-weight: normal;
line-height: 29px;
letter-spacing: 0px;
color: $theme_color;
}
</style>

View File

@ -0,0 +1,205 @@
<template>
<div class="goods-type-wrapper">
<div class="flex goods-type-line">
<div class="goods-type-title">{{ paramData.options.title }}</div>
<div class="flex goods-type-labels">
<div
:class="{ active: current === item.___index }"
class="goods-type-item"
v-for="(item, index) in paramData.options.labels"
:key="index"
@click="handleClickLabel(item, index)"
>
{{ item.label }}
</div>
</div>
</div>
<!-- 商品部分 -->
<div class="only-goods-list flex-j-sb">
<div
v-if="paramData.options"
class="only-goods-list-item "
v-for="(item, index) in paramData.options.list.filter((client) => {
return client.___index == current;
})"
:key="index"
@click="linkTo(item.url)"
>
<div class="goods-img">
<img :src="item.img" />
</div>
<div>
<div class="goods-name wes-2">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<div class="goods-price">
{{ item.price | unitPrice("¥") }}
</div>
<!-- 查看 -->
<div class="white-shadow">
<div class="search">去查看</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "goods",
props: {
paramData: {
type: Object,
default: {},
},
},
data() {
return {
current: "",
};
},
watch: {},
mounted() {
this.current = this.paramData.options.labels[0].___index;
},
methods: {
//
handleClickLabel(val, index) {
this.current = index;
},
},
};
</script>
<style scoped lang="scss">
.white-shadow {
width: 287px;
height: 122px;
border-radius: 0px 0px 10px 10px;
opacity: 1;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
display: flex;
justify-content: center;
transition: 0.35s;
align-items: center;
background: linear-gradient(
180deg,
rgba(252, 252, 252, 0.58) -50%,
#ffffff 99%
);
}
.search {
width: 143px;
height: 45px;
border-radius: 22.5px;
opacity: 1;
font-size: 20px;
font-weight: normal;
text-align: center;
letter-spacing: 0px;
line-height: 45px;
color: #ffffff;
background: $theme_color;
}
.only-goods-list{
display: flex;
flex-wrap: wrap;
}
.only-goods-list-item {
padding-top: 30px;
width: 287px;
height: 343.7px;
border-radius: 9.8px;
opacity: 1;
margin-bottom: 14.3px;
cursor: pointer;
background: #ffffff;
transition: all 0.4s ease;
box-shadow: 0px 1px 13px 0px #e5e5e5;
position: relative;
&:hover {
transform: translateY(-5px);
box-shadow: 0px 1px 14px 0px #c5c5c5;
> .white-shadow {
opacity: 1;
}
> .goods-img {
> img {
opacity: 0.8 !important;
}
}
}
}
.goods-img {
margin-bottom: 9.8px;
text-align: center;
> img {
transition: all 0.4s ease;
width: auto;
max-height: 183px;
}
}
.goods-name {
font-size: 18px;
font-weight: normal;
line-height: 22px;
text-align: center;
letter-spacing: 0px;
width: 200px;
margin: 0 auto 12.4px auto;
color: #333333;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-desc {
font-size: 14px;
font-weight: normal;
line-height: 17px;
text-align: center;
letter-spacing: 0px;
margin-bottom: 12.4px;
color: #666666;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-price {
font-size: 25.2px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #f31947;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-type-line {
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.goods-type-title {
font-size: 31px;
font-weight: normal;
line-height: 37px;
letter-spacing: 0px;
color: #333333;
}
.active {
color: #f31947;
}
.goods-type-labels {
cursor: pointer;
font-size: 21px;
font-weight: normal;
line-height: 25px;
letter-spacing: 0px;
}
.goods-type-item {
margin-left: 28px;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<div class="mix-model">
<!-- 左侧 -->
<div class="left-card">
<left :data="data" />
</div>
<!-- 右侧 -->
<div class="right-card">
<right :data="data" />
</div>
</div>
</template>
<script>
import left from './mixs/mix-goods'
import right from './mixs/mix-brand'
export default {
name: "mixModel",
data() {
return {}
},
props: {
data: {
type: Object,
default: {}
}
},
components: {
left,
right
},
mounted() {
},
methods: {}
}
</script>
<style scoped lang="scss">
.mix-model{
display: flex;
justify-content:space-between;
}
.left-card,.right-card{
width: 584px;
height: 344px;
border-radius: 10px;
opacity: 1;
background: #FFFFFF;
box-shadow: 0px 1px 13px 0px #E5E5E5;
position: relative;
}
</style>

View File

@ -0,0 +1,132 @@
<template>
<div class="flex" v-if="data.options.right.model == 'brand'">
<div class="left-side" @click="linkTo(data.options.right.data.image.url)">
<img :src="data.options.right.data.image.src" alt="">
</div>
<div class="right-side">
<div class="badge-box flex">
<div class="round">
<Icon type="ios-arrow-forward" />
</div>
</div>
<div class="flex goods-list">
<div class="goods-item flex" @click="linkTo(item.url)" :key="index" v-for="(item,index) in data.options.right.data.list">
<div class="goods-thumbnail">
<img :src="item.img" alt="">
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "mix-goods",
data() {
return {}
},
props: {
data: {
type: Object,
default: {}
}
},
components: {},
mounted() {
},
methods: {}
}
</script>
<style scoped lang="scss">
.right-side{
width: 330px;
}
.goods-detail-title{
font-size: 13px;
font-weight: normal;
line-height: 16px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-detail-price{
font-size: 14px;
font-weight: normal;
line-height: 17px;
letter-spacing: 0px;
color: $theme_color;
margin-top: 8px;
margin-bottom:10px;
}
.goods-thumbnail{
margin-left: 7px;
display: flex;
align-items: center;
>img{
width:90px;
height: 90px;
}
}
.badge-box{
margin-top: 33px;
justify-content:right;
>.round{
width: 17.5px;
height: 17.5px;
opacity: 1;
border-radius: 50%;
text-align: center;
line-height: 17.5px;
border: 0.7px solid #333333;
margin-right: 17.5px;
}
}
.goods-list{
width: 330px;
flex-wrap: wrap;
justify-content:space-between;
padding: 0 16px;
}
.goods-item{
display: flex;
align-items: center;
justify-content: center;
width:50%;
height: 85px;
border-radius: 9.8px;
opacity: 1;
transition: .35s;
background: #FFFFFF;
margin-bottom:9px;
}
.left-side {
>img{
width: 254px;
height: 344px;
border-radius: 9.8px 0px 0px 9.8px;
opacity: 1;
}
}
.badge {
width: 50px;
height: 27px;
line-height:27px;
border-radius: 13.3px 0px 0px 13.3px;
opacity: 1;
background: #F31947;
font-size: 12.6px;
font-weight: normal;
text-align: center;
letter-spacing: 0px;
color: #FFFFFF;
margin-top: 26px;
margin-bottom:17px;
}
</style>

View File

@ -0,0 +1,127 @@
<template>
<div class="flex" v-if="data.options.left.model == 'goods'">
<div class="left-side" @click="linkTo(data.options.right.data.image.url)">
<img :src="data.options.left.data.image.src" alt="">
</div>
<div class="right-side">
<div class="badge-box flex">
<div class="badge" @click="linkTo(data.options.right.data.image.url)">
{{data.options.left.data.badge.label}}
</div>
</div>
<div class="flex goods-list">
<div class="goods-item flex" @click="linkTo(item.url)" :key="index" v-for="(item,index) in data.options.left.data.list">
<div class="goods-thumbnail">
<img :src="item.img" alt="">
</div>
<div class="goods-detail">
<div class="goods-detail-title">{{item.title}}</div>
<div class="goods-detail-price">{{item.price | unitPrice('¥')}}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "mix-goods",
data() {
return {}
},
props: {
data: {
type: Object,
default: {}
}
},
components: {},
mounted() {
},
methods: {}
}
</script>
<style scoped lang="scss">
.right-side{
width: 387px;
}
.goods-detail-title{
font-size: 13px;
font-weight: normal;
line-height: 16px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-detail-price{
font-size: 14px;
font-weight: normal;
line-height: 17px;
letter-spacing: 0px;
color: #F31947;
margin-top: 8px;
margin-bottom:10px;
}
.goods-thumbnail{
margin-left: 7px;
display: flex;
align-items: center;
>img{
width:90px;
height: 90px;
}
}
.badge-box{
justify-content:right;
}
.goods-list{
width: 387px;
flex-wrap: wrap;
justify-content:space-between;
padding: 0 16px;
}
.goods-item{
cursor: pointer;
display: flex;
align-items: center;
width: 173.6px;
height: 119px;
border-radius: 9.8px;
opacity: 1;
transition: .35s;
background: #FFFFFF;
margin-bottom:9px;
&:hover{
box-shadow: 0px 1px 6px 0px #E5E5E5;
}
}
.left-side {
>img{
border-radius: 10px 0px 0px 10px;
display: block;
width: 196.7px;
height: 343.7px;
}
}
.badge {
width: 50px;
height: 27px;
line-height:27px;
border-radius: 13.3px 0px 0px 13.3px;
opacity: 1;
background: #F31947;
font-size: 12.6px;
font-weight: normal;
text-align: center;
letter-spacing: 0px;
color: #FFFFFF;
margin-top: 26px;
margin-bottom:17px;
}
</style>

View File

@ -0,0 +1,36 @@
<template>
<div class="line flex flex-a-c flex-j-sb">
<div class="column" v-for="(item,index) in data.options.list" :key="index">
<img :src="item.img" class="three-column-img">
</div>
</div>
</template>
<script>
export default {
name: "oneRowThreeColumns",
props: {
data: {
type: Object,
default: {}
}
},
data () {
return {
};
},
methods: {}
}
</script>
<style scoped lang="scss">
.column{
width: 385px;
height: 165px;
>img{
width: 100%;
height: 100%;
}
}
</style>

View File

@ -0,0 +1,186 @@
<template>
<div class="goods-type-wrapper">
<!-- 商品部分 -->
<div class="only-goods-list flex" >
<div
class="only-goods-list-item"
v-for="(item, index) in data.options.list"
:key="index"
@click="handleClick(item)"
>
<div>
<div class="goods-name wes-2">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<div class="goods-img">
<img :src="item.img" />
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "onlyGoodsList",
props: {
data: {
type: Object,
default: {},
},
},
data() {
return {
flag:false,
tabIndex:0,
current: 0,
showModal: false,
selected: {}, //
picModelFlag: false,
};
},
mounted(){
},
methods: {
handleClick(val){
this.linkTo(val.url)
},
},
};
</script>
<style scoped lang="scss">
.goods-type-wrapper {
position: relative;
}
.del-btn{
margin-left:10px;
}
.tab-bar {
margin-bottom: 20px;
}
.draggable {
padding: 10px;
border-bottom: 1px solid #ededed;
transition: 0.35s;
&:hover {
background-color: #ededed;
}
}
.column-config {
margin-left: 10px;
> * {
margin: 4px;
}
}
.column-img {
width: 100px;
height: 100px;
}
.add-goods {
margin-left: 20px;
margin-bottom: 10px;
}
.only-goods-list {
position: relative;
flex-wrap: wrap;
justify-content: space-between;
&:hover {
> .setup-box {
display: block;
}
}
}
.column-goods-config {
flex: 2;
align-items: center;
justify-content: space-between;
}
.only-goods-list-item {
padding-top: 34.8px;
margin-bottom: 14.3px;
width: 287px;
height: 343.7px;
border-radius: 9.8px;
opacity: 1;
cursor: pointer;
background: #ffffff;
transition: 0.35s;
box-shadow: 0px 1px 13px 0px #e5e5e5;
&:hover {
box-shadow: 0px 1px 14px 0px #c5c5c5;
transform: translateY(-2px);
}
}
.goods-img {
text-align: center;
> img {
width: auto;
max-height: 183px;
}
}
.goods-name {
margin-bottom: 11.9px;
font-size: 25px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #333333;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-desc {
margin-bottom: 30px;
font-size: 16px;
font-weight: normal;
line-height: 19px;
text-align: center;
letter-spacing: 0px;
color: #666666;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-price {
font-size: 25.2px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: $theme_color;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-type-line {
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.goods-type-title {
font-size: 31px;
font-weight: normal;
line-height: 37px;
letter-spacing: 0px;
color: #333333;
}
.active {
color: $theme_color;
}
.goods-type-labels {
font-size: 21px;
font-weight: normal;
line-height: 25px;
letter-spacing: 0px;
}
.goods-type-item {
margin-left: 28px;
}
</style>

View File

@ -1,28 +1,29 @@
<template>
<div class="cate-nav">
<div class="nav-con">
<div class="cate-nav width_1200_auto" :class="{'fixed-show':useClass == 'fixed-show'}">
<div class="nav-con" :class="{'background-white':useClass == 'background-white'}">
<div
class="all-categories hover-pointer"
@mouseenter="showFirstLists"
@mouseleave="showFirstList = false"
>
全部商品分类
商品分类
</div>
<ul class="nav-item " v-if="showNavBar">
<li
class="nav-lis"
class="nav-lis flex flex-a-c flex-j-c"
v-for="(item, index) in navList.list"
:key="index"
@click="linkTo(item.url)"
>
{{ item.name }}
<!-- {{item}} -->
<div class="colum"></div>
</li>
</ul>
</div>
<!-- 全部商品分类 -->
<div
class="cate-list"
:style="{'top':!showNavBar ?'60px':'46px'}"
v-show="showAlways || showFirstList"
@mouseenter="showFirstList = true"
@mouseleave="showFirstList = false"
@ -131,6 +132,10 @@ export default {
default: false,
type: Boolean,
},
useClass:{
type:null,
default:''
}
},
data() {
return {
@ -223,46 +228,81 @@ export default {
</script>
<style scoped lang="scss">
.background-white{
background: #fff;
}
.nav-lis:hover {
color: $theme_color !important;
cursor: pointer;
}
.nav-lis{
width: 103px;
text-align: center;
position: relative;
}
.fixed-show{
margin-top: 0 !important;
>.nav-con{
>.all-categories{
align-items: center !important;
height: 60px;
display: inherit;
justify-content: center;
padding: 0 !important;
}
}
}
.colum{
height: 14.7px;
opacity: 1;
border: 0.7px solid #CBC8C8;
position: absolute;
right: 0;
}
.cate-nav {
width: 1200px;
position: relative;
margin: 0 auto;
margin: 14px auto 0 auto;
}
/** 商品分类 */
.nav-con {
width: 1200px;
height: 40px;
height: 46px;
margin: 0 auto;
display: flex;
.all-categories {
width: 200px;
line-height: 40px;
color: #fff;
background-color: $theme_color;
text-align: center;
font-size: 16px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding-left: 37.4px;
background: #FFFFFF;
width: 263.2px;
padding-top: 15.4px;
line-height: 20px;
border-bottom: none;
font-size: 16.8px;
font-weight: normal;
color: #333333;
letter-spacing: 0px;
}
.nav-item {
width: 1000px;
height: 40px;
line-height: 40px;
width: 914px;
height: 46px;
border-radius: 10px;
background: #FFFFFF;
margin-left: 10px;
line-height: 46px;
overflow: hidden;
list-style: none;
// background-color: #eee;
display: flex;
li {
float: left;
font-weight: bold;
margin-left: 20px;
color: rgb(129, 127, 127);
font-size: 15px;
font-size: 17px;
font-weight: normal;
color: #333333;
&:hover {
color: #e1251b;
color: $theme_color;
}
}
}
@ -271,17 +311,33 @@ export default {
.cate-list {
margin: 0 auto;
position: absolute;
z-index: 1000;
}
.nav-side {
width: 200px;
width: 263.2px;
color: #666;
float: left;
padding: 0px;
color: #fff;
background-color: #6e6568;
height: 335px;
overflow:hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
background-color: #fff;
height: 340px;
////
//&::-webkit-scrollbar {
// width: 1px;
// height: 5px;
//}
//&::-webkit-scrollbar-thumb {
// border-radius: 1em;
// background-color: rgba(50, 50, 50, 0.3);
//}
//&::-webkit-scrollbar-track {
// border-radius: 1em;
// background-color: rgba(50, 50, 50, 0.1);
//}
}
.large-nav {
height: 470px;
@ -294,22 +350,16 @@ export default {
}
.nav-side ul {
width: 100%;
padding: 0px;
padding-top: 5px;
list-style: none;
}
.nav-side li {
padding: 7.5px 0;
padding-left: 12px;
padding: 0 0 16.2px 37.4px;
font-size: 13px;
line-height: 18px;
&:hover {
background: #999395;
}
}
.nav-side-item:hover {
cursor: pointer;
color: #e1251b;
color: $theme_color;
}
/*显示商品详细信息*/
@ -335,10 +385,11 @@ export default {
padding-left: 12px;
margin-right: 15px;
font-size: 12px;
background-color: #6e6568;
color: #333;
}
.nav-detail-item span:hover {
background-color: #e1251b;
background-color: $theme_color;
color: #fff;
}
.detail-item-panel li {
line-height: 30px;
@ -353,7 +404,7 @@ export default {
text-align: right;
}
.detail-item-title:hover {
color: #e1251b;
color: $theme_color;
}
.detail-item-row {
display: flex;
@ -373,6 +424,6 @@ export default {
}
}
.detail-item:hover {
color: #e1251b;
color: $theme_color;
}
</style>

View File

@ -10,7 +10,7 @@
>)
</div>
</div>
<Search :showTag="false" :showLogo="false"></Search>
</div>
<Divider />
<!-- 购物车主体 -->
@ -245,7 +245,7 @@
</div>
<Spin size="large" fix v-if="loading"></Spin>
</div>
<BaseFooter></BaseFooter>
<BaseFooter class="footer"></BaseFooter>
</div>
</template>
@ -449,6 +449,9 @@ export default {
</script>
<style scoped lang="scss">
.footer{
margin-top: 10px;
}
/** logo 搜索 start **/
.logo {
height: 40px;
@ -781,4 +784,5 @@ export default {
.ivu-input-number-input {
text-align: center;
}
</style>

View File

@ -3,7 +3,6 @@
<BaseHeader></BaseHeader>
<Search></Search>
<drawer></drawer>
<ShopHeader :detail="storeMsg"></ShopHeader>
<div class="shop-item-path">
<div class="shop-nav-container">
<Breadcrumb>
@ -45,7 +44,7 @@
<script>
import Search from "@/components/Search";
import ShopHeader from "@/components/header/ShopHeader";
import ShowGoods from "@/components/goodsDetail/ShowGoods";
import empty from "@/components/empty/Main";
import ShowGoodsDetail from "@/components/goodsDetail/ShowGoodsDetail";
@ -192,7 +191,6 @@ export default {
watch: {},
components: {
Search,
ShopHeader,
ShowGoods,
ShowGoodsDetail,
empty

View File

@ -1,9 +1,9 @@
<template>
<div>
<div class="wrapper">
<BaseHeader></BaseHeader>
<Search @search="handleSearch"></Search>
<drawer></drawer>
<cateNav></cateNav>
<cateNav class="cate-nav" useClass="background-white"></cateNav>
<div class="container">
<!-- 商品筛选栏 -->
<GoodsClassNav @getParams="getParams"></GoodsClassNav>
@ -261,6 +261,9 @@ export default {
<style scoped lang="scss">
@import "../assets/styles/goodsList.scss";
.cate-nav{
margin-top: 10px;
}
.goods-show-info > .goods-show-seller > .goods-show-buyer {
width: 35px;
height: 17px;
@ -288,7 +291,7 @@ export default {
}
.container {
margin: 15px auto;
width: 1200px;
width: 1184px;
min-width: 1000px;
position: relative;
}
@ -299,92 +302,14 @@ export default {
display: flex;
}
/* ---------------侧边广告栏开始------------------- */
.as-box {
width: 200px;
border: 1px solid #ccc;
}
.goods-show-right {
display: flex;
flex-direction: row;
margin-top: 5px;
}
.goods-show-self {
float: left;
height: 16px;
line-height: 16px;
padding: 0 3px;
margin-right: 3px;
overflow: hidden;
text-align: center;
font-style: normal;
font-size: 12px;
background: #e23a3a;
color: #fff;
border-radius: 2px;
}
.goods-show-middle {
float: left;
height: 16px;
line-height: 16px;
padding: 0 3px;
margin-right: 3px;
overflow: hidden;
text-align: center;
font-style: normal;
font-size: 12px;
border: 1px solid rgba(112, 123, 187, 0.8);
color: rgba(112, 123, 187, 0.8);
}
// .goods-show-middle:hover {
// color: rgba(2, 15, 88, 0.6);
// border: 0.2px solid rgba(0, 13, 87, 0.6);
// border-radius: 4px;
// line-height: 18px;
// }
.item-as-title {
width: 100%;
height: 36px;
color: $theme_color;
line-height: 36px;
font-size: 18px;
}
.item-as-title span:first-child {
margin-left: 20px;
}
.item-as-title span:last-child {
float: right;
margin-right: 15px;
font-size: 10px;
color: rgb(204, 204, 204);
}
.item-as {
width: 160px;
margin: 18px auto;
}
.item-as-img {
width: 160px;
height: 160px;
margin: 0px auto;
}
.item-as-price span {
font-size: 18px;
}
.item-as-intro {
margin-top: 5px;
font-size: 12px;
}
.item-as-selled {
margin-top: 5px;
font-size: 12px;
}
.item-as-selled span {
color: #005aa0;
}
/* ---------------侧边广告栏结束------------------- */
/* ---------------商品栏开始------------------- */
.goods-list-box {

View File

@ -22,7 +22,7 @@
<Button type="error" @click="showCpmodel=false"></Button>
</template>
</Modal>
<drawer></drawer>
<!-- 固定头部 -->
<hover-search class="hover-search" :class="{show: topSearchShow}"></hover-search>
<!-- 顶部广告 -->
@ -37,6 +37,8 @@
<model-form ref="modelForm" :data="modelForm"></model-form>
<!-- 底部栏 -->
<BaseFooter></BaseFooter>
<!-- 侧边栏 -->
<fixedBar class="fixed-bar" :class="{'show-fixed': topSearchShow}"></fixedBar>
</div>
</template>
@ -44,6 +46,7 @@
import Search from '@/components/Search';
import ModelForm from '@/components/indexDecorate/ModelForm';
import HoverSearch from '@/components/header/hoverSearch';
import fixedBar from '@/components/fixed/index';
import storage from "@/plugins/storage";
import { indexData,getAutoCoup } from '@/api/index.js';
import {seckillByDay} from '@/api/promotion'
@ -141,7 +144,7 @@ export default {
})
},
handleReachBottom(){
console.log(111)
} ,
getIndexData () {
//
@ -181,7 +184,8 @@ export default {
components: {
Search,
ModelForm,
HoverSearch
HoverSearch,
fixedBar
}
};
</script>
@ -213,4 +217,55 @@ export default {
transform: translateZ(0);
top: 0;
}
.fixed-bar{
opacity: 0 !important;
transform: translateY(-10px);
transition: .35s;
z-index: 999999;
height: 0px !important;
overflow: hidden;
}
.show-fixed{
height: 354px !important;
opacity: 1 !important;
transform: translateY(0);
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
}
/* 2K */
@media screen and (min-width: 2561px) and (max-width: 3840px) {
/* 样式 */
.fixed-bar{
position: fixed;
right:900px;
top: 500px;
}
}
/* 1080p */
@media screen and (max-width: 2560px) {
/* 样式 */
.fixed-bar{
position: fixed;
right:300px;
top: 500px;
}
}
@media screen and (max-width: 2025px) {
/* 样式 */
.fixed-bar{
position: fixed;
right:150px;
top: 300px;
}
}
</style>

View File

@ -2,7 +2,7 @@
<div>
<BaseHeader></BaseHeader>
<Search></Search>
<cateNav></cateNav>
<!-- 添加成功提示 -->
<div class="add-info-box-container">
<div class="add-info-box">

View File

@ -53,11 +53,12 @@ export default {
params: { //
pageNumber: 1,
pageSize: 100,
type: 'GOODS'
type: this.$route.query.type || 'GOODS'
},
spinShow: false //
};
},
methods: {
getList () { //
this.spinShow = true
@ -123,6 +124,7 @@ export default {
mounted () {
if (this.homePage) this.params.pageSize = 5;
this.getList()
}
};
</script>

View File

@ -6,7 +6,7 @@ var BASE = {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
manager: "http://admin-api.pickmall.cn:18889"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@ -66,7 +66,6 @@ export default {
}, []);
this.wap.forEach((items,indexs) => {
if(items.title == '活动'){
console.log(32323232323232)
this.wap.splice(indexs,1)
}
})

View File

@ -117,7 +117,6 @@ export default {
if(urls.indexOf('/floorList/renovation') != -1){
this.linkList.forEach((items,indexs)=>{
if(items.title == '砍价'){
console.log(12321322,indexs)
this.linkList.splice(indexs,1)
}
})

View File

@ -22,7 +22,7 @@
:current="params.pageNumber"
:page-size="params.pageSize"
class="mt_10"
:total="Number(totals)"
:total="Number(total)"
size="small"
show-elevator
/>

View File

@ -99,4 +99,30 @@ $theme_color: #FF5C58;
}
$bg_color: #f1f6fa;
.wes {
/* 多出部分用省略号表示 , 用于一行 */
overflow: hidden;
word-wrap: normal;
white-space: nowrap;
text-overflow: ellipsis;
}
.wes-2 {
/* 适用于webkit内核和移动端 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.wes-3 {
/* 适用于webkit内核和移动端 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
@import "./table-common.scss";

View File

@ -194,7 +194,7 @@ export default {
"Button",
{
props: {
type: "success",
type: "primary",
size: "small",
},
style: {
@ -216,7 +216,7 @@ export default {
"Button",
{
props: {
type: "primary",
type: "default",
size: "small",
},
style: {

View File

@ -681,6 +681,253 @@ export const modelData = [{
size: '1200*自定义'
},
},
{
type: 'oneRowThreeColumns',
name: '一行三列',
icon: 'md-image',
options: {
list:[
{
img: require('@/assets/nav/decorate8.png'),
url:"",
size:"385*165"
},
{
img: require('@/assets/nav/decorate8.png'),
url:"",
size:"385*165"
},
{
img: require('@/assets/nav/decorate8.png'),
url:"",
size:"385*165"
},
]
},
},
{
type: 'goodsType',
name: '商品模块',
icon: 'md-image',
options: {
title:"智能家居",
labels:[
{
label: '音箱',
___index:0,
},
{
label: '门锁',
___index:1
},
{
label: '路由器',
___index:2
},
{
label: '智能设备',
___index:3
},
],
list:[
{
img: "https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
price: "120",
title:" 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用",
desc:"万家宝藏好店等你来",
url:'',
___index: 0
},
]
},
},
{
type: 'onlyGoodsModel',
name: '商品模块2',
icon: 'md-image',
options: {
list:[
{
img: "https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
price: "120",
title:" 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用",
desc:"万家宝藏好店等你来",
url:'',
},
]
},
},
{
type: 'mixModel',
name: '混合模块',
icon: 'md-image',
options: {
left:{
model:'goods',
//数据集合
data:{
image:{
url:"",
src:'https://lili-system.oss-cn-beijing.aliyuncs.com/mix-bg1.png',
size:"197 * 344"
},
list:[
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
],
badge:{
label:"精选",
url:""
}
}
},
right:{
model:'brand',
data:{
image:{
url:"",
src:'https://lili-system.oss-cn-beijing.aliyuncs.com/mix-bg2.png',
size:"254 * 344"
},
list:[
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
],
badge:"",
}
},
},
},
{
type: 'forYour',
name: '为你推荐',
icon: 'md-image',
options: {
model:'goods',
title:"为你推荐",
//数据集合
data:{
image:{
url:"",
src:'https://lili-system.oss-cn-beijing.aliyuncs.com/mix-bg3.png',
size:"197 * 344"
},
list:[
{
img:"https://lili-system.oss-cn-beijing.aliyuncs.com/example1.png",
title:"标题",
desc:"精品好物等你挑",
url:"",
size:"346 * 554"
},
{
img:"https://lili-system.oss-cn-beijing.aliyuncs.com/example2.png",
title:"标题",
desc:"精品好物等你挑",
url:"",
size:"190 * 156"
},
{
img:"https://lili-system.oss-cn-beijing.aliyuncs.com/example3.png",
title:"标题",
desc:"精品好物等你挑",
url:"",
size:"190 * 156"
},
{
img:"https://lili-system.oss-cn-beijing.aliyuncs.com/example4.png",
title:"标题",
desc:"精品好物等你挑",
url:"",
size:"190 * 156"
},
],
hot:{
title:"最近热卖",
list:[
{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},{
img:"https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
title:"商品标题",
price:"120",
url:"",
},
]
}
},
},
},
{
type: 'notEnough',
name: '还没逛够',

View File

@ -56,6 +56,10 @@
<template v-if="element.type == 'seckill'">
<seckill :data="element"></seckill>
</template>
<!-- 限时秒杀 待完善 -->
<template v-if="element.type == 'seckill-only-album'">
<seckill-only-album :data="element"></seckill-only-album>
</template>
<!-- 折扣广告 -->
<template v-if="element.type == 'discountAdvert'">
<div
@ -111,6 +115,26 @@
<template v-if="element.type == 'firstAdvert'">
<first-page-advert :data="element"></first-page-advert>
</template>
<!-- 商品模块 -->
<template v-if="element.type == 'goodsType'">
<goodsType :data="element" class="mb_20 width_1200_auto"></goodsType>
</template>
<!-- 商品模块2 -->
<template v-if="element.type == 'onlyGoodsModel'">
<onlyGoodsModel :data="element" class="mb_20 width_1200_auto"></onlyGoodsModel>
</template>
<!-- 混合模块 -->
<template v-if="element.type == 'mixModel'">
<mixModel :data="element" class="mb_20 width_1200_auto"></mixModel>
</template>
<!-- 为你推荐 -->
<template v-if="element.type == 'forYour'">
<forYour :data="element" class="mb_20 width_1200_auto"></forYour>
</template>
<!-- 一行三列 -->
<template v-if="element.type == 'oneRowThreeColumns'">
<oneRowThreeColumns :data="element" class="mb_20 width_1200_auto"></oneRowThreeColumns>
</template>
<!-- 横幅广告 -->
<template v-if="element.type == 'bannerAdvert'">
<div class="horizontal-advert setup-content">
@ -237,8 +261,15 @@ import NewGoodsSort from "./modelList/newGoodsSort.vue";
import Recommend from "./modelList/recommend.vue";
import NotEnough from "./modelList/notEnough.vue";
import Seckill from "./modelList/seckill.vue";
import goodsType from "./modelList/goodsAndType.vue";
import ossManage from "@/views/sys/oss-manage/ossManage";
import mixModel from "./modelList/mixModel.vue";
import forYour from "./modelList/forYour.vue";
import onlyGoodsModel from "./modelList/onlyGoodsModel.vue";
import oneRowThreeColumns from "./modelList/oneRowThreeColumns.vue";
import seckillOnlyAlbum from "./modelList/seckill-only-album.vue";
export default {
name: "modelFormItem",
props: ["element", "select", "index", "data"],
@ -251,7 +282,13 @@ export default {
FirstPageAdvert,
NotEnough,
Seckill,
goodsType,
ossManage,
oneRowThreeColumns,
"seckill-only-album":seckillOnlyAlbum,
onlyGoodsModel,
mixModel,
forYour
},
data() {
return {

View File

@ -0,0 +1,444 @@
<template>
<div class="model" v-if="data">
<div class="for-your">{{ data.options.title }}</div>
<div class="flex card">
<div class="left">
<img :src="data.options.data.image.src" alt="" />
</div>
<div class="right flex">
<!-- 商品区 -->
<div class="goods-list">
<div
class="goods-item"
:key="index"
v-for="(item, index) in data.options.data.list"
>
<div>
<div class="goods-name">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<img class="goods-img" :src="item.img" alt="" />
</div>
</div>
<!-- 热卖区 -->
<div class="hot-list">
<div class="hot-title">{{ data.options.data.hot.title }}</div>
<div
class="hot-item flex flex-a-c"
v-for="(item, index) in data.options.data.hot.list"
:key="index"
>
<img :src="item.img" alt="" />
<div class="hot-goods">
<div class="hot-goods-title">{{ item.title }}</div>
<div>
<div class="hot-price">{{ item.price | unitPrice }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="setup-box">
<div>
<Button size="small" @click.stop="handleSelectModel()">编辑 </Button>
</div>
</div>
</div>
<Modal
v-model="showModal"
title="装修"
draggable
width="800"
:z-index="100"
:mask-closable="false"
>
<div>
<div class="modal-tab-bar">
<div>
主标题:
<Input style="width: 200px" v-model="data.options.title"></Input>
</div>
<Divider>左侧商品部分</Divider>
<div class="flex">
<div>图片 :</div>
<div>
<img class="image" :src="data.options.data.image.src" alt="" />
<div>
<div>推荐尺寸{{ data.options.data.image.size }}</div>
<div class="link-src">
链接地址
<Input
style="width: 200px"
v-model="data.options.data.image.url"
disabled
/>
</div>
<Button
size="small"
type="primary"
@click="handleSelectImg('image')"
>选择图片
</Button>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectLink('image')"
>选择链接
</Button>
</div>
</div>
</div>
<Divider>中间商品部分</Divider>
<div class="flex column-list">
<div
v-for="(item, index) in data.options.data.list"
:key="index"
class="draggable"
>
<div class="flex">
<img :src="item.img" class="column-img" />
<div class="column-goods-list">
<div><Input v-model="item.title"></Input></div>
<div><Input v-model="item.desc"></Input></div>
<div><Input disabled v-model="item.url"></Input></div>
<div>{{ item.size }}</div>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectLink('list', index)"
>选择链接
</Button>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectImg('list', index)"
>选择图片
</Button>
</div>
</div>
</div>
</div>
<Divider>右侧商品部分</Divider>
<div class="flex">
<div>右侧标题 :</div>
<Input
style="width: 200px"
v-model="data.options.data.hot.title"
></Input>
</div>
<div class="flex column-list">
<div
v-for="(item, index) in data.options.data.hot.list"
:key="index"
class="draggable"
>
<div class="flex">
<img :src="item.img" class="column-img" />
<div class="column-goods-list">
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectGoods('hot', index)"
>选择商品
</Button>
</div>
</div>
</div>
</div>
</div>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
<!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage
@callback="callbackSelected"
:isComponent="true"
ref="ossManage"
/>
</Modal>
</div>
</template>
<script>
import ossManage from "@/views/sys/oss-manage/ossManage.vue";
export default {
name: "forYour",
data() {
return {
showModal: false,
picModelFlag: false,
selectedData: "", //
goodsIndex: 0, //
align: "",
defaultCallbackImageType: "",
current: "",
};
},
props: {
data: {
type: Object,
default: {},
},
},
components: {
ossManage,
},
mounted() {
},
methods: {
handleSelectImg(type, index) {
this.defaultCallbackImageType = type;
this.goodsIndex = index;
//
this.$refs.ossManage.selectImage = true;
this.picModelFlag = true;
},
handleSelectGoods(val, index) {
this.$refs.liliDialog.open("goods");
this.$refs.liliDialog.singleGoods();
this.selectedData = val;
this.goodsIndex = index;
},
handleSelectLink(val, index) {
//
this.$refs.liliDialog.open("link");
this.selectedData = val;
this.goodsIndex = index;
},
//
callbackSelected(val) {
this.picModelFlag = false;
if (this.defaultCallbackImageType == "image") {
this.data.options.data.image.src = val.url;
} else {
this.data.options.data[this.defaultCallbackImageType][
this.goodsIndex
].img = val.url;
}
},
//
selectedGoodsData(val) {
this.data.options.data.hot.list[this.goodsIndex].img = val[0].thumbnail;
this.data.options.data.hot.list[this.goodsIndex].title = val[0].goodsName;
this.data.options.data.hot.list[this.goodsIndex].price = val[0].price;
this.data.options.data.hot.list[this.goodsIndex].url =
this.$options.filters.formatLinkType(val[0]);
console.log(val, this.selectedData, this.goodsIndex);
},
//
selectedLink(val) {
console.log(val,this.selectedData)
if (this.selectedData == "image") {
this.data.options.data.image.url =
this.$options.filters.formatLinkType(val);
} else {
console.log(this.data.options.data.list,this.goodsIndex)
this.data.options.data.list[
this.goodsIndex
].url = this.$options.filters.formatLinkType(val);
}
},
/*
* 点击不同模块进行编辑
* 判断也很简单就是第一个第二个模块进行判断
*
* */
handleSelectModel() {
this.showModal = true;
},
},
};
</script>
<style scoped lang="scss">
@import "./setup-box.scss";
.goods-list {
display: flex;
width: 558px;
flex-wrap: wrap;
}
.goods-item {
width: 278px;
height: 277px;
text-align: center;
box-sizing: border-box;
border-right: 1.4px solid #e2e2e2;
&:nth-of-type(3) {
border-top: 1.4px solid #e2e2e2;
}
&:nth-of-type(4) {
border-top: 1.4px solid #e2e2e2;
}
}
.active {
color: #f31947;
}
.goods-name {
margin-top: 23px;
font-size: 25px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-img {
width: 190px;
height: 156px;
border-radius: 10px;
margin-top: 19px;
}
.goods-desc {
font-size: 14px;
font-weight: normal;
line-height: 17px;
text-align: center;
margin-top: 11px;
letter-spacing: 0px;
color: #333333;
}
.for-your {
font-size: 35px;
font-weight: normal;
line-height: 42px;
text-align: center;
letter-spacing: 0px;
margin-bottom: 32px;
color: #333333;
}
.column-goods-list {
> div {
margin: 10px;
}
}
.link-src {
margin: 10px 0;
}
.card,
.right-card {
opacity: 1;
background: #ffffff;
position: relative;
&:hover {
.setup-box {
display: block;
}
}
}
.column-img {
width: 100px;
height: 100px;
}
.column-list {
flex-wrap: wrap;
> div {
width: 50%;
}
}
.image {
max-width: 100px;
}
.modal-tab-bar {
> .flex {
align-items: center;
margin: 10px 0;
}
}
.draggable {
margin: 10px 0;
> .flex {
align-items: center;
}
}
.left {
width: 346px;
height: 554px;
border-radius: 9.8px 0px 0px 9.8px;
> img {
max-width: 100%;
height: 100%;
}
}
.right {
width: 839px;
height: 554px;
border-radius: 0px 9.8px 9.8px 0px;
}
.hot-list {
width: 279px;
}
.hot-title {
margin-left: 25px;
line-height: 63px;
font-size: 17px;
font-weight: normal;
letter-spacing: 0px;
color: #333333;
height: 63px;
}
.hot-item {
box-sizing: border-box;
border-top: 1.4px solid #e2e2e2;
height: 122px;
padding-left: 14px;
align-items: center;
> img {
width: 76.3px;
height: 77.7px;
}
}
.hot-goods {
margin-left: 14px;
}
.hot-goods-title {
font-size: 13px;
font-weight: normal;
line-height: 16px;
letter-spacing: 0px;
color: #333333;
}
.hot-price {
margin-top: 10.3px;
font-size: 24px;
font-weight: normal;
line-height: 29px;
letter-spacing: 0px;
color: #f31947;
}
</style>

View File

@ -0,0 +1,367 @@
<template>
<div class="goods-type-wrapper">
<div class="flex goods-type-line">
<div class="goods-type-title">{{ data.options.title }}</div>
<div class="flex goods-type-labels">
<div
@click="tabCurrentlyIndex = index"
:class="{ active: tabCurrentlyIndex === index }"
class="goods-type-item"
v-for="(item, index) in data.options.labels"
:key="index"
>
{{ item.label }}
</div>
</div>
</div>
<!-- 商品部分 -->
<div class="goods-list flex">
<div
class="goods-list-item"
v-for="(item, index) in data.options.list.filter((subset) => {
return subset.___index == tabCurrentlyIndex;
})"
:key="index"
>
<div class="goods-img">
<img :src="item.img" />
</div>
<div>
<div class="goods-name wes-2">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<div class="goods-price">
{{ item.price | unitPrice("¥") }}
</div>
</div>
<div class="setup-box">
<div>
<Button
size="small"
@click.stop="handleSelectModel(data.options.list)"
>编辑</Button
>
</div>
</div>
</div>
<Modal
v-model="showModal"
title="装修"
draggable
width="800"
:z-index="100"
:mask-closable="false"
>
<div class="modal-tab-bar">
<div class="tab-bar">
标题
<Input style="width: 300px" v-model="data.options.title"></Input>
</div>
<div class="tab-bar" v-if="data.options.labels[tabCurrentlyIndex]">
标签
<Input
style="width: 300px"
v-model="data.options.labels[tabCurrentlyIndex].label"
></Input>
</div>
<Tabs
type="card"
@on-click="handleClickTab"
:value="tabIndex"
:draggable="true"
>
<Button @click="handleTabsAdd" size="small" slot="extra">增加</Button>
<TabPane
v-for="(tab,tabIndex) in data.options.labels"
:key="tabIndex"
:label="tab.label"
:name="tab.___index + ''"
>
<div class="flex flex-a-c">
<Button class="del-btn" type="primary" @click="handleContextMenuDelete(tab,tabIndex)"></Button>
<Button class="add-goods" @click="addCurrentGoods">
添加商品
</Button>
</div>
<div
v-for="(item, index) in data.options.list.filter((subset) => {
return subset.___index == tabCurrentlyIndex;
})"
:key="index"
class="draggable"
>
<div class="flex">
<img :src="item.img" class="column-img" />
<div class="flex column-goods-config">
<div class="column-config">
<div>
标题
<Input v-model="item.title"></Input>
</div>
<div>
描述
<Input v-model="item.desc"></Input>
</div>
</div>
<Button @click="delGoods(item)"></Button>
</div>
</div>
</div>
</TabPane>
</Tabs>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
</div>
</template>
<script>
export default {
name: "goods",
props: {
data: {
type: Object,
default: {},
},
},
data() {
return {
tabIndex:0,
current: 0,
showModal: false,
selected: {}, //
picModelFlag: false,
tabCurrentlyIndex: 0, //
};
},
mounted(){
this.tabIndex = this.data.options.labels[0].___index
},
methods: {
/**
* 算出最大的index 然后索引叠加
*/
handleTabsAdd() {
let findAllIndex = this.data.options.labels.map((item) => {
return item.___index;
});
let max = Math.max.apply(null, findAllIndex);
this.data.options.labels.push({
label: "标签" + (max + 1),
___index: max + 1,
});
},
//
handleContextMenuDelete(item,index) {
//
this.data.options.list.forEach((lab,currently)=>{
if(lab.___index == item.___index){
this.data.options.list.splice(currently,1)
}
})
//
this.data.options.labels.splice(index,1)
},
//
delGoods(val) {
this.data.options.list.forEach((item, i) => {
if (
item.title == val.title &&
item.___index == this.tabCurrentlyIndex
) {
this.data.options.list.splice(i, 1);
}
});
},
//
handleClickTab(name) {
console.log(name)
this.tabCurrentlyIndex = name;
},
//
addCurrentGoods() {
this.$refs.liliDialog.clearGoodsSelected();
this.$refs.liliDialog.open("goods");
},
//
handleSelectModel(item) {
console.log(item);
this.selected = item;
this.showModal = true;
},
//
selectedGoodsData(val) {
if (val.length) {
val.forEach((item) => {
const pushGoodsDetail = {
img: item.thumbnail,
price: item.price,
title: item.goodsName,
desc: "",
url: `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`,
___index: this.tabCurrentlyIndex,
};
this.data.options.list.push(pushGoodsDetail);
});
}
},
//
selectedLink(val) {
this.selected[this.current].url =
this.$options.filters.formatLinkType(val);
this.selected[this.current].type =
val.___type === "other" && val.url === "" ? "link" : "other";
console.log(this.selected[this.current]);
},
handleSelectLink(index) {
//
this.$refs.liliDialog.open("link");
this.current = index;
},
},
};
</script>
<style scoped lang="scss">
@import "./setup-box.scss";
.goods-type-wrapper {
position: relative;
}
.del-btn{
margin-left:10px;
}
.tab-bar {
margin-bottom: 20px;
}
.draggable {
padding: 10px;
border-bottom: 1px solid #ededed;
transition: 0.35s;
&:hover {
background-color: #ededed;
}
}
.column-config {
margin-left: 10px;
> * {
margin: 4px;
}
}
.column-img {
width: 100px;
height: 100px;
}
.add-goods {
margin-left: 20px;
margin-bottom: 10px;
}
.goods-list {
position: relative;
flex-wrap: wrap;
justify-content: space-between;
&:hover {
> .setup-box {
display: block;
}
}
}
.column-goods-config {
flex: 2;
align-items: center;
justify-content: space-between;
}
.goods-list-item {
margin-bottom: 14.3px;
width: 287px;
height: 343.7px;
border-radius: 9.8px;
opacity: 1;
cursor: pointer;
background: #ffffff;
transition: 0.35s;
box-shadow: 0px 1px 13px 0px #e5e5e5;
&:hover {
box-shadow: 0px 1px 14px 0px #c5c5c5;
}
}
.goods-img {
text-align: center;
> img {
width: auto;
max-height: 183px;
}
}
.goods-name {
font-size: 18px;
font-weight: normal;
line-height: 22px;
text-align: center;
letter-spacing: 0px;
width: 200px;
margin: 0 auto 12.4px auto;
color: #333333;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-desc {
font-size: 14px;
font-weight: normal;
line-height: 17px;
text-align: center;
letter-spacing: 0px;
margin-bottom: 12.4px;
color: #666666;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-price {
font-size: 25.2px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #f31947;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-type-line {
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.goods-type-title {
font-size: 31px;
font-weight: normal;
line-height: 37px;
letter-spacing: 0px;
color: #333333;
}
.active {
color: #f31947;
}
.goods-type-labels {
font-size: 21px;
font-weight: normal;
line-height: 25px;
letter-spacing: 0px;
}
.goods-type-item {
margin-left: 28px;
}
</style>

View File

@ -0,0 +1,325 @@
<template>
<div class="mix-model">
<!-- 左侧 -->
<div class="left-card">
<left :data="data" />
<div class="setup-box">
<div>
<Button size="small" @click.stop="handleSelectModel('left')"
>编辑
</Button>
</div>
</div>
</div>
<!-- 右侧 -->
<div class="right-card">
<right :data="data" />
<div class="setup-box">
<div>
<Button size="small" @click.stop="handleSelectModel('right')"
>编辑
</Button>
</div>
</div>
</div>
<Modal
v-model="showModal"
title="装修"
draggable
width="800"
:z-index="100"
:mask-closable="false"
>
<div v-if="current">
<div class="modal-tab-bar">
<div>
当前模块 :
<ButtonGroup>
<Button :type="current.model == 'goods' ? 'primary' : 'default'"
>商品</Button
>
<Button :type="current.model == 'brand' ? 'primary' : 'default'"
>品牌</Button
>
</ButtonGroup>
</div>
<div class="flex">
<div>图片 :</div>
<div>
<img class="image" :src="current.data.image.src" alt="" />
<div>
<div>推荐尺寸{{ current.data.image.size }}</div>
<div class="link-src">
链接地址
<Input
style="width: 200px"
v-model="current.data.image.url"
disabled
/>
</div>
<Button
size="small"
type="primary"
@click="handleSelectImg('default')"
>选择图片
</Button>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectLink('image')"
>选择链接
</Button>
</div>
</div>
</div>
<div class="flex" v-if="current.model == 'goods'">
<div>标签 :</div>
<Input
style="width: 200px"
type="text"
v-model="current.data.badge.label"
/>
<Input
style="width: 100px; margin-left: 10px"
disabled
type="text"
v-model="current.data.badge.url"
/>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectLink('badge')"
>选择链接
</Button>
</div>
<div class="flex column-list">
<div
v-for="(item, index) in current.data.list"
:key="index"
class="draggable"
>
<div class="flex">
<img :src="item.img" class="column-img" />
<Button
size="small"
class="ml_10"
type="primary"
v-if="current.model == 'goods'"
@click="handleSelectGoods('list', index)"
>选择商品
</Button>
<div>
<div v-if="current.model == 'brand'" style="margin-bottom: 10px">
<Input disabled v-model="item.url" />
</div>
<Button
size="small"
class="ml_10"
type="primary"
v-if="current.model == 'brand'"
@click="handleSelectLink('list', index)"
>
选择链接
</Button>
<Button
size="small"
class="ml_10"
type="primary"
v-if="current.model == 'brand'"
@click="handleSelectImg('list', index)"
>选择图片
</Button>
</div>
</div>
</div>
</div>
</div>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
<!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage
@callback="callbackSelected"
:isComponent="true"
ref="ossManage"
/>
</Modal>
</div>
</template>
<script>
import left from "./mixs/mix-goods";
import right from "./mixs/mix-brand";
import ossManage from "@/views/sys/oss-manage/ossManage.vue";
export default {
name: "mixModel",
data() {
return {
showModal: false,
current: "", //
picModelFlag: false,
selectedData: "", //
goodsIndex: 0, //
align: "",
defaultCallbackImageType: "",
};
},
props: {
data: {
type: Object,
default: {},
},
},
components: {
left,
right,
ossManage,
},
mounted() {},
methods: {
handleSelectImg(type, index) {
this.defaultCallbackImageType = type;
this.goodsIndex = index;
//
this.$refs.ossManage.selectImage = true;
this.picModelFlag = true;
},
handleSelectGoods(val, index) {
this.$refs.liliDialog.open("goods");
this.$refs.liliDialog.singleGoods();
this.selectedData = val;
this.goodsIndex = index;
},
handleSelectLink(val, index) {
//
this.$refs.liliDialog.open("link");
this.selectedData = val;
this.goodsIndex = index;
},
//
callbackSelected(val) {
this.picModelFlag = false;
if (this.defaultCallbackImageType == "default") {
console.log(this.current.data.image);
this.current.data.image.src = val.url;
} else {
console.log(this.goodsIndex, this.data.options[this.align].data.list);
this.data.options[this.align].data.list[this.goodsIndex].img = val.url;
// this.data.options[this.align].data[this.selectedData][this.goodsIndex].url = val.img
}
},
//
selectedGoodsData(val) {
console.log(val);
this.$nextTick(() => {
this.data.options[this.align].data.list[this.goodsIndex].img =
val[0].thumbnail;
this.data.options[this.align].data.list[this.goodsIndex].title =
val[0].goodsName;
this.data.options[this.align].data.list[this.goodsIndex].price =
val[0].price;
this.data.options[this.align].data.list[this.goodsIndex].url =
val[0].url;
});
console.log(this.data.options[this.align].data.list[this.goodsIndex]);
this.$forceUpdate();
},
//
selectedLink(val) {
if (this.selectedData != "list") {
this.data.options[this.align].data[this.selectedData].url = this.$options.filters.formatLinkType(val);
console.log(this.data.options[this.align].data[this.selectedData])
}
if (this.selectedData == "list") {
this.data.options[this.align].data[this.selectedData][this.goodsIndex]
.url = this.$options.filters.formatLinkType(val);
}
},
/*
* 点击不同模块进行编辑
* 判断也很简单就是第一个第二个模块进行判断
*
* */
handleSelectModel(align) {
this.align = align;
this.current = this.data.options[align];
console.log(this.data.options[align]);
this.showModal = true;
},
},
};
</script>
<style scoped lang="scss">
@import "./setup-box.scss";
.link-src {
margin: 10px 0;
}
.mix-model {
display: flex;
justify-content: space-between;
}
.left-card,
.right-card {
width: 584px;
height: 344px;
border-radius: 10px;
opacity: 1;
background: #ffffff;
box-shadow: 0px 1px 13px 0px #e5e5e5;
position: relative;
&:hover {
.setup-box {
display: block;
}
}
}
.column-img {
width: 100px;
height: 100px;
}
.column-list {
flex-wrap: wrap;
> div {
width: 50%;
}
}
.image {
max-width: 100px;
}
.modal-tab-bar {
> .flex {
align-items: center;
margin: 10px 0;
}
}
.draggable {
> .flex {
align-items: center;
}
}
</style>

View File

@ -0,0 +1,131 @@
<template>
<div class="flex" v-if="data.options.right.model == 'brand'">
<div class="left-side" >
<img :src="data.options.right.data.image.src" alt="">
</div>
<div>
<div class="badge-box flex">
<div class="round">
<Icon type="ios-arrow-forward" />
</div>
</div>
<div class="flex goods-list">
<div class="goods-item flex" :key="index" v-for="(item,index) in data.options.right.data.list">
<div class="goods-thumbnail">
<img :src="item.img" alt="">
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "mix-goods",
data() {
return {}
},
props: {
data: {
type: Object,
default: {}
}
},
components: {},
mounted() {
},
methods: {}
}
</script>
<style scoped lang="scss">
.goods-detail{
}
.goods-detail-title{
font-size: 13px;
font-weight: normal;
line-height: 16px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-detail-price{
font-size: 14px;
font-weight: normal;
line-height: 17px;
letter-spacing: 0px;
color: #F31947;
margin-top: 8px;
margin-bottom:10px;
}
.goods-thumbnail{
margin-left: 7px;
display: flex;
align-items: center;
>img{
width:90px;
height: 90px;
}
}
.badge-box{
margin-top: 33px;
justify-content:right;
>.round{
width: 17.5px;
height: 17.5px;
opacity: 1;
border-radius: 50%;
text-align: center;
line-height: 17.5px;
border: 0.7px solid #333333;
margin-right: 17.5px;
}
}
.goods-list{
flex-wrap: wrap;
justify-content:space-between;
padding: 0 16px;
}
.goods-item{
display: flex;
align-items: center;
justify-content: center;
width:50%;
height: 85px;
border-radius: 9.8px;
opacity: 1;
transition: .35s;
background: #FFFFFF;
margin-bottom:9px;
}
.left-side {
>img{
width: 254px;
height: 344px;
border-radius: 9.8px 0px 0px 9.8px;
opacity: 1;
}
}
.badge {
width: 50px;
height: 27px;
line-height:27px;
border-radius: 13.3px 0px 0px 13.3px;
opacity: 1;
background: #F31947;
font-size: 12.6px;
font-weight: normal;
text-align: center;
letter-spacing: 0px;
color: #FFFFFF;
margin-top: 26px;
margin-bottom:17px;
}
</style>

View File

@ -0,0 +1,124 @@
<template>
<div class="flex" v-if="data.options.left.model == 'goods'">
<div class="left-side" >
<img :src="data.options.left.data.image.src" alt="">
</div>
<div>
<div class="badge-box flex">
<div class="badge">
{{data.options.left.data.badge.label}}
</div>
</div>
<div class="flex goods-list">
<div class="goods-item flex" :key="index" v-for="(item,index) in data.options.left.data.list">
<div class="goods-thumbnail">
<img :src="item.img" alt="">
</div>
<div class="goods-detail">
<div class="goods-detail-title">{{item.title}}</div>
<div class="goods-detail-price">{{item.price | unitPrice('¥')}}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "mix-goods",
data() {
return {}
},
props: {
data: {
type: Object,
default: {}
}
},
components: {},
mounted() {
},
methods: {}
}
</script>
<style scoped lang="scss">
.goods-detail{
}
.goods-detail-title{
font-size: 13px;
font-weight: normal;
line-height: 16px;
text-align: center;
letter-spacing: 0px;
color: #333333;
}
.goods-detail-price{
font-size: 14px;
font-weight: normal;
line-height: 17px;
letter-spacing: 0px;
color: #F31947;
margin-top: 8px;
margin-bottom:10px;
}
.goods-thumbnail{
margin-left: 7px;
display: flex;
align-items: center;
>img{
width:90px;
height: 90px;
}
}
.badge-box{
justify-content:right;
}
.goods-list{
flex-wrap: wrap;
justify-content:space-between;
padding: 0 16px;
}
.goods-item{
display: flex;
align-items: center;
width: 173.6px;
height: 119px;
border-radius: 9.8px;
opacity: 1;
transition: .35s;
background: #FFFFFF;
margin-bottom:9px;
&:hover{
box-shadow: 0px 1px 6px 0px #E5E5E5;
}
}
.left-side {
>img{
border-radius: 10px 0px 0px 10px;
display: block;
width: 196.7px;
height: 343.7px;
}
}
.badge {
width: 50px;
height: 27px;
line-height:27px;
border-radius: 13.3px 0px 0px 13.3px;
opacity: 1;
background: #F31947;
font-size: 12.6px;
font-weight: normal;
text-align: center;
letter-spacing: 0px;
color: #FFFFFF;
margin-top: 26px;
margin-bottom:17px;
}
</style>

View File

@ -0,0 +1,154 @@
<template>
<div class="line flex flex-j-sb">
<div class="column" v-for="(item,index) in data.options.list" :key="index">
<div v-if="!item.img" class="placeholder"></div>
<img v-else :src="item.img" class="three-column-img">
</div>
<div class="setup-box">
<div>
<Button
size="small"
@click.stop="handleSelectModel(data.options.list)"
>编辑</Button
>
</div>
</div>
<Modal
v-model="showModal"
title="装修"
draggable
width="800"
:z-index="100"
:mask-closable="false"
>
<div class="modal-tab-bar">
<div v-for="(item,index) in data.options.list" :key="index">
<img :src="item.img" class="three-column-img">
<div>推荐尺寸{{item.size}}</div>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectImg(index)"
>选择图片</Button
>
<Button
size="small"
class="ml_10"
type="primary"
@click="handleSelectLink(index)"
>选择链接</Button
>
</div>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
<!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage
@callback="callbackSelected"
:isComponent="true"
ref="ossManage"
/>
</Modal>
</div>
</template>
<script>
import ossManage from "@/views/sys/oss-manage/ossManage";
export default {
name: "oneRowThreeColumns",
components:{ossManage},
props: {
data: {
type: Object,
default: {}
}
},
data () {
return {
showModal:false,
selected: {}, //
picModelFlag:false,
current:0,
};
},
methods: {
//
callbackSelected(val) {
this.picModelFlag = false;
this.selected[this.current].img = val.url;
console.log(this.selected)
},
//
handleSelectModel(item) {
this.selected = item;
this.showModal = true;
},
//
selectedGoodsData(val) {
console.log(val);
let goods = val[0];
this.selected.img = goods.thumbnail;
this.selected.price = goods.price;
this.selected.name = goods.goodsName;
this.selected.url = `/goodsDetail?skuId=${goods.id}&goodsId=${goods.goodsId}`;
},
//
selectedLink(val) {
this.selected.url = this.$options.filters.formatLinkType(val);
this.selected.type =
val.___type === "other" && val.url === "" ? "link" : "other";
},
handleSelectLink(index) {
//
this.$refs.liliDialog.open("link");
this.current = index;
},
handleSelectImg(index){
//
this.$refs.ossManage.selectImage = true;
this.picModelFlag = true;
this.current = index;
}
}
}
</script>
<style scoped lang="scss">
@import "./setup-box.scss";
.three-column-img{
width:385px;
height: 165px
}
.line:hover{
>.setup-box{
display: block;
}
}
.placeholder{
background: #666;
width: 100%;
height: 100%;
}
.line{
position: relative;
justify-content: space-between;
}
.column{
width: 385px;
height: 165px;
>img{
width: 100%;
height: 100%;
}
}
</style>

View File

@ -0,0 +1,280 @@
<template>
<div class="goods-type-wrapper">
<!-- 商品部分 -->
<div class="goods-list flex">
<div
class="goods-list-item"
v-for="(item, index) in data.options.list"
:key="index"
>
<div>
<div class="goods-name wes-2">{{ item.title }}</div>
<div class="goods-desc">{{ item.desc }}</div>
</div>
<div class="goods-img">
<img :src="item.img" />
</div>
</div>
<div class="setup-box">
<div>
<Button
size="small"
@click.stop="handleSelectModel(data.options.list)"
>编辑</Button
>
</div>
</div>
</div>
<Modal
v-model="showModal"
title="装修"
draggable
width="800"
:z-index="100"
:mask-closable="false"
>
<div class="modal-tab-bar">
<div class="flex flex-a-c">
<Button class="add-goods" @click="addCurrentGoods">
添加商品
</Button>
</div>
<div
v-for="(item, index) in data.options.list"
:key="index"
class="draggable"
>
<div class="flex">
<img :src="item.img" class="column-img" />
<div class="flex column-goods-config">
<div class="column-config">
<div>
标题
<Input v-model="item.title"></Input>
</div>
<div>
描述
<Input v-model="item.desc"></Input>
</div>
</div>
<Button @click="delGoods(item,index)"></Button>
</div>
</div>
</div>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
</div>
</template>
<script>
export default {
name: "onlyGoodsList",
props: {
data: {
type: Object,
default: {},
},
},
data() {
return {
flag:false,
tabIndex:0,
current: 0,
showModal: false,
selected: {}, //
picModelFlag: false,
};
},
mounted(){
},
methods: {
//
delGoods(val,i) {
this.data.options.list.splice(i, 1);
},
//
addCurrentGoods() {
this.$refs.liliDialog.open("goods");
},
//
handleSelectModel(item) {
console.log(item);
this.selected = item;
this.showModal = true;
},
//
selectedGoodsData(val) {
if (val.length) {
val.forEach((item) => {
const pushGoodsDetail = {
img: item.thumbnail,
price: item.price,
title: item.goodsName,
desc: "",
url: `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`,
};
this.data.options.list.push(pushGoodsDetail);
});
}
},
//
selectedLink(val) {
this.selected[this.current].url =
this.$options.filters.formatLinkType(val);
this.selected[this.current].type =
val.___type === "other" && val.url === "" ? "link" : "other";
console.log(this.selected[this.current]);
},
handleSelectLink(index) {
//
this.$refs.liliDialog.open("link");
this.current = index;
},
},
};
</script>
<style scoped lang="scss">
@import "./setup-box.scss";
.goods-type-wrapper {
position: relative;
}
.del-btn{
margin-left:10px;
}
.tab-bar {
margin-bottom: 20px;
}
.draggable {
padding: 10px;
border-bottom: 1px solid #ededed;
transition: 0.35s;
&:hover {
background-color: #ededed;
}
}
.column-config {
margin-left: 10px;
> * {
margin: 4px;
}
}
.column-img {
width: 100px;
height: 100px;
}
.add-goods {
margin-left: 20px;
margin-bottom: 10px;
}
.goods-list {
position: relative;
flex-wrap: wrap;
justify-content: space-between;
&:hover {
> .setup-box {
display: block;
}
}
}
.column-goods-config {
flex: 2;
align-items: center;
justify-content: space-between;
}
.goods-list-item {
padding-top: 34.8px;
margin-bottom: 14.3px;
width: 287px;
height: 343.7px;
border-radius: 9.8px;
opacity: 1;
cursor: pointer;
background: #ffffff;
transition: 0.35s;
box-shadow: 0px 1px 13px 0px #e5e5e5;
&:hover {
box-shadow: 0px 1px 14px 0px #c5c5c5;
}
}
.goods-img {
text-align: center;
> img {
width: auto;
max-height: 183px;
}
}
.goods-name {
margin-bottom: 11.9px;
font-size: 25px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #333333;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-desc {
margin-bottom: 30px;
font-size: 16px;
font-weight: normal;
line-height: 19px;
text-align: center;
letter-spacing: 0px;
color: #666666;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-price {
font-size: 25.2px;
font-weight: normal;
line-height: 30px;
text-align: center;
letter-spacing: 0px;
color: #f31947;
-webkit-text-stroke: #979797 0.7px; /* 浏览器可能不支持 */
}
.goods-type-line {
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.goods-type-title {
font-size: 31px;
font-weight: normal;
line-height: 37px;
letter-spacing: 0px;
color: #333333;
}
.active {
color: #f31947;
}
.goods-type-labels {
font-size: 21px;
font-weight: normal;
line-height: 25px;
letter-spacing: 0px;
}
.goods-type-item {
margin-left: 28px;
}
</style>

View File

@ -0,0 +1,291 @@
<template>
<div class="seckill">
<div class="desc">秒杀商品需要在促销活动中添加商品有商品时才会在首页展示</div>
<div class="aside">
<div class="title">{{ actName }}</div>
<div class="hour">
<span>{{ currHour }}:00</span>点场 倒计时
</div>
<div class="count-down" v-if="actStatus === 1">
<span>{{ hours }}</span
><span>{{ minutes }}</span
><span>{{ seconds }}</span>
</div>
<div class="act-status" v-else>
{{ actStatus == 0 ? "未开始" : "已结束" }}
</div>
</div>
<div class="section">
<swiper ref="mySwiper" :options="swiperOptions">
<swiper-slide
v-for="(item, index) in options.list[0].goodsList"
:key="index"
>
<div class="content">
<img :src="item.img" width="140" height="140" :alt="item.name" />
<div class="ellipsis">{{ item.name }}</div>
<div>
<span>{{ item.price | unitPrice("¥") }}</span>
<span>{{ item.originalPrice | unitPrice("¥") }}</span>
</div>
</div>
</swiper-slide>
</swiper>
</div>
</div>
</template>
<script>
import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
import "swiper/swiper-bundle.css";
export default {
components: {
Swiper,
SwiperSlide,
},
directives: {
swiper: directive,
},
props: {
data: {
type: Object,
default: null,
},
},
data() {
return {
options: this.data.options, //
actStatus: 0, // 0 1 2
actName: "限时秒杀",
currHour: "00", //
diffSeconds: 0, //
hours: "00", //
minutes: "00", //
seconds: "00", //
interval: undefined, //
swiperOptions: {
//
slidesPerView: 5,
autoplay: true,
loop: true,
},
};
},
watch: {
diffSeconds(val) {
const hours = Math.floor(val / 3600);
// / 60
// 3600 / 60 = 60
// 60
const minutes = Math.floor(val / 60) % 60;
// % 60
const seconds = val % 60;
this.hours = hours < 10 ? "0" + hours : hours;
this.minutes = minutes < 10 ? "0" + minutes : minutes;
this.seconds = seconds < 10 ? "0" + seconds : seconds;
if (val === 0) {
clearInterval(this.interval);
this.hours = 0;
this.minutes = 0;
this.seconds = 0;
this.countDown(this.options.list);
}
},
},
mounted() {
this.countDown(this.options.list);
},
beforeDestroy() {
clearInterval(this.interval);
},
methods: {
//
countDown(list) {
/**
* 默认倒计时两小时
* 如果没有开始则显示未开始
* 进行中显示倒计时
* 今天的秒杀结束则显示已结束
*/
let nowHour = new Date().getHours();
if (nowHour < Number(list[0].time)) {
//
this.currHour = list[0].time;
this.actStatus = 0;
} else if (nowHour >= Number(list[list.length - 1].time + 2)) {
//
this.actStatus = 2;
this.currHour = list[list.length - 1].time;
} else {
//
this.actStatus = 1;
for (let i = 0; i < list.length; i++) {
if (nowHour == Number(list[i].time)) {
this.currHour = list[i].time;
}
if (
nowHour > Number(list[i].time) &&
nowHour < Number(list[i].time + 2)
) {
this.currHour = list[i].time;
}
}
// 0
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
//
this.diffSeconds = Math.floor(
(zeroTime +
3600 * 1000 * (this.currHour + 2) -
new Date().getTime()) /
1000
);
const that = this;
this.interval = setInterval(() => {
this.diffSeconds--;
}, 1000);
}
},
},
};
</script>
<style lang="scss" scoped>
.seckill {
width: 100%;
height: 260px;
display: flex;
position: relative;
.desc{
position: absolute;
color: $theme_color;
left: 200px;
top: 5px;
}
.aside {
overflow: hidden;
width: 190px;
height: 100%;
color: #fff;
background-image: url("../../../assets/seckillBg.png");
.title {
width: 100%;
text-align: center;
font-size: 28px;
margin-top: 31px;
}
.hour {
margin-top: 90px;
text-align: center;
span {
font-size: 18px;
}
}
.count-down {
margin: 10px 0 0 30px;
> span {
position: relative;
float: left;
width: 30px;
height: 30px;
text-align: center;
background-color: #2f3430;
margin-right: 20px;
color: white;
font-size: 20px;
&::after {
content: ":";
display: block;
position: absolute;
right: -20px;
font-weight: bolder;
font-size: 18px;
width: 20px;
height: 100%;
top: 0;
}
}
> span:last-child::after {
content: "";
}
}
.act-status {
margin: 10px 0 0 65px;
font-size: 20px;
}
}
.section {
width: 1000px;
// background: #efefef;
.swiper-slide {
height: 260px;
.content {
width: 200px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
&::after {
content: "";
display: block;
position: absolute;
top: 50%;
right: 0;
width: 1px;
height: 200px;
transform: translateY(-50%);
background: linear-gradient(180deg, white, #eeeeee, white);
}
img {
margin-top: 30px;
}
> div {
width: 160px;
margin-top: 10px;
font-size: 12px;
position: relative;
}
> div:nth-of-type(1):hover {
color: $theme_color;
cursor: pointer;
}
> div:nth-of-type(2) {
border: 1px solid $theme_color;
line-height: 24px;
display: flex;
text-align: center;
span:nth-child(1) {
color: #fff;
font-size: 16px;
width: 92px;
background-color: $theme_color;
position: relative;
&::before {
content: " ";
width: 0;
height: 0;
border-color: transparent white transparent transparent;
border-style: solid;
border-width: 24px 8px 0 0;
position: absolute;
top: 0;
left: 84px;
}
}
span:nth-child(2) {
color: #999;
width: 66px;
text-decoration: line-through;
}
}
}
}
}
}
</style>

View File

@ -107,8 +107,9 @@ export default {
display: flex;
}
.model-list {
width: 120px;
height: auto;
width: 130px;
height: 620px;
overflow-y: auto;
padding: 10px;
background: #fff;
margin-top: 60px;
@ -121,17 +122,21 @@ export default {
line-height: 30px;
}
.model-item {
width: 100px;
width: 110px;
height: 30px;
background: #eee;
margin-top: 10px;
line-height: 30px;
text-align: center;
color: #999;
transition:0.15s;
border-radius: 4px;
&:hover {
border: 1px dashed #409eff;
color: #409eff;
background: $theme_color;
cursor: move;
color: #fff;
}
}
.ghost::after {

View File

@ -149,7 +149,7 @@ import {
import Editor from "@tinymce/tinymce-vue";
import { initEditor } from "@/components/editor/config";
export default {
name: "article",
components: {
editor: Editor,
},

View File

@ -128,7 +128,7 @@ li {
$success_color: #68cabe;
$warning_color: #fa6419;
$error_color: #ff3c2a;
$theme_color: #FF5C58;
$theme_color: #F31947;
.theme_color {
color: $theme_color !important;
}

View File

@ -1,7 +1,7 @@
@import "~view-design/src/styles/index.less";
// iview 自定义样式
@primary-color: #ff5c58;
@primary-color: #F31947;
@info-color: #fa6419;
@success-color: #68cabe;
@error-color: #ff3c2a;