Compare commits

..

23 Commits

Author SHA1 Message Date
hackrobot
3bec52d5a5 update 2024-05-13 14:07:01 +08:00
hackrobot
700a45fbf7 marked 2024-05-13 14:04:13 +08:00
eric
6fd48e40fb sss 2024-04-11 03:13:21 +00:00
hackrobot
1514ffd4c6 qwfqwf 2024-04-11 11:09:44 +08:00
hackrobot
8c5f3eb5fd afawfw 2024-04-11 11:00:47 +08:00
hackrobot
219423ed9b fwqf 2024-04-11 10:55:17 +08:00
hackrobot
61e588affe wqqwfwq 2024-04-11 10:41:28 +08:00
hackrobot
b64a0a013e ewwewet 2024-04-11 10:36:58 +08:00
hackrobot
b782557de1 saas 2024-04-11 10:31:49 +08:00
hackrobot
621e7fe1f2 qwfqw 2024-04-11 09:52:26 +08:00
hackrobot
6af9642ceb dffe 2024-04-11 09:33:44 +08:00
hackrobot
7a493f8320 wdwf 2024-04-11 09:22:52 +08:00
hackrobot
8f5b6e59f3 fqqf 2024-04-11 09:03:08 +08:00
hackrobot
9425042bd8 www 2024-04-11 08:52:49 +08:00
hackrobot
8918e5a1ad ewgw 2024-04-11 08:51:35 +08:00
hackrobot
16a1dfc7f2 dd 2024-04-11 02:17:11 +08:00
hackrobot
cef574e3e6 www 2024-04-11 01:34:02 +08:00
hackrobot
0b80e81a97 ddd 2024-04-11 01:03:04 +08:00
hackrobot
6b4bf3fdc1 ddd 2024-04-11 00:52:44 +08:00
hackrobot
9ad06c5adb update 2024-04-11 00:33:01 +08:00
hackrobot
be018507c7 update 2024-04-10 21:23:42 +08:00
eric
636ccda1fb 增加sh脚本 2024-04-10 10:57:48 +00:00
hackrobot
41ec6ea5e9 h5裂变 2024-04-10 17:55:19 +08:00
9 changed files with 100 additions and 307 deletions

View File

@@ -45,8 +45,7 @@ const config = {
esnextModules: ["taro-ui"], esnextModules: ["taro-ui"],
publicPath: "/", publicPath: "/",
staticDirectory: "static", staticDirectory: "static",
postcss: { postcss: { autoprefixer: {
autoprefixer: {
enable: true, enable: true,
config: {}, config: {},
}, },
@@ -76,13 +75,15 @@ const config = {
devServer: { devServer: {
proxy: { proxy: {
'/api/': { '/api/': {
target: JSON.parse('"http://localhost:8055"'), //本地调试端口 // target: JSON.parse('"http://localhost:28369"'), //本地调试端口
target: JSON.parse('"https://kunpeng.hackrobot.cn"'),
pathRewrite: { pathRewrite: {
'^/api/': '/' '^/api/': '/'
}, },
changeOrigin: true changeOrigin: true
} }
} },
allowedHosts: "all"
} }
}, },
}; };

3
link.sh Normal file
View File

@@ -0,0 +1,3 @@
yarn build:h5
cd dist
http-server --port 10086

View File

@@ -44,6 +44,7 @@
"@tarojs/runtime": "3.6.20", "@tarojs/runtime": "3.6.20",
"@tarojs/shared": "3.6.20", "@tarojs/shared": "3.6.20",
"@tarojs/taro": "3.6.20", "@tarojs/taro": "3.6.20",
"marked": "^12.0.2",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"sr-sdk-h5": "^1.3.1", "sr-sdk-h5": "^1.3.1",

