commit
parent
1bee69cefb
commit
166e889b6f
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<div class="scroll-show">
|
||||
<div class="content clearfix">
|
||||
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
|
||||
<!-- <cateNav class="cate" :hover="true" :showNavBar="false"></cateNav> -->
|
||||
<img src="../../assets/images/logo2.png" alt="" class="images" />
|
||||
<Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<div class="cart-content">
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
</div>
|
||||
<div class="hr"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -48,25 +52,46 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.content{
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
.hr{
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background-color: #e4393c;
|
||||
margin-top:60px;
|
||||
}
|
||||
.content>img{
|
||||
width:180px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px!important;
|
||||
}
|
||||
.cart-content{
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
margin-left:55px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
line-height: 500%;
|
||||
}
|
||||
.search-con{
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
height: 100%;
|
||||
margin-left:20px;
|
||||
// overflow: hidden;
|
||||
line-height: 60px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
|
@ -77,7 +102,8 @@ export default {
|
|||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
// right: 165px;
|
||||
right:108px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div> <hr style="width:1200px;height:2px;background:#e4393c;margin-top:-1px;margin-bottom:5px;"/>
|
||||
</div> <hr style="width:1200px;height:2.5px;background:#e4393c;margin-top:-1px;margin-bottom:5px;border:none;"/>
|
||||
<!-- 全部商品分类 -->
|
||||
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
|
||||
<!-- 第一级分类 -->
|
||||
|
@ -157,7 +157,7 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.nav-lis:hover{
|
||||
color:#e4393c !important;
|
||||
color:$theme_color !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cate-nav{
|
||||
|
@ -175,7 +175,7 @@ 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;
|
||||
|
@ -195,7 +195,7 @@ export default {
|
|||
color: rgb(129, 127, 127);
|
||||
font-size: 15px;
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
}
|
||||
.nav-side-item:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
|
||||
/*显示商品详细信息*/
|
||||
|
@ -271,7 +271,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,7 +286,7 @@ export default {
|
|||
text-align: right;
|
||||
}
|
||||
.detail-item-title:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
.detail-item-row {
|
||||
display: flex;
|
||||
|
@ -304,6 +304,6 @@ export default {
|
|||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ export default {
|
|||
.item-as-title {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
color: #e4393c;
|
||||
color: $theme_color;
|
||||
line-height: 36px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
@ -372,7 +372,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;
|
||||
|
@ -384,7 +384,7 @@ export default {
|
|||
.goods-list-tool-active {
|
||||
color: #fff;
|
||||
border-left: 1px solid #ccc;
|
||||
background-color: #e4393c !important;
|
||||
background-color: $theme_color !important;
|
||||
}
|
||||
|
||||
/* ---------------商品栏结束------------------- */
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<Form ref="searchForm" :model="searchForm" class="search-form">
|
||||
<Form-item label="会员名称" class="flex" prop="memberName">
|
||||
<Input
|
||||
type="text" v-model="searchForm.memberName"
|
||||
type="text" v-model="searchForm.memberName" clearable
|
||||
style="width: 200px"></Input>
|
||||
</Form-item>
|
||||
<Form-item label="编号" class="flex">
|
||||
<Input
|
||||
type="text" v-model="searchForm.sn"
|
||||
type="text" v-model="searchForm.sn" clearable
|
||||
style="width: 200px"></Input>
|
||||
</Form-item>
|
||||
<Form-item label="状态"
|
||||
|
|
|
@ -62,9 +62,11 @@ export default {
|
|||
};
|
||||
},
|
||||
props: {
|
||||
selectedWay: {
|
||||
selectedWay: {
|
||||
type: Array,
|
||||
default: new Array()
|
||||
default: function(){
|
||||
return new Array()
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<Table height="350" border tooltip :loading="loading" :columns="activeColumns" :data="showPromotionList"></Table>
|
||||
|
||||
<Page @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" class="mt_10" :total="totals" size="small" show-elevator />
|
||||
<Page @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" class="mt_10" :total="Number(totals)" size="small" show-elevator />
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -187,6 +187,7 @@ export default {
|
|||
on: {
|
||||
click: () => {
|
||||
this.selectedPromotion(params);
|
||||
console.log(this.index)
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,15 +1,36 @@
|
|||
<template>
|
||||
<div class="layout">
|
||||
<div class="goods-cell-title">
|
||||
<div class="goods-item-title" :class="{ selected: selected.index == index }" @click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
|
||||
<div
|
||||
class="goods-item-title"
|
||||
:class="{ selected: selected.index == index }"
|
||||
@click="handleClickTitle(title, index)"
|
||||
v-for="(title, index) in res.list[0].titleWay"
|
||||
:key="index"
|
||||
>
|
||||
<h4>{{ title.title }}</h4>
|
||||
<div>{{ title.desc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div v-if="item.___index != undefined ? (selected.index == item.___index) : ( selected.val == item.type)" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
|
||||
<div
|
||||
v-if="
|
||||
item.___index != undefined
|
||||
? selected.index == item.___index
|
||||
: selected.val == item.type
|
||||
"
|
||||
class="goods-item"
|
||||
v-for="(item, item_index) in res.list[0].listWay"
|
||||
:key="item_index"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<Icon size="20" color="#e1251b" @click="closeGoods(item, item_index)" class="goods-icon" type="ios-close-circle" />
|
||||
<Icon
|
||||
size="20"
|
||||
color="#e1251b"
|
||||
@click="closeGoods(item, item_index)"
|
||||
class="goods-icon"
|
||||
type="ios-close-circle"
|
||||
/>
|
||||
<img :src="item.img" alt />
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
|
@ -70,7 +91,7 @@ export default {
|
|||
}
|
||||
> div {
|
||||
font-weight: bold;
|
||||
color: #e4393c !important;
|
||||
color: $theme_color !important;
|
||||
}
|
||||
}
|
||||
.goods-cell-title {
|
||||
|
@ -137,7 +158,7 @@ export default {
|
|||
display: flex;
|
||||
> .goods-price {
|
||||
line-height: 2;
|
||||
color: #e4393c;
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
<div class="no-more" v-if="list.length ==0">暂无更多模板</div>
|
||||
</div>
|
||||
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" />
|
||||
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" show-sizer :page-size-opts="[10, 20, 50]" @on-page-size-change="changePageSize"/>
|
||||
|
||||
</Card>
|
||||
|
||||
|
@ -74,8 +74,8 @@ export default {
|
|||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "",
|
||||
order: "asc",
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageType: "INDEX",
|
||||
pageClientType: "H5",
|
||||
},
|
||||
|
@ -147,6 +147,12 @@ export default {
|
|||
this.$router.push({
|
||||
path: "/floorList/main",
|
||||
});
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = v;
|
||||
this.init();
|
||||
},
|
||||
// 删除模板
|
||||
handleDel(val) {
|
||||
|
|
|
@ -96,27 +96,27 @@
|
|||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<Input class="text w40" type="text" v-model="item.firstCompany" maxlength="3" clearable />
|
||||
<InputNumber class="text w40" type="text" v-model="item.firstCompany" :max="999" :min="0" :step="0.1" clearable/>
|
||||
</td>
|
||||
<td>
|
||||
<Input class="text w60" type="text" v-model="item.firstPrice" maxlength="6" clearable>
|
||||
<span slot="append">元</span>
|
||||
</Input>
|
||||
<InputNumber class="text w60" type="text" v-model="item.firstPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
|
||||
</InputNumber>
|
||||
</td>
|
||||
<td>
|
||||
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6"
|
||||
clearable />
|
||||
<InputNumber class="text w40" type="text" v-model="item.continuedCompany" :max="999" :min="0" :step="0.1"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable>
|
||||
<span slot="append">元</span>
|
||||
</Input>
|
||||
<InputNumber class="text w60" type="text" v-model="item.continuedPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
|
||||
</InputNumber>
|
||||
</td>
|
||||
<td class="nscs-table-handle">
|
||||
<Button @click="editRegion(item,index)" type="info" size="small"
|
||||
style="margin-bottom: 5px">修改
|
||||
</Button>
|
||||
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error"
|
||||
<Button @click="removeTemplateChildren(index)" type="error"
|
||||
size="small" style="margin-bottom: 5px">删除
|
||||
</Button>
|
||||
</td>
|
||||
|
@ -145,7 +145,7 @@
|
|||
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
|
||||
icon="ios-create-outline">为指定城市设置运费模板
|
||||
</Button>
|
||||
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存
|
||||
<Button @click="handleSubmit" type="primary" style="margin-right:5px">保存
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
|
@ -170,12 +170,15 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
gotop: false,
|
||||
index:'0',
|
||||
selectedIndex: 0, //选中的地址模板下标
|
||||
item: "", //运费模板子模板
|
||||
shipInfo: {}, // 运费模板数据
|
||||
title: "添加运费模板", // 模态框标题
|
||||
operation: "add", // 操作状态
|
||||
currentTab: "", // 当前模板tab
|
||||
// submitLoading:false,
|
||||
saveError: false, // 是否显示错误提示
|
||||
csTab: false, // 添加运费模板显示
|
||||
form: {
|
||||
|
@ -234,15 +237,19 @@ export default {
|
|||
{
|
||||
area: "",
|
||||
areaId: "",
|
||||
firstCompany: "1",
|
||||
firstPrice: "",
|
||||
continuedCompany: "1",
|
||||
continuedPrice: "",
|
||||
firstCompany: 0,
|
||||
firstPrice: 0,
|
||||
continuedCompany: 0,
|
||||
continuedPrice: 0,
|
||||
selectedAll: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
handleScroll(){
|
||||
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
scrolltop > 30 ? (this.gotop = true) : (this.gotop = false);
|
||||
},
|
||||
//修改运费模板
|
||||
edit(item) {
|
||||
this.title = "修改运费模板";
|
||||
|
@ -252,6 +259,15 @@ export default {
|
|||
this.saveError = false;
|
||||
//给form赋值
|
||||
this.form = item;
|
||||
|
||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
// 实现滚动效果
|
||||
const timeTop = setInterval(() => {
|
||||
document.body.scrollTop = document.documentElement.scrollTop = top -= 50;
|
||||
if (top <= 0) {
|
||||
clearInterval(timeTop);
|
||||
}
|
||||
}, 0);
|
||||
},
|
||||
//选择地区
|
||||
editRegion(item, index) {
|
||||
|
@ -268,7 +284,6 @@ export default {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
this.$store.state.shipTemplate = this.form.freightTemplateChildList;
|
||||
|
||||
this.$refs.region.open(item, index);
|
||||
|
@ -328,9 +343,9 @@ export default {
|
|||
};
|
||||
|
||||
this.$refs.form.validate((valid) => {
|
||||
const regNumber = /^\+?[1-9][0-9]*$/;
|
||||
const regMoney =
|
||||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
|
||||
// const regNumber = /^\+?[1-9][0-9]*$/;
|
||||
// const regMoney =
|
||||
// /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
|
||||
if (valid) {
|
||||
if (this.form.pricingMethod != "FREE") {
|
||||
//校验运费模板详细信息
|
||||
|
@ -349,23 +364,23 @@ export default {
|
|||
this.saveError = true;
|
||||
return;
|
||||
}
|
||||
if (
|
||||
regNumber.test(
|
||||
this.form.freightTemplateChildList[i].firstCompany
|
||||
) == false ||
|
||||
regNumber.test(
|
||||
this.form.freightTemplateChildList[i].continuedCompany
|
||||
) == false ||
|
||||
regMoney.test(
|
||||
this.form.freightTemplateChildList[i].firstPrice
|
||||
) == false ||
|
||||
regMoney.test(
|
||||
this.form.freightTemplateChildList[i].continuedPrice
|
||||
) == false
|
||||
) {
|
||||
this.saveError = true;
|
||||
return;
|
||||
}
|
||||
// if (
|
||||
// regNumber.test(
|
||||
// this.form.freightTemplateChildList[i].firstCompany
|
||||
// ) == false ||
|
||||
// regNumber.test(
|
||||
// this.form.freightTemplateChildList[i].continuedCompany
|
||||
// ) == false ||
|
||||
// regMoney.test(
|
||||
// this.form.freightTemplateChildList[i].firstPrice
|
||||
// ) == false ||
|
||||
// regMoney.test(
|
||||
// this.form.freightTemplateChildList[i].continuedPrice
|
||||
// ) == false
|
||||
// ) {
|
||||
// this.saveError = true;
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,10 +415,10 @@ export default {
|
|||
const params = {
|
||||
area: "",
|
||||
areaId: "",
|
||||
firstCompany: "1",
|
||||
firstPrice: "",
|
||||
continuedCompany: "1",
|
||||
continuedPrice: "",
|
||||
firstCompany: 0,
|
||||
firstPrice: 0,
|
||||
continuedCompany: 0,
|
||||
continuedPrice: 0,
|
||||
selectedAll: false,
|
||||
};
|
||||
this.form.freightTemplateChildList.push(params);
|
||||
|
@ -437,6 +452,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
window.addEventListener("scroll", this.handleScroll, true);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue