From 5d240edb842c40f323dcd293440161e85ac7471c Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Wed, 22 Apr 2026 16:11:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20setting=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/eye.svg | 5 + src/views/main-header.vue | 2 +- src/views/setting/components/Radio.vue | 4 + src/views/setting/index.vue | 1110 ++++++++++-------------- 4 files changed, 479 insertions(+), 642 deletions(-) create mode 100644 src/assets/icons/eye.svg diff --git a/src/assets/icons/eye.svg b/src/assets/icons/eye.svg new file mode 100644 index 0000000..9b4d290 --- /dev/null +++ b/src/assets/icons/eye.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/views/main-header.vue b/src/views/main-header.vue index 406d949..54f3a83 100644 --- a/src/views/main-header.vue +++ b/src/views/main-header.vue @@ -124,7 +124,7 @@ } const onSettings = () => { hideProfilePopover() - console.log('settings') + router.push('/settings') } const onLogout = () => { hideProfilePopover() diff --git a/src/views/setting/components/Radio.vue b/src/views/setting/components/Radio.vue index 8d2376c..7c05e54 100644 --- a/src/views/setting/components/Radio.vue +++ b/src/views/setting/components/Radio.vue @@ -29,6 +29,7 @@ const props = defineProps<{ modelValue: string | number | boolean | Array | null options: Option[] // 按钮选项数组 multiple?: boolean // 是否支持多选,默认为 false + max?: number // 多选时最多可选数量,不传则不限制 }>() const emit = defineEmits<{ @@ -54,6 +55,9 @@ const selectOption = (value: any) => { if (index >= 0) { current.splice(index, 1) } else { + if (typeof props.max === 'number' && props.max > 0 && current.length >= props.max) { + current.shift() + } current.push(value) } emit('update:modelValue', current) diff --git a/src/views/setting/index.vue b/src/views/setting/index.vue index 831ddb5..1a8eed3 100644 --- a/src/views/setting/index.vue +++ b/src/views/setting/index.vue @@ -18,9 +18,7 @@
- +
{{ fullName }}
@@ -28,113 +26,66 @@
- - - + @@ -147,72 +98,72 @@
+
-
EMAIL
- - +
+
EMAIL
+
{{ displayData.email }}
+ +
-
+
NEW EMAIL ADDRESS
-
+
- +
Verify
-
+
-
PASSWORD
- - +
+
PASSWORD
+
.........
+ +
- +
+
@@ -227,40 +178,26 @@
DISPLAY LANGUAGE
- - +
+ {{ displayData.language }} +
+
+ + + +
REGION
- - +
+ {{ displayData.region }} +
+
+ + + +
@@ -285,10 +222,8 @@ + + \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 7858deb..a2e30c1 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -25,6 +25,11 @@ const router = createRouter({ name: 'brand', component: () => import('../views/brand/index.vue'), }, + { + path: '/digitalItem', + name: 'digitalItem', + component: () => import('../views/digitalItem/index.vue'), + }, { path: '/:pathMatch(.*)', name: '404', diff --git a/src/views/digitalItem/commodity-list.vue b/src/views/digitalItem/commodity-list.vue new file mode 100644 index 0000000..9c99b70 --- /dev/null +++ b/src/views/digitalItem/commodity-list.vue @@ -0,0 +1,115 @@ + + + \ No newline at end of file diff --git a/src/views/digitalItem/index.vue b/src/views/digitalItem/index.vue new file mode 100644 index 0000000..dcfb1cd --- /dev/null +++ b/src/views/digitalItem/index.vue @@ -0,0 +1,101 @@ + + + \ No newline at end of file diff --git a/src/views/digitalItem/merchant-info.vue b/src/views/digitalItem/merchant-info.vue new file mode 100644 index 0000000..2063f15 --- /dev/null +++ b/src/views/digitalItem/merchant-info.vue @@ -0,0 +1,135 @@ + + + \ No newline at end of file From 751cd1aa1fcae1c78cce00fee2430364dc6a3015 Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Thu, 23 Apr 2026 09:39:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20notification=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 5 + src/views/main-header.vue | 2 +- .../components/NotificationListItem.vue | 136 ++++++++++++++ .../components/NotificationsList.vue | 111 ++++++++++++ src/views/notifications/index.vue | 166 ++++++++++++++++++ src/views/notifications/types.ts | 8 + 6 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 src/views/notifications/components/NotificationListItem.vue create mode 100644 src/views/notifications/components/NotificationsList.vue create mode 100644 src/views/notifications/index.vue create mode 100644 src/views/notifications/types.ts diff --git a/src/router/index.ts b/src/router/index.ts index 7c94de4..dc46a8e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -29,6 +29,11 @@ const router = createRouter({ component: () => import('@/views/setting/index.vue'), meta: { cache: true } }, + { + path: '/notifications', + name: 'notifications', + component: () => import('@/views/notifications/index.vue') + }, { path: '/:pathMatch(.*)', name: '404', diff --git a/src/views/main-header.vue b/src/views/main-header.vue index 54f3a83..42562c3 100644 --- a/src/views/main-header.vue +++ b/src/views/main-header.vue @@ -120,7 +120,7 @@ } const onNotifications = () => { hideProfilePopover() - console.log('notifications') + router.push('/notifications') } const onSettings = () => { hideProfilePopover() diff --git a/src/views/notifications/components/NotificationListItem.vue b/src/views/notifications/components/NotificationListItem.vue new file mode 100644 index 0000000..e52039a --- /dev/null +++ b/src/views/notifications/components/NotificationListItem.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/views/notifications/components/NotificationsList.vue b/src/views/notifications/components/NotificationsList.vue new file mode 100644 index 0000000..161d904 --- /dev/null +++ b/src/views/notifications/components/NotificationsList.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/views/notifications/index.vue b/src/views/notifications/index.vue new file mode 100644 index 0000000..c1e08a2 --- /dev/null +++ b/src/views/notifications/index.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/notifications/types.ts b/src/views/notifications/types.ts new file mode 100644 index 0000000..90fabf5 --- /dev/null +++ b/src/views/notifications/types.ts @@ -0,0 +1,8 @@ +export interface NotificationRecord { + id: string + title: string + date: string + content: string + isUnread: boolean + isExpanded: boolean +}