楼层装修新特征

master
学习很差啦 2023-03-22 16:22:01 +08:00
parent bf58711c88
commit 500afcc33f
35 changed files with 1924 additions and 408 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,14 +10,14 @@ $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;
@ -283,8 +283,18 @@ 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;
}

View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="container">
<div class="navbar" :class="{'small-search-box':useClass == 'fixed-show'}">
<div class="container 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">
<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() {
@ -111,27 +121,65 @@ 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;
}
.search-input {
}
.container {
position: relative;
width: 1200px;
margin: 0 auto;
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;
@ -139,28 +187,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,110 @@
<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:"会员中心"
},
{
icon:"consumer",
label:"客服"
},
{
icon:"notification",
label:"消息"
},
{
icon:"feedback",
label:"反馈"
},
{
icon:"back",
label:"顶部"
},
],
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.icon === 'back'){
this.scrollToTop()
}
}
}
}
</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">
<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,91 @@ 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;
border-left: 1px solid #ccc !important;
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 +285,7 @@ export default {
line-height: 20px;
}
.go-to-buy {
display: flex;
justify-content: flex-end;
}
.shopping-cart-null {
padding: 15px;
display: flex;
@ -301,22 +293,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 +336,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 +367,7 @@ export default {
left: 0;
}
}
&:hover {
.drop-items {
display: block;
@ -382,11 +383,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 +397,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 +417,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 +449,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,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,11 @@
<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 == 'newGoodsSort'">
<new-goods-sort
@ -100,7 +105,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 +131,7 @@ 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";
export default {
name: "modelFormItem",
@ -139,6 +145,7 @@ export default {
FirstPageAdvert,
NotEnough,
Seckill,
oneRowThreeColumns
},
data() {
return {
@ -153,7 +160,11 @@ export default {
position: relative;
margin-bottom: 10px;
}
.bannerAd{
width: 1183px;
height: 166.6px;
border-radius: 10px;
}
/** 热门广告 */
.advert-list {
background: $theme_color;
@ -201,6 +212,6 @@ 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>
@ -21,47 +20,62 @@
</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>
<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 flex flex-j-sb" @click="entryControl">
<div class="icon-item" :key="index" 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" @click="entryControl">
<div class="icon-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" @click="entryControl">
<div class="icon-item" :key="index" 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 +83,225 @@ 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:"宝贝收藏"
},
{
icon:"shop",
label:"收藏店铺"
},
{
icon:"carts",
label:"购物车"
},
{
icon:"story",
label:"我的足迹"
},
],
appendList:[
{
icon:"support",
label:"帮助中心"
},
{
icon:"feedback",
label:"问题反馈"
},
{
icon:"notice",
label:"平台公告"
},
{
icon:"notification",
label:"我的消息"
},
],
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(){
},
},
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,45 +310,47 @@ 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;
}
/*导航内容*/
.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 {
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 {

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,132 @@
<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 :class="{'active':current === index}" class="goods-type-item" v-for="(item,index) in data.options.labels" :key="index">
{{item.label}}
</div>
</div>
</div>
<!-- 商品部分 -->
<div class="goods-list">
<div class="goods-list-item" v-for="(item,index) in data.options.list" :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>
</div>
</template>
<script>
export default {
name: "goods",
props: {
data: {
type: Object,
default: {}
}
},
data(){
return{
current:0
}
},
methods:{
}
}
</script>
<style scoped lang="scss">
.goods-list-item{
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,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

@ -16,7 +16,6 @@ export default {
methods: {
// im
async IMService(id) {
// 访Token
let accessToken = Storage.getItem("accessToken");
await this.getIMDetailMethods();

View File

@ -1,22 +1,22 @@
<template>
<div class="cate-nav">
<div class="cate-nav" :class="{'fixed-show':useClass == 'fixed-show'}">
<div class="nav-con" >
<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>
@ -131,6 +131,10 @@ export default {
default: false,
type: Boolean,
},
useClass:{
type:null,
default:''
}
},
data() {
return {
@ -226,43 +230,77 @@ export default {
.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;
}
}
}
@ -275,13 +313,28 @@ export default {
}
.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 +347,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 +382,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 +401,7 @@ export default {
text-align: right;
}
.detail-item-title:hover {
color: #e1251b;
color: $theme_color;
}
.detail-item-row {
display: flex;
@ -373,6 +421,6 @@ export default {
}
}
.detail-item:hover {
color: #e1251b;
color: $theme_color;
}
</style>

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"></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,37 @@ export default {
transform: translateZ(0);
top: 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: 400px;
}
}
</style>

View File

@ -7,6 +7,7 @@ var BASE = {
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",

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

@ -300,6 +300,25 @@ export const modelData = [{
]
},
},
{
type: 'seckill-only-album',
name: '促销活动-图片版',
icon: 'md-image',
showName: '',
options: {
list: [{
time: 6,
goodsList: [{
img: require('@/assets/nav/1.jpg'),
url: ''
},
]
},
]
},
},
{
type: 'discountAdvert',
name: '折扣广告',
@ -681,6 +700,67 @@ 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:"万家宝藏好店等你来",
___index: 0
},
]
},
},
{
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,14 @@
<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>
<!-- 一行三列 -->
<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 +249,11 @@ 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 oneRowThreeColumns from "./modelList/oneRowThreeColumns.vue";
import seckillOnlyAlbum from "./modelList/seckill-only-album.vue";
export default {
name: "modelFormItem",
props: ["element", "select", "index", "data"],
@ -251,7 +266,10 @@ export default {
FirstPageAdvert,
NotEnough,
Seckill,
goodsType,
ossManage,
oneRowThreeColumns,
"seckill-only-album":seckillOnlyAlbum
},
data() {
return {

View File

@ -0,0 +1,253 @@
<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 :class="{'active':current === index}" class="goods-type-item" v-for="(item,index) in data.options.labels" :key="index">
{{item.label}}
</div>
</div>
</div>
<!-- 商品部分 -->
<div class="goods-list">
<div class="goods-list-item" v-for="(item,index) in data.options.list" :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>
<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">
<Tabs type="card" :draggable="true" @on-drag-drop="handleDragDrop">
<TabPane v-for="(tab, index) in data.options.labels" :key="index" :label="tab.label" :name="index">
</TabPane>
</Tabs>
<div v-for="(item,index) in data.options.list" :key="index">
<img :src="item.img" class="column-img">
<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: "goods",
components:{ossManage},
props: {
data: {
type: Object,
default: {}
}
},
data(){
return{
current:0,
showModal:false,
selected: {}, //
picModelFlag:false,
}
},
methods:{
handleDragDrop (name, newName, a, b, names) {
// names name
this.data.options.labels.splice(b,1,...this.data.options.labels.splice(a, 1 , this.data.options.labels[b]));
},
//
callbackSelected(val) {
this.picModelFlag = false;
this.selected[this.current].img = val.url;
console.log(this.selected)
},
//
handleSelectModel(item) {
console.log(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";
.goods-type-wrapper{
position: relative;
&:hover{
>.setup-box{
display: block;
}
}
}
.column-img{
width: 100px;
height: 100px;
}
.goods-list-item{
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,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,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,7 +107,7 @@ export default {
display: flex;
}
.model-list {
width: 120px;
width: 130px;
height: auto;
padding: 10px;
background: #fff;
@ -121,17 +121,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

@ -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;