<template> <niu-page Tab> <niu-navbar offsetHide forceFixed fixed adjust middleLayout='left' :back="false" color="white" bg="#39b54a"> 爱能森组件库 <template #right> asd </template> </niu-navbar> <template v-for="(item,index) in pages"> <view class="title"> {{item.name}} </view> <template v-for="(child,childIndex) in item.children"> <Cell :title="child.name" :content="child.desc" :path="child.path"></Cell> </template> </template> <button @click="click">获取推送标识</button> <niu-tabbar></niu-tabbar> </niu-page> </template> <script> import { pages } from "./pages.js" export default { data() { return { text: '', pages } }, onReady() { console.log(this.$n.data.navbarTop); }, methods: { click(){ uni.getPushClientId({ success(res) { console.log(res); },fail(err) { console.error(err); } }) }, sendCode(done){ done(true) }, go(path) { uni.navigateTo({ url: path }) }, } } </script> <style lang="scss" scoped> .title { font-size: 36rpx; padding: 20rpx; color: #333333; } .color-list { display: flex; padding: 0 20rpx; text-align: center; } .box-list { display: flex; flex-wrap: wrap; .box-item { text-align: center; width: 33.3333%; height: 100rpx; line-height: 100rpx; color: #FFFFFF; } } </style>