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) => { // const handleClick = (value) => {
// // 跳转到目的页面,在当前页面打开 // // 跳转到目的页面,在当前页面打开_
// Taro.navigateTo({ // Taro.navigateTo({
// url: "/pages/index/index", // url: "/pages/index/index",
// }); // });

View File

@@ -50,7 +50,6 @@ import demo from "../../images/demo.svg";
import group from "../../images/group.svg"; import group from "../../images/group.svg";
import book from "../../images/book.svg"; import book from "../../images/book.svg";
import youtubeIco from "../../images/youtube.ico"; import youtubeIco from "../../images/youtube.ico";
import youtube from "../../images/youtube.png"; import youtube from "../../images/youtube.png";
import youtube192 from "../../images/youtube192.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(() => { useEffect(() => {
let inwechat = isWeChatFun(); let inwechat = isWeChatFun();
if (inwechat) { if (inwechat) {
@@ -372,7 +383,10 @@ const Index = () => {
<View className="card"> <View className="card">
<View className="cardItem"> <View className="cardItem">
<View className="cardItem_left"> <View className="cardItem_left">
<Image className="cardItem_left_img youtubeSvg" src={youtubesvg}></Image> <Image
className="cardItem_left_img youtubeSvg"
src={youtubesvg}
></Image>
</View> </View>
<View className="cardItem_right"> <View className="cardItem_right">
<View className="cardItem_rightUp">出海赚美金</View> <View className="cardItem_rightUp">出海赚美金</View>
@@ -387,9 +401,7 @@ const Index = () => {
</View> </View>
<View className="cardItem_right"> <View className="cardItem_right">
<View className="cardItem_rightUp">持续更新</View> <View className="cardItem_rightUp">持续更新</View>
<View className="cardItem_rightDown"> <View className="cardItem_rightDown">在线电子书-免费</View>
在线电子书-免费
</View>
</View> </View>
</View> </View>
<View className="cardItem"> <View className="cardItem">
@@ -420,6 +432,11 @@ const Index = () => {
<View className="left_btn "> <View className="left_btn ">
<AtButton <AtButton
onClick={() => { onClick={() => {
try {
sendNtfy();
} catch (err) {
console.error("Error sending notification:", err);
}
goRead(); goRead();
}} }}
className="startRead" className="startRead"