index.vue 2.3 KB
<template>
  <view class="mine-page">
    <view class="page-content">
      <view class="hero-card">
        <text class="hero-title">我的</text>
        <text class="hero-desc">
          这里预留给个人资料、授权信息和常用入口。当前阶段先提供基础占位和授权状态展示。
        </text>
      </view>

      <view class="status-card">
        <text class="section-title">授权状态</text>
        <view class="status-row">
          <text class="section-desc">当前小程序登录态</text>
          <text class="status-tag" :class="{ authed: isAuthed }">
            {{ isAuthed ? '已授权' : '未授权' }}
          </text>
        </view>
      </view>
    </view>

    <AppTabbar current="mine" />
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { useDidShow } from '@tarojs/taro'
import AppTabbar from '@/components/AppTabbar.vue'
import { hasAuth } from '@/utils/authRedirect'

const isAuthed = ref(false)

useDidShow(() => {
  isAuthed.value = hasAuth()
})
</script>

<style lang="less">
.mine-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(166, 121, 57, 0.14), transparent 30%),
    linear-gradient(180deg, #fffaf4 0%, #f3f5f9 100%);

  .page-content {
    padding: 32rpx 24rpx 0;
    box-sizing: border-box;
  }

  .hero-card,
  .status-card {
    padding: 32rpx;
    border-radius: 28rpx;
    background: rgba(255, 255, 255, 0.94);
    border: 2rpx solid rgba(166, 121, 57, 0.08);
    box-shadow: 0 20rpx 60rpx rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
  }

  .hero-title,
  .section-title {
    display: block;
    font-size: 40rpx;
    font-weight: 700;
    color: #111827;
  }

  .hero-desc,
  .section-desc {
    display: block;
    margin-top: 16rpx;
    font-size: 26rpx;
    line-height: 1.8;
    color: #6b7280;
  }

  .status-card {
    margin-top: 24rpx;
  }

  .section-title {
    font-size: 30rpx;
  }

  .status-row {
    margin-top: 20rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24rpx;
  }

  .status-tag {
    flex-shrink: 0;
    padding: 12rpx 22rpx;
    border-radius: 999rpx;
    font-size: 24rpx;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
  }

  .status-tag.authed {
    color: #166534;
    background: #dcfce7;
  }
}
</style>