This commit is contained in:
hackrobot
2025-01-07 13:03:03 +08:00
parent 0d7e2ee59c
commit 681add24a7
55 changed files with 332 additions and 330 deletions

View File

@@ -7,8 +7,7 @@ export default {
'pages/group/index',
'pages/book/index',
'pages/salon/index',
'pages/sphone/index'
],
window: {
backgroundTextStyle: 'light',

View File

@@ -132,8 +132,8 @@ const Book = () => {
return false;
} else {
if (!!isWeChat) {
// 9.8元
payh5("book", 980);
// 19.8元
payh5("book", 1980);
} else {
// setmeetupQR(true);
}

View File

@@ -374,7 +374,7 @@ const Index = () => {
<br />
副业是做跨境电商
<br />
做一个<span className="spanText">数字游民</span>ing😎
做一个<span className="spanText">数字游民</span>ing
</View>
</View>
@@ -382,14 +382,16 @@ const Index = () => {
<View className="index-list">
<AtList>
<AtListItem
title="云手机"
title="云手机 🔥"
arrow="right"
// hasBorder={false}
thumb={phone}
onClick={() => {
window.location.href =
// "https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzU4NTgyNDUxNw==&action=getalbum&album_id=3403853254399082501#wechat_redirect";
"https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzU4NTgyNDUxNw==&action=getalbum&album_id=3555705062712901639#wechat_redirect";
Taro.navigateTo({
url: "/pages/sphone/index",
});
// window.location.href =
// "https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzU4NTgyNDUxNw==&action=getalbum&album_id=3555705062712901639#wechat_redirect";
}}
/>
<AtListItem
@@ -537,7 +539,7 @@ const Index = () => {
? "已报名"
: // : "立即报名"}
"已满"} */}
{`查看`}
{`加入`}
</View>
</View>
</View>

View File

@@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '云手机'
}

View File

@@ -0,0 +1,37 @@
// 在 src/index.scss 中引入 GitHub Markdown 主题
@import 'github-markdown-css/github-markdown.css';
.Sphone {
padding: 40px;
// font-size: 30px !important;
// color: #666;
.markdown-body{
font-size: 30px !important;
}
img {
max-width: 100%;
height: auto; /* 保持图像的纵横比 */
}
.formCode {
display: flex;
flex-direction: row;
.codeBtn {
background-color: aquamarine;
// height: 80px;
// color: red;
}
}
.joinSalon {
// position: relative;
// bottom: 20px;
// position: fixed;
width: 700px;
font-weight: 600;
background-color:#72D572 ;
border-color: #72D572 ;;
}
}

151
src/pages/sphone/index.tsx Normal file
View File

@@ -0,0 +1,151 @@
// @ts-nocheck
import { Component } from "react";
import { View, Text, Image } from "@tarojs/components";
import "./index.scss";
import { AtButton, AtInput, AtTabBar } from "taro-ui";
import React, { useCallback, useEffect, useState } from "react";
import { AtGrid } from "taro-ui";
import { Swiper, SwiperItem } from "@tarojs/components";
import { AtCard } from "taro-ui";
import { AtImagePicker } from "taro-ui";
import Taro from "@tarojs/taro";
import { AtAvatar } from "taro-ui";
import { AtTag } from "taro-ui";
import { AtList, AtListItem } from "taro-ui";
import { AtForm, AtMessage } from "taro-ui";
import { marked } from "marked";
import infoText from "./info.md";
import payText from "./pay.md";
marked.setOptions({
breaks: true, // 是否回车换行
gfm: true, //使用经批准的 GitHub Flavored Markdown (GFM) 规范
// pedantic: true, //严格模式
// highlight(code:any, lang:any) {
// // 语法高亮
// let val = code;
// if (lang) {
// val = hljs.highlight(lang, code).value;
// } else {
// val = hljs.highlightAuto(code).value;
// }
// return val;
// },
});
// const renderer = new marked.Renderer();
// // 使用拓展
// marked.use({ renderer });
// export default class Index extends Component {
const Sphone = () => {
const [markText, setmarkText] = useState();
const [isWeChat, setisWeChat] = useState(false);
const [book, setbook] = useState(window.localStorage.getItem("book"));
useEffect(() => {
isWeChatFun();
}, []);
// const handleClick = (value) => {
// // 跳转到目的页面,在当前页面打开
// Taro.navigateTo({
// url: "/pages/index/index",
// });
// };
// 是否在微信客户端
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({
method: "POST",
url: `${process.env.TARO_API_API}/payh5`, //仅为示例,并非真实的接口地址
// url: "https://pay.hackrobot.cn${process.env.TARO_API_API}/payh5", //仅为示例,并非真实的接口地址
data: {
callback_url: window.location.href,
openid: window.localStorage.getItem("openid"),
total_fee: total_fee, // 金额,单位:分
type: type, //订单类型 book/meetup/video/vip
},
header: {
"content-type": "application/json", // 默认值
},
success: function (res) {
console.log(res.data);
// window.alert(res.data.jsapi);
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
{
// 以下6个支付参数通过payjs的jsapi接口获取
// appId: "wxc5205a653b0259bf",
// timeStamp: "1701401644",
// nonceStr: "KhOYB0wFV6j9qyQK",
// package: "prepay_id=wx01113404850024729b35f4d69b73500000",
// signType: "MD5",
// paySign: "2A823C8D47CCF871C6C65A56DC228CF8",
...(res?.data?.jsapi ?? {}),
},
function (res) {
// 支付成功
if (res.err_msg == "get_brand_wcpay_request:ok") {
window.localStorage.setItem(type, 1); //订单类型 book/meetup/video/vip
WeixinJSBridge.call("closeWindow");
}
}
);
},
});
};
return (
<View className="Sphone">
<View
className="markdown-body" // 添加 GitHub Markdown 主题类
dangerouslySetInnerHTML={{
__html: marked(book == 1 ? bookText : infoText),
}}
></View>
<View className="bottomDiv"></View>
{/* 判断有没有wxid,是否女性 */}
{book != 1 ? (
<AtButton
type="primary"
size="normal"
className="joinSalon"
onClick={() => {
if (book == 1) {
return false;
} else {
if (!!isWeChat) {
// 580元
payh5("book", 5800);
} else {
// setmeetupQR(true);
}
}
}}
>
{/* {meetup == 1 ? "已加入" : `立即加入`} */}
{`阅读更多 ¥580`}
</AtButton>
) : null}
</View>
);
};
export default Sphone;

