112 lines
3.1 KiB
Vue
112 lines
3.1 KiB
Vue
<template>
|
|
<app-layout
|
|
minHeight="unset"
|
|
btnType="unset"
|
|
title="分类"
|
|
backgroundColor="#F6F6F6"
|
|
headerBackgroundColor="#F6F6F6"
|
|
>
|
|
<view class="search-component">
|
|
<widget-search />
|
|
</view>
|
|
<view class="cate">
|
|
<app-cate
|
|
:offsetHeight="95"
|
|
:data="data"
|
|
cateType="cate"
|
|
@clickItem="clickItem"
|
|
/>
|
|
</view>
|
|
</app-layout>
|
|
</template>
|
|
|
|
<script>
|
|
import AppLayout from "@/components/layout/layout";
|
|
import AppCate from "@/components/cate/cate";
|
|
import WidgetSearch from "@/components/widgets/search";
|
|
export default {
|
|
name: "service-cate",
|
|
data() {
|
|
return {
|
|
data: [
|
|
{
|
|
id: 1,
|
|
name: "热门推荐",
|
|
icon: "",
|
|
child: [
|
|
{
|
|
id: 2,
|
|
name: "空调安装",
|
|
icon: require("@/static/temp/cate/1.png"),
|
|
},
|
|
{
|
|
id: 3,
|
|
name: "空调拆卸",
|
|
icon: require("@/static/temp/cate/2.png"),
|
|
},
|
|
{
|
|
id: 4,
|
|
name: "热水器安装",
|
|
icon: require("@/static/temp/cate/3.png"),
|
|
},
|
|
{
|
|
id: 5,
|
|
name: "油烟机安装",
|
|
icon: require("@/static/temp/cate/4.png"),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
id: 5,
|
|
name: "电器安装",
|
|
icon: "",
|
|
child: [
|
|
{
|
|
id: 6,
|
|
name: "空调安装",
|
|
icon: require("@/static/temp/cate/2.png"),
|
|
},
|
|
{
|
|
id: 7,
|
|
name: "空调拆卸",
|
|
icon: require("@/static/temp/cate/3.png"),
|
|
},
|
|
{
|
|
id: 8,
|
|
name: "热水器安装",
|
|
icon: require("@/static/temp/cate/4.png"),
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|
|
},
|
|
components: {
|
|
AppLayout,
|
|
AppCate,
|
|
WidgetSearch,
|
|
},
|
|
onLoad() {},
|
|
onShow() {},
|
|
onReady() {},
|
|
onReachBottom() {},
|
|
onPullDownRefresh() {},
|
|
methods: {
|
|
clickItem(id) {
|
|
uni.navigateTo({
|
|
url: "/pages/service/list?id=" + id,
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.search-component {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding-bottom: 30rpx;
|
|
}
|
|
</style> |