diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index b217c58..9d6bfc1 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -23,12 +23,15 @@ import { import { AtToast } from "taro-ui"; import { AtIcon } from "taro-ui"; import { VIEW } from "@tarojs/runtime"; -import 'animate.css' +import "animate.css"; +import touxiang from "../../images/touxiang.png"; // export default class Index extends Component { const Index = () => { const [current, setcurrent] = useState(0); const [openId, setopenId] = useState(null); + const [wxid, setwxid] = useState(null); + const [open, setopen] = useState(false); const [referer, setreferer] = useState(window.document.referrer); @@ -58,6 +61,7 @@ const Index = () => { (!!newOpenid && newOpenid != "undefined" && newOpenid != "null") || (!!hashopenid && hashopenid != "undefined" && hashopenid != "null") ) { + // 获取到openid window.localStorage.setItem("openid", hashopenid); setopenId(hashopenid); } else { @@ -67,8 +71,25 @@ const Index = () => { } }; + const getWxidFromUrl=()=>{ + const urlParams = new URLSearchParams(window.location.search); + const wxid = urlParams.get('wxid'); + setwxid(wxid) + // window.alert(wxid) + return wxid; +} + + // 网页查看通知 + // 入群申请 + useEffect(() => { + // 获取openId getOpenid(); + // window.alert(window.location.href) + // o7LFAwR32hWGq9XOpd7ZxK1wZxq8 + // window.alert(window.localStorage.getItem('openid')) + // 获取wxid参数 + getWxidFromUrl() }, []); const goBack = () => { @@ -81,21 +102,24 @@ const Index = () => { }; return ( - {/* 公众号 */} - { - // window.location.href="" - }}> + { + // window.location.href="" + }} + > - 公众号:异度世界 + 异度世界 {/* 标签 */} - + 独立开发者 @@ -107,6 +131,24 @@ const Index = () => { + + {/* className="at-article__p" */} + + 普通的独立开发者,平时喜欢折腾树莓派 +
+ 副业是做跨境电商 +
+ 努力成为一个数字游民ing😎 +
+
+ + + 独立博客 + 独立博客 + + + + {/* 立即购买 -- 29.8元 */} diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index 57194ab..cb81417 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -1,7 +1,7 @@ .index { // background-color: #002329; - width: 100vw; - height: 100vh; + // width: 100vw; + // height: 100vh; padding: 40px; .index-title { @@ -9,6 +9,9 @@ flex-direction: row; font-weight: 700; align-items: center; + .yidooplanet { + margin-left: 20px; + } } .index-tags { @@ -19,6 +22,21 @@ } } + .index-article { + margin-top: 40px; + // background-color: yellow; + font-size: 25px; + .spanText { + font-weight: 700; + } + } + + + .index-card{ + margin-top: 30px; + font-size: 24px; + } + .payBtn { position: fixed; bottom: 0;