| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <view class="container">
- <navBar title="" :navImg="navImg" :back="false" color="#333333" background="#FFFFFF" />
- <tabBar :tabBarList="tabBarList" :routePath="routePath" @onTabBar="onTabBar" />
- <view class="topBox">
- <view class="userBox">
- <image class="avatar" @click="toUserInfo" :src="picBase+'edit.png'" mode=""></image>
- <view class="nickname" @click="toUserInfo">
- 刘晓艺
- </view>
- <image class="icon" @click="toUserInfo" :src="picBase+'edit.png'" mode=""></image>
- </view>
- <view class="infoBox">
- <view class="left">
- <image class="icon" :src="picBase+'edit.png'" mode=""></image>
- 当前剩余次数:2
- </view>
- <view class="btn" @click="toCharge">
- 立即充值
- </view>
- </view>
- </view>
- <view class="contentBox">
- <view class="tabBox">
- <view class="item" @click="toHuibenJilu">
- <image class="icon" :src="picBase+'edit.png'" mode=""></image>
- <view class="right">
- <view class="t1">
- 绘本记录
- </view>
- <view class="t2">
- 绘本历史记录
- </view>
- </view>
- </view>
- <view class="item">
- <image class="icon" :src="picBase+'edit.png'" mode=""></image>
- <view class="right">
- <view class="t1">
- 推广大使
- </view>
- <view class="t2">
- 推广大使招募
- </view>
- </view>
- </view>
- </view>
- <view class="serListBox">
- <view class="item" v-for="(item,index) in serList">
- <view class="left">
- <image class="icon" src="../../static/other/edit.png" mode=""></image>
- {{item.name}}
- </view>
- <image class="icon_r" src="../../static/other/arrR.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- // import navBar from '@/components/navBar/index.vue'
- export default {
- // components: {
- // navBar
- // },
- data() {
- return {
- picBase: this.$picBase,
- navImg: require('@/static/other/logo.png'),
- tabBarList: [{
- "pagePath": "pages/index/index",
- "iconPath": "../../static/tabbar/index.png",
- "selectedIconPath": "../../static/tabbar/index_a.png",
- "text": "首页"
- },
- {
- "pagePath": "pages/my/index",
- "iconPath": "../../static/tabbar/my.png",
- "selectedIconPath": "../../static/tabbar/my_a.png",
- "text": "我的"
- }
- ],
- routePath: '',
- serList: [{
- name: '推荐奖励',
- icon: this.$picBase + 'edit.png',
- },
- {
- name: '消费记录',
- icon: this.$picBase + 'edit.png',
- },
- {
- name: '客服中心',
- icon: this.$picBase + 'edit.png',
- },
- {
- name: '关于我们',
- icon: this.$picBase + 'edit.png',
- },
- ]
- }
- },
- onLoad() {
- uni.hideTabBar()
- let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
- let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由
- this.routePath = curRoute;
- console.log('routePath', this.routePath);
- },
- methods: {
- onTabBar(e) {
- console.log('e------------', e);
- uni.switchTab({
- url: '/' + e
- })
- },
- toCharge() {
- uni.navigateTo({
- url: '/pages/my/charge/index'
- })
- },
- toHuibenJilu() {
- uni.navigateTo({
- url: '/pages/my/huiBen_record/index'
- })
- },
- toUserInfo() {
- uni.navigateTo({
- url: '/pages/my/userInfo/index'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "./index.scss";
- </style>
|