This commit is contained in:
hackrobot
2025-03-31 07:12:19 -05:00
2 changed files with 24 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ const Book = () => {
};
// const handleClick = (value) => {
// // 跳转到目的页面,在当前页面打开
// // 跳转到目的页面,在当前页面打开_
// Taro.navigateTo({
// url: "/pages/index/index",
// });

View File

@@ -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 = () => {
<View className="card">
<View className="cardItem">
<View className="cardItem_left">
<Image className="cardItem_left_img youtubeSvg" src={youtubesvg}></Image>
<Image
className="cardItem_left_img youtubeSvg"
src={youtubesvg}
></Image>
</View>
<View className="cardItem_right">
<View className="cardItem_rightUp">出海赚美金</View>
@@ -387,9 +401,7 @@ const Index = () => {
</View>
<View className="cardItem_right">
<View className="cardItem_rightUp">持续更新</View>
<View className="cardItem_rightDown">
在线电子书-免费
</View>
<View className="cardItem_rightDown">在线电子书-免费</View>
</View>
</View>
<View className="cardItem">
@@ -420,6 +432,11 @@ const Index = () => {
<View className="left_btn ">
<AtButton
onClick={() => {
try {
sendNtfy();
} catch (err) {
console.error("Error sending notification:", err);
}
goRead();
}}
className="startRead"