From e8dfbf1368c7f01c6eda73fa435c0ad5ee5947b9 Mon Sep 17 00:00:00 2001 From: "WLT\\Eric.hu" Date: Mon, 31 Mar 2025 11:34:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0nyft=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/book/index.tsx | 2 +- src/pages/index/index.jsx | 29 +++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/pages/book/index.tsx b/src/pages/book/index.tsx index 06961c0..b142a62 100644 --- a/src/pages/book/index.tsx +++ b/src/pages/book/index.tsx @@ -78,7 +78,7 @@ const Book = () => { }; // const handleClick = (value) => { - // // 跳转到目的页面,在当前页面打开 + // // 跳转到目的页面,在当前页面打开_ // Taro.navigateTo({ // url: "/pages/index/index", // }); diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index 2b08912..3a370ac 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -50,7 +50,6 @@ import demo from "../../images/demo.svg"; import group from "../../images/group.svg"; import book from "../../images/book.svg"; - import youtubeIco from "../../images/youtube.ico"; import youtube from "../../images/youtube.png"; import youtube192 from "../../images/youtube192.png"; @@ -280,8 +279,20 @@ const Index = () => { }); }; - // 入群申请 + const sendNtfy = () => { + // fetch("https://ntfy.nomadcna.com/awE5vPZI1LoRvsN1", { + // method: "POST", // PUT works too + // body: "Backup successful 😀", + // }); + Taro.request({ + method: "POST", + url: `${`https://ntfy.nomadcna.com/awE5vPZI1LoRvsN1`}`, + success: function (res) { + console.log("访问提醒发送成功"); + }, + }); + }; useEffect(() => { let inwechat = isWeChatFun(); if (inwechat) { @@ -372,7 +383,10 @@ const Index = () => { - + 出海赚美金 @@ -387,9 +401,7 @@ const Index = () => { 持续更新 - - 在线电子书-免费 - + 在线电子书-免费 @@ -420,6 +432,11 @@ const Index = () => { { + try { + sendNtfy(); + } catch (err) { + console.error("Error sending notification:", err); + } goRead(); }} className="startRead"