feat(web): 使用vite重新组织前端代码
This commit is contained in:
64
gringotts-frontend/pages/index/main.js
Normal file
64
gringotts-frontend/pages/index/main.js
Normal file
@@ -0,0 +1,64 @@
|
||||
import {apiGet, useAmis} from '../../components/constants.js'
|
||||
import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js";
|
||||
import {tabUser} from "./tab-user.js";
|
||||
import {tabOverview} from "./tab-overview.js";
|
||||
|
||||
useAmis(information => {
|
||||
return {
|
||||
id: 'header-service',
|
||||
className: 'h-full',
|
||||
type: 'service',
|
||||
api: apiGet('${base}/user/state'),
|
||||
onEvent: {
|
||||
fetchInited: {
|
||||
actions: [
|
||||
{
|
||||
expression: '${!event.data.responseData.token}',
|
||||
actionType: 'url',
|
||||
args: {
|
||||
url: '/pages/login/index.html',
|
||||
blank: false,
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'page',
|
||||
title: information.title,
|
||||
subTitle: '提供合法合规的数据要素可信供给工具',
|
||||
toolbar: [
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
label: '${username}',
|
||||
align: 'right',
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
label: '修改密码',
|
||||
...userChangePasswordDialog(),
|
||||
},
|
||||
{
|
||||
label: '退出登陆',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user/logout'),
|
||||
reload: 'header-service',
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
bodyClassName: 'p-0',
|
||||
body: {
|
||||
className: 'h-full border-0',
|
||||
type: 'tabs',
|
||||
tabsMode: 'vertical',
|
||||
tabs: [
|
||||
tabOverview(),
|
||||
tabUser(),
|
||||
]
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user