Skip to content

Commit d90042b

Browse files
committed
fixed: account center page
1 parent 7efa409 commit d90042b

File tree

9 files changed

+92
-8
lines changed

9 files changed

+92
-8
lines changed

src/router/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,45 +249,45 @@ export const asyncRouterMap = [
249249
{
250250
path: '/account/center',
251251
name: 'center',
252-
component: () => import('@/views/account/Index'),
252+
component: () => import('@/views/account/center/Index'),
253253
meta: { title: '个人中心', keepAlive: true }
254254
},
255255
{
256256
path: '/account/settings',
257257
name: 'settings',
258-
component: () => import('@/views/account/Index'),
258+
component: () => import('@/views/account/settings/Index'),
259259
meta: { title: '个人设置', hideHeader: true, keepAlive: true },
260260
redirect: '/account/settings/base',
261261
alwaysShow: true,
262262
children: [
263263
{
264264
path: '/account/settings/base',
265265
name: 'BaseSettings',
266-
component: () => import('@/views/account/BaseSetting'),
266+
component: () => import('@/views/account/settings/BaseSetting'),
267267
meta: { title: '基本设置', hidden: true, keepAlive: true }
268268
},
269269
{
270270
path: '/account/settings/security',
271271
name: 'SecuritySettings',
272-
component: () => import('@/views/account/Security'),
272+
component: () => import('@/views/account/settings/Security'),
273273
meta: { title: '安全设置', hidden: true, keepAlive: true }
274274
},
275275
{
276276
path: '/account/settings/custom',
277277
name: 'CustomSettings',
278-
component: () => import('@/views/account/Custom'),
278+
component: () => import('@/views/account/settings/Custom'),
279279
meta: { title: '个性化设置', hidden: true, keepAlive: true }
280280
},
281281
{
282282
path: '/account/settings/binding',
283283
name: 'BindingSettings',
284-
component: () => import('@/views/account/Binding'),
284+
component: () => import('@/views/account/settings/Binding'),
285285
meta: { title: '账户绑定', hidden: true, keepAlive: true }
286286
},
287287
{
288288
path: '/account/settings/notification',
289289
name: 'NotificationSettings',
290-
component: () => import('@/views/account/Notification'),
290+
component: () => import('@/views/account/settings/Notification'),
291291
meta: { title: '新消息通知', hidden: true, keepAlive: true }
292292
},
293293
]

src/views/account/center/Index.vue

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<template>
2+
<a-card :bordered="false" :bodyStyle="{ padding: '16px 0', height: '100%' }" :style="{ height: '100%' }">
3+
account center page
4+
</a-card>
5+
</template>
6+
7+
<script>
8+
import PageLayout from '@/components/layout/PageLayout'
9+
import RouteView from "@/components/layout/RouteView";
10+
11+
export default {
12+
components: {
13+
RouteView,
14+
PageLayout
15+
},
16+
data () {
17+
return {
18+
defaultSelectedKeys: [],
19+
20+
// cropper
21+
preview: {},
22+
option: {
23+
img: '/avatar2.jpg',
24+
info: true,
25+
size: 1,
26+
outputType: 'jpeg',
27+
canScale: false,
28+
autoCrop: true,
29+
// 只有自动截图开启 宽度高度才生效
30+
autoCropWidth: 180,
31+
autoCropHeight: 180,
32+
fixedBox: true,
33+
// 开启宽度和高度比例
34+
fixed: true,
35+
fixedNumber: [1, 1]
36+
},
37+
38+
pageTitle: ''
39+
}
40+
},
41+
created () {
42+
this.updateMenu()
43+
},
44+
methods: {
45+
onOpenChange (openKeys) {
46+
47+
},
48+
updateMenu () {
49+
let routes = this.$route.matched.concat()
50+
this.defaultSelectedKeys = [ routes.pop().path ]
51+
}
52+
},
53+
}
54+
</script>
55+
56+
<style lang="scss" scoped>
57+
.account-settings-info-main {
58+
width: 100%;
59+
display: flex;
60+
height: 100%;
61+
overflow: auto;
62+
63+
.account-settings-info-left {
64+
border-right: 1px solid #e8e8e8;
65+
width: 224px;
66+
}
67+
68+
.account-settings-info-right {
69+
flex: 1 1;
70+
padding: 8px 40px;
71+
72+
.account-settings-info-title {
73+
color: rgba(0,0,0,.85);
74+
font-size: 20px;
75+
font-weight: 500;
76+
line-height: 28px;
77+
margin-bottom: 12px;
78+
}
79+
.account-settings-info-view {
80+
padding-top: 12px;
81+
}
82+
}
83+
}
84+
</style>
File renamed without changes.
File renamed without changes.

src/views/account/IndexOld.vue renamed to src/views/account/settings/IndexOld.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
</template>
8787

8888
<script>
89-
import {timeFix, welcome} from "../../utils/util"
89+
import {timeFix, welcome} from "../../../utils/util"
9090
import LayoutMain from '@/components/layout/LayoutMain'
9191
import PageLayout from '@/components/layout/PageLayout'
9292

0 commit comments

Comments
 (0)