feat: 修改UI问题

merge-requests/68/head
xiaoguang 3 years ago
parent c867fb7246
commit 71af82d03c

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 188 KiB

@ -170,7 +170,7 @@ export default {
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
color: #999999; color: #999999;
border-radius: 8px 8px 8px 8px; border-radius: 4px;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
cursor: pointer; cursor: pointer;
.wrap-right-cart__tip { .wrap-right-cart__tip {
@ -181,16 +181,17 @@ export default {
border-radius: 50%; border-radius: 50%;
color: #ffffff; color: #ffffff;
margin-left: 4px; margin-left: 4px;
padding-top: 2px;
&--more { &--more {
width: unset; width: unset;
padding: 0 4px; padding: 2px 5px 0 4px;
border-radius: 7px; border-radius: 7px;
} }
} }
img { img {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin: 0 4px 0 10px; margin-right: 10px;
} }
} }
.header-cart-popover { .header-cart-popover {

@ -29,7 +29,7 @@
'menu-left__item--light': item.id === currentCategroyId, 'menu-left__item--light': item.id === currentCategroyId,
}" }"
> >
<img /> <img :src="item.icon" />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
</div> </div>
@ -198,6 +198,7 @@ export default {
box-shadow: 7px 0px 10px 1px rgba(0, 0, 0, 0.1); box-shadow: 7px 0px 10px 1px rgba(0, 0, 0, 0.1);
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
background: #ffffff; background: #ffffff;
border-radius: 0 4px 4px 0;
.category-menu-right__wrap { .category-menu-right__wrap {
height: 36px; height: 36px;
margin-top: 23px; margin-top: 23px;

@ -20,10 +20,10 @@
<img class="content-login-info__logo" :src="menuIcon" /> <img class="content-login-info__logo" :src="menuIcon" />
</div> </div>
<el-dropdown-menu slot="dropdown" class="header-info-bar__dropdown"> <el-dropdown-menu slot="dropdown" class="header-info-bar__dropdown">
<div class="menu-item__wrap flex flex-middle"> <!-- <div class="menu-item__wrap flex flex-middle">
<img class="menu-item-wrap__avatar" :src="userInfo.avatar" /> <img class="menu-item-wrap__avatar" :src="userInfo.avatar" />
<span>{{ userInfo.nickname }}</span> <span>{{ userInfo.nickname }}</span>
</div> </div> -->
<div class="menu-item__line"></div> <div class="menu-item__line"></div>
<el-dropdown-item <el-dropdown-item
class="flex flex-between flex-middle" class="flex flex-between flex-middle"
@ -47,11 +47,20 @@
<template> <template>
<div v-if="!menuVisible" class="header-wrap-content--line"></div> <div v-if="!menuVisible" class="header-wrap-content--line"></div>
<div <div
class="header-wrap-content__common flex flex-middle" class="header-wrap-content__common hover-text flex flex-middle"
@click="onJumpPersonalPage('message')" @click="onJumpPersonalPage('message')"
@mouseenter="messageHover = true"
@mouseleave="messageHover = false"
> >
<img src="~/assets/img/layout/icon-message.png" /> <img
<span class="hover-text">消息</span> v-show="messageHover"
src="~/assets/img/layout/icon-message-light.png"
/>
<img
v-show="!messageHover"
src="~/assets/img/layout/icon-message.png"
/>
<span>消息</span>
<div <div
v-if="messageCount > 0" v-if="messageCount > 0"
class="wrap-content-message__tip flex flex-center flex-middle" class="wrap-content-message__tip flex flex-center flex-middle"
@ -63,11 +72,17 @@
</template> </template>
<div class="header-wrap-content--line"></div> <div class="header-wrap-content--line"></div>
<div <div
class="header-wrap-content__common flex flex-middle" class="header-wrap-content__common hover-text flex flex-middle"
@click="onJumpPersonalPage('order/list')" @click="onJumpPersonalPage('order/list')"
@mouseenter="orderHover = true"
@mouseleave="orderHover = false"
> >
<img src="~/assets/img/layout/icon-order.png" /> <img
<span class="hover-text">我的订单</span> v-show="orderHover"
src="~/assets/img/layout/icon-order-light.png"
/>
<img v-show="!orderHover" src="~/assets/img/layout/icon-order.png" />
<span>我的订单</span>
</div> </div>
<div class="header-wrap-content--line"></div> <div class="header-wrap-content--line"></div>
<!-- 下载app --> <!-- 下载app -->
@ -76,13 +91,24 @@
placement="bottom" placement="bottom"
width="230" width="230"
trigger="hover" trigger="hover"
@show="phoneHover = true"
@hide="phoneHover = false"
> >
<div <div
slot="reference" slot="reference"
class="header-wrap-content__common flex flex-middle" class="header-wrap-content__common flex flex-middle"
> >
<img src="~/assets/img/layout/icon-phone.png" /> <img
<span class="hover-text">下载app</span> v-show="phoneHover"
src="~/assets/img/layout/icon-phone-light.png"
/>
<img
v-show="!phoneHover"
src="~/assets/img/layout/icon-phone.png"
/>
<span :class="{ 'wrap-content-common--light': phoneHover }"
>下载app</span
>
</div> </div>
<div class="info-bar-popover__qrcode"> <div class="info-bar-popover__qrcode">
<img src="~/assets/img/common/app-qrcode.png" /> <img src="~/assets/img/common/app-qrcode.png" />
@ -106,6 +132,9 @@ export default {
data() { data() {
return { return {
menuVisible: false, menuVisible: false,
orderHover: false,
phoneHover: false,
messageHover: false,
menuList: [ menuList: [
{ {
label: "个人中心", label: "个人中心",
@ -269,6 +298,9 @@ export default {
.header-wrap-content__common { .header-wrap-content__common {
cursor: pointer; cursor: pointer;
padding: 0 18px; padding: 0 18px;
.wrap-content-common--light {
color: #ff875b;
}
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;

@ -8,10 +8,9 @@
> >
<div class="sticky-bar-header__wrap flex flex-middle flex-between"> <div class="sticky-bar-header__wrap flex flex-middle flex-between">
<div class="flex flex-middle"> <div class="flex flex-middle">
<img <div class="bar-header-wrap__logo" @click="onOpenHomePage">
class="bar-header-wrap__logo" <img src="~/assets/img/layout/logo-sticky.png" />
src="~/assets/img/layout/logo-sticky.png" </div>
/>
<el-menu <el-menu
:default-active="tabPath" :default-active="tabPath"
mode="horizontal" mode="horizontal"
@ -62,7 +61,10 @@
<HeaderInfoBar /> <HeaderInfoBar />
<div class="default-bar-header"> <div class="default-bar-header">
<div class="bar-header-box"> <div class="bar-header-box">
<div class="bar-header-box__wrap flex flex-between flex-middle"> <div
class="bar-header-box__wrap flex flex-between flex-middle"
@click="onOpenHomePage"
>
<img <img
class="header-box-wrap__logo" class="header-box-wrap__logo"
src="~/assets/img/layout/logo.png" src="~/assets/img/layout/logo.png"
@ -74,14 +76,13 @@
v-model="searchContent" v-model="searchContent"
clearable clearable
placeholder="请输入商品名称" placeholder="请输入商品名称"
@keyup.enter.native="onSearch" @keyup.enter="onSearch"
> >
</el-input> </el-input>
</div> </div>
<div <div
slot="suffix" slot="suffix"
class="search-icon flex flex-center flex-middle" class="search-icon flex flex-center flex-middle"
@keyup.enter.native="onSearch"
@click="onSearch" @click="onSearch"
> >
<img src="~/assets/img/layout/icon-search.png" /> <img src="~/assets/img/layout/icon-search.png" />
@ -192,6 +193,9 @@ export default {
onOpenCartPage() { onOpenCartPage() {
window.open(`${location.origin}/cart`); window.open(`${location.origin}/cart`);
}, },
onOpenHomePage() {
this.$router.push("/");
},
}, },
}; };
</script> </script>
@ -220,6 +224,11 @@ export default {
width: 164px; width: 164px;
height: 28px; height: 28px;
margin-right: 50px; margin-right: 50px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
} }
.bar-header-wrap__icons { .bar-header-wrap__icons {
cursor: pointer; cursor: pointer;
@ -229,7 +238,7 @@ export default {
} }
.header-wrap-icons__shop { .header-wrap-icons__shop {
position: relative; position: relative;
margin-left: 14px; margin-left: 20px;
.wrap-icons-shop__tip { .wrap-icons-shop__tip {
position: absolute; position: absolute;
left: 18px; left: 18px;
@ -294,6 +303,7 @@ export default {
font-size: 14px; font-size: 14px;
margin-bottom: 38px; margin-bottom: 38px;
padding-right: 50px; padding-right: 50px;
cursor: pointer;
.header-box-wrap__logo { .header-box-wrap__logo {
width: 244px; width: 244px;
height: 100%; height: 100%;
@ -304,6 +314,7 @@ export default {
.search-input { .search-input {
width: 551px; width: 551px;
z-index: 1; z-index: 1;
border-radius: 4px;
/deep/.el-input__inner:focus { /deep/.el-input__inner:focus {
border-color: #ff512b; border-color: #ff512b;
} }
@ -312,7 +323,7 @@ export default {
width: 77px; width: 77px;
margin-left: -2px; margin-left: -2px;
background: linear-gradient(270deg, #ffa25a 0%, #ff7f39 100%); background: linear-gradient(270deg, #ffa25a 0%, #ff7f39 100%);
border-radius: 0px 8px 8px 0px; border-radius: 0px 4px 4px 0px;
z-index: 2; z-index: 2;
cursor: pointer; cursor: pointer;
img { img {
@ -334,6 +345,9 @@ export default {
font-size: 16px; font-size: 16px;
color: #666666; color: #666666;
cursor: pointer; cursor: pointer;
&:hover {
color: #ff875b;
}
} }
} }
} }

@ -19,7 +19,7 @@ export default {
{ name: 'format-detection', content: 'telephone=no' } { name: 'format-detection', content: 'telephone=no' }
], ],
link: [ link: [
{ rel: 'icon', type: 'image/x-icon', href: '/logo.png' } { rel: 'icon', type: 'image/x-icon', href: '/logo.ico' }
] ]
}, },
router: { router: {

@ -2,12 +2,8 @@
<div class="home-pick flex flex-between"> <div class="home-pick flex flex-between">
<!-- 甄选推荐 --> <!-- 甄选推荐 -->
<div v-if="showRecommend" class="home-pick-recommend"> <div v-if="showRecommend" class="home-pick-recommend">
<div <div class="home-pick--label flex flex-middle">
@click="onJumpGoodsList('recommend')"
class="home-pick--label flex flex-middle"
>
<strong>甄选推荐</strong> <strong>甄选推荐</strong>
<img src="~/assets/img/common/icon-jump.png" />
</div> </div>
<div class="home-pick-recommend__products flex flex-middle flex-between"> <div class="home-pick-recommend__products flex flex-middle flex-between">
<!-- 左侧商品一 --> <!-- 左侧商品一 -->
@ -74,12 +70,8 @@
</div> </div>
<!-- 新品上架 --> <!-- 新品上架 -->
<div v-if="showNew" class="home-pick-new"> <div v-if="showNew" class="home-pick-new">
<div <div class="home-pick--label flex flex-middle">
@click="onJumpGoodsList('new')"
class="home-pick--label flex flex-middle"
>
<strong>新品上架</strong> <strong>新品上架</strong>
<img src="~/assets/img/common/icon-jump.png" />
</div> </div>
<div class="home-pick-new__products flex"> <div class="home-pick-new__products flex">
<!-- 左侧商品 --> <!-- 左侧商品 -->
@ -175,9 +167,6 @@ export default {
onJumpGoodsDetail(id) { onJumpGoodsDetail(id) {
window.open(`${location.origin}/goods/detail/${id}`); window.open(`${location.origin}/goods/detail/${id}`);
}, },
onJumpGoodsList(type) {
window.open(`${location.origin}/goods/list?id=${type}`);
},
}, },
}; };
</script> </script>
@ -188,8 +177,6 @@ export default {
&--label { &--label {
font-size: 24px; font-size: 24px;
margin-bottom: 16px; margin-bottom: 16px;
width: 150px;
cursor: pointer;
img { img {
width: 16px; width: 16px;
height: 16px; height: 16px;
@ -228,9 +215,9 @@ export default {
height: 340px; height: 340px;
padding: 16px 20px; padding: 16px 20px;
background: #ffffff; background: #ffffff;
border-radius: 2px; border-radius: 4px;
&--tag-wrap { &--tag-wrap {
margin-bottom: 16px; margin-bottom: 8px;
.tag-wrap__item { .tag-wrap__item {
width: 40px; width: 40px;
height: 20px; height: 20px;
@ -243,18 +230,19 @@ export default {
} }
&--second_kill { &--second_kill {
color: #3083ff; color: #3083ff;
background: #3083ff; background: rgba(48, 131, 255, 0.1);
} }
&--recommended { &--recommended {
color: #ff875b; color: #ff875b;
background: #ff875b; background: rgba(255, 135, 91, 0.1);
} }
} }
} }
&--title { &--title {
display: block; display: block;
font-size: 18px; width: 140px;
margin-bottom: 8px; font-size: 16px;
margin-bottom: 6px;
@include ellipsis; @include ellipsis;
} }
&--subtitle { &--subtitle {
@ -291,7 +279,7 @@ export default {
height: 122px; height: 122px;
position: relative; position: relative;
background: #f8f7f8; background: #f8f7f8;
padding: 14px 0 14px 20px; padding: 10px 0 10px 20px;
} }
.recommend-products-right__cover { .recommend-products-right__cover {
position: absolute; position: absolute;
@ -313,6 +301,7 @@ export default {
height: 340px; height: 340px;
padding: 14px 20px 16px 20px; padding: 14px 20px 16px 20px;
background: #ffffff; background: #ffffff;
border-radius: 4px;
&__products { &__products {
cursor: pointer; cursor: pointer;
.pick-new-products__left { .pick-new-products__left {

@ -189,6 +189,7 @@ export default {
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 4px 0 0 4px;
.home-sckill-title { .home-sckill-title {
display: block; display: block;
font-size: 28px; font-size: 28px;
@ -229,19 +230,27 @@ export default {
.home-sckill-carousel { .home-sckill-carousel {
/deep/.el-carousel { /deep/.el-carousel {
width: 1010px; width: 1010px;
border-radius: 4px;
.el-carousel__container { .el-carousel__container {
padding: 0 10px; padding: 0 10px;
background: #ffffff; background: #ffffff;
.el-carousel__arrow { .el-carousel__arrow {
border-radius: 45%;
i { i {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
&--left { &--left {
left: -11px; left: -11px;
i {
margin-left: 5px;
}
} }
&--right { &--right {
right: -11px; right: -11px;
i {
margin-right: 5px;
}
} }
} }
} }

@ -1,5 +1,9 @@
<template> <template>
<div class="home-tabbar-fixed flex"> <div
v-if="tabBarVisible"
class="home-tabbar-fixed flex"
:class="{ 'home-tabbar-fixed--change': appHover }"
>
<div v-show="appHover" class="home-tabbar-fixed__qrcode"> <div v-show="appHover" class="home-tabbar-fixed__qrcode">
<img src="~/assets/img/common/app-qrcode.png" /> <img src="~/assets/img/common/app-qrcode.png" />
<p>扫一扫上方二维码 下载APP</p> <p>扫一扫上方二维码 下载APP</p>
@ -23,11 +27,8 @@
@click="onConcatCustomer" @click="onConcatCustomer"
class="tabbar-fixed-box__common flex flex-middle" class="tabbar-fixed-box__common flex flex-middle"
> >
<span v-show="customerHover"></span> <span v-show="customerHover"></span>
<img <img v-show="!customerHover" src="~/assets/img/home/icon-message.png" />
v-show="!customerHover"
src="~/assets/img/home/icon-customer.png"
/>
</div> </div>
<div v-show="showToTop"> <div v-show="showToTop">
<div class="tabbar-fixed-box__line"></div> <div class="tabbar-fixed-box__line"></div>
@ -61,6 +62,7 @@ export default {
appHover: false, appHover: false,
customerHover: false, customerHover: false,
totopHover: false, totopHover: false,
tabBarVisible: false,
}; };
}, },
computed: { computed: {
@ -68,7 +70,16 @@ export default {
return this.scrollTop > 400; return this.scrollTop > 400;
}, },
}, },
mounted() {
this.getTabBarVisible();
},
methods: { methods: {
getTabBarVisible() {
const clientWidth = document.body.clientWidth;
if (clientWidth >= 1200) {
this.tabBarVisible = true;
}
},
onConcatCustomer() { onConcatCustomer() {
if (!this.$isLoginValidate()) { if (!this.$isLoginValidate()) {
return; return;
@ -83,9 +94,13 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.home-tabbar-fixed { .home-tabbar-fixed {
position: fixed; position: fixed;
right: 270px; z-index: 99;
left: 50%;
top: 568px; top: 568px;
z-index: 10; margin-left: 630px;
&--change {
margin-left: 390px;
}
.home-tabbar-fixed__qrcode { .home-tabbar-fixed__qrcode {
width: 230px; width: 230px;
height: 260px; height: 260px;
@ -93,7 +108,7 @@ export default {
box-shadow: 0px 4px 30px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 4px 30px 1px rgba(0, 0, 0, 0.1);
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
padding: 22px; padding: 22px 20px;
margin-right: 10px; margin-right: 10px;
img { img {
width: 186px; width: 186px;

@ -282,7 +282,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.seckill { .seckill {
background: #f8f8f8; background: #f8f8f8;
padding-bottom: 42px; padding-bottom: 60px;
.seckill-header-sticky { .seckill-header-sticky {
position: fixed; position: fixed;
left: 50%; left: 50%;
@ -342,6 +342,9 @@ export default {
&:not(:nth-child(4n)) { &:not(:nth-child(4n)) {
margin-right: calc(4% / 3); margin-right: calc(4% / 3);
} }
&:hover {
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.1);
}
.seckill-products-wrap__cover { .seckill-products-wrap__cover {
width: 100%; width: 100%;
height: 288px; height: 288px;
@ -390,7 +393,6 @@ export default {
} }
} }
.seckill-pagination { .seckill-pagination {
margin-top: 60px;
.btn-confirm { .btn-confirm {
width: 81px; width: 81px;
height: 32px; height: 32px;

@ -2,6 +2,7 @@ export default ({ app }) => {
app.router.beforeEach((to, from, next) => { app.router.beforeEach((to, from, next) => {
const { token, userInfo } = app.store.state; const { token, userInfo } = app.store.state;
if (token) { if (token) {
// 获取用户信息
if (Object.keys(userInfo).length === 0) { if (Object.keys(userInfo).length === 0) {
app.store.dispatch("getUserInfo"); app.store.dispatch("getUserInfo");
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

Loading…
Cancel
Save