master
夜良king 2022-02-15 10:12:49 +08:00
parent 1bee69cefb
commit 166e889b6f
18 changed files with 391 additions and 223 deletions

View File

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

View File

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

View File

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

View File

@ -1,11 +1,15 @@
<template> <template>
<div class="scroll-show"> <div class="scroll-show">
<div class="content clearfix"> <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> <Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
<div class="cart-content">
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" /> <Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i> <i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
</div> </div>
<div class="hr"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -48,25 +52,46 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .content{
width: 1200px; width: 1200px;
height: 40px; height: 100%;
margin: 10px auto; margin: auto;
position: relative; position: relative;
} }
.hr{
width: 100%;
height: 2px;
background-color: #e4393c;
margin-top:60px;
}
.content>img{
width:180px;
float: left;
overflow: hidden;
height: 100%;
}
.cate { .cate {
float: left; float: left;
width: 200px!important; width: 200px!important;
} }
.cart-content{
width: 100px;
height: 100%;
margin-left:55px;
float: left;
overflow: hidden;
line-height: 500%;
}
.search-con{ .search-con{
float: left; float: left;
width: 800px; width: 800px;
overflow: hidden; height: 100%;
margin-top: -27px; margin-left:20px;
// overflow: hidden;
line-height: 60px;
margin-top: -20px;
} }
.cart-icon { .cart-icon {
width: 30px; width: 30px;
float: left;
font-size: 25px; font-size: 25px;
margin-top: 8px;
color: $theme_color; color: $theme_color;
z-index: 1; z-index: 1;
position: relative; position: relative;
@ -77,7 +102,8 @@ export default {
.cart-badge { .cart-badge {
position: absolute; position: absolute;
font-style: normal; font-style: normal;
right: 165px; // right: 165px;
right:108px;
display: block; display: block;
background-color: $theme_color; background-color: $theme_color;
color: #fff; color: #fff;

View File

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

View File

@ -23,12 +23,18 @@
<div class="person-msg"> <div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt /> <img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" /> <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"> <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>
<div v-else> <div v-else>
<Button type="error" @click="$router.push('login')" shape="circle" <Button class="btns" @click="$router.push('login')" shape="circle"
>请登录</Button >请登录</Button
> >
</div> </div>
@ -37,8 +43,14 @@
<div> <div>
<span>常见问题</span> <span>常见问题</span>
<ul class="article-list"> <ul class="article-list">
<li class="ellipsis" :alt="article.title" v-for="(article, index) in articleList" :key="index" @click="goArticle(article.id)"> <li
{{article.title}} class="ellipsis"
:alt="article.title"
v-for="(article, index) in articleList"
:key="index"
@click="goArticle(article.id)"
>
{{ article.title }}
</li> </li>
</ul> </ul>
</div> </div>
@ -49,45 +61,48 @@
</template> </template>
<script> <script>
import { articleList } from "@/api/common.js";
import {articleList} from '@/api/common.js' import storage from "@/plugins/storage";
import storage from '@/plugins/storage';
export default { export default {
name: 'modelCarousel', name: "modelCarousel",
props: ['data'], props: ["data"],
data () { data() {
return { return {
config:require('@/config'), config: require("@/config"),
userInfo: {}, // userInfo: {}, //
articleList: [], // articleList: [], //
params: { // params: {
//
pageNumber: 1, pageNumber: 1,
pageSize: 5, pageSize: 5,
type: 'ANNOUNCEMENT', type: "ANNOUNCEMENT",
sort: 'sort' sort: "sort",
} },
}; };
}, },
methods: { methods: {
getArticleList () { // getArticleList() {
articleList(this.params).then(res => { //
articleList(this.params).then((res) => {
if (res.success) { 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');
}
}, },
mounted () { goArticle(id) {
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo')); //
this.getArticleList() 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();
},
}; };
</script> </script>
@ -98,6 +113,16 @@ export default {
overflow: hidden; 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 { .nav-body {
width: 1200px; width: 1200px;
@ -130,12 +155,14 @@ export default {
flex-direction: column; flex-direction: column;
margin: 20px auto; margin: 20px auto;
button { button {
height: 25px !important; height: 30px !important;
margin-top: 10px; margin-top: 10px;
line-height: 30px;
border: none;
} }
.ivu-btn-default { .ivu-btn-default {
color: $theme_color; // color: $theme_color;
border-color: $theme_color; // border-color: $theme_color;
} }
img { img {
margin-bottom: 10px; margin-bottom: 10px;

View File

@ -1,16 +1,18 @@
<template> <template>
<div class="not-enough"> <div class="not-enough" ref="obtain" id="demo">
<ul class="nav-bar"> <Affix :offset-top="62" @on-change="change">
<ul class="nav-bar" v-show="topSearchShow">
<li <li
v-for="(item, index) in conData.options.navList" v-for="(item, index) in conData.options.navList"
:class="currentIndex === index ? 'curr' : ''" :class="currentIndex === index ? 'curr' : ''"
@click="changeCurr(index)" @click="changeCurr(index)"
:key="index" :key="index"
> >
<p>{{ item.title }}</p> <p @click="gotoDemo">{{ item.title }}</p>
<p>{{ item.desc }}</p> <p @click="gotoDemo">{{ item.desc }}</p>
</li> </li>
</ul> </ul>
</Affix>
<div class="content" v-if="showContent"> <div class="content" v-if="showContent">
<div <div
v-for="(item, index) in conData.options.list[currentIndex]" v-for="(item, index) in conData.options.list[currentIndex]"
@ -29,17 +31,26 @@
</template> </template>
<script> <script>
export default { export default {
mounted() {
window.addEventListener('scroll',this.handleScrollx,true)
},
props: { props: {
data: { data: {
type: Object, type: Object,
default: null default: null,
}
}, },
data () { },
data() {
return { return {
screenHeight:document.body.clientHeight,
scrollHieght:0,
topSearchShow: true, //
topIndex: 0, //
scrollTops: 0,
open:'',
currentIndex: 0, // currentIndex: 0, //
conData: this.data, // conData: this.data, //
showContent: true // showContent: true, //
}; };
}, },
watch: { watch: {
@ -47,14 +58,40 @@ export default {
this.conData = val; this.conData = val;
}, },
conData: function (val) { conData: function (val) {
this.$emit('content', val); this.$emit("content", val);
} },
}, },
methods: { methods: {
changeCurr (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; this.currentIndex = index;
} },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -63,10 +100,13 @@ export default {
justify-content: center; justify-content: center;
width: 100%; width: 100%;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #f3f5f7; background-color: #f8f8f8;
height: 60px; height: 60px;
align-items: center; align-items: center;
position: relative; position: relative;
position: sticky;
position: -webkit-sticky;
top: 0;
li { li {
padding: 0 30px; padding: 0 30px;
text-align: center; text-align: center;
@ -140,5 +180,6 @@ export default {
} }
} }
} }
} }
</style> </style>

View File

@ -12,7 +12,7 @@
{{ item.name }} {{ item.name }}
</li> </li>
</ul> </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"> <div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
<!-- 第一级分类 --> <!-- 第一级分类 -->
@ -157,7 +157,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.nav-lis:hover{ .nav-lis:hover{
color:#e4393c !important; color:$theme_color !important;
cursor: pointer; cursor: pointer;
} }
.cate-nav{ .cate-nav{
@ -175,7 +175,7 @@ export default {
width: 200px; width: 200px;
line-height: 40px; line-height: 40px;
color: #fff; color: #fff;
background-color: #e4393c; background-color: $theme_color;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
border-bottom:none; border-bottom:none;
@ -195,7 +195,7 @@ export default {
color: rgb(129, 127, 127); color: rgb(129, 127, 127);
font-size: 15px; font-size: 15px;
&:hover { &:hover {
color: $theme_color; color: #e1251b;
} }
} }
} }
@ -242,7 +242,7 @@ export default {
} }
.nav-side-item:hover { .nav-side-item:hover {
cursor: pointer; cursor: pointer;
color: $theme_color; color: #e1251b;
} }
/*显示商品详细信息*/ /*显示商品详细信息*/
@ -271,7 +271,7 @@ export default {
background-color: #6e6568; background-color: #6e6568;
} }
.nav-detail-item span:hover { .nav-detail-item span:hover {
background-color: $theme_color; background-color: #e1251b;
} }
.detail-item-panel li { .detail-item-panel li {
line-height: 30px; line-height: 30px;
@ -286,7 +286,7 @@ export default {
text-align: right; text-align: right;
} }
.detail-item-title:hover { .detail-item-title:hover {
color: $theme_color; color: #e1251b;
} }
.detail-item-row { .detail-item-row {
display: flex; display: flex;
@ -304,6 +304,6 @@ export default {
} }
} }
.detail-item:hover { .detail-item:hover {
color: $theme_color; color: #e1251b;
} }
</style> </style>

View File

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

View File

@ -271,7 +271,7 @@ export default {
.item-as-title { .item-as-title {
width: 100%; width: 100%;
height: 36px; height: 36px;
color: #e4393c; color: $theme_color;
line-height: 36px; line-height: 36px;
font-size: 18px; font-size: 18px;
} }
@ -372,7 +372,7 @@ export default {
background-color: #fff; background-color: #fff;
} }
.goods-list-tool span:hover { .goods-list-tool span:hover {
border-color: #e4393c; border-color: $theme_color;
position: relative; position: relative;
text-decoration: none; text-decoration: none;
z-index: 1; z-index: 1;
@ -384,7 +384,7 @@ export default {
.goods-list-tool-active { .goods-list-tool-active {
color: #fff; color: #fff;
border-left: 1px solid #ccc; 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-icon">
<div class="user-img"> <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" /> <Avatar icon="ios-person" class="mb_10" v-else size="96" />
</div> </div>
<p>{{userInfo.nickName}}</p> <p>{{ userInfo.nickName }}</p>
</div> </div>
<!-- 循环导航栏 --> <!-- 循环导航栏 -->
@ -38,7 +43,6 @@
>{{ chlidren.title }}</MenuItem >{{ chlidren.title }}</MenuItem
> >
</Submenu> </Submenu>
</Menu> </Menu>
</Sider> </Sider>
<Layout class="layout ml_10"> <Layout class="layout ml_10">
@ -54,47 +58,33 @@
</template> </template>
<script> <script>
import menuList from './menu'; import menuList from "./menu";
import Storage from '@/plugins/storage.js'; import Storage from "@/plugins/storage.js";
export default { export default {
name: 'Home', name: "Home",
data () { data() {
return { return {
menuList // menuList, //
}; };
}, },
computed: { computed: {
userInfo () { // userInfo() {
if(Storage.getItem('userInfo')){ //
return JSON.parse(Storage.getItem('userInfo')); if (Storage.getItem("userInfo")) {
} else{ return JSON.parse(Storage.getItem("userInfo"));
this.$Modal.confirm({ } else {
title:'请登录', return {};
content:"<p>请登录后执行此操作</p>",
okText: '立即登录',
cancelText: '继续浏览',
onOk:()=>{
if(true){
this.$router.push('/login');
}
}
})
return {}
}
} }
}, },
},
methods: { methods: {
// barcallback // barcallback
onSelect (name) { onSelect(name) {
this.$router.push({name: name}); this.$router.push({ name: name });
},
}, },
//
toUserMain () {
this.$router.push(`/home`);
}
}
}; };
</script> </script>

View File

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

View File

@ -4,12 +4,12 @@
<Form ref="searchForm" :model="searchForm" class="search-form"> <Form ref="searchForm" :model="searchForm" class="search-form">
<Form-item label="会员名称" class="flex" prop="memberName"> <Form-item label="会员名称" class="flex" prop="memberName">
<Input <Input
type="text" v-model="searchForm.memberName" type="text" v-model="searchForm.memberName" clearable
style="width: 200px"></Input> style="width: 200px"></Input>
</Form-item> </Form-item>
<Form-item label="编号" class="flex"> <Form-item label="编号" class="flex">
<Input <Input
type="text" v-model="searchForm.sn" type="text" v-model="searchForm.sn" clearable
style="width: 200px"></Input> style="width: 200px"></Input>
</Form-item> </Form-item>
<Form-item label="状态" <Form-item label="状态"

View File

@ -64,7 +64,9 @@ export default {
props: { props: {
selectedWay: { selectedWay: {
type: Array, type: Array,
default: new Array() default: function(){
return new Array()
}
} }
}, },
watch: { watch: {

View File

@ -22,7 +22,7 @@
<Table height="350" border tooltip :loading="loading" :columns="activeColumns" :data="showPromotionList"></Table> <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> </div>
@ -187,6 +187,7 @@ export default {
on: { on: {
click: () => { click: () => {
this.selectedPromotion(params); this.selectedPromotion(params);
console.log(this.index)
}, },
}, },
}, },

View File

@ -1,15 +1,36 @@
<template> <template>
<div class="layout"> <div class="layout">
<div class="goods-cell-title"> <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> <h4>{{ title.title }}</h4>
<div>{{ title.desc }}</div> <div>{{ title.desc }}</div>
</div> </div>
</div> </div>
<div class="goods-list"> <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"> <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 /> <img :src="item.img" alt />
</div> </div>
<div class="goods-desc"> <div class="goods-desc">
@ -70,7 +91,7 @@ export default {
} }
> div { > div {
font-weight: bold; font-weight: bold;
color: #e4393c !important; color: $theme_color !important;
} }
} }
.goods-cell-title { .goods-cell-title {
@ -137,7 +158,7 @@ export default {
display: flex; display: flex;
> .goods-price { > .goods-price {
line-height: 2; line-height: 2;
color: #e4393c; color: $theme_color;
} }
} }
} }

View File

@ -32,7 +32,7 @@
</div> </div>
<div class="no-more" v-if="list.length ==0"></div> <div class="no-more" v-if="list.length ==0"></div>
</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> </Card>
@ -74,8 +74,8 @@ export default {
params: { // params: { //
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
sort: "", sort: "createTime",
order: "asc", order: "desc",
pageType: "INDEX", pageType: "INDEX",
pageClientType: "H5", pageClientType: "H5",
}, },
@ -147,6 +147,12 @@ export default {
this.$router.push({ this.$router.push({
path: "/floorList/main", path: "/floorList/main",
}); });
},
//
changePageSize(v) {
this.params.pageNumber = 1;
this.params.pageSize = v;
this.init();
}, },
// //
handleDel(val) { handleDel(val) {

View File

@ -96,27 +96,27 @@
</td> </td>
<td></td> <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>
<td> <td>
<Input class="text w60" type="text" v-model="item.firstPrice" maxlength="6" clearable> <InputNumber class="text w60" type="text" v-model="item.firstPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
<span slot="append"></span> :parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</Input> </InputNumber>
</td> </td>
<td> <td>
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6" <InputNumber class="text w40" type="text" v-model="item.continuedCompany" :max="999" :min="0" :step="0.1"
clearable /> />
</td> </td>
<td> <td>
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable> <InputNumber class="text w60" type="text" v-model="item.continuedPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
<span slot="append"></span> :parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</Input> </InputNumber>
</td> </td>
<td class="nscs-table-handle"> <td class="nscs-table-handle">
<Button @click="editRegion(item,index)" type="info" size="small" <Button @click="editRegion(item,index)" type="info" size="small"
style="margin-bottom: 5px">修改 style="margin-bottom: 5px">修改
</Button> </Button>
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error" <Button @click="removeTemplateChildren(index)" type="error"
size="small" style="margin-bottom: 5px">删除 size="small" style="margin-bottom: 5px">删除
</Button> </Button>
</td> </td>
@ -145,7 +145,7 @@
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'" <Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
icon="ios-create-outline">为指定城市设置运费模板 icon="ios-create-outline">为指定城市设置运费模板
</Button> </Button>
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存 <Button @click="handleSubmit" type="primary" style="margin-right:5px">保存
</Button> </Button>
</Form-item> </Form-item>
</Form> </Form>
@ -170,12 +170,15 @@ export default {
}, },
data() { data() {
return { return {
gotop: false,
index:'0',
selectedIndex: 0, // selectedIndex: 0, //
item: "", // item: "", //
shipInfo: {}, // shipInfo: {}, //
title: "添加运费模板", // title: "添加运费模板", //
operation: "add", // operation: "add", //
currentTab: "", // tab currentTab: "", // tab
// submitLoading:false,
saveError: false, // saveError: false, //
csTab: false, // csTab: false, //
form: { form: {
@ -234,15 +237,19 @@ export default {
{ {
area: "", area: "",
areaId: "", areaId: "",
firstCompany: "1", firstCompany: 0,
firstPrice: "", firstPrice: 0,
continuedCompany: "1", continuedCompany: 0,
continuedPrice: "", continuedPrice: 0,
selectedAll: false, selectedAll: false,
}, },
], ],
}; };
}, },
handleScroll(){
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
scrolltop > 30 ? (this.gotop = true) : (this.gotop = false);
},
// //
edit(item) { edit(item) {
this.title = "修改运费模板"; this.title = "修改运费模板";
@ -252,6 +259,15 @@ export default {
this.saveError = false; this.saveError = false;
//form //form
this.form = item; 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) { editRegion(item, index) {
@ -268,7 +284,6 @@ export default {
}); });
}); });
}); });
this.$store.state.shipTemplate = this.form.freightTemplateChildList; this.$store.state.shipTemplate = this.form.freightTemplateChildList;
this.$refs.region.open(item, index); this.$refs.region.open(item, index);
@ -328,9 +343,9 @@ export default {
}; };
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
const regNumber = /^\+?[1-9][0-9]*$/; // const regNumber = /^\+?[1-9][0-9]*$/;
const regMoney = // const regMoney =
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; // /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
if (valid) { if (valid) {
if (this.form.pricingMethod != "FREE") { if (this.form.pricingMethod != "FREE") {
// //
@ -349,23 +364,23 @@ export default {
this.saveError = true; this.saveError = true;
return; return;
} }
if ( // if (
regNumber.test( // regNumber.test(
this.form.freightTemplateChildList[i].firstCompany // this.form.freightTemplateChildList[i].firstCompany
) == false || // ) == false ||
regNumber.test( // regNumber.test(
this.form.freightTemplateChildList[i].continuedCompany // this.form.freightTemplateChildList[i].continuedCompany
) == false || // ) == false ||
regMoney.test( // regMoney.test(
this.form.freightTemplateChildList[i].firstPrice // this.form.freightTemplateChildList[i].firstPrice
) == false || // ) == false ||
regMoney.test( // regMoney.test(
this.form.freightTemplateChildList[i].continuedPrice // this.form.freightTemplateChildList[i].continuedPrice
) == false // ) == false
) { // ) {
this.saveError = true; // this.saveError = true;
return; // return;
} // }
} }
} }
@ -400,10 +415,10 @@ export default {
const params = { const params = {
area: "", area: "",
areaId: "", areaId: "",
firstCompany: "1", firstCompany: 0,
firstPrice: "", firstPrice: 0,
continuedCompany: "1", continuedCompany: 0,
continuedPrice: "", continuedPrice: 0,
selectedAll: false, selectedAll: false,
}; };
this.form.freightTemplateChildList.push(params); this.form.freightTemplateChildList.push(params);
@ -437,6 +452,7 @@ export default {
}, },
mounted() { mounted() {
this.init(); this.init();
window.addEventListener("scroll", this.handleScroll, true);
}, },
}; };
</script> </script>