Skip to content

Commit

Permalink
fix: 修复用户名不显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jianbing.chen committed Aug 5, 2024
1 parent d27bfac commit 9e127a3
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 90 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"private": true,
"name": "mars",
"description": "低代码平台,包含可视化编辑器、可视化后台管理,支持自定义组件开发",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"start:editor": "pnpm --filter editor start",
"build:editor": "pnpm --filter editor build",
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export interface PageParams {
export interface PageItem {
id: number;
name: string;
sso_name: string;
user_id: string;
user_name: string;
user_id: number;
remark: string;
updated_at: string;
created_at: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/pages/home/PageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ export default function Index() {
<StateTag item={item} />
</div>
<div className={styles.itemTitle}>{item.name}</div>
<div className={styles.itemRemark}>{item.remark}</div>
<div className={styles.itemRemark}>{item.remark || '暂无描述'}</div>
<div className={styles.updateUser}>
<span style={{ marginRight: 10 }}>
<UserOutlined style={{ fontSize: 15, marginRight: 5 }} />
{item.sso_name}
{item.user_name}
</span>
<span>更新时间:{dayjs(item.updated_at).fromNow()}</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/pages/home/ProjectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function Index() {
description={
<>
<div style={{ position: 'absolute', top: 15, right: 15 }}>{isAuth ? null : <LockOutlined />}</div>
<p style={{ color: 'rgba(0, 0, 0, 0.88)' }}>{item.remark}</p>
<p style={{ color: 'rgba(0, 0, 0, 0.88)' }}>{item.remark || '暂无描述'}</p>
<p style={{ marginTop: 10 }}>
<UserOutlined style={{ fontSize: 14, marginRight: 5 }} />
{item.user_name}
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ instance.interceptors.response.use(
if (res.ret === 10018) {
message.error('登录已过期,请重新登录');
setTimeout(() => {
window.location.replace(`/#/login?callback=${window.location.href}`);
window.location.replace(`/login?callback=${window.location.href}`);
return null;
}, 1500);
return Promise.reject(res.message);
Expand Down
Loading

0 comments on commit 9e127a3

Please sign in to comment.