master
parent
e7dfe717c8
commit
b0c4e7f212
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar></navbar>
|
||||
<tabbar></tabbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from './Tabbar.vue'
|
||||
import navbar from './Navbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
tabbar,
|
||||
navbar
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-navbar back-text="返回"
|
||||
is-back
|
||||
:title="title"
|
||||
back-icon-color="#fff"
|
||||
:back-text-style="{
|
||||
color: '#fff'
|
||||
}"
|
||||
:background="{
|
||||
backgroundImage: 'linear-gradient(0deg, #c10d12 0%, #c10d12 4%, #e26165 99%, #e26165 100%)'
|
||||
}">
|
||||
<view class="slot-wrap" @click="toSearch">
|
||||
<u-search :show-action="false" shape="round" placeholder="请输入搜索内容"></u-search>
|
||||
</view>
|
||||
</u-navbar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: String
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
toSearch() {
|
||||
this.$u.route({
|
||||
url: '/package_sub/pages/Shop/Search'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.slot-wrap {
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<view>
|
||||
<tabbar></tabbar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from "@/package_sub/pages/Shop/Tabbar.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tabbar
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<view>
|
||||
<tabbar></tabbar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from "@/package_sub/pages/Shop/Tabbar.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tabbar
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-tabbar inactive-color="#999"
|
||||
active-color="#ea3323"
|
||||
:list="list"
|
||||
:mid-button="false"
|
||||
@change="tabbarSwitch"></u-tabbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
iconPath: "home",
|
||||
selectedIconPath: "home-fill",
|
||||
text: "首页",
|
||||
customIcon: false,
|
||||
pagePath: "/package_sub/pages/Shop/Home"
|
||||
},
|
||||
{
|
||||
iconPath: "grid",
|
||||
selectedIconPath: "grid-fill",
|
||||
text: "分类",
|
||||
customIcon: false,
|
||||
pagePath: "/package_sub/pages/Shop/ProductList"
|
||||
},
|
||||
{
|
||||
iconPath: "search",
|
||||
selectedIconPath: "search",
|
||||
text: "搜索",
|
||||
customIcon: false,
|
||||
pagePath: "/package_sub/pages/Shop/Search"
|
||||
},
|
||||
{
|
||||
iconPath: "shopping-cart",
|
||||
selectedIconPath: "shopping-cart-fill",
|
||||
text: "购物车",
|
||||
customIcon: false,
|
||||
pagePath: "/package_sub/pages/Shop/Order"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
let curPages = getCurrentPages();
|
||||
this.pageUrl = curPages[curPages.length - 1].route;
|
||||
},
|
||||
methods: {
|
||||
tabbarSwitch(e) {
|
||||
this.$u.route({
|
||||
url: this.list[e].pagePath,
|
||||
animationDuration: 500
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue