12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <!-- 底部tab导航 -->
- <view>
- <Home v-if="nowchos === 0"></Home>
- <Order v-else-if="nowchos === 1"></Order>
- <Mine ref="mine" v-else-if="nowchos === 2"></Mine>
- <!-- <Information v-else-if="nowchos === 2"></Information>
- <Mine ref="mine" v-else-if="nowchos === 3"></Mine> -->
- <view class="bottomboxs">
- <x-navbottom :nowchos='nowchos' @botomchos='botomchos'></x-navbottom>
- </view>
- </view>
- </template>
- <script>
- import Home from './home/index.vue' // 引入首页
- import Order from './order/index.vue' // 引入收益首页
- import Information from './information/index.vue' // 记录
- import Mine from './mine/index.vue' // 记录
- export default {
- components: { //在这里注册相应的组件
- Home,
- Order,
- Information,
- Mine,
- },
- data() {
- return {
- nowchos: 0, //当前选择了那个底部菜单
- userInfo: {},
- isorders: 0,
- userType: 3,
- }
- },
- onShow() {
- if (this.nowchos == 3) {
- this.$nextTick(() => {
- this.$refs.mine.refreshTokenil()
- })
- }
- },
- mounted() {
- var userInfo = this.$cache.getCache('userInfo')
- if (userInfo.provUser) {
- this.isorders = userInfo.provUser.isorders
- this.userType = userInfo.provUser.userType
- }
- this.userInfo = userInfo
- },
- methods: {
- // tab
- botomchos(e) {
- uni.setStorageSync('nowchos', e);
- this.nowchos = e
- },
- }
- }
- </script>
- <style lang="scss">
- .bottomboxs {
- position: relative;
- bottom: 0;
- z-index: 2023;
- height: 100rpx;
- }
- </style>
|