index.vue
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<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>