This commit is contained in:
hackrobot
2024-09-12 16:29:03 +08:00
parent 4b27c16d44
commit b579bac84a
12 changed files with 404 additions and 0 deletions

BIN
src/images/loft.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/images/loft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 KiB

View File

@@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '一人公司方法论'
}

26
src/pages/book/index.scss Normal file
View File

@@ -0,0 +1,26 @@
// 在 src/index.scss 中引入 GitHub Markdown 主题
@import 'github-markdown-css/github-markdown.css';
.Book {
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;
}
}
}

62
src/pages/book/index.tsx Normal file
View File

@@ -0,0 +1,62 @@
// @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 markdownText from "./text.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 Book = () => {
const [markText, setmarkText] = useState();
useEffect(() => {}, []);
const handleClick = (value) => {
// 跳转到目的页面,在当前页面打开
Taro.navigateTo({
url: "/pages/index/index",
});
};
return (
<View className="Book">
<View
className="markdown-body" // 添加 GitHub Markdown 主题类
dangerouslySetInnerHTML={{ __html: marked(markdownText) }}
></View>
</View>
);
};
export default Book;

49
src/pages/book/text.md Normal file
View File

@@ -0,0 +1,49 @@
## 一人公司方法论
> 公司化运营业务,但并不是注册企业主体
<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

@@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '模版页面'
}

View File

@@ -0,0 +1,4 @@
.Model{
padding: 40px;
}

31
src/pages/model/index.tsx Normal file
View File

@@ -0,0 +1,31 @@
// @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";
// export default class Index extends Component {
const Model = () => {
useEffect(() => {}, []);
const handleClick = (value) => {
// 跳转到目的页面,在当前页面打开
Taro.navigateTo({
url: "/pages/index/index",
});
};
return <View className="Model"></View>;
};
export default Model;

View File

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

View File

@@ -0,0 +1,16 @@
.Model {
padding: 20px;
.bottomDiv{
width: 100%;
height: 100px;
// background-color: yellow;
}
.joinSalon {
// position: relative;
bottom: 20px;
position: fixed;
width: 680px;
}
}

207
src/pages/salon/index.tsx Normal file
View File

@@ -0,0 +1,207 @@
// @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 {
AtModal,
AtModalHeader,
AtModalContent,
AtModalAction,
AtAvatar,
AtAccordion,
} from "taro-ui";
import qrcode from "../../images/qrcode.png";
// export default class Index extends Component {
const Salon = () => {
const [meetupQR, setmeetupQR] = useState(false);
const [isWeChat, setisWeChat] = useState(false);
const [type, settype] = useState(window.localStorage.getItem("type"));
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: "/api/payh5", //仅为示例,并非真实的接口地址
// url: "https://pay.hackrobot.cn/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">| 📣coffeechat</View>
<View className="at-article__p">
coffeechat的另一种形式,1V1交流会紧张,,(6),
</View>
<br />
<View className="at-article__h3">| 📋</View>
<View className="at-article__p">
<br />
1地点:龙华区--宿
<br />
26
<br />
3
</View>
<br />
<View className="at-article__h3">| ,</View>
<View className="at-article__p">
🚫广
<br />
🚫:"留学海归""博士硕士""大咖大V""大厂"
<br />
:"一人公司","自由职业","副业",,,,"高端XX局",,,.{" "}
<br />
<br />
,"职业/学历/成就"--
<br />
💰29/ ()
</View>
</View>
</View>
</View>
<View className="bottomDiv"></View>
{/* 已报名 */}
{type == 1 ? (
<View className="model-emoji">
<Image
// style="width: 100%;height: 240px;background: #fff;"
src={qrcode}
/>
</View>
) : null}
{/* 判断有没有wxid,是否女性 */}
<AtButton
type="primary"
size="normal"
className="joinSalon"
onClick={() => {
if (type == 1) {
return false;
} else {
if (!!isWeChat) {
payh5(1, 290);
} else {
setmeetupQR(true);
}
}
}}
>
{type == 1 ? "已报名" : `立即报名`}
</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;