diff --git a/main.go b/main.go index 936a83e..39c4da3 100644 --- a/main.go +++ b/main.go @@ -281,7 +281,8 @@ func getAllTool(db *sql.DB) []Tool { if sort == nil { tool.Sort = 0 } else { - tool.Sort = sort.(int) + i64 := sort.(int64) + tool.Sort = int(i64) } checkErr(err) results = append(results, tool) diff --git a/public/admin/index.html b/public/admin/index.html index 9523f09..3f00de5 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -1,14 +1,15 @@ - - - - - 管理后台 - - - - 管理后台 - - - \ No newline at end of file + + + + + Van Nav + + + + +
+ + + diff --git a/public/index.html b/public/index.html index e69de29..7d7e8c8 100644 --- a/public/index.html +++ b/public/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/ui/admin/src/pages/Setting/index.tsx b/ui/admin/src/pages/Setting/index.tsx index 07e4629..1a9a87e 100644 --- a/ui/admin/src/pages/Setting/index.tsx +++ b/ui/admin/src/pages/Setting/index.tsx @@ -6,7 +6,12 @@ import "./index.css"; export interface SettingProps { } export const Setting: React.FC = (props) => { const { store, reload, loading } = useContext(GlobalContext); - console.log(store.setting) + const [userForm] = Form.useForm(); + const [settingForm] = Form.useForm(); + useEffect(() => { + userForm.setFieldsValue(store?.user ?? {}) + settingForm.setFieldsValue(store?.setting ?? {}) + }, [store]) const handleUpdateUser = useCallback( async (values: any) => { try { @@ -37,7 +42,7 @@ export const Setting: React.FC = (props) => {
-
+ = (props) => { onFinish={handleUpdateWebSite} initialValues={store?.setting ?? {}} labelCol={{ span: 6 }} + form={settingForm} >