|
@@ -1,4 +1,5 @@
|
|
"use client";
|
|
"use client";
|
|
|
|
+import { ModalEnum } from "@/components/Box/types";
|
|
import { useRouter } from "@/i18n/routing";
|
|
import { useRouter } from "@/i18n/routing";
|
|
import { Mask } from "antd-mobile";
|
|
import { Mask } from "antd-mobile";
|
|
import clsx from "clsx";
|
|
import clsx from "clsx";
|
|
@@ -33,7 +34,7 @@ const ImgDialog = () => {
|
|
dialogManage.hideDialog(keyName);
|
|
dialogManage.hideDialog(keyName);
|
|
};
|
|
};
|
|
//点击功能, 1:无功能,2:跳转外部链接,3:跳转页面,4:跳转弹窗,5:跳转打开游戏,6:跳转Live Chat客服,7:跳转内部文档
|
|
//点击功能, 1:无功能,2:跳转外部链接,3:跳转页面,4:跳转弹窗,5:跳转打开游戏,6:跳转Live Chat客服,7:跳转内部文档
|
|
- const doFun = () => {
|
|
|
|
|
|
+ const doFun = async () => {
|
|
switch (data.action_type) {
|
|
switch (data.action_type) {
|
|
case 2:
|
|
case 2:
|
|
window.open(data.action_params, "_blank");
|
|
window.open(data.action_params, "_blank");
|
|
@@ -45,6 +46,17 @@ const ImgDialog = () => {
|
|
}
|
|
}
|
|
router.push(path);
|
|
router.push(path);
|
|
break;
|
|
break;
|
|
|
|
+ case 4:
|
|
|
|
+ if (data.action_params === ModalEnum.red_packet) {
|
|
|
|
+ dialogManage.showDialog("RedPacket");
|
|
|
|
+ }
|
|
|
|
+ if (data.action_params === ModalEnum.pwa_install) {
|
|
|
|
+ dialogManage.showDialog("PwaInstall");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 5:
|
|
|
|
+ data?.action_params ? await eval(data?.action_params || "") : "";
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -55,7 +67,11 @@ const ImgDialog = () => {
|
|
<Mask visible={visible} onMaskClick={close}>
|
|
<Mask visible={visible} onMaskClick={close}>
|
|
<div className={styles.imgDialog}>
|
|
<div className={styles.imgDialog}>
|
|
<div className={styles.imgDialogContainer}>
|
|
<div className={styles.imgDialogContainer}>
|
|
- <img src={data?.content?.image} alt="" onClick={doFun} />
|
|
|
|
|
|
+ <div
|
|
|
|
+ dangerouslySetInnerHTML={{ __html: data?.content?.text }}
|
|
|
|
+ className={styles.textBox}
|
|
|
|
+ onCanPlay={doFun}
|
|
|
|
+ ></div>
|
|
<div className={clsx(styles.close)} onClick={close}>
|
|
<div className={clsx(styles.close)} onClick={close}>
|
|
<i
|
|
<i
|
|
className={clsx("iconfont icon-guanbi relative z-10 text-[.14rem]")}
|
|
className={clsx("iconfont icon-guanbi relative z-10 text-[.14rem]")}
|