This commit is contained in:
hackrobot
2024-10-20 14:48:49 +08:00
parent 030ba5a88e
commit 7b8cd49656
56 changed files with 571 additions and 484 deletions

View File

@@ -41,9 +41,3 @@
以youtube频道作为副资产获利
最近在策划`coffeechat以及小型沙龙`
---
## 持续更新中
> 有建议请私聊

View File

@@ -14,7 +14,8 @@ import { AtTag } from "taro-ui";
import { AtList, AtListItem } from "taro-ui";
import { AtForm, AtMessage } from "taro-ui";
import { marked } from "marked";
import markdownText from "./text.md";
import infoText from "./info.md";
import bookText from "./book.md";
marked.setOptions({
breaks: true, // 是否回车换行
@@ -39,6 +40,7 @@ marked.setOptions({
// export default class Index extends Component {
const Book = () => {
const [markText, setmarkText] = useState();
const [book, setbook] = useState(window.localStorage.getItem("book"));
useEffect(() => {}, []);
@@ -49,12 +51,82 @@ const Book = () => {
// });
// };
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="Book">
<View
className="markdown-body" // 添加 GitHub Markdown 主题类
dangerouslySetInnerHTML={{ __html: marked(markdownText) }}
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) {
payh5("book", 2900);
} else {
// setmeetupQR(true);
}
}
}}
>
{/* {meetup == 1 ? "已加入" : `立即加入`} */}
{`立即阅读`}
</AtButton>
) : null}
</View>
);
};

43
src/pages/book/info.md Normal file
View File

@@ -0,0 +1,43 @@
## 一人公司方法论
> 公司化运营业务,但并不是注册企业主体
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/book.png?imageSlim" title="" alt="book.png" width="248">
这本书是基于H5页面的`单页书籍`,会不定时更新
本主要基于个人的学习,实践,总结一套方法论,包含了`道``术`
读者可以参考借鉴
主题包含并不限于以下:
- 云手机+微信机器人+AIGC+边缘计算
- youtube频道获利
- 独立开发者
- 跨境电商
- 旅行+远程办公
---
## 简介
> 数字游民实践者
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/avatar.jpg?imageSlim" title="" alt="avatar.jpg" width="254">
曾经是程序员,业余开发软件工具
有公司主体,运营跨境电商亚马逊
平时爱折腾技术,以`树莓派`为主
目前方向是偏户外/旅行
以youtube频道作为副资产获利
最近在策划`coffeechat以及小型沙龙`

View File

