Skip to content

Let's use AI to Earn!

feat: 官网chat搞进来

gaoSira12f562824e6
diff --git a/src/components/WebView/index.tsx b/src/components/WebView/index.tsx
index 2a0cad05..9db5b369 100644
--- a/src/components/WebView/index.tsx
+++ b/src/components/WebView/index.tsx
@@ -41,7 +41,7 @@ const WebView = memo(
console.log(cookieParams);
setLoading(true);
- webviewRef.current?.addEventListener('dom-ready', async () => {
+ webviewRef.current?.addEventListener('dom-ready', async (e) => {
// 每个平台localStorage添加
if (account) {
let jsCode;
diff --git a/src/icp/account.ts b/src/icp/account.ts
index 2b36ffcd..9cd3ab53 100644
--- a/src/icp/account.ts
+++ b/src/icp/account.ts
@@ -10,6 +10,7 @@ import { AccountInfo } from '@/views/account/comment';
import { AccountStatus, AccountType } from '../../commont/AccountEnum';
import { DashboardData } from '../views/statistics/comment';
+// 更新账户状态
export async function ipcUpdateAccountStatus(
accountId: number,
status: AccountStatus,
diff --git a/src/views/aiTool/index.tsx b/src/views/aiTool/index.tsx
index 86e0e86d..4c19824b 100644
--- a/src/views/aiTool/index.tsx
+++ b/src/views/aiTool/index.tsx
@@ -17,7 +17,7 @@ const items: MenuItem[] = [
icon: <Icon component={Ranking} />,
},
{
- key: '/aiTool/aiToolWebview?webviewUrl=https://www.yikart.cn/chat?isHideNav=true',
+ key: `/aiTool/aiToolWebview?webviewUrl=${encodeURIComponent('https://www.yikart.cn/chat/#/new-chat?mask=100005')}`,
label: 'Chat Ai绘图',
icon: <Icon component={AiDraw} />,
},
@@ -39,7 +39,8 @@ export default function Page() {
const [currChooseRoute, setCurrChooseRoute] = useState<string>();
useEffect(() => {
- setCurrChooseRoute(location.pathname + location.search);
+ console.log(location);
+ setCurrChooseRoute(location.pathname + location.search + location.hash);
}, [location]);
return (