BIN
src/images/group.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
src/images/see.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@@ -16,261 +16,64 @@ import { AtNavBar } from "taro-ui";
import { AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui"; import { AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui";
import { AtToast } from "taro-ui"; import { AtToast } from "taro-ui";
import { AtIcon } from "taro-ui"; import { AtIcon } from "taro-ui";
import see from "../../images/see.png";
import group from "../../images/group.png";
import { marked } from "marked";
marked.setOptions({
breaks: true, // 是否回车换行
highlight(code, lang) {
// 语法高亮
let val = code;
if (lang) {
val = hljs.highlight(lang, code).value;
} else {
val = hljs.highlightAuto(code).value;
}
return val;
},
});
const renderer = new marked.Renderer();
// 图片调整300px
renderer.image = function (href, title, text) {
console.log("href, title, text", href, title, text);
return `<img width="300px" src="${href}" alt="${text}"/>
<div class="desc">🥶${text}</div>`;
};
// 引用符号
renderer.blockquote = function (quote) {
console.log("quote", quote);
var regex = /<p>(.*?)<\/p>/;
var str = quote;
var match = regex.exec(str);
if (match != null) {
var content = match[1]; // 获取第一个捕获组的内容
console.log(content);
}
return `❣️<span class="blockquote">${content}</span>`;
};
marked.use({ renderer });
const markTextStr = marked(
`![测试图片2](http://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304081955211.png)
>测试`
);
// export default class Index extends Component { // export default class Index extends Component {
const Index = () => { const Index = () => {
const [current, setcurrent] = useState(0); const [markText, setmarkText] = useState(null);
const [openId, setopenId] = useState(null);
const [isOpened, setisOpened] = useState(false); const onBridgeReady = () => {
const [joinMeetup, setjoinMeetup] = useState(false); WeixinJSBridge.call("hideOptionMenu");
// 获取openid
const getWxid = () => {
// let newparams = Taro.getCurrentInstance().router.params;
// let urlopenid = newparams.openid;
// hash模式
// http://192.168.31.245:10086/?openid=o7LFAwR32hWGq9XOpd7ZxK1wZxq8#/pages/index/index
let hashopenid = null;
if (window.location.href.includes("openid")) {
// window.alert(window.location.href);
hashopenid = window.location.href
.split("#")[0]
.split("?")[1]
.split("=")[1];
} else {
hashopenid = window.localStorage.getItem("openid");
}
// window.alert(hashopenid)
let newOpenid = window.localStorage.getItem("openid");
// window.alert(newOpenid)
if (
(!!newOpenid && newOpenid != "undefined" &&newOpenid != "null") ||
(!!hashopenid && hashopenid != "undefined"&&hashopenid != "null")
) {
// window.alert('存在')
// window.alert(hashopenid);
// window.alert(newOpenid);
window.localStorage.setItem("openid", hashopenid);
setopenId(hashopenid)
} else {
// window.alert('不存在')
let nowUrl = window.location.href;
// window.alert(nowUrl)
let payUrl = `https://payjs.cn/api/openid?mchid=1561724891&callback_url=${nowUrl}`;
window.location.href = payUrl;
}
}; };
useEffect(() => { useEffect(() => {
getWxid(); // console.log("markTextStr=>", markTextStr);
let newjoinMeetup = window.localStorage.getItem("joinMeetup"); // setmarkText(markTextStr);
setjoinMeetup(newjoinMeetup);
}, []); }, []);
const handleClick = (value) => {
console.log("value", value);
setcurrent(value);
if (value == 2) {
// 跳转到目的页面,在当前页面打开
Taro.navigateTo({
url: "/pages/my/index",
});
} else if (value == 0) {
Taro.navigateTo({
url: "/pages/index/index",
});
} else {
Taro.navigateTo({
url: "/pages/meetup/index",
});
}
//
};
const goBack = () => {
// window.history.back();
Taro.navigateBack({
// delta: 2
});
};
return ( return (
<View className="index"> <View className="index">
<AtToast isOpened={isOpened} text="活动暂未开始" icon="blocked"></AtToast> <View dangerouslySetInnerHTML={{ __html: markTextStr }}></View>
{/* <Text>Hello world!</Text> */}
{/* <AtNavBar
// onClickRgIconSt={handleClick}
// onClickRgIconNd={handleClick}
// onClickLeftIcon={goBack}
// leftIconType="chevron-left"
color="#000"
title="异度星球"
// leftText='返回'
// rightFirstIconType='bullet-list'
// rightSecondIconType='user'
/> */}
<View>
<AtSearchBar
showActionButton
value={""}
onChange={() => {}}
onActionClick={() => {}}
/>
</View>
<View className="indexSwiper">
{" "}
<Swiper
indicatorColor="#999"
indicatorActiveColor="#333"
// vertical
circular
indicatorDots
autoplay
>
<SwiperItem>
<View className="demo-text">
{" "}
<Image
// style="width: 300px;height: 100px;background: #fff;"
src={
"http://cdn.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30775083495267465.jpg"
}
/>
</View>
</SwiperItem>
<SwiperItem>
<View className="demo-text">
{" "}
<Image
// style="width: 300px;height: 100px;background: #fff;"
src={
"https://7084298024874.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30435083489707317.jpeg"
}
/>
</View>
</SwiperItem>
<SwiperItem>
<View className="demo-text">
{" "}
<Image
// style="width: 300px;height: 100px;background: #fff;"
src={
"https://7084298024874.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30435083489707317.jpeg"
}
/>
</View>
</SwiperItem>
</Swiper>
</View>
<AtGrid
data={[
{
image:
"https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png",
value: "签到",
},
{
image:
"https://img20.360buyimg.com/jdphoto/s72x72_jfs/t15151/308/1012305375/2300/536ee6ef/5a411466N040a074b.png",
value: "活动",
},
{
image:
"https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png",
value: "视频",
},
]}
onClick={(item, index) => {
console.log("item", item);
console.log("index", index);
if (index == 0) {
setisOpened(true);
setTimeout(() => {
setisOpened(false);
}, 3500);
}
if (index == 1) {
Taro.navigateTo({
url: "/pages/meetup/index",
});
}
if (index == 2) {
setisOpened(true);
setTimeout(() => {
setisOpened(false);
}, 3500);
}
}}
/>
<AtCard
onClick={() => {
// Taro.navigateTo({
// url: "/pages/meetup/Detail/index?id=20231206",
// });
}}
note=""
extra=""
title="[副业交流] 沙龙茶话会"
thumb="http://www.logoquan.com/upload/list/20180421/logoquan15259400209.PNG"
>
<View className="meetupCard">
{" "}
<View className="left">
{" "}
<Image
style="width: 150px;height: 100px;background: #fff;"
src={
"https://7084298024874.huodongxing.com/file/ue/20211008/115427740E13BBD5BD7B56940467DC03B4/30435083489707317.jpeg"
}
/>
</View>
<View className="right">
<View className="up">
<span style={{ color: "green" }}>[报名中]</span> 4/10
</View>
<View className="middle">2023/12/06 星期三</View>
<View className="down">
<AtButton
type="primary"
size="small"
className="submitBtn"
disabled={joinMeetup}
onClick={() => {
// window.alert(window.location.href)
// return false
Taro.navigateTo({
url: "/pages/meetup/Detail/index?id=20231206",
});
}}
>
{!!joinMeetup ? "已报名" : "立即报名"}
</AtButton>
</View>
</View>
</View>
</AtCard>
<View className="indexTablebar">
<AtTabBar
tabList={[
{ title: "首页", text: "" },
{ title: "活动" },
{ title: "我的" },
]}
onClick={(value) => handleClick(value)}
current={current}
/>
</View>
</View> </View>
); );
}; };

View File

@@ -1,59 +1,13 @@
.index { .index {
display: flex; // font-size: 28px;
flex-direction: column;
// align-items: center;
justify-content: center;
.indexSwiper {
// margin-top: 20px;
padding: 20px;
.demo-text { .payBtn{
// display: flex; // font-size: 30px;
// flex-direction: column; margin-left: 20px;
// align-items: center; top: 10px;
// justify-content: center; }
// background-color: yellow;
height: 300px; .lastWord{
width: 100%; font-size: 25px;
// padding: 20px; }
// Image{
// width: 90%;
// }
}
}
.meetupCard {
display: flex;
flex-direction: row;
.right {
// background-color: yellow;
width: 100%;
margin-left: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
.down {
width: 200px;
// background-color: aqua;
position: relative;
bottom: 10px;
right: -120px;
// display: flex;
// flex-direction: column-reverse;
// justify-content:flex-end
// position: relative;
.submitBtn {
// width: 200px;
// position: absolute;
// right: 0px;
}
}
}
}
.indexTablebar {
position: fixed;
bottom: 0;
width: 100%;
}
} }

View File

@@ -98,6 +98,7 @@ const Detail = () => {
...res?.data?.jsapi??{}, ...res?.data?.jsapi??{},
}, },
function (res) { function (res) {
// 付款成功
if (res.err_msg == "get_brand_wcpay_request:ok") { if (res.err_msg == "get_brand_wcpay_request:ok") {
setjoinMeetup(true) setjoinMeetup(true)
window.localStorage.setItem('joinMeetup',true) window.localStorage.setItem('joinMeetup',true)

View File

@@ -8280,6 +8280,11 @@ markdown-table@^1.1.0:
resolved "https://registry.npmmirror.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" resolved "https://registry.npmmirror.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60"
integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==
marked@^12.0.2:
version "12.0.2"
resolved "https://registry.yarnpkg.com/marked/-/marked-12.0.2.tgz#b31578fe608b599944c69807b00f18edab84647e"
integrity sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==
math-random@^1.0.1: math-random@^1.0.1:
version "1.0.4" version "1.0.4"
resolved "https://registry.npmmirror.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" resolved "https://registry.npmmirror.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
@@ -11291,7 +11296,7 @@ strict-uri-encode@^2.0.0:
resolved "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" resolved "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: "string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3" version "4.2.3"
resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -11308,6 +11313,15 @@ string-width@^2.1.0, string-width@^2.1.1:
is-fullwidth-code-point "^2.0.0" is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0" strip-ansi "^4.0.0"
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2:
version "4.2.3"
resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
string-width@^5.0.1, string-width@^5.1.2: string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2" version "5.1.2"
resolved "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" resolved "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
@@ -11388,7 +11402,7 @@ stringify-entities@^1.0.1:
is-alphanumerical "^1.0.0" is-alphanumerical "^1.0.0"
is-hexadecimal "^1.0.0" is-hexadecimal "^1.0.0"
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: "strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1" version "6.0.1"
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -11409,6 +11423,13 @@ strip-ansi@^4.0.0:
dependencies: dependencies:
ansi-regex "^3.0.0" ansi-regex "^3.0.0"
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-ansi@^7.0.1: strip-ansi@^7.0.1:
version "7.1.0" version "7.1.0"
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -12734,7 +12755,7 @@ widest-line@^3.1.0:
dependencies: dependencies:
string-width "^4.0.0" string-width "^4.0.0"
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -12752,6 +12773,15 @@ wrap-ansi@^6.0.1:
string-width "^4.1.0" string-width "^4.1.0"
strip-ansi "^6.0.0" strip-ansi "^6.0.0"
wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"
wrap-ansi@^8.1.0: wrap-ansi@^8.1.0:
version "8.1.0" version "8.1.0"
resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"