51
src/pages/sphone/info.md Normal file
View File

@@ -0,0 +1,51 @@
## 云手机教程
> docker部署
![2024-12-22-01-00-03-Escrcpy.png](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2024-12-22-01-00-03-Escrcpy.png?imageSlim)
> 原生安卓AOSP
![2025-01-06-01-40-05-EscrcpyMirror-rk3588_s(WIFI).png](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2025-01-06-01-40-05-EscrcpyMirror-rk3588_s(WIFI).png?imageSlim)
***
## 目录
- 云手机设备指北
- 硬件选型
- 方案1:docker容器化安卓
- 虚拟化的优缺点/设置
- 方案2:主板+原生AOSP
- root权限与magisk配置
- OTG外设配件
- 内网穿透
- 远程控制:云控
- 魔法:多开/群控/应用变量/gps/ip属地
- 应用场景:无人直播/机器人bot/RPA自动化+数据爬虫
- 杂谈~~
***
## 简述
教程属于`操作类,不是原理`
比如不涉及:内核编译,ROM定制,虚拟化
图文+视频录制
长期更新

79
src/pages/sphone/pay.md Normal file
View File

@@ -0,0 +1,79 @@
## 云手机教程
> docker部署
![2024-12-22-01-00-03-Escrcpy.png](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2024-12-22-01-00-03-Escrcpy.png?imageSlim)
> 原生安卓AOSP
![2025-01-06-01-40-05-EscrcpyMirror-rk3588_s(WIFI).png](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2025-01-06-01-40-05-EscrcpyMirror-rk3588_s(WIFI).png?imageSlim)
***
## 目录
- 云手机设备指北
- 硬件选型
- 方案1:docker容器化安卓
- 虚拟化的优缺点/设置
- 方案2:主板+原生AOSP
- root权限与magisk配置
- OTG外设配件
- 内网穿透
- 远程控制:云控
- 魔法:多开/群控/应用变量/gps/ip属地
- 应用场景:无人直播/机器人bot/RPA自动化+数据爬虫
- 杂谈~~
***
## 简述
教程属于`操作类,不是原理`
比如不涉及:内核编译,ROM定制,虚拟化
图文+视频录制
长期更新
***
## 云手机设备指北
这里说的云手机,默认指的
1. 开源硬件:ARM主板,
2. 设置安卓系统
3. 远程控制
***
## 硬件选型
建议购买RK3588芯片的开发板
- 香橙派5plus
- nvme ssd硬盘
- TF卡:用于测试系统
- 2个支持`uvc协议+带麦克风`的摄像头
教程正在更新中,视频录制操作过程,请等待