123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <view class="login-status" @click.stop="getUserInfo()">
- <view class="head-icon">
- <text class="iconfont"></text>
- <!-- <image src="../../static/images/logo.png" mode="aspectFit"></image> -->
- </view>
- <view v-if="!token" class="no-login">
- 登录/注册
- </view>
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- // token
- export default {
- name: 'loginComponents',
- data() {
- return {
- userInfo: false
- };
- },
- computed: {
- ...mapGetters([
- 'token'
- ]),
- },
- methods: {
- getUserInfo() {
- uni.navigateTo({
- url: '/pages/content/mine'
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .login-status {
- display: flex;
- align-items: center;
- .no-login {
- padding-left: 3px;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- }
- }
- </style>
|