af-mobile-client-vue3 1.3.87 → 1.3.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,158 +1,158 @@
1
- <script setup lang="ts">
2
- import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
3
- import { getPlatformConfig, getPlatformRoutePrefix } from '@af-mobile-client-vue3/types/platform'
4
- import {
5
- Icon as VanIcon,
6
- } from 'vant'
7
- import { computed } from 'vue'
8
- import { useRouter } from 'vue-router'
9
-
10
- const router = useRouter()
11
- const userStore = useUserStore()
12
-
13
- const userInfo = computed(() => userStore.getUserInfo())
14
- const userName = computed(() => userInfo.value?.name || '外部用户')
15
- const platformType = computed(() => userStore.getPlatformType())
16
- const platformConfig = computed(() => getPlatformConfig(platformType.value))
17
- const userDescription = computed(() =>
18
- platformConfig.value?.description || '外部系统访问用户',
19
- )
20
-
21
- function goToProfile() {
22
- const routePrefix = getPlatformRoutePrefix(platformType.value)
23
- router.push(`${routePrefix}/my`)
24
- }
25
- async function clean () {
26
- await useUserStore().registerClean()
27
- }
28
- </script>
29
-
30
- <template>
31
- <main class="external_main">
32
- <!-- 顶部导航栏 -->
33
- <nav class="header_nav">
34
- <div class="header_content">
35
- <h1 class="main_title">
36
- 智慧燃气外部系统
37
- </h1>
38
- <div class="user_section" @click="goToProfile">
39
- <VanIcon name="user-o" class="user-icon" />
40
- </div>
41
- </div>
42
- </nav>
43
-
44
- <!-- 主要内容区域 -->
45
- <div class="content">
46
- <!-- 用户信息卡片 -->
47
- <div class="user-card">
48
- <div class="user-content">
49
- <div class="user-info">
50
- <VanIcon name="user-circle-o" size="64" color="#3b82f6" />
51
- <h2 class="user-name">
52
- {{ userName }}
53
- </h2>
54
- <p class="user-desc">
55
- {{ userDescription }}
56
- </p>
57
- <p v-if="platformConfig" class="platform-name">
58
- {{ platformConfig.name }}
59
- </p>
60
- <p class="platform-name" @click="clean">
61
- 清理缓存
62
- </p>
63
- </div>
64
- </div>
65
- </div>
66
- </div>
67
- </main>
68
- </template>
69
-
70
- <style scoped lang="less">
71
- .external_main {
72
- min-height: 100vh;
73
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
74
-
75
- .header_nav {
76
- background: rgba(255, 255, 255, 0.95);
77
- backdrop-filter: blur(10px);
78
- padding: 0 16px;
79
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
80
-
81
- .header_content {
82
- display: flex;
83
- justify-content: space-between;
84
- align-items: center;
85
- height: 56px;
86
-
87
- .main_title {
88
- font-size: 1.125rem;
89
- font-weight: 600;
90
- color: #333;
91
- margin: 0;
92
- }
93
-
94
- .user_section {
95
- padding: 8px;
96
- cursor: pointer;
97
- border-radius: 50%;
98
- background: rgba(59, 130, 246, 0.1);
99
- transition: all 0.3s ease;
100
-
101
- &:active {
102
- background: rgba(59, 130, 246, 0.2);
103
- }
104
-
105
- .user-icon {
106
- font-size: 20px;
107
- color: #3b82f6;
108
- }
109
- }
110
- }
111
- }
112
-
113
- .content {
114
- padding: 24px 16px;
115
- display: flex;
116
- justify-content: center;
117
-
118
- .user-card {
119
- width: 100%;
120
- max-width: 400px;
121
- border-radius: 12px;
122
- overflow: hidden;
123
- background: rgba(255, 255, 255, 0.95);
124
- backdrop-filter: blur(10px);
125
-
126
- :deep(.van-card__content) {
127
- padding: 32px 24px;
128
- }
129
-
130
- .user-content {
131
- .user-info {
132
- text-align: center;
133
-
134
- .user-name {
135
- font-size: 24px;
136
- font-weight: 600;
137
- color: #333;
138
- margin: 16px 0 8px 0;
139
- }
140
-
141
- .user-desc {
142
- font-size: 14px;
143
- color: #666;
144
- margin: 0;
145
- }
146
-
147
- .platform-name {
148
- font-size: 12px;
149
- color: #3b82f6;
150
- margin: 4px 0 0 0;
151
- font-weight: 500;
152
- }
153
- }
154
- }
155
- }
156
- }
157
- }
158
- </style>
1
+ <script setup lang="ts">
2
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
3
+ import { getPlatformConfig, getPlatformRoutePrefix } from '@af-mobile-client-vue3/types/platform'
4
+ import {
5
+ Icon as VanIcon,
6
+ } from 'vant'
7
+ import { computed } from 'vue'
8
+ import { useRouter } from 'vue-router'
9
+
10
+ const router = useRouter()
11
+ const userStore = useUserStore()
12
+
13
+ const userInfo = computed(() => userStore.getUserInfo())
14
+ const userName = computed(() => userInfo.value?.name || '外部用户')
15
+ const platformType = computed(() => userStore.getPlatformType())
16
+ const platformConfig = computed(() => getPlatformConfig(platformType.value))
17
+ const userDescription = computed(() =>
18
+ platformConfig.value?.description || '外部系统访问用户',
19
+ )
20
+
21
+ function goToProfile() {
22
+ const routePrefix = getPlatformRoutePrefix(platformType.value)
23
+ router.push(`${routePrefix}/my`)
24
+ }
25
+ async function clean() {
26
+ await useUserStore().registerClean()
27
+ }
28
+ </script>
29
+
30
+ <template>
31
+ <main class="external_main">
32
+ <!-- 顶部导航栏 -->
33
+ <nav class="header_nav">
34
+ <div class="header_content">
35
+ <h1 class="main_title">
36
+ 智慧燃气外部系统
37
+ </h1>
38
+ <div class="user_section" @click="goToProfile">
39
+ <VanIcon name="user-o" class="user-icon" />
40
+ </div>
41
+ </div>
42
+ </nav>
43
+
44
+ <!-- 主要内容区域 -->
45
+ <div class="content">
46
+ <!-- 用户信息卡片 -->
47
+ <div class="user-card">
48
+ <div class="user-content">
49
+ <div class="user-info">
50
+ <VanIcon name="user-circle-o" size="64" color="#3b82f6" />
51
+ <h2 class="user-name">
52
+ {{ userName }}
53
+ </h2>
54
+ <p class="user-desc">
55
+ {{ userDescription }}
56
+ </p>
57
+ <p v-if="platformConfig" class="platform-name">
58
+ {{ platformConfig.name }}
59
+ </p>
60
+ <p class="platform-name" @click="clean">
61
+ 清理缓存
62
+ </p>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </main>
68
+ </template>
69
+
70
+ <style scoped lang="less">
71
+ .external_main {
72
+ min-height: 100vh;
73
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
74
+
75
+ .header_nav {
76
+ background: rgba(255, 255, 255, 0.95);
77
+ backdrop-filter: blur(10px);
78
+ padding: 0 16px;
79
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
80
+
81
+ .header_content {
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
85
+ height: 56px;
86
+
87
+ .main_title {
88
+ font-size: 1.125rem;
89
+ font-weight: 600;
90
+ color: #333;
91
+ margin: 0;
92
+ }
93
+
94
+ .user_section {
95
+ padding: 8px;
96
+ cursor: pointer;
97
+ border-radius: 50%;
98
+ background: rgba(59, 130, 246, 0.1);
99
+ transition: all 0.3s ease;
100
+
101
+ &:active {
102
+ background: rgba(59, 130, 246, 0.2);
103
+ }
104
+
105
+ .user-icon {
106
+ font-size: 20px;
107
+ color: #3b82f6;
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ .content {
114
+ padding: 24px 16px;
115
+ display: flex;
116
+ justify-content: center;
117
+
118
+ .user-card {
119
+ width: 100%;
120
+ max-width: 400px;
121
+ border-radius: 12px;
122
+ overflow: hidden;
123
+ background: rgba(255, 255, 255, 0.95);
124
+ backdrop-filter: blur(10px);
125
+
126
+ :deep(.van-card__content) {
127
+ padding: 32px 24px;
128
+ }
129
+
130
+ .user-content {
131
+ .user-info {
132
+ text-align: center;
133
+
134
+ .user-name {
135
+ font-size: 24px;
136
+ font-weight: 600;
137
+ color: #333;
138
+ margin: 16px 0 8px 0;
139
+ }
140
+
141
+ .user-desc {
142
+ font-size: 14px;
143
+ color: #666;
144
+ margin: 0;
145
+ }
146
+
147
+ .platform-name {
148
+ font-size: 12px;
149
+ color: #3b82f6;
150
+ margin: 4px 0 0 0;
151
+ font-weight: 500;
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ </style>