Compare commits
23 Commits
main
...
3bec52d5a5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bec52d5a5 | ||
|
|
700a45fbf7 | ||
|
|
6fd48e40fb | ||
|
|
1514ffd4c6 | ||
|
|
8c5f3eb5fd | ||
|
|
219423ed9b | ||
|
|
61e588affe | ||
|
|
b64a0a013e | ||
|
|
b782557de1 | ||
|
|
621e7fe1f2 | ||
|
|
6af9642ceb | ||
|
|
7a493f8320 | ||
|
|
8f5b6e59f3 | ||
|
|
9425042bd8 | ||
|
|
8918e5a1ad | ||
|
|
16a1dfc7f2 | ||
|
|
cef574e3e6 | ||
|
|
0b80e81a97 | ||
|
|
6b4bf3fdc1 | ||
|
|
9ad06c5adb | ||
|
|
be018507c7 | ||
|
|
636ccda1fb | ||
|
|
41ec6ea5e9 |
@@ -45,8 +45,7 @@ const config = {
|
||||
esnextModules: ["taro-ui"],
|
||||
publicPath: "/",
|
||||
staticDirectory: "static",
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
postcss: { autoprefixer: {
|
||||
enable: true,
|
||||
config: {},
|
||||
},
|
||||
@@ -76,13 +75,15 @@ const config = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: JSON.parse('"http://localhost:8055"'), //本地调试端口
|
||||
// target: JSON.parse('"http://localhost:28369"'), //本地调试端口
|
||||
target: JSON.parse('"https://kunpeng.hackrobot.cn"'),
|
||||
pathRewrite: {
|
||||
'^/api/': '/'
|
||||
},
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
allowedHosts: "all"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"@tarojs/runtime": "3.6.20",
|
||||
"@tarojs/shared": "3.6.20",
|
||||
"@tarojs/taro": "3.6.20",
|
||||
"marked": "^12.0.2",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"sr-sdk-h5": "^1.3.1",
|
||||
|
||||
BIN
src/images/group.png
Normal file
BIN
src/images/group.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
BIN
src/images/see.png
Normal file
BIN
src/images/see.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
@@ -16,261 +16,64 @@ import { AtNavBar } from "taro-ui";
|
||||
import { AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui";
|
||||
import { AtToast } 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(
|
||||
`
|
||||
>测试`
|
||||
);
|
||||
// export default class Index extends Component {
|
||||
const Index = () => {
|
||||
const [current, setcurrent] = useState(0);
|
||||
const [openId, setopenId] = useState(null);
|
||||
const [markText, setmarkText] = useState(null);
|
||||
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
const [joinMeetup, setjoinMeetup] = useState(false);
|
||||
|
||||
// 获取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;
|
||||
}
|
||||
const onBridgeReady = () => {
|
||||
WeixinJSBridge.call("hideOptionMenu");
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getWxid();
|
||||
let newjoinMeetup = window.localStorage.getItem("joinMeetup");
|
||||
setjoinMeetup(newjoinMeetup);
|
||||
// console.log("markTextStr=>", markTextStr);
|
||||
// setmarkText(markTextStr);
|
||||
}, []);
|
||||
|
||||
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 (
|
||||
<View className="index">
|
||||
<AtToast isOpened={isOpened} text="活动暂未开始" icon="blocked"></AtToast>
|
||||
{/* <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 dangerouslySetInnerHTML={{ __html: markTextStr }}></View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,59 +1,13 @@
|
||||
.index {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// align-items: center;
|
||||
justify-content: center;
|
||||
.indexSwiper {
|
||||
// margin-top: 20px;
|
||||
padding: 20px;
|
||||
// font-size: 28px;
|
||||
|
||||
.demo-text {
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: yellow;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
// 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%;
|
||||
}
|
||||
.payBtn{
|
||||
// font-size: 30px;
|
||||
margin-left: 20px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.lastWord{
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ const Detail = () => {
|
||||
...res?.data?.jsapi??{},
|
||||
},
|
||||
function (res) {
|
||||
// 付款成功
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
setjoinMeetup(true)
|
||||
window.localStorage.setItem('joinMeetup',true)
|
||||
|
||||
36
yarn.lock
36
yarn.lock
@@ -8280,6 +8280,11 @@ markdown-table@^1.1.0:
|
||||
resolved "https://registry.npmmirror.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60"
|
||||
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:
|
||||
version "1.0.4"
|
||||
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"
|
||||
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"
|
||||
resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
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"
|
||||
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:
|
||||
version "5.1.2"
|
||||
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-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"
|
||||
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
@@ -11409,6 +11423,13 @@ strip-ansi@^4.0.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
|
||||
@@ -12734,7 +12755,7 @@ widest-line@^3.1.0:
|
||||
dependencies:
|
||||
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"
|
||||
resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
@@ -12752,6 +12773,15 @@ wrap-ansi@^6.0.1:
|
||||
string-width "^4.1.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:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
|
||||
|
||||
Reference in New Issue
Block a user