|
|
@@ -5,10 +5,12 @@ import { MessageFu } from "@/utils/message";
|
|
|
import TextArea from "antd/es/input/TextArea";
|
|
|
import classNames from "classnames";
|
|
|
import { ArrowUpOutlined } from "@ant-design/icons";
|
|
|
-import http from "@/utils/http";
|
|
|
+import http, { baseURL } from "@/utils/http";
|
|
|
import { isH5Fu, isWeiFu } from "@/utils/pcOrH5";
|
|
|
-import history from "@/utils/history";
|
|
|
+import { urlParameter } from "@/utils/history";
|
|
|
+import { useLocation } from "react-router-dom";
|
|
|
function Z1Gather() {
|
|
|
+ const location = useLocation();
|
|
|
// const timeRef = useRef(-1);
|
|
|
useEffect(() => {
|
|
|
document.title = "2023 Print China_Contact us";
|
|
|
@@ -66,32 +68,38 @@ function Z1Gather() {
|
|
|
};
|
|
|
|
|
|
// 通过校验点击确定
|
|
|
- const onFinish = useCallback(async (values: any) => {
|
|
|
- const res = await API_btnOk(values);
|
|
|
- if (res.code === 0) {
|
|
|
- MessageFu.success("succeed!");
|
|
|
- localStorage.setItem("HDB_WJ", "1");
|
|
|
- FormBoxRef.current.resetFields();
|
|
|
- window.setTimeout(() => {
|
|
|
- if (isH5Fu()) {
|
|
|
- if (isWeiFu()) history.go(-1);
|
|
|
- else {
|
|
|
+ const onFinish = useCallback(
|
|
|
+ async (values: any) => {
|
|
|
+ const res = await API_btnOk(values);
|
|
|
+ if (res.code === 0) {
|
|
|
+ MessageFu.success("succeed!");
|
|
|
+ localStorage.setItem("HDB_WJ", "1");
|
|
|
+ FormBoxRef.current.resetFields();
|
|
|
+
|
|
|
+ window.setTimeout(() => {
|
|
|
+ const obj = urlParameter(location.search);
|
|
|
+ if (obj.q) {
|
|
|
+ // 通过热点跳到这个页面
|
|
|
+ if (isH5Fu() && isWeiFu()) window.history.go(-1);
|
|
|
+ else {
|
|
|
+ window.opener = null;
|
|
|
+ window.open("", "_self");
|
|
|
+ window.close();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 直接打开这个页面
|
|
|
window.opener = null;
|
|
|
window.open("", "_self");
|
|
|
window.close();
|
|
|
+ window.open(
|
|
|
+ `${baseURL}/webHot/index.html#/?m=e3bv6739474&time=1681093455388&id=1172_1&q=1`
|
|
|
+ );
|
|
|
}
|
|
|
- } else {
|
|
|
- window.opener = null;
|
|
|
- window.open("", "_self");
|
|
|
- window.close();
|
|
|
- // 2023删除
|
|
|
- window.open(
|
|
|
- "https://haidebao.4dage.com/webHot/index.html#/?m=e3bv6739474&time=1681093455388&id=1172_1"
|
|
|
- );
|
|
|
- }
|
|
|
- }, 500);
|
|
|
- }
|
|
|
- }, []);
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [location.search]
|
|
|
+ );
|
|
|
|
|
|
// 输入框只输入空格的非法校验
|
|
|
const inputCheckFu = useCallback((_: any, value: string) => {
|