@@ -424,114 +424,13 @@ const Index = () => {
</AtList>
</View>
{/* 在线图书 */}
{/* 参考资料https://readmake.com/ */}
<View className="index-book">
<View className="bookImg">
<Image
style="width: 40%px;height:100%;background: #fff;"
src={book}
/>
</View>
<View className="book-middle"></View>
<View className="nomad-right">
<View className="nomad-title">
<Image
style="width: 30px;height:30px;background: #fff;"
src={nomad}
/>
<View className="bookNmae">一人公司方法论</View>
</View>
<View className="subtitle">多元自动化收入</View>
<View className="bookText">
{/* 两个核心主题: <br /> */}
1. 云手机+微信机器人+AIGC
<br />
2. youtube获利 <br />
3. 跨境电商
<br />
4. 独立开发者
<br />
5. 旅行与远程办公
<br />
</View>
<View
className="bookPrice"
onClick={() => {
// 19元解锁书籍
// payh5("bookpay", 10);
Taro.navigateTo({
url: "/pages/book/index",
});
return false;
if (!!userInfo?.ebook) {
// 已预约
Taro.atMessage({
message: "已预约成功",
type: "warning",
});
} else {
if (!!wxid) {
// 发起预约
const userUpdateData = {
ebook: 1, // 只更新 openid 字段
};
Taro.request({
method: "PUT",
// url: `${process.env.TARO_API_API}/user/${urlwxid}`, //仅为示例,并非真实的接口地址
url: `${process.env.TARO_API_API}/user/${wxid}`, //仅为示例,并非真实的接口地址
data: userUpdateData,
header: {
"Content-Type": "application/json",
},
success: function (res) {
// 预约成功
// Taro.atMessage({
// message: "预约成功",
// type: "success",
// });
if (res.data.code == "200") {
setbookToast(true);
}
},
fail: function (err) {},
complete: function (finy) {
// setTimeout(() => {
// window.location.reload();
// }, 2000);
// getUserinfo()
},
});
} else {
setmeetupQR(true);
}
}
}}
>
<View
className="join"
// style={{ backgroundColor: !!userInfo?.ebook ? "#1890ff" : null }}
style={{
backgroundColor: !!userInfo?.ebook ? "#1890ff" : "#1890ff",
}}
>
{/* {!!userInfo?.ebook ? "已预约" : "预约"} */}
{/* {!!userInfo?.ebook ? "未完结" : "未完结"} */}
{bookpay == 1 ? "查看" : "阅读"}
</View>
</View>
</View>
</View>
{/* 已付费的用户才展示活动 */}
<View className="index-meetup animate__animated animate__pulse">
{/* 已付费的用户才展示活动 */}
<View className="index-meetup animate__animated animate__pulse">
<AtCard
// note="提示文字"
// extra="2024/09/18"
extra="已加入:200+"
title="交流群"
// extra="已加入:200+"
title="群"
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
>
<View className="meetup-card">
@@ -643,6 +542,110 @@ const Index = () => {
</AtCard>
</View>
{/* 在线图书 */}
{/* 参考资料https://readmake.com/ */}
<View className="index-book">
<View className="bookImg">
<Image
style="width: 40%px;height:100%;background: #fff;"
src={book}
/>
</View>
<View className="book-middle"></View>
<View className="nomad-right">
<View className="nomad-title">
<Image
style="width: 30px;height:30px;background: #fff;"
src={nomad}
/>
<View className="bookNmae">一人公司方法论</View>
</View>
<View className="subtitle">多元自动化收入</View>
<View className="bookText">
{/* 两个核心主题: <br /> */}
1. 云手机+微信机器人+AIGC
<br />
2. youtube获利 <br />
3. 跨境电商
<br />
4. 独立开发者
<br />
5. 旅行与远程办公
<br />
</View>
<View
className="bookPrice"
onClick={() => {
// 19元解锁书籍
// payh5("bookpay", 10);
Taro.navigateTo({
url: "/pages/book/index",
});
return false;
if (!!userInfo?.ebook) {
// 已预约
Taro.atMessage({
message: "已预约成功",
type: "warning",
});
} else {
if (!!wxid) {
// 发起预约
const userUpdateData = {
ebook: 1, // 只更新 openid 字段
};
Taro.request({
method: "PUT",
// url: `${process.env.TARO_API_API}/user/${urlwxid}`, //仅为示例,并非真实的接口地址
url: `${process.env.TARO_API_API}/user/${wxid}`, //仅为示例,并非真实的接口地址
data: userUpdateData,
header: {
"Content-Type": "application/json",
},
success: function (res) {
// 预约成功
// Taro.atMessage({
// message: "预约成功",
// type: "success",
// });
if (res.data.code == "200") {
setbookToast(true);
}
},
fail: function (err) {},
complete: function (finy) {
// setTimeout(() => {
// window.location.reload();
// }, 2000);
// getUserinfo()
},
});
} else {
setmeetupQR(true);
}
}
}}
>
<View
className="join"
// style={{ backgroundColor: !!userInfo?.ebook ? "#1890ff" : null }}
style={{
backgroundColor: !!userInfo?.ebook ? "#1890ff" : "#1890ff",
}}
>
{/* {!!userInfo?.ebook ? "已预约" : "预约"} */}
{/* {!!userInfo?.ebook ? "未完结" : "未完结"} */}
{bookpay == 1 ? "查看" : "阅读"}
</View>
</View>
</View>
</View>
{/* 软件下载 */}
<View className="software">
<View className="emojiTitle">

View File

@@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '副业沙龙'
}

View File

@@ -0,0 +1,23 @@
.Model {
padding: 20px;
.bottomDiv {
width: 100%;
height: 100px;
// background-color: yellow;
}
.joinSalon {
// position: relative;
bottom: 20px;
position: fixed;
width: 700px;
}
.model-emoji {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}

217
src/pages/planet/index.tsx Normal file
View File

@@ -0,0 +1,217 @@
// @ts-nocheck
import { Component } from "react";
import { View, Text, Image, Button } 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 { AtTag } from "taro-ui";
import { AtList, AtListItem } from "taro-ui";
import { AtForm, AtMessage } from "taro-ui";
import loft from "../../images/loft.png";
import nomadvloglife from "../../images/nomadvloglife.png";
import {
AtModal,
AtModalHeader,
AtModalContent,
AtModalAction,
AtAvatar,
AtAccordion,
} from "taro-ui";
import qrcode from "../../images/qrcode.png";
import joinGroup from "../../images/joinGroup.png";
// export default class Index extends Component {
const Salon = () => {
const [meetupQR, setmeetupQR] = useState(false);
const [isWeChat, setisWeChat] = useState(false);
const [meetup, setmeetup] = useState(window.localStorage.getItem("meetup"));
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="Model">
<View className="meetup-left">
<Image style="width: 100%;height: 100px;background: #fff;" src={loft} />
</View>
<View className="at-article">
<View className="at-article__h1"></View>
<View className="at-article__info">
{/* 2017-05-07&nbsp;&nbsp;&nbsp; */}
</View>
<View className="at-article__content">
<View className="at-article__section">
<View className="at-article__h2"></View>
<View className="at-article__h3">| 📣</View>
<View className="at-article__p">
,/
</View>
<br />
<View className="at-article__h3">| 📋</View>
<View className="at-article__p">
,
<br />
:
<br />
1
<br />
2
<br />
3AIGC /
</View>
<br />
<View className="at-article__h3">| </View>
<View className="at-article__p">
🚫广
<br />
🚫
<br />
<br />
,@
{/* <br />
💰价格29元/人 (场地成本) */}
</View>
<br />
{meetup == 1 ? (
<View className="at-article__h3">| 入群口令:3399</View>
) : null}
{meetup == 1 ? (
<View className="at-article__p">
{`ID:${window.localStorage.getItem("openid")}`}
</View>
) : null}
{/* 已报名 */}
{meetup == 1 ? (
<View className="model-emoji">
<Image
style="width: 240px;height: 240px;background: #fff;"
// src={qrcode}
src={joinGroup}
/>
</View>
) : null}
</View>
</View>
</View>
<View className="bottomDiv"></View>
{/* 判断有没有wxid,是否女性 */}
<AtButton
type="primary"
size="normal"
className="joinSalon"
onClick={() => {
if (meetup == 1) {
return false;
} else {
if (!!isWeChat) {
payh5("meetup", 2900);
} else {
setmeetupQR(true);
}
}
}}
>
{meetup == 1 ? "入群口令: 3399" : `立即加入`}
</AtButton>
<View className="meetupQR">
{/* 软件下载模态窗 */}
<AtModal isOpened={meetupQR}>
<AtModalHeader></AtModalHeader>
<AtModalContent>
<View className="model-emoji">
<Image
// style="width: 100%;height: 240px;background: #fff;"
src={qrcode}
/>
</View>
</AtModalContent>
<AtModalAction>
<Button
onClick={() => {
setmeetupQR(false);
}}
>
</Button>
</AtModalAction>
</AtModal>
</View>
</View>
);
};
export default Salon;

View File

@@ -21,3 +21,12 @@
justify-content: center;
}
}
.no-border {
border: none;
overflow: hidden;
width: 100%;
height: 100vh;
scrollbar-width: none; /* Firefox */
}

