| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <template>
- <div style="width: 100vw;">
- <div class="content flex">
- <div class="left-nav">
- <div class="nav-item hand" v-for="(item,index) in navList" @click="navto(item.path)"
- :class="{'action-item':currentUrl.indexOf(item.path) !=-1}">
- {{item.tit}}
- </div>
- </div>
- <div class="right-body">
- <router-view></router-view>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from 'vuex';
- export default {
- name: 'user',
- data() {
- return {
- navList: [{
- tit: '基本信息',
- path: '/user/setUserinfo'
- },
- {
- tit: '资金流水',
- path: '/user/money'
- },
- {
- tit: '充值记录',
- path: '/user/rechangeList'
- },
- {
- tit: '提现记录',
- path: '/user/takingList'
- },
- {
- tit: '转账记录',
- path: '/user/transferList'
- }
- ]
- }
- },
- computed: {
- ...mapState(['userInfo', 'baseInfo']),
- currentUrl() {
- return this.$route.path
- },
- },
- methods: {
- navto(path) {
- this.$router.push(path)
- }
- },
- mounted() {
- if (this.userInfo.agent_id == 1) {
- this.navList.splice(1, 0, {
- tit: '注册码',
- path: '/user/regList'
- }, );
- this.navList.splice(1, 0, {
- tit: '用户管理',
- path: '/user/userAdmin'
- }, );
- } else {
- this.navList.splice(1, 0, {
- tit: 'Token',
- path: '/user/tokenOrderList'
- }, );
- this.navList.splice(2, 0, {
- tit: '结算申请',
- path: '/user/jssq'
- }, );
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- width: 1425px;
- max-width: 1425px;
- margin: auto;
- }
- .left-nav {
- padding-top: 25px;
- width: 120px;
- height: 710px;
- flex-shrink: 0;
- .nav-item {
- height: 50px;
- line-height: 50px;
- margin-bottom: 20px;
- text-align: center;
- }
- .action-item {
- color: #007aff;
- border-right: #007aff 2px solid;
- font-weight: bold;
- }
- }
- .right-body {
- flex-grow: 1;
- max-width: 1240px;
- margin-left: 25px;
- }
- </style>
|