123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view class="content">
- <u-navbar back-icon-size="0" title="星火纵横" :title-color="mainColor" title-bold></u-navbar>
- <u-card :head-border-bottom="false" :foot-border-top="false" padding="0px" margin="10px" borderRadius="40" v-for="(item, index) in cardList"
- :key="index" class="card-box" @click="goToHandle(item)">
- <view class="card-content" slot="body">
- <view class="iconfont" :class="item.icon"></view>
- <view class="card-label">{{item.label}}</view>
- <view class="iconfont iconjinru"></view>
- </view>
- </u-card>
- <u-top-tips ref="uTips"></u-top-tips>
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- const NET = require('@/utils/request')
- const API = require('@/config/api')
- export default {
- computed: {
- ...mapGetters([
- 'mainColor',
- ])
- },
- data() {
- return {
- cardList: [{
- icon: 'iconzu4931',
- label: '我的补课',
- path: 'extraLessonsForm'
- },
- {
- icon: 'iconwodebanji',
- label: '我的班级',
- path: 'classList'
- },
- {
- icon: 'iconwodepaiban',
- label: '我的排班',
- path: 'timetable'
- }
- ]
- }
- },
- onLoad() {
- // uni.setStorage({
- // key: 'token',
- // data: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDT0FDSDo4OSJ9.7DPbdHQIkhpCXE2Tf6eHkdl0Y69C6kbRwntVdKm4DXu1_LlP1ue_2t4LKW0CYLm-enBRzBvIxkgvYjZSoKhqSA'
- // })
- if (!uni.getStorageSync('token')) {
- uni.navigateTo({
- url: '/pages/login/index'
- });
- }
- },
- methods: {
- // 跳转
- goToHandle(item) {
- uni.removeStorageSync({
- key: 'extraLessonsUserList'
- })
- uni.navigateTo({
- url: '/pagesClass/' + item.path
- });
- },
- },
- }
- </script>
- <style>
- page {
- width: 100%;
- height: 100%;
- background-color: #f7f7f7;
- }
- </style>
- <style lang="scss" scoped>
- @import "@/static/css/themes.scss";
- .content {
- width: 100%;
- float: left;
- /deep/.u-navbar {
- .u-title {
- font-weight: bold;
- }
- }
- .card-box {
- .card-content {
- padding: 20px 15px;
- display: flex;
- align-items: center;
- .iconfont {
- width: 40px;
- height: 40px;
- font-size: 32px;
- color: $mainColor;
- display: flex;
- align-items: center;
- }
- .card-label {
- font-size: 16px;
- font-weight: bold;
- flex: 1;
- margin-left: 10px;
- }
- .iconjinru {
- font-size: 22px;
- justify-content: flex-end;
- }
- }
- }
- }
- </style>
|