Browse Source

fix: 完善记录

jihuaqiang 2 months ago
parent
commit
eb017df71b

+ 1 - 1
src/App.tsx

@@ -11,7 +11,7 @@ const App: React.FC = () => {
   // TODO: refactor this logic
   if (window.location.pathname === '/') {
     setTimeout(() => {
-      navigate('/cooperationAccount/gzh')
+      navigate('/account/qw')
     })
   }
 

+ 2 - 2
src/components/layout/headerbar.tsx

@@ -20,11 +20,11 @@ const Headerbar = () => {
 	}
 
   return (
-    <Header title='票圈内容合作平台' className='bg-[#20214F] !px-1'>
+    <Header title='票圈风控平台' className='bg-[#20214F] !px-1'>
       <div className='text-[#9090a7] flex items-center justify-between h-full px-[20px] '>
         <div className='flex items-center gap-[12px]'>
           <Icon component={LogoIcon} className='text-[40px]' />
-          <span className='text-lg font-bold'>票圈内容合作平台</span>
+          <span className='text-lg font-bold'>票圈风控平台</span>
         </div>
         <div className='flex items-center gap-[30px] cursor-pointer'>
           <Switch 

+ 5 - 4
src/http/sso.ts

@@ -46,7 +46,7 @@ export function login(account: string, password: string) {
     if (code === 0) {
       message.success('登录成功')
       setUserInfo(data)
-			location.href = '/cooperationAccount/gzh'
+			router.navigate('/account/qw')
       return true
     }
 
@@ -73,16 +73,17 @@ export function sendCode(phone: string) {
   }).catch(() => {})
 }
 
-export function loginBySendCode(telNum: string, verifyCode: string) {
+export function loginBySendCode(telNum: string, verifyCode: string, companyName: string) {
   return http.post(loginPhone, {
     telNum,
-    verifyCode
+    verifyCode,
+		companyName
   }).then(res => {
 		const { code, msg, data } = res as { code: number, msg: string, data: UserInfo }
     if (code === 0 && data) {
       message.success('登录成功')
       setUserInfo(data)
-			router.navigate('/cooperationAccount/gzh')
+			router.navigate('/account/qw')
       return true
     }
 

+ 10 - 10
src/views/cooperationAccount/cooperationAccount.router.tsx → src/views/account/account.router.tsx

@@ -1,26 +1,26 @@
 import { TeamOutlined } from '@ant-design/icons'
 import { AdminRouterItem } from "../../router";
 import { Outlet } from "react-router-dom";
-import GZH from './gzh';
+import QWAccount from './qwAccount';
 
 const demoRoutes: AdminRouterItem[] = [
   {
-    path: 'cooperationAccount',
+    path: 'account',
     element: <Outlet />,
 		meta: {
-			label: "合作账号管理",
-			title: "合作账号管理",
-			key: "/cooperationAccount",
+			label: "账号管理",
+			title: "账号管理",
+			key: "/account",
 			icon: <TeamOutlined />,
 		},
 		children: [
 			{
-				path: 'gzh',
-				element: <GZH />,
+				path: 'qw',
+				element: <QWAccount />,
 				meta: {
-					label: "公众号管理",
-					title: "公众号管理",
-					key: "/cooperationAccount/gzh",
+					label: "企微号管理",
+					title: "企微号管理",
+					key: "/account/qw",
 				},
 			},
 		]

File diff suppressed because it is too large
+ 7 - 52
src/views/account/qwAccount/index.tsx


+ 6 - 2
src/views/login/login.tsx

@@ -15,8 +15,8 @@ const LoginPage: React.FC = () => {
 	const handlePhoneLogin = async (values: any) => {
 		try {
 			setLoading(true);
-			const { phone, code } = values;
-			const success = await loginBySendCode(phone, code);
+			const { phone, code, companyName } = values;
+			const success = await loginBySendCode(phone, code, companyName);
 			if (success) {
 				// Redirect will be handled by the login function
 			}
@@ -157,6 +157,10 @@ const LoginPage: React.FC = () => {
 												</div>
 											</Form.Item>
 
+											<Form.Item name="companyName" rules={[{ required: true, message: '请输入公司主体名称' }]}>
+												<Input placeholder="请输入公司主体名称" />
+											</Form.Item>
+
 											<Form.Item>
 												<Button
 													type="primary"

Some files were not shown because too many files changed in this diff