View File

@@ -105,92 +105,114 @@ const Salon = () => {
<Image style="width: 100%;height: 100px;background: #fff;" src={loft} />
</View>
<View className="at-article">
<View className="at-article__h1"></View>
<View className="at-article__info">
{/* 2017-05-07&nbsp;&nbsp;&nbsp; */}
</View>
<View className="at-article__content">
<View className="at-article__section">
<View className="at-article__h2"></View>
<View className="at-article__h3">| 📣</View>
<View className="at-article__p">
,/
</View>
<br />
<View className="at-article__h3">| 📋</View>
<View className="at-article__p">
,
<br />
:
<br />
1
<br />
2
<br />
3AIGC /
</View>
<br />
<View className="at-article__h3">| </View>
<View className="at-article__p">
🚫广
<br />
🚫
<br />
<br />
,@
{/* <br />
💰价格29元/人 (场地成本) */}
</View>
<br />
{meetup == 1 ? (
<View className="at-article__h3">| 入群口令:3399</View>
) : null}
{meetup == 1 ? (
{meetup != 1 ? (
<View className="at-article">
<View className="at-article__h1"></View>
<View className="at-article__info">
{/* 2017-05-07&nbsp;&nbsp;&nbsp; */}
</View>
<View className="at-article__content">
<View className="at-article__section">
<View className="at-article__h2"></View>
<View className="at-article__h3">| 📣</View>
<View className="at-article__p">
{`ID:${window.localStorage.getItem("openid")}`}
{/* 微信群是一个交流技术的平台,不限软件/硬件 */}
/
<br />
<br />
,homelab
<br />
</View>
) : null}
{/* 已报名 */}
{meetup == 1 ? (
<View className="model-emoji">
<Image
style="width: 240px;height: 240px;background: #fff;"
// src={qrcode}
src={joinGroup}
/>
<br />
<View className="at-article__h3">| 📋</View>
<View className="at-article__p">
{/* 微信群只是一个沟通平台,与其他伙伴搭桥
<br /> */}
:
<br />
1
<br />
2
<br />
3AIGC /
</View>
) : null}
<br />
<View className="at-article__h3">| 🟩</View>
<View className="at-article__p">
,
<br />
,
<br />
</View>
<br />
{/* <View className="at-article__h3">| ❌禁止以下行为</View>
<View className="at-article__p">
🚫营销推广
<br />
🚫恶意捣乱
<br />
<br />
❗群主精力有限,没有解答义务,勿随意@
</View> */}
<br />
</View>
</View>
</View>
</View>
) : (
<View>
<iframe
className="no-border"
src="https://memos.nomadcna.com/"
></iframe>
{/* <View>
<View className="at-article__h3">| ☕微信自动入群口令:3399</View>
<View className="at-article__p">
{`ID:${window.localStorage.getItem("openid")}`}
</View>
<View className="model-emoji">
<Image
style="width: 240px;height: 240px;background: #fff;"
// src={qrcode}
src={joinGroup}
/>
</View>
</View> */}
</View>
)}
<View className="bottomDiv"></View>
{/* 判断有没有wxid,是否女性 */}
<AtButton
type="primary"
size="normal"
className="joinSalon"
onClick={() => {
if (meetup == 1) {
return false;
} else {
if (!!isWeChat) {
payh5("meetup", 2900);
{meetup != 1 ? (
<AtButton
type="primary"
size="normal"
className="joinSalon"
onClick={() => {
if (meetup == 1) {
return false;
} else {
setmeetupQR(true);
if (!!isWeChat) {
payh5("meetup", 2980);
} else {
setmeetupQR(true);
}
}
}
}}
>
{meetup == 1 ? "入群口令: 3399" : `立即加入`}
</AtButton>
}}
>
{/* {meetup == 1 ? "已加入" : `立即加入`} */}
{`立即加入`}
</AtButton>
) : null}
<View className="meetupQR">
{/* 软件下载模态窗 */}
<AtModal isOpened={meetupQR}>
<AtModalHeader></AtModalHeader>
<AtModalHeader></AtModalHeader>
<AtModalContent>
<View className="model-emoji">
<Image