Commit 529e5b6d by liwk

commit

1 parent 4cdd4e67
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^8.0.0", "autoprefixer": "^8.0.0",
"axios": "^0.19.2",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"dayjs": "^1.10.5", "dayjs": "^1.10.5",
"glsx-common": "^1.4.7",
"lib-flexible": "^0.3.2", "lib-flexible": "^0.3.2",
"postcss-loader": "^6.2.0", "postcss-loader": "^6.2.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
......
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
.icon-exchange { width: 80px; height: 80px; background-position: 0px -90px;} .icon-exchange { width: 80px; height: 80px; background-position: 0px -90px;}
.icon-share { width: 20px; height: 20px; background-position: -180px 0px;} .icon-share { width: 20px; height: 20px; background-position: -180px 0px;}
.icon-vip { width: 80px; height: 80px; background-position: -90px -90px;} .icon-vip { width: 80px; height: 80px; background-position: -90px -90px;}
.icon-down { width: 12px; height: 12px; background-position: -180px -30px;}
\ No newline at end of file \ No newline at end of file

43.4 KB | W: | H:

43.6 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="search-box flex">
<van-search
v-model="keyword"
placeholder="输入客户姓名搜索"
/>
<van-dropdown-menu active-color="#5850ff">
<van-dropdown-item
v-model="value"
:options="option"
/>
<div class="arrow y-center">
<div class="sprite-icon icon-down"></div>
</div>
</van-dropdown-menu>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'SearchBox',
data () {
return {
keyword: '',
value: 0,
option: [
{ text: '优惠券', value: 0 },
{ text: '精品礼券', value: 1 }
]
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang='scss'>
.search-box {
height: 50px;
background: #5850ff;
box-shadow: 0px 1px 0px 0px #e9e9e9;
padding-right: 16px;
position: relative;
.van-search {
width: 263px;
padding: 4.5px 8px;
height: 100%;
background: #5850ff;
.van-search__content {
background-color: #fff;
}
}
.van-dropdown-menu {
margin-left: auto;
.arrow {
right: 8px;
z-index: 998;
}
.van-dropdown-menu__bar--opened ~ .arrow .sprite-icon {
transform: rotate(-180deg);
transition: all 0.25s;
}
.van-dropdown-menu__bar {
background-color: #5850ff;
.van-dropdown-menu__title {
color: #fff !important;
font-size: 16px;
&::after {
display: none;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="tab"> <van-tabs
v-model="tabIndex"
color="#5850ff"
title-inactive-color="#BBB"
title-active-color="#2c2c2c"
@click="click"
>
<template v-for="(i,index) in data"> <template v-for="(i,index) in data">
<div <van-tab
@click="change(index)" :title="i"
:class="['item' ,'text-center', {'active':index == tabIndex}]"
:key="index" :key="index"
>{{i}}</div> ></van-tab>
</template> </template>
<div :class="['line',`type-${tabIndex}`]"></div> </van-tabs>
</div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
...@@ -30,7 +34,7 @@ export default { ...@@ -30,7 +34,7 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
change (tabIndex) { click (tabIndex) {
this.tabIndex = tabIndex this.tabIndex = tabIndex
this.$emit('change', tabIndex) this.$emit('change', tabIndex)
} }
...@@ -38,40 +42,14 @@ export default { ...@@ -38,40 +42,14 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style lang='scss'>
.tab { .van-tabs__wrap {
position: sticky; height: 50px !important;
top: 0; }
z-index: 2; .van-tab__text {
display: grid;
grid-template-columns: repeat(2, 1fr);
background-color: #fff;
height: 44px;
.item {
color: #a9a9a9;
font-size: 14px;
transition: all 0.5s;
}
.active {
font-size: 16px;
color: #2c2c2c;
font-weight: 500;
}
.line {
position: absolute;
bottom: 0;
background: #5850ff;
border-radius: 2px;
height: 3px;
width: 40px;
transform: translateX(-50%);
transition: all 0.25s; transition: all 0.25s;
} }
.type-0 { .van-tab--active {
left: 25%; font-size: 16px !important;
}
.type-1 {
left: 75%;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
close-on-click-action close-on-click-action
@cancel="onCancel" @cancel="onCancel"
@click-overlay="onCancel" @click-overlay="onCancel"
close-on-popstate
> >
<div class="box"> <div class="box">
<div class="title flex"> <div class="title flex">
......
...@@ -5,7 +5,9 @@ const pages = [{ ...@@ -5,7 +5,9 @@ const pages = [{
keepAlive: true keepAlive: true
}, },
children: [{ children: [{
name: 'list' name: 'verificationList'
}, {
name: 'verificationDetail'
}] }]
}, },
{ {
...@@ -52,9 +54,7 @@ const getPages = _ => { ...@@ -52,9 +54,7 @@ const getPages = _ => {
let router = { let router = {
path: '/', path: '/',
name: 'home', name: 'home',
// redirect: '/coupon', redirect: '/coupon',
// redirect: '/activity',
redirect: '/merchant',
component: resolve => require([`views/home.vue`], resolve), component: resolve => require([`views/home.vue`], resolve),
} }
router.children = pages.map(e => { router.children = pages.map(e => {
......
<template> <template>
<div class="layout"> <div class="index">
<template v-if="$route.meta.isTab"> <template v-if="$route.meta.isTab">
<tab <tab
:data="['新车精品礼券','商城优惠券']" :data="['新车精品礼券','商城优惠券']"
......
<template> <template>
<div> <div class="layout">
优惠券列表 核销详情
</div> </div>
</template> </template>
...@@ -12,7 +12,6 @@ export default { ...@@ -12,7 +12,6 @@ export default {
} }
}, },
mounted () { mounted () {
console.log('list')
}, },
methods: { methods: {
} }
......
<template>
<div class="layout">
<search-box></search-box>
<tab
:data="tab"
@change="change"
/>
</div>
</template>
<script type='text/ecmascript-6'>
import Tab from '../../components/Tab.vue'
export default {
components: { Tab },
name: '',
data () {
return {
tab: ['已核销(0)', '待核销(0)', '未领取(0)']
}
},
mounted () {
console.log('list')
},
methods: {
change () {
}
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!