@appthen/cli 1.2.10 → 1.2.12
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/.gitignore +1 -0
- package/bin/main.js +92 -0
- package/dist/index.js +7014 -14988
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
- package/tests/test-app/.appthen/space-config.json +8 -0
- package/tests/test-app/docs/AI-Workflow.flow +112 -0
- package/tests/test-app/docs/Logic-1.flow +16 -0
- package/tests/test-app/docs/Logic.flow +16 -0
- package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
- package/tests/test-app/docs/Project-Blueprint.flow +119 -0
- package/tests/test-app/docs/README.md +3 -0
- package/tests/test-app/docs/claude.md +194 -0
- package/tests/test-app/docs/page_requirement_analysis.md +149 -0
- package/tests/test-app/docs//345/267/245/345/215/225/347/256/241/347/220/206/347/263/273/347/273/237/350/257/246/347/273/206/350/256/276/350/256/241.md +377 -0
- package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
- package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
- package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
- package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
- package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
- package/tests/test-app/src/app.css +15 -0
- package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
- package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
- package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
- package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
- package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
- package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
- package/tests/test-app/src/components/Button.js +11 -0
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
- package/tests/test-app/src/components/Timeline.tsx +145 -0
- package/tests/test-app/src/index.ts +2 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
- package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/344/272/247/345/223/201/350/256/276/350/256/241/346/226/207/346/241/243.md +301 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/345/274/200/345/217/221/344/273/273/345/212/241/345/210/206/345/267/245/346/226/207/346/241/243.md +345 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
- package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
- package/tests/test-app/src/pages/TicketList.tsx +27 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
- package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
- package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
- package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
- package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
- package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
- package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/web_version/website.css +205 -0
- package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
- package/tests/test-app/src/project.json +1120 -0
- package/tests/test-app/src/store/global.store.ts +10 -0
- package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
- package/tests/test-app/src/types/SLAPolicy.ts +50 -0
- package/tests/test-app/src/types/Ticket.ts +68 -0
- package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
- package/tests/test-app/src/types/TicketComment.m.ts +59 -0
- package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
- package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
- package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
- package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
- package/tests/test-app/src/types/TicketRecord.ts +47 -0
- package/tests/test-app/src/types/TrainDoor.ts +284 -0
- package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
- package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
- package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
- package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 用户资料
|
|
3
|
+
* 用户个人信息管理
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /profile
|
|
7
|
+
* @screen 1920w
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IProps {
|
|
15
|
+
userId?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* 数据与接口请求定义
|
|
20
|
+
*/
|
|
21
|
+
class IState {
|
|
22
|
+
userInfo?: {
|
|
23
|
+
/* @example 1 */id?: number,
|
|
24
|
+
/* @example zhangsan */username?: string,
|
|
25
|
+
/* @example 张三 */realName?: string,
|
|
26
|
+
/* @example zhangsan@example.com */email?: string,
|
|
27
|
+
/* @example 13800138000 */phone?: string,
|
|
28
|
+
/* @example male */gender?: string,
|
|
29
|
+
/* @example 1990-01-01 */birthday?: string,
|
|
30
|
+
/* @example https://via.placeholder.com/150 */avatar?: string,
|
|
31
|
+
/* @example 全栈开发工程师 */bio?: string,
|
|
32
|
+
/* @example 北京市海淀区 */location?: string,
|
|
33
|
+
/* @example https://example.com */website?: string,
|
|
34
|
+
/* @example active */status?: string,
|
|
35
|
+
/* @example 2024-01-01 */createTime?: string,
|
|
36
|
+
};
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
editing?: boolean;
|
|
39
|
+
activeTab?: string;
|
|
40
|
+
formData?: any;
|
|
41
|
+
uploadProgress?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
class Document extends React.Component<IProps, IState> {
|
|
45
|
+
state = {
|
|
46
|
+
userInfo: {
|
|
47
|
+
id: 1,
|
|
48
|
+
username: 'zhangsan',
|
|
49
|
+
realName: '张三',
|
|
50
|
+
email: 'zhangsan@example.com',
|
|
51
|
+
phone: '13800138000',
|
|
52
|
+
gender: 'male',
|
|
53
|
+
birthday: '1990-01-01',
|
|
54
|
+
avatar: 'https://via.placeholder.com/150',
|
|
55
|
+
bio: '全栈开发工程师',
|
|
56
|
+
location: '北京市海淀区',
|
|
57
|
+
website: 'https://example.com',
|
|
58
|
+
status: 'active',
|
|
59
|
+
createTime: '2024-01-01',
|
|
60
|
+
},
|
|
61
|
+
loading: false,
|
|
62
|
+
editing: false,
|
|
63
|
+
activeTab: 'basic',
|
|
64
|
+
formData: {},
|
|
65
|
+
uploadProgress: 0,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
handleTabChange(key) {
|
|
69
|
+
this.setState({
|
|
70
|
+
activeTab: key,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
toggleEdit() {
|
|
75
|
+
this.setState({
|
|
76
|
+
editing: !this.state.editing,
|
|
77
|
+
formData: this.state.editing
|
|
78
|
+
? {}
|
|
79
|
+
: {
|
|
80
|
+
...this.state.userInfo,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
handleSave() {
|
|
86
|
+
this.setState({
|
|
87
|
+
userInfo: {
|
|
88
|
+
...this.state.userInfo,
|
|
89
|
+
...this.state.formData,
|
|
90
|
+
},
|
|
91
|
+
editing: false,
|
|
92
|
+
loading: true,
|
|
93
|
+
});
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
this.setState({
|
|
96
|
+
loading: false,
|
|
97
|
+
});
|
|
98
|
+
}, 1000);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
handleFieldChange(field, value) {
|
|
102
|
+
this.setState({
|
|
103
|
+
formData: {
|
|
104
|
+
...this.state.formData,
|
|
105
|
+
[field]: value,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
handleAvatarUpload(file) {
|
|
111
|
+
this.setState({
|
|
112
|
+
uploadProgress: 0,
|
|
113
|
+
});
|
|
114
|
+
const interval = setInterval(() => {
|
|
115
|
+
const progress = this.state.uploadProgress + 10;
|
|
116
|
+
if (progress >= 100) {
|
|
117
|
+
clearInterval(interval);
|
|
118
|
+
this.setState({
|
|
119
|
+
uploadProgress: 100,
|
|
120
|
+
});
|
|
121
|
+
} else {
|
|
122
|
+
this.setState({
|
|
123
|
+
uploadProgress: progress,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}, 200);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
resetPassword() {
|
|
130
|
+
console.log('重置密码');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
logout() {
|
|
134
|
+
console.log('退出登录');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
render() {
|
|
138
|
+
// 💀 死亡:变量声明 - 解构赋值
|
|
139
|
+
const { userInfo, loading, editing, activeTab, formData, uploadProgress } =
|
|
140
|
+
this.state;
|
|
141
|
+
|
|
142
|
+
// 💀 死亡:变量声明 - 计算属性
|
|
143
|
+
// 💀 死亡:变量声明 - 计算属性
|
|
144
|
+
const age =
|
|
145
|
+
new Date().getFullYear() - new Date(userInfo.birthday).getFullYear();
|
|
146
|
+
const isEmailVerified = true;
|
|
147
|
+
const accountStatus = userInfo.status === 'active' ? '正常' : '已禁用';
|
|
148
|
+
|
|
149
|
+
// 💀 死亡:变量声明 - 配置对象
|
|
150
|
+
// 💀 死亡:变量声明 - 配置对象
|
|
151
|
+
const genderOptions = [
|
|
152
|
+
{
|
|
153
|
+
label: '男',
|
|
154
|
+
value: 'male',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: '女',
|
|
158
|
+
value: 'female',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: '保密',
|
|
162
|
+
value: 'secret',
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
|
|
166
|
+
// 💀 死亡:变量声明 - 标签页配置
|
|
167
|
+
// 💀 死亡:变量声明 - 标签页配置
|
|
168
|
+
const tabItems = [
|
|
169
|
+
{
|
|
170
|
+
key: 'basic',
|
|
171
|
+
label: '基本信息',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
key: 'contact',
|
|
175
|
+
label: '联系方式',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
key: 'security',
|
|
179
|
+
label: '安全设置',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
key: 'privacy',
|
|
183
|
+
label: '隐私设置',
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
// 💀 死亡:if 语句 - 条件渲染
|
|
188
|
+
// 💀 死亡:if 语句 - 条件渲染
|
|
189
|
+
if (loading) {
|
|
190
|
+
return <View className="p-6">加载中...</View>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// 💀 死亡:变量声明 - JSX 片段函数
|
|
194
|
+
// 💀 死亡:变量声明 - JSX 片段函数
|
|
195
|
+
const basicInfoForm = () => (
|
|
196
|
+
<View className="space-y-4">
|
|
197
|
+
<View className="flex items-center gap-4 mb-6">
|
|
198
|
+
<Avatar size={80} src={userInfo.avatar} />
|
|
199
|
+
<View>
|
|
200
|
+
<Text className="text-xl font-bold">{userInfo.realName}</Text>
|
|
201
|
+
<Text className="text-gray-500">@{userInfo.username}</Text>
|
|
202
|
+
</View>
|
|
203
|
+
{!editing && (
|
|
204
|
+
<Button onClick={() => this.handleAvatarUpload(null)}>
|
|
205
|
+
更换头像
|
|
206
|
+
</Button>
|
|
207
|
+
)}
|
|
208
|
+
</View>
|
|
209
|
+
{uploadProgress > 0 && uploadProgress < 100 && (
|
|
210
|
+
<View className="mb-4">
|
|
211
|
+
<Text>上传进度: {uploadProgress}%</Text>
|
|
212
|
+
</View>
|
|
213
|
+
)}
|
|
214
|
+
</View>
|
|
215
|
+
);
|
|
216
|
+
return (
|
|
217
|
+
<Page className="p-[24px] bg-[var(--gray-50)] min-h-screen">
|
|
218
|
+
<View className="mb-[24px]">
|
|
219
|
+
<Text className="text-2xl font-bold text-[#1f2937]">用户资料</Text>
|
|
220
|
+
<Text className="text-[#6b7280] text-sm mt-[4px]">
|
|
221
|
+
用户个人信息管理
|
|
222
|
+
</Text>
|
|
223
|
+
</View>
|
|
224
|
+
<Card className="mb-[24px]">
|
|
225
|
+
<View className="flex items-center justify-between">
|
|
226
|
+
<View className="gap-4 flex items-center">
|
|
227
|
+
<Avatar size={64} src={userInfo.avatar} />
|
|
228
|
+
<View>
|
|
229
|
+
<Text className="text-xl font-bold">{userInfo.realName}</Text>
|
|
230
|
+
<Text className="text-[#6b7280]">@{userInfo.username}</Text>
|
|
231
|
+
<View className="gap-2 flex items-center mt-[4px]">
|
|
232
|
+
<Tag color="blue">
|
|
233
|
+
<Text>{accountStatus}</Text>
|
|
234
|
+
</Tag>
|
|
235
|
+
{!!isEmailVerified && <Tag color="green">已验证</Tag>}
|
|
236
|
+
</View>
|
|
237
|
+
</View>
|
|
238
|
+
</View>
|
|
239
|
+
<View className="gap-2 flex">
|
|
240
|
+
<Button onClick={() => this.toggleEdit()}>
|
|
241
|
+
{editing ? '取消' : '编辑'}
|
|
242
|
+
</Button>
|
|
243
|
+
{!!editing && (
|
|
244
|
+
<Button type="primary" onClick={() => this.handleSave()}>
|
|
245
|
+
保存
|
|
246
|
+
</Button>
|
|
247
|
+
)}
|
|
248
|
+
</View>
|
|
249
|
+
</View>
|
|
250
|
+
</Card>
|
|
251
|
+
<Card>
|
|
252
|
+
<Tabs
|
|
253
|
+
activeKey={activeTab}
|
|
254
|
+
onChange={key => this.handleTabChange(key)}
|
|
255
|
+
>
|
|
256
|
+
<Tabs.TabPane tab="基本信息" key="basic">
|
|
257
|
+
<View className="gap-6 grid grid-cols-2">
|
|
258
|
+
<View>
|
|
259
|
+
<Text className="block mb-[8px]">用户名</Text>
|
|
260
|
+
<Input
|
|
261
|
+
value={editing ? formData.username : userInfo.username}
|
|
262
|
+
disabled={!editing}
|
|
263
|
+
onChange={e =>
|
|
264
|
+
this.handleFieldChange('username', e.target.value)
|
|
265
|
+
}
|
|
266
|
+
/>
|
|
267
|
+
</View>
|
|
268
|
+
<View>
|
|
269
|
+
<Text className="block mb-[8px]">真实姓名</Text>
|
|
270
|
+
<Input
|
|
271
|
+
value={editing ? formData.realName : userInfo.realName}
|
|
272
|
+
disabled={!editing}
|
|
273
|
+
onChange={e =>
|
|
274
|
+
this.handleFieldChange('realName', e.target.value)
|
|
275
|
+
}
|
|
276
|
+
/>
|
|
277
|
+
</View>
|
|
278
|
+
<View>
|
|
279
|
+
<Text className="block mb-[8px]">性别</Text>
|
|
280
|
+
<Radio.Group
|
|
281
|
+
value={editing ? formData.gender : userInfo.gender}
|
|
282
|
+
disabled={!editing}
|
|
283
|
+
onChange={e =>
|
|
284
|
+
this.handleFieldChange('gender', e.target.value)
|
|
285
|
+
}
|
|
286
|
+
>
|
|
287
|
+
{genderOptions.map((opt, index) => (
|
|
288
|
+
<Radio key={opt.value} value={opt.value}>
|
|
289
|
+
<Text>{opt.label}</Text>
|
|
290
|
+
</Radio>
|
|
291
|
+
))}
|
|
292
|
+
</Radio.Group>
|
|
293
|
+
</View>
|
|
294
|
+
<View>
|
|
295
|
+
<Text className="block mb-[8px]">生日</Text>
|
|
296
|
+
<DatePicker
|
|
297
|
+
value={editing ? formData.birthday : userInfo.birthday}
|
|
298
|
+
disabled={!editing}
|
|
299
|
+
onChange={date => this.handleFieldChange('birthday', date)}
|
|
300
|
+
/>
|
|
301
|
+
</View>
|
|
302
|
+
<View>
|
|
303
|
+
<Text className="block mb-[8px]">年龄</Text>
|
|
304
|
+
<Text>{age}岁</Text>
|
|
305
|
+
</View>
|
|
306
|
+
</View>
|
|
307
|
+
</Tabs.TabPane>
|
|
308
|
+
<Tabs.TabPane tab="联系方式" key="contact">
|
|
309
|
+
<View className="gap-6 grid grid-cols-2">
|
|
310
|
+
<View>
|
|
311
|
+
<Text className="block mb-[8px]">邮箱</Text>
|
|
312
|
+
<Input
|
|
313
|
+
value={editing ? formData.email : userInfo.email}
|
|
314
|
+
disabled={!editing}
|
|
315
|
+
onChange={e =>
|
|
316
|
+
this.handleFieldChange('email', e.target.value)
|
|
317
|
+
}
|
|
318
|
+
/>
|
|
319
|
+
</View>
|
|
320
|
+
<View>
|
|
321
|
+
<Text className="block mb-[8px]">手机号</Text>
|
|
322
|
+
<Input
|
|
323
|
+
value={editing ? formData.phone : userInfo.phone}
|
|
324
|
+
disabled={!editing}
|
|
325
|
+
onChange={e =>
|
|
326
|
+
this.handleFieldChange('phone', e.target.value)
|
|
327
|
+
}
|
|
328
|
+
/>
|
|
329
|
+
</View>
|
|
330
|
+
<View>
|
|
331
|
+
<Text className="block mb-[8px]">位置</Text>
|
|
332
|
+
<Input
|
|
333
|
+
value={editing ? formData.location : userInfo.location}
|
|
334
|
+
disabled={!editing}
|
|
335
|
+
onChange={e =>
|
|
336
|
+
this.handleFieldChange('location', e.target.value)
|
|
337
|
+
}
|
|
338
|
+
/>
|
|
339
|
+
</View>
|
|
340
|
+
<View>
|
|
341
|
+
<Text className="block mb-[8px]">个人网站</Text>
|
|
342
|
+
<Input
|
|
343
|
+
value={editing ? formData.website : userInfo.website}
|
|
344
|
+
disabled={!editing}
|
|
345
|
+
onChange={e =>
|
|
346
|
+
this.handleFieldChange('website', e.target.value)
|
|
347
|
+
}
|
|
348
|
+
/>
|
|
349
|
+
</View>
|
|
350
|
+
</View>
|
|
351
|
+
</Tabs.TabPane>
|
|
352
|
+
<Tabs.TabPane tab="安全设置" key="security">
|
|
353
|
+
<View className="space-y-4">
|
|
354
|
+
<View>
|
|
355
|
+
<Text className="block mb-[8px]">修改密码</Text>
|
|
356
|
+
<Button onClick={() => this.resetPassword()}>重置密码</Button>
|
|
357
|
+
</View>
|
|
358
|
+
<View>
|
|
359
|
+
<Text className="block mb-[8px]">两步验证</Text>
|
|
360
|
+
<Switch
|
|
361
|
+
checked={false}
|
|
362
|
+
onChange={checked => console.log('两步验证:', checked)}
|
|
363
|
+
/>
|
|
364
|
+
<Text className="text-[#6b7280] ml-[8px]">未启用</Text>
|
|
365
|
+
</View>
|
|
366
|
+
</View>
|
|
367
|
+
</Tabs.TabPane>
|
|
368
|
+
<Tabs.TabPane tab="隐私设置" key="privacy">
|
|
369
|
+
<View className="space-y-4">
|
|
370
|
+
<View>
|
|
371
|
+
<Text className="block mb-[8px]">公开个人资料</Text>
|
|
372
|
+
<Switch
|
|
373
|
+
checked={true}
|
|
374
|
+
onChange={checked =>
|
|
375
|
+
this.handleFieldChange('publicProfile', checked)
|
|
376
|
+
}
|
|
377
|
+
/>
|
|
378
|
+
</View>
|
|
379
|
+
<View>
|
|
380
|
+
<Text className="block mb-[8px]">允许私信</Text>
|
|
381
|
+
<Switch
|
|
382
|
+
checked={false}
|
|
383
|
+
onChange={checked =>
|
|
384
|
+
this.handleFieldChange('allowMessages', checked)
|
|
385
|
+
}
|
|
386
|
+
/>
|
|
387
|
+
</View>
|
|
388
|
+
</View>
|
|
389
|
+
</Tabs.TabPane>
|
|
390
|
+
</Tabs>
|
|
391
|
+
</Card>
|
|
392
|
+
<Card className="mt-[24px]">
|
|
393
|
+
<View className="gap-2 flex justify-end">
|
|
394
|
+
<Button onClick={() => this.logout()} danger={true}>
|
|
395
|
+
退出登录
|
|
396
|
+
</Button>
|
|
397
|
+
</View>
|
|
398
|
+
</Card>
|
|
399
|
+
</Page>
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export default Document;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 可视化AI IDE升级介绍
|
|
3
|
+
* 展示从可视化IDE升级到可视化AI IDE的四大核心特性
|
|
4
|
+
*
|
|
5
|
+
* @type Component
|
|
6
|
+
* @screen 1920x800 #1a1a1a
|
|
7
|
+
* @frames web
|
|
8
|
+
* @portal true
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Component, Text, View } from '@appthen/react';
|
|
12
|
+
import main from '/src/pages/test/main';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class IProps {
|
|
16
|
+
/* 主题色 */
|
|
17
|
+
themeColor: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* 数据与接口请求定义
|
|
22
|
+
*/
|
|
23
|
+
class IState {
|
|
24
|
+
/* 当前激活的特性索引 */
|
|
25
|
+
activeFeature: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
class Document extends React.Component<IProps, IState> {
|
|
29
|
+
state = { activeFeature: 0 };
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 切换特性展示
|
|
33
|
+
*/
|
|
34
|
+
switchFeature(index) {
|
|
35
|
+
this.setState({
|
|
36
|
+
activeFeature: index,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
render() {
|
|
41
|
+
return (
|
|
42
|
+
<React.Fragment>
|
|
43
|
+
<View className="w-full h-full bg-[#111827] flex flex-col overflow-hidden">
|
|
44
|
+
<header className="p-[32px] text-[var(--center)]">
|
|
45
|
+
<h1 className="bg-gradient-to-r from-purple-400 via-[#f472b6] to-indigo-400 [WebkitBackgroundClip:text] [WebkitTextFillColor:transparent] [backgroundClip:text] [backgroundClip:text] [WebkitBackgroundClip:text] text-[transparent] text-5xl font-bold mb-[8px]">
|
|
46
|
+
可视化AI IDE
|
|
47
|
+
</h1>
|
|
48
|
+
<h2 className="bg-gradient-to-r from-blue-400 via-[var(--cyan-400)] to-[var(--teal-400)] [WebkitBackgroundClip:text] [WebkitTextFillColor:transparent] [backgroundClip:text] [backgroundClip:text] [WebkitBackgroundClip:text] text-[transparent] text-3xl font-bold">
|
|
49
|
+
全面升级
|
|
50
|
+
</h2>
|
|
51
|
+
<p className="text-[#9ca3af] mt-[16px] text-lg">
|
|
52
|
+
从可视化IDE到可视化AI IDE的进化之路
|
|
53
|
+
</p>
|
|
54
|
+
</header>
|
|
55
|
+
<main className="flex-1 flex items-center justify-center pl-[32px] pr-[32px]">
|
|
56
|
+
<View className="w-full">
|
|
57
|
+
<View className="border-gray-700 bg-[#1f2937] rounded-2xl p-[32px] shadow-[0 25px 50px -12px rgb(0 0 0 / 0.25)] border border-solid">
|
|
58
|
+
<View className="text-[var(--center)] mb-[24px]">
|
|
59
|
+
<View className="text-6xl mb-[2px]">
|
|
60
|
+
{!!(this.state.activeFeature === 0) && <Text>📁</Text>}
|
|
61
|
+
{!!(this.state.activeFeature === 1) && <Text>⚡</Text>}
|
|
62
|
+
{!!(this.state.activeFeature === 2) && <Text>🤖</Text>}
|
|
63
|
+
{!!(this.state.activeFeature === 3) && <Text>👥</Text>}
|
|
64
|
+
</View>
|
|
65
|
+
<h3
|
|
66
|
+
className={`text-2xl font-bold bg-gradient-to-r ${
|
|
67
|
+
this.state.activeFeature === 0
|
|
68
|
+
? 'from-purple-500 to-pink-500'
|
|
69
|
+
: this.state.activeFeature === 1
|
|
70
|
+
? 'from-blue-500 to-cyan-500'
|
|
71
|
+
: this.state.activeFeature === 2
|
|
72
|
+
? 'from-green-500 to-emerald-500'
|
|
73
|
+
: 'from-orange-500 to-red-500'
|
|
74
|
+
} bg-clip-text text-transparent mb-2`}
|
|
75
|
+
>{`${
|
|
76
|
+
this.state.activeFeature === 0 ? '对象资源管理能力增强' : ''
|
|
77
|
+
}${this.state.activeFeature === 1 ? '双向编辑能力' : ''}${
|
|
78
|
+
this.state.activeFeature === 2 ? 'AI能力增强' : ''
|
|
79
|
+
}${
|
|
80
|
+
this.state.activeFeature === 3 ? '协作能力增强' : ''
|
|
81
|
+
}`}</h3>
|
|
82
|
+
<p className="text-[#d1d5db] text-lg mt-[7px]">{`${
|
|
83
|
+
this.state.activeFeature === 0 ? '模块化文件夹管理' : ''
|
|
84
|
+
}${this.state.activeFeature === 1 ? '可视化 ↔ 代码' : ''}${
|
|
85
|
+
this.state.activeFeature === 2 ? '完整AI Agent集成' : ''
|
|
86
|
+
}${
|
|
87
|
+
this.state.activeFeature === 3 ? '人机协作新体验' : ''
|
|
88
|
+
}`}</p>
|
|
89
|
+
</View>
|
|
90
|
+
<View className="bg-[#374151] rounded-xl p-[24px] mb-[24px]">
|
|
91
|
+
<p className="text-[#fff4f4] [lineHeight:1.625]">{`${
|
|
92
|
+
this.state.activeFeature === 0
|
|
93
|
+
? '现在可以用文件夹的方式,将前端、后端、接口文档、协作文档都方便进行模块化的管理'
|
|
94
|
+
: ''
|
|
95
|
+
}${
|
|
96
|
+
this.state.activeFeature === 1
|
|
97
|
+
? '所有资源都可以进行可视化开发和代码开发双向编辑,让开发者可以自由切换工作模式,提升开发效率'
|
|
98
|
+
: ''
|
|
99
|
+
}${
|
|
100
|
+
this.state.activeFeature === 2
|
|
101
|
+
? '引入完整的AI Agent,可以更好地理解低代码资源,提供更充足的上下文帮助我们完成应用开发工作'
|
|
102
|
+
: ''
|
|
103
|
+
}${
|
|
104
|
+
this.state.activeFeature === 3
|
|
105
|
+
? '与同事更好的协作,与AI更好的协作,打造全新的协作开发体验'
|
|
106
|
+
: ''
|
|
107
|
+
}`}</p>
|
|
108
|
+
</View>
|
|
109
|
+
<View className="space-x-2 flex justify-center">
|
|
110
|
+
<button
|
|
111
|
+
onClick={() => this.switchFeature(0)}
|
|
112
|
+
className={`w-3 h-3 rounded-full transition-all duration-300 ${
|
|
113
|
+
this.state.activeFeature === 0
|
|
114
|
+
? 'bg-white scale-125'
|
|
115
|
+
: 'bg-gray-600 hover:bg-gray-500'
|
|
116
|
+
}`}
|
|
117
|
+
/>
|
|
118
|
+
<button
|
|
119
|
+
onClick={() => this.switchFeature(1)}
|
|
120
|
+
className={`w-3 h-3 rounded-full transition-all duration-300 ${
|
|
121
|
+
this.state.activeFeature === 1
|
|
122
|
+
? 'bg-white scale-125'
|
|
123
|
+
: 'bg-gray-600 hover:bg-gray-500'
|
|
124
|
+
}`}
|
|
125
|
+
/>
|
|
126
|
+
<button
|
|
127
|
+
onClick={() => this.switchFeature(2)}
|
|
128
|
+
className={`w-3 h-3 rounded-full transition-all duration-300 ${
|
|
129
|
+
this.state.activeFeature === 2
|
|
130
|
+
? 'bg-white scale-125'
|
|
131
|
+
: 'bg-gray-600 hover:bg-gray-500'
|
|
132
|
+
}`}
|
|
133
|
+
/>
|
|
134
|
+
<button
|
|
135
|
+
onClick={() => this.switchFeature(3)}
|
|
136
|
+
className={`w-3 h-3 rounded-full transition-all duration-300 ${
|
|
137
|
+
this.state.activeFeature === 3
|
|
138
|
+
? 'bg-white scale-125'
|
|
139
|
+
: 'bg-gray-600 hover:bg-gray-500'
|
|
140
|
+
}`}
|
|
141
|
+
/>
|
|
142
|
+
</View>
|
|
143
|
+
</View>
|
|
144
|
+
<View className="mt-[32px] grid grid-cols-2 gap-4">
|
|
145
|
+
<button
|
|
146
|
+
onClick={() => this.switchFeature(0)}
|
|
147
|
+
className={`p-4 rounded-xl border transition-all duration-300 ${
|
|
148
|
+
this.state.activeFeature === 0
|
|
149
|
+
? 'border-purple-500 bg-purple-500/10'
|
|
150
|
+
: 'border-gray-700 bg-gray-800 hover:border-gray-600'
|
|
151
|
+
}`}
|
|
152
|
+
>
|
|
153
|
+
<View className="text-2xl mb-[8px]">
|
|
154
|
+
<Text>📁</Text>
|
|
155
|
+
</View>
|
|
156
|
+
<View
|
|
157
|
+
className={`text-sm font-medium ${
|
|
158
|
+
this.state.activeFeature === 0
|
|
159
|
+
? 'text-purple-400'
|
|
160
|
+
: 'text-gray-400'
|
|
161
|
+
}`}
|
|
162
|
+
>
|
|
163
|
+
<Text>资源管理</Text>
|
|
164
|
+
</View>
|
|
165
|
+
</button>
|
|
166
|
+
<button
|
|
167
|
+
onClick={() => this.switchFeature(1)}
|
|
168
|
+
className={`p-4 rounded-xl border transition-all duration-300 ${
|
|
169
|
+
this.state.activeFeature === 1
|
|
170
|
+
? 'border-blue-500 bg-blue-500/10'
|
|
171
|
+
: 'border-gray-700 bg-gray-800 hover:border-gray-600'
|
|
172
|
+
}`}
|
|
173
|
+
>
|
|
174
|
+
<View className="text-2xl mb-[8px]">
|
|
175
|
+
<Text>⚡</Text>
|
|
176
|
+
</View>
|
|
177
|
+
<View
|
|
178
|
+
className={`text-sm font-medium ${
|
|
179
|
+
this.state.activeFeature === 1
|
|
180
|
+
? 'text-blue-400'
|
|
181
|
+
: 'text-gray-400'
|
|
182
|
+
}`}
|
|
183
|
+
>
|
|
184
|
+
<Text>双向编辑</Text>
|
|
185
|
+
</View>
|
|
186
|
+
</button>
|
|
187
|
+
<button
|
|
188
|
+
onClick={() => this.switchFeature(2)}
|
|
189
|
+
className={`p-4 rounded-xl border transition-all duration-300 ${
|
|
190
|
+
this.state.activeFeature === 2
|
|
191
|
+
? 'border-green-500 bg-green-500/10'
|
|
192
|
+
: 'border-gray-700 bg-gray-800 hover:border-gray-600'
|
|
193
|
+
}`}
|
|
194
|
+
>
|
|
195
|
+
<View className="text-2xl mb-[8px]">
|
|
196
|
+
<Text>🤖</Text>
|
|
197
|
+
</View>
|
|
198
|
+
<View
|
|
199
|
+
className={`text-sm font-medium ${
|
|
200
|
+
this.state.activeFeature === 2
|
|
201
|
+
? 'text-green-400'
|
|
202
|
+
: 'text-gray-400'
|
|
203
|
+
}`}
|
|
204
|
+
>
|
|
205
|
+
<Text>AI增强</Text>
|
|
206
|
+
</View>
|
|
207
|
+
</button>
|
|
208
|
+
<button
|
|
209
|
+
onClick={() => this.switchFeature(3)}
|
|
210
|
+
className={`p-4 rounded-xl border transition-all duration-300 ${
|
|
211
|
+
this.state.activeFeature === 3
|
|
212
|
+
? 'border-orange-500 bg-orange-500/10'
|
|
213
|
+
: 'border-gray-700 bg-gray-800 hover:border-gray-600'
|
|
214
|
+
}`}
|
|
215
|
+
>
|
|
216
|
+
<View className="text-2xl mb-[8px]">
|
|
217
|
+
<Text>👥</Text>
|
|
218
|
+
</View>
|
|
219
|
+
<View
|
|
220
|
+
className={`text-sm font-medium ${
|
|
221
|
+
this.state.activeFeature === 3
|
|
222
|
+
? 'text-orange-400'
|
|
223
|
+
: 'text-gray-400'
|
|
224
|
+
}`}
|
|
225
|
+
>
|
|
226
|
+
<Text>协作增强</Text>
|
|
227
|
+
</View>
|
|
228
|
+
</button>
|
|
229
|
+
</View>
|
|
230
|
+
</View>
|
|
231
|
+
</main>
|
|
232
|
+
<footer className="p-[16px] text-[var(--center)]">
|
|
233
|
+
<View className="space-x-8 flex justify-center text-[#6b7280] text-sm">
|
|
234
|
+
<Text>🚀 更快</Text>
|
|
235
|
+
<Text>🎯 更准</Text>
|
|
236
|
+
<Text>💡 更智能</Text>
|
|
237
|
+
</View>
|
|
238
|
+
</footer>
|
|
239
|
+
</View>
|
|
240
|
+
</React.Fragment>
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export default Document;
|