d第一次提交
This commit is contained in:
13
pages/index/index.scss
Normal file
13
pages/index/index.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.page_body{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #F1F2F7;
|
||||
.page_container{
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
74
pages/index/index.vue
Normal file
74
pages/index/index.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<view class="page_body" disableScroll>
|
||||
<view class="page_container">
|
||||
<home ref="home" v-show="tabBarIndex==0" />
|
||||
<personal ref="personal" v-show="tabBarIndex==1" />
|
||||
</view>
|
||||
<tab-bar :tabBarList='tabBarList' v-model="tabBarIndex" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tool from '../../utils/tool.js'
|
||||
import tabBar from "@/components/tabBar/tabBar.vue"
|
||||
import home from "../home/index.vue"
|
||||
import personal from "../personal/index.vue"
|
||||
export default {
|
||||
components: {
|
||||
tabBar,
|
||||
home,
|
||||
personal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabBarList: [{
|
||||
"text": "首页",
|
||||
"selectIndex": 0,
|
||||
"iconPath": require('@/static/home.png'),
|
||||
"selectedIconPath": require('@/static/select-home.png'),
|
||||
},
|
||||
{
|
||||
"text": "我的",
|
||||
"selectIndex": 1,
|
||||
"iconPath": require('@/static/Personal.png'),
|
||||
"selectedIconPath": require('@/static/select-Personal.png'),
|
||||
}
|
||||
],
|
||||
user: uni.getStorageSync('user'),
|
||||
location: null,
|
||||
setingMenuData: null,
|
||||
tabBarIndex: 0,
|
||||
Anticorrosive: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tabBarIndex(n, o) {
|
||||
console.log('索引改变')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
uni.$emit('onshow','onshow')
|
||||
},
|
||||
methods: {
|
||||
async getPosition(callback) {
|
||||
await this.tool.getLocation().then(res => {
|
||||
this.location = uni.getStorageSync('location')
|
||||
}).catch(err => {});
|
||||
},
|
||||
init() {
|
||||
this.getSetingMenu(); //获取胶囊数据
|
||||
},
|
||||
getSetingMenu() {
|
||||
this.setingMenuData = wx.getMenuButtonBoundingClientRect();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user