合并部分代码 回滚规格

This commit is contained in:
lemon橪
2022-02-16 11:22:35 +08:00
27 changed files with 606 additions and 627 deletions

View File

@@ -10,7 +10,7 @@ $warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ff5c58;
$theme_color: #e4393c;
$border_color: #dddee1;
$title_color: #8c8c8c;

View File

@@ -147,9 +147,11 @@ export default {
cursor: pointer;
}
.store-search{
width:63px;
padding: 0 9px;
border-radius: 0;
&:nth-child(2){
width:62px;
margin-left: -5px;
}
}

View File

@@ -43,7 +43,7 @@
{{config.icpCard}}
</a>
</li>
<li v-if="config.icpMessage">
<li v-if="config.icpMessage" class="footer-bottmom">
<a href="https://beian.miit.gov.cn/" target="_blank">
{{config.icpMessage}}
</a>
@@ -51,7 +51,7 @@
</div>
</div>
<div class="information">
<div class="information footer-bottmom">
<a class="flex " :href="config.company.href">
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
@@ -173,12 +173,19 @@ export default {
cursor: pointer;
line-height: 26px;
}
.servece-type-info li:hover{
color:#b8b8be;
}
.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;
}
.friend-link {
display: flex;
align-items: flex-start;
@@ -207,6 +214,17 @@ export default {
padding: 5px 0px;
float: left;
}
.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;

View File

@@ -61,12 +61,9 @@ export default {
<style lang="scss" scoped>
.content {
width: 1200px;
height: 100%;
margin: auto;
position: fixed;
top: 0;
left: 50%;
margin-left: -600px;
height: 40px;
margin: 10px auto;
position: relative;
}
.cate {
float: left;

View File

@@ -2,13 +2,19 @@
<div class="model-item" v-if="element && element.key">
<!-- 轮播图模块包括个人信息快捷导航模块 -->
<template v-if="element.type == 'carousel'">
<model-carousel :data="element" class="mb_20 width_1200_auto"></model-carousel>
<model-carousel
:data="element"
class="mb_20 width_1200_auto"
></model-carousel>
</template>
<template v-if="element.type == 'carousel1'">
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
</template>
<template v-if="element.type == 'carousel2'">
<model-carousel2 :data="element" class="mb_20 width_1200_auto"></model-carousel2>
<model-carousel2
:data="element"
class="mb_20 width_1200_auto"
></model-carousel2>
</template>
<!-- 热门广告 -->
<template v-if="element.type == 'hotAdvert'">
@@ -37,13 +43,16 @@
</template>
<!-- 限时秒杀 待完善 -->
<template v-if="element.type == 'seckill' && element.options.list.length">
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
</template>
<!-- 折扣广告 -->
<template v-if="element.type == 'discountAdvert'">
<div
class="discountAdvert"
:style="{'backgroundImage' :'url(' + require('@/assets/images/decorate.png') + ')'}"
:style="{
backgroundImage:
'url(' + require('@/assets/images/decorate.png') + ')',
}"
>
<img
@click="linkTo(item.url)"
@@ -74,44 +83,53 @@
</template>
<!-- 新品排行 -->
<template v-if="element.type == 'newGoodsSort'">
<new-goods-sort :data="element" class="mb_20 width_1200_auto"></new-goods-sort>
<new-goods-sort
:data="element"
class="mb_20 width_1200_auto"
></new-goods-sort>
</template>
<!-- 首页广告 -->
<template v-if="element.type == 'firstAdvert'">
<first-page-advert :data="element" class="mb_20 width_1200_auto"></first-page-advert>
<first-page-advert
:data="element"
class="mb_20 width_1200_auto"
></first-page-advert>
</template>
<!-- 横幅广告 -->
<template v-if="element.type == 'bannerAdvert'">
<div style="width:100%; text-align: center;">
<img
width="1200"
class="hover-pointer mb_20"
@click="linkTo(element.options.url)"
:src="element.options.img"
alt=""
/>
<template v-if="element.type == 'bannerAdvert'">
<div style="width: 100%; text-align: center">
<img
width="1200"
class="hover-pointer mb_20"
@click="linkTo(element.options.url)"
:src="element.options.img"
alt=""
/>
</div>
</template>
<template v-if="element.type == 'notEnough'">
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
<template v-if="element.type == 'notEnough'"
>
<not-enough
:data="element"
class="mb_20 width_1200_auto"
></not-enough>
</template>
</div>
</template>
<script>
import ModelCarousel from './modelList/Carousel.vue';
import ModelCarousel1 from './modelList/Carousel1.vue';
import ModelCarousel2 from './modelList/Carousel2.vue';
import FirstPageAdvert from './modelList/FirstPageAdvert.vue';
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 ModelCarousel from "./modelList/Carousel.vue";
import ModelCarousel1 from "./modelList/Carousel1.vue";
import ModelCarousel2 from "./modelList/Carousel2.vue";
import FirstPageAdvert from "./modelList/FirstPageAdvert.vue";
import NewGoodsSort from "./modelList/NewGoodsSort.vue";
import Recommend from "./modelList/Recommend.vue";
import NotEnough from "./modelList/NotEnough.vue";
import Seckill from "./modelList/Seckill.vue";
export default {
name: 'modelFormItem',
props: ['element', 'select', 'index', 'data'],
name: "modelFormItem",
props: ["element", "select", "index", "data"],
components: {
ModelCarousel,
ModelCarousel1,
@@ -120,18 +138,17 @@ export default {
NewGoodsSort,
FirstPageAdvert,
NotEnough,
Seckill
Seckill,
},
data () {
data() {
return {
showModal: false, // 控制模态框显隐
selected: {} // 已选数据
selected: {}, // 已选数据
};
}
},
};
</script>
<style lang="scss" scoped>
.model-item {
position: relative;
margin-bottom: 10px;
@@ -181,7 +198,7 @@ export default {
}
}
.width_1200_auto{
.width_1200_auto {
width: 1200px;
margin: 0 auto;
background-color: #fff;

View File

@@ -23,12 +23,18 @@
<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>Hi{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
<div>
Hi, {{
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
}}
</div>
<div v-if="userInfo.id">
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
<Button class="btns" shape="circle" @click="$router.push('home')"
>会员中心</Button
>
</div>
<div v-else>
<Button type="error" @click="$router.push('login')" shape="circle"
<Button class="btns" @click="$router.push('login')" shape="circle"
>请登录</Button
>
</div>
@@ -37,8 +43,14 @@
<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
class="ellipsis"
:alt="article.title"
v-for="(article, index) in articleList"
:key="index"
@click="goArticle(article.id)"
>
{{ article.title }}
</li>
</ul>
</div>
@@ -49,45 +61,48 @@
</template>
<script>
import {articleList} from '@/api/common.js'
import storage from '@/plugins/storage';
import { articleList } from "@/api/common.js";
import storage from "@/plugins/storage";
export default {
name: 'modelCarousel',
props: ['data'],
data () {
name: "modelCarousel",
props: ["data"],
data() {
return {
config:require('@/config'),
config: require("@/config"),
userInfo: {}, // 用户信息
articleList: [], // 常见问题
params: { // 请求常见问题参数
params: {
// 请求常见问题参数
pageNumber: 1,
pageSize: 5,
type: 'ANNOUNCEMENT',
sort: 'sort'
}
type: "ANNOUNCEMENT",
sort: "sort",
},
};
},
methods: {
getArticleList () { // 获取常见问题列表
articleList(this.params).then(res => {
getArticleList() {
// 获取常见问题列表
articleList(this.params).then((res) => {
if (res.success) {
this.articleList = res.result.records
this.articleList = res.result.records;
}
})
},
goArticle (id) { // 跳转文章详情
let routeUrl = this.$router.resolve({
path: '/article',
query: {id}
});
window.open(routeUrl.href, '_blank');
}
},
goArticle(id) {
// 跳转文章详情
let routeUrl = this.$router.resolve({
path: "/article",
query: { id },
});
window.open(routeUrl.href, "_blank");
},
},
mounted() {
if (storage.getItem("userInfo"))
this.userInfo = JSON.parse(storage.getItem("userInfo"));
this.getArticleList();
},
mounted () {
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo'));
this.getArticleList()
}
};
</script>
@@ -98,6 +113,16 @@ export default {
overflow: hidden;
}
.btns {
background-color:#363634 ;
line-height:30px;
color: white !important;
}
.btns:hover {
background-color: #363634;
line-height:32px !important;
color: #e5d790 !important;
}
/* 导航主体 */
.nav-body {
width: 1200px;
@@ -130,12 +155,14 @@ export default {
flex-direction: column;
margin: 20px auto;
button {
height: 25px !important;
height: 30px !important;
margin-top: 10px;
line-height: 30px;
border: none;
}
.ivu-btn-default {
color: $theme_color;
border-color: $theme_color;
// color: $theme_color;
// border-color: $theme_color;
}
img {
margin-bottom: 10px;

View File

@@ -1,16 +1,18 @@
<template>
<div class="not-enough">
<ul class="nav-bar">
<li
v-for="(item, index) in conData.options.navList"
:class="currentIndex === index ? 'curr' : ''"
@click="changeCurr(index)"
:key="index"
>
<p>{{ item.title }}</p>
<p>{{ item.desc }}</p>
</li>
</ul>
<div class="not-enough" ref="obtain" id="demo">
<Affix :offset-top="62" @on-change="change">
<ul class="nav-bar" v-show="topSearchShow">
<li
v-for="(item, index) in conData.options.navList"
:class="currentIndex === index ? 'curr' : ''"
@click="changeCurr(index)"
:key="index"
>
<p @click="gotoDemo">{{ item.title }}</p>
<p @click="gotoDemo">{{ item.desc }}</p>
</li>
</ul>
</Affix>
<div class="content" v-if="showContent">
<div
v-for="(item, index) in conData.options.list[currentIndex]"
@@ -29,17 +31,26 @@
</template>
<script>
export default {
mounted() {
window.addEventListener('scroll',this.handleScrollx,true)
},
props: {
data: {
type: Object,
default: null
}
default: null,
},
},
data () {
data() {
return {
screenHeight:document.body.clientHeight,
scrollHieght:0,
topSearchShow: true, //展示 导航条
topIndex: 0, // 当前滚动条位置 (取整)
scrollTops: 0,
open:'',
currentIndex: 0, // 当前分类下标
conData: this.data, // 装修数据
showContent: true // 是否展示内容
showContent: true, // 是否展示内容
};
},
watch: {
@@ -47,14 +58,40 @@ export default {
this.conData = val;
},
conData: function (val) {
this.$emit('content', val);
}
this.$emit("content", val);
},
},
methods: {
changeCurr (index) { // 选择分类
this.currentIndex = index;
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;
}
},
toguid(path,id){
var path =path;
var Id = id;
localStorage.setItem('toId',Id);
this.$router.push(path);
},
change(status){ //获取是否获取到图钉
this.open = status
},
gotoDemo(){ // 跳转到demo的位置
if(this.open){ // 获取到图钉之后在跳转当前位置
document.querySelector("#demo").scrollIntoView(true);
}
}
//scrollIntoView()可以在所有的HTML元素上调用通过滚动浏览器窗口或某个容器元素
},
changeCurr(index) {
// 选择分类
this.currentIndex = index;
},
},
};
</script>
<style lang="scss" scoped>
@@ -63,10 +100,13 @@ export default {
justify-content: center;
width: 100%;
margin-bottom: 10px;
background-color: #f3f5f7;
background-color: #f8f8f8;
height: 60px;
align-items: center;
position: relative;
position: sticky;
position: -webkit-sticky;
top: 0;
li {
padding: 0 30px;
text-align: center;
@@ -140,5 +180,6 @@ export default {
}
}
}
}
</style>

View File

@@ -1,28 +1,54 @@
<template>
<div class="cate-nav">
<div class="nav-con">
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
<div
class="all-categories hover-pointer"
@mouseenter="showFirstList = true"
@mouseleave="showFirstList = false"
>
全部商品分类
</div>
<ul class="nav-item" v-if="showNavBar">
<li
class ="nav-lis"
class="nav-lis"
v-for="(item, index) in navList.list"
:key="index"
@click="linkTo(item.url)"
>
{{ item.name }}
</li>
</ul>
</div> <hr style="width:1200px;height:2px;background:#e4393c;margin-top:-1px;margin-bottom:5px;"/>
</ul>
</div>
<!-- 全部商品分类 -->
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
<div
class="cate-list"
v-show="showAlways || showFirstList"
@mouseenter="showFirstList = true"
@mouseleave="showFirstList = false"
>
<!-- 第一级分类 -->
<div class="nav-side" :class="{'large-nav': large, 'opacity-nav': opacity}" @mouseleave="panel = false">
<div
class="nav-side"
:class="{ 'large-nav': large, 'opacity-nav': opacity }"
@mouseleave="panel = false"
>
<ul>
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
<li
v-for="(item, index) in cateList"
:key="index"
@mouseenter="showDetail(index)"
>
<span class="nav-side-item" @click="goGoodsList(item.id)">{{
item.name
}}</span>
<span v-for="(second, secIndex) in item.children" :key="secIndex">
<span v-if="secIndex < 2" > / </span>
<span @click="goGoodsList(second.id, second.parentId)" class="nav-side-item" v-if="secIndex < 2">{{second.name}}</span>
<span v-if="secIndex < 2"> / </span>
<span
@click="goGoodsList(second.id, second.parentId)"
class="nav-side-item"
v-if="secIndex < 2"
>{{ second.name }}</span
>
</span>
</li>
</ul>
@@ -30,14 +56,19 @@
<!-- 展开分类 -->
<div
class="detail-item-panel"
:style="{'minHeight': large?'470px':'340px'}"
:style="{ minHeight: large ? '470px' : '340px' }"
v-show="panel"
@mouseenter="panel = true"
@mouseleave="panel = false"
>
<div class="nav-detail-item">
<template v-for="(item, index) in panelData">
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
<span
@click="goGoodsList(item.id, item.parentId)"
v-if="index < 8"
:key="index"
>{{ item.name }}<Icon type="ios-arrow-forward"
/></span>
</template>
</div>
<ul>
@@ -46,13 +77,21 @@
:key="index"
class="detail-item-row"
>
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
<span
class="detail-item-title"
@click="goGoodsList(items.id, items.parentId)"
>
{{ items.name }} <Icon type="ios-arrow-forward" />
<span class="glyphicon glyphicon-menu-right"></span>
</span>
<div>
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
:key="subIndex" class="detail-item">{{ item.name }}</span>
<span
v-for="(item, subIndex) in items.children"
@click="goGoodsList(item.id, items.id, items.parentId)"
:key="subIndex"
class="detail-item"
>{{ item.name }}</span
>
</div>
</li>
</ul>
@@ -62,105 +101,116 @@
</template>
<script>
import { getCategory } from '@/api/goods';
import storage from '@/plugins/storage.js'
import { getCategory } from "@/api/goods";
import storage from "@/plugins/storage.js";
export default {
name: 'GoodsListNav',
name: "GoodsListNav",
props: {
showAlways: { // 总是显示下拉分类
showAlways: {
// 总是显示下拉分类
default: false,
type: Boolean
type: Boolean,
},
showNavBar: { // 显示全部商品分类右侧导航条
showNavBar: {
// 显示全部商品分类右侧导航条
default: true,
type: Boolean
type: Boolean,
},
hover: {
default: false,
type: Boolean
type: Boolean,
},
large: { // 是否更高的高度
large: {
// 是否更高的高度
default: false,
type: Boolean
type: Boolean,
},
opacity: { // 是否背景透明
opacity: {
// 是否背景透明
default: false,
type: Boolean
}
type: Boolean,
},
},
data () {
data() {
return {
panel: false, // 二级分类展示
panelData: [], // 二级分类数据
showFirstList: false, // 始终展示一级列表
cateList: [] // 商品分类
}
cateList: [], // 商品分类
};
},
computed: {
navList () { // 导航列表
if (storage.getItem('navList')) {
return JSON.parse(storage.getItem('navList'))
navList() {
// 导航列表
if (storage.getItem("navList")) {
return JSON.parse(storage.getItem("navList"));
} else {
return []
return [];
}
}
},
},
methods: {
getCate () { // 获取分类数据
getCate() {
// 获取分类数据
if (this.hover) return false;
getCategory(0).then(res => {
getCategory(0).then((res) => {
if (res.success) {
this.cateList = res.result;
this.$store.commit('SET_CATEGORY', res.result)
this.$store.commit("SET_CATEGORY", res.result);
// 过期时间
var expirationTime = new Date().setHours(new Date().getHours() + 1);
// 存放过期时间
localStorage.setItem('category_expiration_time', expirationTime);
localStorage.setItem("category_expiration_time", expirationTime);
// 存放分类信息
localStorage.setItem('category', JSON.stringify(res.result))
localStorage.setItem("category", JSON.stringify(res.result));
}
});
},
showDetail (index) { // 展示全部分类
this.panel = true
this.panelData = this.cateList[index].children
showDetail(index) {
// 展示全部分类
this.panel = true;
this.panelData = this.cateList[index].children;
},
goGoodsList (id, secondId, firstId) { // 分类共有三级,传全部分类过去
const arr = [firstId, secondId, id]
goGoodsList(id, secondId, firstId) {
// 分类共有三级,传全部分类过去
const arr = [firstId, secondId, id];
if (!arr[1]) {
arr.splice(0, 2)
arr.splice(0, 2);
}
if (!arr[0]) {
arr.shift()
arr.shift();
}
let routerUrl = this.$router.resolve({
path: '/goodsList',
query: {categoryId: arr.toString()}
})
window.open(routerUrl.href, '_blank')
}
path: "/goodsList",
query: { categoryId: arr.toString() },
});
window.open(routerUrl.href, "_blank");
},
},
mounted () {
if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) {
mounted() {
if (
localStorage.getItem("category") &&
localStorage.getItem("category_expiration_time")
) {
// 如果缓存过期,则获取最新的信息
if (new Date() > localStorage.getItem('category_expiration_time')) {
if (new Date() > localStorage.getItem("category_expiration_time")) {
this.getCate();
return;
}
this.cateList = JSON.parse(localStorage.getItem('category'))
this.cateList = JSON.parse(localStorage.getItem("category"));
} else {
this.getCate()
this.getCate();
}
}
},
};
</script>
<style scoped lang="scss">
.nav-lis:hover{
color:#e4393c !important;
.nav-lis:hover {
color: $theme_color !important;
cursor: pointer;
}
.cate-nav{
.cate-nav {
width: 1200px;
position: relative;
margin: 0 auto;
@@ -175,10 +225,10 @@ export default {
width: 200px;
line-height: 40px;
color: #fff;
background-color: #e4393c;
background-color: $theme_color;
text-align: center;
font-size: 16px;
border-bottom:none;
border-bottom: none;
}
.nav-item {
width: 1000px;
@@ -195,13 +245,13 @@ export default {
color: rgb(129, 127, 127);
font-size: 15px;
&:hover {
color: $theme_color;
color: #e1251b;
}
}
}
}
// 分类列表
.cate-list{
.cate-list {
margin: 0 auto;
position: absolute;
z-index: 1000;
@@ -216,14 +266,14 @@ export default {
height: 335px;
overflow: hidden;
}
.large-nav{
.large-nav {
height: 470px;
ul>li{
ul > li {
line-height: 20px;
}
}
.opacity-nav{
background-color:rgba(0,0,0,.5);
.opacity-nav {
background-color: rgba(0, 0, 0, 0.5);
}
.nav-side ul {
width: 100%;
@@ -236,13 +286,13 @@ export default {
padding-left: 12px;
font-size: 13px;
line-height: 18px;
&:hover{
&:hover {
background: #999395;
}
}
.nav-side-item:hover {
cursor: pointer;
color: $theme_color;
color: #e1251b;
}
/*显示商品详细信息*/
@@ -271,7 +321,7 @@ export default {
background-color: #6e6568;
}
.nav-detail-item span:hover {
background-color: $theme_color;
background-color: #e1251b;
}
.detail-item-panel li {
line-height: 30px;
@@ -286,11 +336,13 @@ export default {
text-align: right;
}
.detail-item-title:hover {
color: $theme_color;
color: #e1251b;
}
.detail-item-row {
.detail-item-row {
display: flex;
>div{flex: 1;}
> div {
flex: 1;
}
}
.detail-item {
font-size: 12px;
@@ -298,12 +350,12 @@ export default {
padding-right: 8px;
cursor: pointer;
border-left: 1px solid #ccc;
&:first-child{
&:first-child {
border: none;
padding-left: 0;
}
}
.detail-item:hover {
color: $theme_color;
color: #e1251b;
}
</style>

View File

@@ -414,7 +414,7 @@ export default {
font-size: 18px;
font-weight: bold;
&:hover {
color: #e4393c;
color: $theme_color;
cursor: pointer;
}
}
@@ -428,8 +428,8 @@ export default {
text-align: center;
margin: 0 3px;
&:hover {
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
border-bottom-color: #fff;
cursor: pointer;
ul {
@@ -447,7 +447,7 @@ export default {
width: 300px;
padding: 5px 10px;
background: #fff;
border: 1px solid #e4393c;
border: 1px solid $theme_color;
z-index: 1;
&::before {
content: "";
@@ -470,7 +470,7 @@ export default {
margin: 3px 0;
text-align: left;
&:hover {
color: #e4393c;
color: $theme_color;
cursor: pointer;
}
}
@@ -489,23 +489,23 @@ export default {
background-color: #f3f3f3;
border: 1px solid #ddd;
&:hover {
border-color: #e4393c;
border-color: $theme_color;
background-color: #fff;
.ivu-icon {
color: #fff;
background-color: #e4393c;
background-color: $theme_color;
}
}
span:nth-child(2) {
color: #e4393c;
color: $theme_color;
}
.ivu-icon {
position: absolute;
right: 0;
top: 0;
color: #e4393c;
color: $theme_color;
line-height: 22px;
width: 21px;
height: 22px;
@@ -557,8 +557,8 @@ export default {
}
&:hover {
border-color: #e4393c;
border: 2px solid #e4393c;
border-color: $theme_color;
border: 2px solid $theme_color;
top: 0;
left: 0;
position: relative;
@@ -572,7 +572,7 @@ export default {
display: inline-block;
width: 100%;
height: 100%;
color: #e4393c;
color: $theme_color;
text-align: center;
font-size: 12px;
cursor: pointer;
@@ -585,7 +585,7 @@ export default {
div {
width: 0;
border-top: 20px solid transparent;
border-right: 20px solid #e4393c;
border-right: 20px solid $theme_color;
}
.ivu-icon {
font-size: 12px;
@@ -598,7 +598,7 @@ export default {
}
}
.border-color {
border-color: #e4393c;
border-color: $theme_color;
z-index: 1;
}
}
@@ -620,8 +620,8 @@ export default {
font-size: 12px;
&:hover {
cursor: pointer;
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
}
}
}
@@ -674,7 +674,7 @@ export default {
padding: 2px;
cursor: pointer;
&:hover {
color: #e4393c;
color: $theme_color;
}
}
}
@@ -696,8 +696,8 @@ export default {
font-size: 12px;
&:hover {
cursor: pointer;
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
}
}
}

View File

@@ -295,7 +295,7 @@ export default {
.item-as-title {
width: 100%;
height: 36px;
color: #e4393c;
color: $theme_color;
line-height: 36px;
font-size: 18px;
}
@@ -396,7 +396,7 @@ export default {
background-color: #fff;
}
.goods-list-tool span:hover {
border-color: #e4393c;
border-color: $theme_color;
position: relative;
text-decoration: none;
z-index: 1;
@@ -408,7 +408,7 @@ export default {
.goods-list-tool-active {
color: #fff;
border-left: 1px solid #ccc;
background-color: #e4393c !important;
background-color: $theme_color !important;
}
/* ---------------商品栏结束------------------- */

View File

@@ -15,10 +15,15 @@
>
<div class="user-icon">
<div class="user-img">
<img :src="userInfo.face" style="width:100%;height:100%;" v-if="userInfo.face" alt />
<img
:src="userInfo.face"
style="width: 100%; height: 100%"
v-if="userInfo.face"
alt
/>
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
</div>
<p>{{userInfo.nickName}}</p>
<p>{{ userInfo.nickName }}</p>
</div>
<!-- 循环导航栏 -->
@@ -38,7 +43,6 @@
>{{ chlidren.title }}</MenuItem
>
</Submenu>
</Menu>
</Sider>
<Layout class="layout ml_10">
@@ -54,47 +58,33 @@
</template>
<script>
import menuList from './menu';
import Storage from '@/plugins/storage.js';
import menuList from "./menu";
import Storage from "@/plugins/storage.js";
export default {
name: 'Home',
data () {
name: "Home",
data() {
return {
menuList // 会员中心左侧列表
menuList, // 会员中心左侧列表
};
},
computed: {
userInfo () { // 用户信息
if(Storage.getItem('userInfo')){
return JSON.parse(Storage.getItem('userInfo'));
} else{
this.$Modal.confirm({
title:'请登录',
content:"<p>请登录后执行此操作</p>",
okText: '立即登录',
cancelText: '继续浏览',
onOk:()=>{
if(true){
this.$router.push('/login');
}
}
})
return {}
}
}
userInfo() {
// 用户信息
if (Storage.getItem("userInfo")) {
return JSON.parse(Storage.getItem("userInfo"));
} else {
return {};
}
},
},
methods: {
// 每次点击左侧bar的callback
onSelect (name) {
this.$router.push({name: name});
onSelect(name) {
this.$router.push({ name: name });
},
// 跳转到个人中心的首页
toUserMain () {
this.$router.push(`/home`);
}
}
},
};
</script>

View File

@@ -5,7 +5,7 @@ import Storage from './storage';
import router from '../router/index.js';
import store from '../vuex/store';
import { handleRefreshToken } from '@/api/index';
import {v4 as uuidv4} from 'uuid';
import { v4 as uuidv4} from 'uuid';
const qs = require('qs');
// api地址
@@ -88,7 +88,7 @@ service.interceptors.request.use(
}
);
async function refresh (error) {
async function refresh(error) {
const getTokenRes = await refreshToken();
if (getTokenRes === 'success') {
// 刷新token
@@ -121,7 +121,8 @@ async function refresh (error) {
});
},
onCancel: () => {
router.go(0)
// router.go(0)
router.push("/");
Modal.remove();
}
});