@atooyu/uxto-fronted 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/example/index.html +12 -0
- package/example/package-lock.json +11120 -0
- package/example/package.json +37 -0
- package/example/patches/@dcloudio+vite-plugin-uni+3.0.0-4060620250520001.patch +13 -0
- package/example/src/App.vue +25 -0
- package/example/src/assets/styles/index.scss +130 -0
- package/example/src/env.d.ts +10 -0
- package/example/src/main.ts +10 -0
- package/example/src/manifest.json +40 -0
- package/example/src/pages/home/index.vue +74 -0
- package/example/src/pages/mine/index.vue +339 -0
- package/example/src/pages/uxto/index.vue +109 -0
- package/example/src/pages.json +28 -0
- package/example/src/stores/index.ts +1 -0
- package/example/src/stores/theme.ts +95 -0
- package/example/tsconfig.json +20 -0
- package/example/vite.config.js +30 -0
- package/package.json +46 -0
- package/template/index.html +12 -0
- package/template/package.json +37 -0
- package/template/src/App.vue +22 -0
- package/template/src/assets/styles/index.scss +213 -0
- package/template/src/env.d.ts +20 -0
- package/template/src/main.ts +12 -0
- package/template/src/manifest.json +69 -0
- package/template/src/pages/api/index.vue +43 -0
- package/template/src/pages/components/index.vue +43 -0
- package/template/src/pages/index/index.vue +51 -0
- package/template/src/pages/store/index.vue +43 -0
- package/template/src/pages/tabbar/index.vue +111 -0
- package/template/src/pages/utils/index.vue +43 -0
- package/template/src/pages.json +53 -0
- package/template/src/static/tabbar/README.md +30 -0
- package/template/src/stores/cart.ts +50 -0
- package/template/src/stores/counter.ts +28 -0
- package/template/src/stores/index.ts +4 -0
- package/template/src/stores/theme.ts +100 -0
- package/template/src/stores/user.ts +48 -0
- package/template/src/utils/common.ts +106 -0
- package/template/src/utils/http.ts +46 -0
- package/template/src/utils/index.ts +3 -0
- package/template/src/utils/storage.ts +26 -0
- package/template/tsconfig.json +30 -0
- package/template/vite.config.js +27 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atooyu/uxto-example",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "UXTO Example",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "patch-package",
|
|
8
|
+
"dev:h5": "uni",
|
|
9
|
+
"dev:app": "uni -p app",
|
|
10
|
+
"dev:mp-weixin": "uni -p mp-weixin",
|
|
11
|
+
"dev:harmony": "uni -p app-harmony",
|
|
12
|
+
"build:h5": "uni build",
|
|
13
|
+
"build:app": "uni build -p app",
|
|
14
|
+
"build:mp-weixin": "uni build -p mp-weixin",
|
|
15
|
+
"build:harmony": "uni build -p app-harmony"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@dcloudio/uni-app": "3.0.0-4060620250520001",
|
|
19
|
+
"@dcloudio/uni-app-harmony": "3.0.0-4060620250520001",
|
|
20
|
+
"@dcloudio/uni-components": "3.0.0-4060620250520001",
|
|
21
|
+
"@dcloudio/uni-h5": "3.0.0-4060620250520001",
|
|
22
|
+
"pinia": "^2.1.7",
|
|
23
|
+
"vue": "^3.5.13"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@dcloudio/types": "^3.4.14",
|
|
27
|
+
"@dcloudio/uni-automator": "3.0.0-4060620250520001",
|
|
28
|
+
"@dcloudio/uni-cli-shared": "3.0.0-4060620250520001",
|
|
29
|
+
"@dcloudio/uni-stacktracey": "3.0.0-4060620250520001",
|
|
30
|
+
"@dcloudio/vite-plugin-uni": "3.0.0-4060620250520001",
|
|
31
|
+
"@types/node": "^22.13.10",
|
|
32
|
+
"patch-package": "^8.0.1",
|
|
33
|
+
"sass": "^1.85.1",
|
|
34
|
+
"typescript": "^5.8.2",
|
|
35
|
+
"vite": "^5.2.8"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/resolveId.js b/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/resolveId.js
|
|
2
|
+
index d5c7927..9574535 100644
|
|
3
|
+
--- a/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/resolveId.js
|
|
4
|
+
+++ b/node_modules/@dcloudio/vite-plugin-uni/dist/configResolved/plugins/resolveId.js
|
|
5
|
+
@@ -8,7 +8,7 @@ const path_1 = __importDefault(require("path"));
|
|
6
|
+
const uni_cli_shared_1 = require("@dcloudio/uni-cli-shared");
|
|
7
|
+
// const debugResolve = debug('uni:resolve-id')
|
|
8
|
+
const BUILT_IN_MODULES = {
|
|
9
|
+
- 'vue-router': 'dist/vue-router.esm-bundler.js',
|
|
10
|
+
+ 'vue-router': '',
|
|
11
|
+
vuex: 'dist/vuex.esm-bundler.js',
|
|
12
|
+
'vue-i18n': 'dist/vue-i18n.esm-bundler.js',
|
|
13
|
+
'@dcloudio/uni-app': 'dist/uni-app.es.js',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useThemeStore } from '@/stores/theme'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
onLaunch() {
|
|
6
|
+
console.log('UXTO Example Launch')
|
|
7
|
+
const themeStore = useThemeStore()
|
|
8
|
+
themeStore.loadFromStorage()
|
|
9
|
+
},
|
|
10
|
+
onShow() { console.log('UXTO Example Show') },
|
|
11
|
+
onHide() { console.log('UXTO Example Hide') }
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style lang="scss">
|
|
16
|
+
@import "@/assets/styles/index.scss";
|
|
17
|
+
|
|
18
|
+
button {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
background: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
&::after { border: none; }
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* UXTO Example 全局样式 */
|
|
2
|
+
|
|
3
|
+
/* ============================================
|
|
4
|
+
默认模式 - 明亮清新
|
|
5
|
+
============================================ */
|
|
6
|
+
:root {
|
|
7
|
+
--color-primary: #1989fa;
|
|
8
|
+
--color-success: #07c160;
|
|
9
|
+
--color-warning: #ff976a;
|
|
10
|
+
--color-danger: #ee0a24;
|
|
11
|
+
--color-info: #969799;
|
|
12
|
+
|
|
13
|
+
--text-color: #323233;
|
|
14
|
+
--text-color-2: #646566;
|
|
15
|
+
--text-color-3: #969799;
|
|
16
|
+
|
|
17
|
+
--bg-color: #f7f8fa;
|
|
18
|
+
--bg-color-2: #ffffff;
|
|
19
|
+
--bg-color-3: #f5f5f5;
|
|
20
|
+
|
|
21
|
+
--border-color: #ebedf0;
|
|
22
|
+
--shadow-color: rgba(0, 0, 0, 0.08);
|
|
23
|
+
|
|
24
|
+
--card-bg: #ffffff;
|
|
25
|
+
--switch-bg: #e5e5e5;
|
|
26
|
+
--switch-active: #12b6af;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ============================================
|
|
30
|
+
暗黑模式 - 深邃墨蓝,沉浸式夜间体验
|
|
31
|
+
============================================ */
|
|
32
|
+
.dark-mode,
|
|
33
|
+
[data-theme="dark"] {
|
|
34
|
+
--color-primary: #58a6ff;
|
|
35
|
+
--color-success: #3fb950;
|
|
36
|
+
--color-warning: #f0883e;
|
|
37
|
+
--color-danger: #f85149;
|
|
38
|
+
--color-info: #8b949e;
|
|
39
|
+
|
|
40
|
+
--text-color: #c9d1d9;
|
|
41
|
+
--text-color-2: #8b949e;
|
|
42
|
+
--text-color-3: #6e7681;
|
|
43
|
+
|
|
44
|
+
--bg-color: #0d1117;
|
|
45
|
+
--bg-color-2: #161b22;
|
|
46
|
+
--bg-color-3: #21262d;
|
|
47
|
+
|
|
48
|
+
--border-color: #30363d;
|
|
49
|
+
--shadow-color: rgba(0, 0, 0, 0.4);
|
|
50
|
+
|
|
51
|
+
--card-bg: #161b22;
|
|
52
|
+
--switch-bg: #21262d;
|
|
53
|
+
--switch-active: #58a6ff;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dark-mode page,
|
|
57
|
+
[data-theme="dark"] page {
|
|
58
|
+
background-color: var(--bg-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dark-mode .page-container,
|
|
62
|
+
[data-theme="dark"] .page-container {
|
|
63
|
+
background: var(--bg-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dark-mode .card,
|
|
67
|
+
.dark-mode .section,
|
|
68
|
+
.dark-mode .menu-section,
|
|
69
|
+
[data-theme="dark"] .card,
|
|
70
|
+
[data-theme="dark"] .section,
|
|
71
|
+
[data-theme="dark"] .menu-section {
|
|
72
|
+
background: var(--card-bg);
|
|
73
|
+
box-shadow: 0 2rpx 16rpx var(--shadow-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dark-mode .theme-switch-card,
|
|
77
|
+
[data-theme="dark"] .theme-switch-card {
|
|
78
|
+
background: var(--card-bg);
|
|
79
|
+
border-color: var(--border-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ============================================
|
|
83
|
+
灰色模式 - 温柔灰调,护眼阅读体验
|
|
84
|
+
============================================ */
|
|
85
|
+
.gray-mode,
|
|
86
|
+
[data-theme="gray"] {
|
|
87
|
+
--color-primary: #737373;
|
|
88
|
+
--color-success: #525252;
|
|
89
|
+
--color-warning: #737373;
|
|
90
|
+
--color-danger: #737373;
|
|
91
|
+
--color-info: #a3a3a3;
|
|
92
|
+
|
|
93
|
+
--text-color: #525252;
|
|
94
|
+
--text-color-2: #737373;
|
|
95
|
+
--text-color-3: #a3a3a3;
|
|
96
|
+
|
|
97
|
+
--bg-color: #e5e5e5;
|
|
98
|
+
--bg-color-2: #f5f5f5;
|
|
99
|
+
--bg-color-3: #d4d4d4;
|
|
100
|
+
|
|
101
|
+
--border-color: #d4d4d4;
|
|
102
|
+
--shadow-color: rgba(0, 0, 0, 0.04);
|
|
103
|
+
|
|
104
|
+
--card-bg: #f5f5f5;
|
|
105
|
+
--switch-bg: #d4d4d4;
|
|
106
|
+
--switch-active: #737373;
|
|
107
|
+
|
|
108
|
+
filter: grayscale(85%);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.gray-mode page,
|
|
112
|
+
[data-theme="gray"] page {
|
|
113
|
+
background-color: var(--bg-color);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.gray-mode .page-container,
|
|
117
|
+
[data-theme="gray"] .page-container {
|
|
118
|
+
background: var(--bg-color);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* ============================================
|
|
122
|
+
重置样式
|
|
123
|
+
============================================ */
|
|
124
|
+
page {
|
|
125
|
+
background-color: var(--bg-color);
|
|
126
|
+
font-size: 28rpx;
|
|
127
|
+
color: var(--text-color);
|
|
128
|
+
line-height: 1.5;
|
|
129
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
|
130
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="@dcloudio/types" />
|
|
2
|
+
|
|
3
|
+
declare const uni: UniNamespace.Uni
|
|
4
|
+
declare const getCurrentPages: () => Page.PageInstance[]
|
|
5
|
+
|
|
6
|
+
declare module '*.vue' {
|
|
7
|
+
import type { DefineComponent } from 'vue'
|
|
8
|
+
const component: DefineComponent<object, object, unknown>
|
|
9
|
+
export default component
|
|
10
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uxto-example",
|
|
3
|
+
"appid": "__UNI__UXTO_EXAMPLE",
|
|
4
|
+
"description": "UXTO 组件库示例项目",
|
|
5
|
+
"versionName": "1.0.0",
|
|
6
|
+
"versionCode": "100",
|
|
7
|
+
"transformPx": false,
|
|
8
|
+
"app-plus": {
|
|
9
|
+
"usingComponents": true,
|
|
10
|
+
"nvueStyleCompiler": "uni-app",
|
|
11
|
+
"compilerVersion": 3,
|
|
12
|
+
"splashscreen": {
|
|
13
|
+
"alwaysShowBeforeRender": true,
|
|
14
|
+
"waiting": true,
|
|
15
|
+
"autoclose": true,
|
|
16
|
+
"delay": 0
|
|
17
|
+
},
|
|
18
|
+
"modules": {},
|
|
19
|
+
"distribute": {
|
|
20
|
+
"android": {
|
|
21
|
+
"permissions": [
|
|
22
|
+
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
|
23
|
+
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
24
|
+
"<uses-permission android:name=\"android.permission.CAMERA\"/>"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"ios": { "idfa": false },
|
|
28
|
+
"sdkConfigs": {}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"quickapp": {},
|
|
32
|
+
"mp-weixin": { "appid": "", "setting": { "urlCheck": false }, "usingComponents": true },
|
|
33
|
+
"mp-alipay": { "usingComponents": true },
|
|
34
|
+
"mp-baidu": { "usingComponents": true },
|
|
35
|
+
"mp-toutiao": { "usingComponents": true },
|
|
36
|
+
"uniStatistics": { "enable": false },
|
|
37
|
+
"vueVersion": "3",
|
|
38
|
+
"app-harmony": { "mode": "development", "projectName": "UXTOExample", "appSign": "", "appDebug": true },
|
|
39
|
+
"h5": { "template": "index.html", "router": { "mode": "hash" }, "optimization": { "prefetch": true, "preload": true } }
|
|
40
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
<template>
|
|
3
|
+
<view class="page-container">
|
|
4
|
+
<!-- 底部导航 -->
|
|
5
|
+
<u-tabbar
|
|
6
|
+
v-model="activeTab"
|
|
7
|
+
center-brand="U"
|
|
8
|
+
center-label="UXTO"
|
|
9
|
+
:left-tab="{ label: '首页', icon: '⌂', value: 'home' }"
|
|
10
|
+
:center-tab="{ label: 'UXTO', icon: 'U', value: 'uxto' }"
|
|
11
|
+
:right-tab="{ label: '我的', icon: '◉', value: 'mine' }"
|
|
12
|
+
@tab-change="onTabChange"
|
|
13
|
+
/>
|
|
14
|
+
</view>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { ref } from 'vue'
|
|
19
|
+
import UCell from 'uxto-ui/u-cell/u-cell.vue'
|
|
20
|
+
import UCellGroup from 'uxto-ui/u-cell-group/u-cell-group.vue'
|
|
21
|
+
|
|
22
|
+
const activeTab = ref('home')
|
|
23
|
+
|
|
24
|
+
const onTabChange = (tab: string) => {
|
|
25
|
+
if (tab === 'uxto') {
|
|
26
|
+
uni.redirectTo({ url: '/pages/uxto/index' })
|
|
27
|
+
} else if (tab === 'mine') {
|
|
28
|
+
uni.redirectTo({ url: '/pages/mine/index' })
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
.page-container {
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
background: #f7f8fa;
|
|
37
|
+
padding-bottom: 120rpx;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.header {
|
|
41
|
+
padding: 60rpx 40rpx 40rpx;
|
|
42
|
+
text-align: center;
|
|
43
|
+
background: linear-gradient(135deg, #1989fa 0%, #07c160 100%);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.title {
|
|
47
|
+
display: block;
|
|
48
|
+
font-size: 48rpx;
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
color: #fff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.subtitle {
|
|
54
|
+
display: block;
|
|
55
|
+
font-size: 26rpx;
|
|
56
|
+
color: rgba(255, 255, 255, 0.8);
|
|
57
|
+
margin-top: 12rpx;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.demo-section {
|
|
61
|
+
margin: 20rpx;
|
|
62
|
+
border-radius: 16rpx;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.section-title {
|
|
67
|
+
display: block;
|
|
68
|
+
font-size: 28rpx;
|
|
69
|
+
font-weight: bold;
|
|
70
|
+
color: #333;
|
|
71
|
+
padding: 24rpx 24rpx 16rpx;
|
|
72
|
+
background: #fff;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="page-container">
|
|
3
|
+
<!-- 用户头部 -->
|
|
4
|
+
<view class="user-header">
|
|
5
|
+
<view class="avatar-ring">
|
|
6
|
+
<view class="avatar">
|
|
7
|
+
<text class="avatar-text">U</text>
|
|
8
|
+
</view>
|
|
9
|
+
</view>
|
|
10
|
+
<text class="username">UXTO 用户</text>
|
|
11
|
+
<text class="user-desc">体验多端开发的魅力</text>
|
|
12
|
+
</view>
|
|
13
|
+
|
|
14
|
+
<!-- 主题设置区域 -->
|
|
15
|
+
<view class="theme-section">
|
|
16
|
+
<text class="section-title">外观设置</text>
|
|
17
|
+
|
|
18
|
+
<!-- 暗黑模式开关 -->
|
|
19
|
+
<view class="theme-switch-card">
|
|
20
|
+
<view class="switch-icon dark-icon">
|
|
21
|
+
<text>🌙</text>
|
|
22
|
+
</view>
|
|
23
|
+
<view class="switch-info">
|
|
24
|
+
<text class="switch-label">暗黑模式</text>
|
|
25
|
+
<text class="switch-desc">深邃墨蓝,沉浸夜间</text>
|
|
26
|
+
</view>
|
|
27
|
+
<view class="switch-wrapper">
|
|
28
|
+
<u-switch
|
|
29
|
+
v-model="theme.darkMode"
|
|
30
|
+
:size="26"
|
|
31
|
+
@change="onDarkModeChange"
|
|
32
|
+
/>
|
|
33
|
+
</view>
|
|
34
|
+
</view>
|
|
35
|
+
|
|
36
|
+
<!-- 灰色模式开关 -->
|
|
37
|
+
<view class="theme-switch-card">
|
|
38
|
+
<view class="switch-icon gray-icon">
|
|
39
|
+
<text>📖</text>
|
|
40
|
+
</view>
|
|
41
|
+
<view class="switch-info">
|
|
42
|
+
<text class="switch-label">灰色模式</text>
|
|
43
|
+
<text class="switch-desc">温柔灰调,护眼阅读</text>
|
|
44
|
+
</view>
|
|
45
|
+
<view class="switch-wrapper">
|
|
46
|
+
<u-switch
|
|
47
|
+
v-model="theme.grayMode"
|
|
48
|
+
:size="26"
|
|
49
|
+
@change="onGrayModeChange"
|
|
50
|
+
/>
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
|
|
54
|
+
<!-- 模式提示 -->
|
|
55
|
+
<view class="mode-hint" v-if="theme.darkMode">
|
|
56
|
+
<text class="hint-text">✨ 暗黑模式已开启,享受沉浸体验</text>
|
|
57
|
+
</view>
|
|
58
|
+
<view class="mode-hint" v-else-if="theme.grayMode">
|
|
59
|
+
<text class="hint-text">📚 灰色模式已开启,护眼阅读更舒适</text>
|
|
60
|
+
</view>
|
|
61
|
+
</view>
|
|
62
|
+
|
|
63
|
+
<!-- 菜单区域 -->
|
|
64
|
+
<view class="menu-section">
|
|
65
|
+
<view class="menu-item" @click="handleMenuClick('profile')">
|
|
66
|
+
<text class="menu-icon">👤</text>
|
|
67
|
+
<text class="menu-text">个人资料</text>
|
|
68
|
+
<text class="menu-arrow">›</text>
|
|
69
|
+
</view>
|
|
70
|
+
<view class="menu-item" @click="handleMenuClick('settings')">
|
|
71
|
+
<text class="menu-icon">⚙️</text>
|
|
72
|
+
<text class="menu-text">账号设置</text>
|
|
73
|
+
<text class="menu-arrow">›</text>
|
|
74
|
+
</view>
|
|
75
|
+
<view class="menu-item" @click="handleMenuClick('notification')">
|
|
76
|
+
<text class="menu-icon">🔔</text>
|
|
77
|
+
<text class="menu-text">消息通知</text>
|
|
78
|
+
<text class="menu-arrow">›</text>
|
|
79
|
+
</view>
|
|
80
|
+
</view>
|
|
81
|
+
|
|
82
|
+
<view class="menu-section">
|
|
83
|
+
<view class="menu-item" @click="handleMenuClick('help')">
|
|
84
|
+
<text class="menu-icon">❓</text>
|
|
85
|
+
<text class="menu-text">帮助中心</text>
|
|
86
|
+
<text class="menu-arrow">›</text>
|
|
87
|
+
</view>
|
|
88
|
+
<view class="menu-item" @click="handleMenuClick('about')">
|
|
89
|
+
<text class="menu-icon">ℹ️</text>
|
|
90
|
+
<text class="menu-text">关于我们</text>
|
|
91
|
+
<text class="menu-arrow">›</text>
|
|
92
|
+
</view>
|
|
93
|
+
</view>
|
|
94
|
+
|
|
95
|
+
<!-- 底部导航 -->
|
|
96
|
+
<u-tabbar
|
|
97
|
+
v-model="activeTab"
|
|
98
|
+
center-brand="U"
|
|
99
|
+
center-label="UXTO"
|
|
100
|
+
:left-tab="{ label: '首页', icon: '⌂', value: 'home' }"
|
|
101
|
+
:center-tab="{ label: 'UXTO', icon: 'U', value: 'uxto' }"
|
|
102
|
+
:right-tab="{ label: '我的', icon: '◉', value: 'mine' }"
|
|
103
|
+
@tab-change="onTabChange"
|
|
104
|
+
/>
|
|
105
|
+
</view>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<script setup lang="ts">
|
|
109
|
+
import { ref } from 'vue'
|
|
110
|
+
import { useThemeStore } from '@/stores/theme'
|
|
111
|
+
|
|
112
|
+
const theme = useThemeStore()
|
|
113
|
+
const activeTab = ref('mine')
|
|
114
|
+
|
|
115
|
+
const onDarkModeChange = (value: boolean) => {
|
|
116
|
+
theme.setDarkMode(value)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const onGrayModeChange = (value: boolean) => {
|
|
120
|
+
theme.setGrayMode(value)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const onTabChange = (tab: string) => {
|
|
124
|
+
if (tab === 'home') {
|
|
125
|
+
uni.redirectTo({ url: '/pages/home/index' })
|
|
126
|
+
} else if (tab === 'uxto') {
|
|
127
|
+
uni.redirectTo({ url: '/pages/uxto/index' })
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const handleMenuClick = (type: string) => {
|
|
132
|
+
uni.showToast({
|
|
133
|
+
title: `点击了${type}`,
|
|
134
|
+
icon: 'none'
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style lang="scss" scoped>
|
|
140
|
+
.page-container {
|
|
141
|
+
min-height: 100vh;
|
|
142
|
+
background: var(--bg-color);
|
|
143
|
+
padding-bottom: 140rpx;
|
|
144
|
+
transition: background 0.3s ease;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 用户头部
|
|
148
|
+
.user-header {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
align-items: center;
|
|
152
|
+
padding: 80rpx 40rpx 60rpx;
|
|
153
|
+
background: linear-gradient(135deg, #1989fa 0%, #07c160 100%);
|
|
154
|
+
position: relative;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
|
|
157
|
+
&::before {
|
|
158
|
+
content: '';
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: -50%;
|
|
161
|
+
left: -50%;
|
|
162
|
+
width: 200%;
|
|
163
|
+
height: 200%;
|
|
164
|
+
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
|
|
165
|
+
animation: float 8s ease-in-out infinite;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes float {
|
|
170
|
+
0%, 100% { transform: translate(0, 0) rotate(0deg); }
|
|
171
|
+
50% { transform: translate(2%, 2%) rotate(5deg); }
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.avatar-ring {
|
|
175
|
+
width: 140rpx;
|
|
176
|
+
height: 140rpx;
|
|
177
|
+
border-radius: 50%;
|
|
178
|
+
background: rgba(255, 255, 255, 0.3);
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
position: relative;
|
|
183
|
+
z-index: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.avatar {
|
|
187
|
+
width: 120rpx;
|
|
188
|
+
height: 120rpx;
|
|
189
|
+
border-radius: 50%;
|
|
190
|
+
background: #fff;
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.avatar-text {
|
|
198
|
+
font-size: 52rpx;
|
|
199
|
+
font-weight: 700;
|
|
200
|
+
color: #1989fa;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.username {
|
|
204
|
+
font-size: 36rpx;
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
color: #fff;
|
|
207
|
+
margin-top: 24rpx;
|
|
208
|
+
position: relative;
|
|
209
|
+
z-index: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.user-desc {
|
|
213
|
+
font-size: 26rpx;
|
|
214
|
+
color: rgba(255, 255, 255, 0.85);
|
|
215
|
+
margin-top: 8rpx;
|
|
216
|
+
position: relative;
|
|
217
|
+
z-index: 1;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// 主题设置区域
|
|
221
|
+
.theme-section {
|
|
222
|
+
margin: 32rpx 24rpx 24rpx;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.section-title {
|
|
226
|
+
display: block;
|
|
227
|
+
font-size: 28rpx;
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
color: var(--text-color-2);
|
|
230
|
+
margin-bottom: 20rpx;
|
|
231
|
+
padding-left: 8rpx;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.theme-switch-card {
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
background: var(--card-bg);
|
|
238
|
+
border-radius: 20rpx;
|
|
239
|
+
padding: 28rpx 24rpx;
|
|
240
|
+
margin-bottom: 16rpx;
|
|
241
|
+
box-shadow: 0 4rpx 20rpx var(--shadow-color);
|
|
242
|
+
transition: all 0.3s ease;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.switch-icon {
|
|
246
|
+
width: 72rpx;
|
|
247
|
+
height: 72rpx;
|
|
248
|
+
border-radius: 16rpx;
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
justify-content: center;
|
|
252
|
+
margin-right: 20rpx;
|
|
253
|
+
font-size: 36rpx;
|
|
254
|
+
|
|
255
|
+
&.dark-icon {
|
|
256
|
+
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&.gray-icon {
|
|
260
|
+
background: linear-gradient(135deg, #d4d4d4 0%, #e5e5e5 100%);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.switch-info {
|
|
265
|
+
flex: 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.switch-label {
|
|
269
|
+
display: block;
|
|
270
|
+
font-size: 30rpx;
|
|
271
|
+
font-weight: 500;
|
|
272
|
+
color: var(--text-color);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.switch-desc {
|
|
276
|
+
display: block;
|
|
277
|
+
font-size: 24rpx;
|
|
278
|
+
color: var(--text-color-3);
|
|
279
|
+
margin-top: 4rpx;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.switch-wrapper {
|
|
283
|
+
transform: scale(1.1);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.mode-hint {
|
|
287
|
+
background: linear-gradient(135deg, rgba(25, 137, 250, 0.1) 0%, rgba(7, 193, 96, 0.1) 100%);
|
|
288
|
+
border-radius: 12rpx;
|
|
289
|
+
padding: 20rpx 24rpx;
|
|
290
|
+
margin-top: 8rpx;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.hint-text {
|
|
294
|
+
font-size: 24rpx;
|
|
295
|
+
color: var(--color-primary);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 菜单区域
|
|
299
|
+
.menu-section {
|
|
300
|
+
margin: 24rpx;
|
|
301
|
+
background: var(--card-bg);
|
|
302
|
+
border-radius: 20rpx;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
box-shadow: 0 4rpx 20rpx var(--shadow-color);
|
|
305
|
+
transition: all 0.3s ease;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.menu-item {
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
padding: 32rpx 24rpx;
|
|
312
|
+
transition: background 0.2s ease;
|
|
313
|
+
|
|
314
|
+
&:not(:last-child) {
|
|
315
|
+
border-bottom: 1rpx solid var(--border-color);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&:active {
|
|
319
|
+
background: var(--bg-color-3);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.menu-icon {
|
|
324
|
+
font-size: 40rpx;
|
|
325
|
+
margin-right: 20rpx;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.menu-text {
|
|
329
|
+
flex: 1;
|
|
330
|
+
font-size: 30rpx;
|
|
331
|
+
color: var(--text-color);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.menu-arrow {
|
|
335
|
+
font-size: 32rpx;
|
|
336
|
+
color: var(--text-color-3);
|
|
337
|
+
font-weight: 300;
|
|
338
|
+
}
|
|
339
|
+
</style>
|