This commit is contained in:
hackrobot
2024-10-20 15:12:01 +08:00
parent 7b8cd49656
commit 5a16a962d1
48 changed files with 337 additions and 1 deletions

View File

@@ -40,9 +40,13 @@ marked.setOptions({
// export default class Index extends Component {
const Book = () => {
const [markText, setmarkText] = useState();
const [isWeChat, setisWeChat] = useState(false);
const [book, setbook] = useState(window.localStorage.getItem("book"));
useEffect(() => {}, []);
useEffect(() => {
isWeChatFun();
}, []);
// const handleClick = (value) => {
// // 跳转到目的页面,在当前页面打开
@@ -51,6 +55,18 @@ const Book = () => {
// });
// };
// 是否在微信客户端
const isWeChatFun = () => {
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("micromessenger") != -1) {
setisWeChat(true);
return true;
} else {
setisWeChat(false);
return false;
}
};
const payh5 = (type, total_fee = 1000) => {
// console.log("111");
Taro.request({