Compare commits
23 Commits
feat/plane
...
test/1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f14fcdc0af | ||
|
|
d2c4fb676c | ||
|
|
8d677f376f | ||
|
|
b8e9e97199 | ||
|
|
0efe0d2c3c | ||
|
|
4e16b51e2c | ||
|
|
21c927b483 | ||
|
|
58e80feb8a | ||
|
|
a31346f404 | ||
|
|
6bc38e01b0 | ||
|
|
58f5b5f41a | ||
|
|
9850328c9d | ||
|
|
6af862ec45 | ||
|
|
c91df58c3a | ||
|
|
fda9f14423 | ||
|
|
03b386ca01 | ||
|
|
1f861dc3c5 | ||
|
|
0ef1698a22 | ||
|
|
36ab69bbf6 | ||
|
|
b173a694ee | ||
|
|
665d1f1ea9 | ||
|
|
f650251cae | ||
|
|
ad8bae3697 |
@@ -9,6 +9,7 @@ const path = require('path'); //引入node的path模块
|
||||
export default defineConfig(async (merge, { command, mode }) => {
|
||||
const baseConfig = {
|
||||
projectName: 'yidooplanet',
|
||||
embeddedAppIdList: ["wx8a5d6f9fad07544e","wx7bb576902363f4ff","wxe2039b83454e49ed"], //半屏拉起小程序 当当wx7bb576902363f4ff/腾讯云wxe2039b83454e49ed/微信读书 wx8a5d6f9fad07544e
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '..', 'src')
|
||||
},
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
"@tarojs/runtime": "3.6.25",
|
||||
"@tarojs/shared": "3.6.25",
|
||||
"@tarojs/taro": "3.6.25",
|
||||
"lodash": "^4.17.21",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"taro-ui": "^3.3.0"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/index/index',
|
||||
'pages/index/componments/KeywordJoin/index',
|
||||
'pages/index/componments/NomadbookPage/index',
|
||||
|
||||
'pages/my/index',
|
||||
'pages/my/componments/Log/index',
|
||||
|
||||
'pages/my/componments/Quesion/index',
|
||||
|
||||
],
|
||||
permission: {
|
||||
|
||||
@@ -22,7 +22,9 @@ import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import QRcodePng from "@/images/index/QRcode.png";
|
||||
import nomad from "@/images/index/nomad.png";
|
||||
import QRcode from "@/images/index/QRcode.png";
|
||||
|
||||
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -40,7 +42,7 @@ const QrCode = (props) => {
|
||||
<Image
|
||||
style={{ width: "100px", height: "100px" }}
|
||||
showMenuByLongpress={true}
|
||||
src={QRcodePng}
|
||||
src={QRcode}
|
||||
// src='cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/touxiang/download-1.jpg'
|
||||
></Image>
|
||||
</View>
|
||||
|
||||
@@ -11,7 +11,7 @@ const TabbarCom = (props) => {
|
||||
<AtTabBar
|
||||
tabList={[
|
||||
{ title: "首页", iconType: "home" }, //, text: "new"
|
||||
// { title: "活动", iconType: "camera" },
|
||||
// { title: "工具箱", iconType: "star" },
|
||||
{ title: "我的", iconType: "user" }, //, text: "100", max: 99
|
||||
]}
|
||||
onClick={(current) => {
|
||||
@@ -20,7 +20,13 @@ const TabbarCom = (props) => {
|
||||
Taro.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
} else {
|
||||
}
|
||||
// else if (current === 1) {
|
||||
// Taro.redirectTo({
|
||||
// url: "/pages/index/index",
|
||||
// });
|
||||
// }
|
||||
else {
|
||||
Taro.redirectTo({
|
||||
url: "/pages/my/index",
|
||||
});
|
||||
|
||||
BIN
src/images/index/nomad.png
Normal file
BIN
src/images/index/nomad.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
BIN
src/images/index/remotework.jpg
Normal file
BIN
src/images/index/remotework.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
@@ -10,7 +10,7 @@ import {
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtMessage
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
@@ -32,12 +32,27 @@ import { useEffect, useState } from "react";
|
||||
const JoinWechat = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
|
||||
// 用户基本信息
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
return (
|
||||
<View
|
||||
className="JoinWechat"
|
||||
onClick={() => {
|
||||
setisOpened(true);
|
||||
// 判断群组内是否包含wxid
|
||||
// pass
|
||||
|
||||
// 判断目前是否辨识wxid
|
||||
if (localuserInfo?.wxid) {
|
||||
// 跳转答题页面=入群
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/KeywordJoin/index",
|
||||
});
|
||||
} else {
|
||||
// 显示二维码-个人名片
|
||||
setisOpened(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<View className="CustomHeader">🥂加入微信群-meetup</View>
|
||||
|
||||
3
src/pages/index/componments/KeywordJoin/index.config.js
Normal file
3
src/pages/index/componments/KeywordJoin/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '入群公告'
|
||||
})
|
||||
180
src/pages/index/componments/KeywordJoin/index.jsx
Normal file
180
src/pages/index/componments/KeywordJoin/index.jsx
Normal file
@@ -0,0 +1,180 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtSteps,
|
||||
AtForm,
|
||||
AtInput,
|
||||
AtToast,
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
import { set } from "lodash";
|
||||
const KeywordJoin = () => {
|
||||
const [current, setcurrent] = useState(0);
|
||||
const [value, setvalue] = useState(null);
|
||||
const [disabled, setdisabled] = useState(false);
|
||||
const [btntext, setbtntext] = useState('立即加入');
|
||||
|
||||
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
|
||||
// 获取用户标识符
|
||||
useEffect(() => {
|
||||
// 获取路由参数
|
||||
const params = Taro.getCurrentInstance().router.params;
|
||||
console.log("params", params);
|
||||
// const [wxid, openId] = params;
|
||||
|
||||
if (params.wxid) {
|
||||
setuserInfo({
|
||||
wxid: params?.wxid, //个人号wxid
|
||||
// openId: params?.openId, //小程序openid
|
||||
});
|
||||
// 本地存储
|
||||
|
||||
try {
|
||||
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||
} catch (e) {}
|
||||
}
|
||||
}, []);
|
||||
|
||||
// useEffect(() => {
|
||||
// // 更新分享-minipro
|
||||
// Taro.updateShareMenu({
|
||||
// withShareTicket: true,
|
||||
// success() {},
|
||||
// });
|
||||
|
||||
// // 显示分享按钮-minipro
|
||||
// Taro.showShareMenu({
|
||||
// withShareTicket: true,
|
||||
// // showShareItems:true,
|
||||
// });
|
||||
|
||||
// }, []);
|
||||
|
||||
const handleClick = (text, type) => {
|
||||
Taro.atMessage({
|
||||
message: text,
|
||||
type: type,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="KeywordJoin">
|
||||
{/* 步骤栏 */}
|
||||
{/* <AtSteps
|
||||
items={[
|
||||
{
|
||||
title: "人群公告",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
// status: "success",
|
||||
},
|
||||
{
|
||||
title: "声明",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
},
|
||||
{
|
||||
title: "再次确认",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
// status: "error",
|
||||
},
|
||||
]}
|
||||
current={current}
|
||||
onChange={(target) => {
|
||||
console.log("target", target);
|
||||
setcurrent(target);
|
||||
}}
|
||||
/> */}
|
||||
|
||||
<View className="at-article">
|
||||
{/* H1文章标题 */}
|
||||
<View className="at-article__h1">欢迎加入微信群</View>
|
||||
{/* <View className="at-article__info">
|
||||
2024-03-24 异度星球
|
||||
</View> */}
|
||||
|
||||
{/* 内容区域 */}
|
||||
<View className="at-article__content">
|
||||
<View className="at-article__section">
|
||||
<Image
|
||||
style={{
|
||||
width: "200px",
|
||||
height: "200px",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
className="at-article__img"
|
||||
src={touxiang}
|
||||
mode="widthFix"
|
||||
/>
|
||||
{/* 二级标题 */}
|
||||
{/* <View className="at-article__h2">这是二级标题</View> */}
|
||||
{/* 三级标题 */}
|
||||
<View className="at-article__h3">群公告</View>
|
||||
{/* 文本段落 */}
|
||||
<View className="at-article__p">
|
||||
交流自由职业/副业,数字游民等话题
|
||||
</View>
|
||||
<View className="at-article__p">请不要打广告</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<AtMessage />
|
||||
<AtButton
|
||||
type="primary"
|
||||
className="jsonWechatBtn"
|
||||
disabled={disabled}
|
||||
onClick={() => {
|
||||
// 通过hook加入微信群邀请
|
||||
//发起网络请求
|
||||
Taro.request({
|
||||
// url: "http://127.0.0.1:28369/joingroup",
|
||||
url: "https://kunpeng.hackrobot.cn/joingroup",
|
||||
data: {
|
||||
wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid
|
||||
},
|
||||
success: function (resUser) {
|
||||
console.log("resUser--", resUser);
|
||||
console.log("加入微信群成功");
|
||||
if (resUser?.data?.success == "fail") {
|
||||
//已经在群聊中
|
||||
handleClick("已经在群聊中", "warning");
|
||||
setbtntext("已经在群聊中")
|
||||
|
||||
} else if (resUser?.data?.success == "ok") {
|
||||
// 发送群聊邀请
|
||||
handleClick("已发送群聊邀请", "warning");
|
||||
setbtntext("已发送群聊邀请")
|
||||
}
|
||||
setdisabled(true);
|
||||
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{btntext}
|
||||
</AtButton>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default KeywordJoin;
|
||||
13
src/pages/index/componments/KeywordJoin/index.scss
Normal file
13
src/pages/index/componments/KeywordJoin/index.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.KeywordJoin{
|
||||
.tabbbarDiv {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.jsonWechatBtn{
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,14 @@ const Nomadbook = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="Nomadbook">
|
||||
<View
|
||||
className="Nomadbook"
|
||||
onClick={() => {
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/NomadbookPage/index",
|
||||
});
|
||||
}}
|
||||
>
|
||||
<View className="book">
|
||||
{[
|
||||
{ imagePath: rework },
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '图书'
|
||||
})
|
||||
60
src/pages/index/componments/NomadbookPage/index.jsx
Normal file
60
src/pages/index/componments/NomadbookPage/index.jsx
Normal file
@@ -0,0 +1,60 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import rework from "@/images/book/rework.jpg";
|
||||
import dangan from "@/images/book/dangan.jpg";
|
||||
import fuye from "@/images/book/fuye.jpg";
|
||||
import poquan from "@/images/book/poquan.jpg";
|
||||
import chuangye from "@/images/book/chuangye.jpg";
|
||||
import hours from "@/images/book/hours.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const NomadbookPage = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="NomadbookPage">
|
||||
{/* <View>NomadbookPage</View> */}
|
||||
<View className="book">
|
||||
{[
|
||||
{ imagePath: rework },
|
||||
{ imagePath: dangan },
|
||||
{ imagePath: fuye },
|
||||
{ imagePath: poquan },
|
||||
{ imagePath: chuangye },
|
||||
{ imagePath: hours },
|
||||
].map((item, index) => {
|
||||
return (
|
||||
<View className="bookItem">
|
||||
{" "}
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={item.imagePath}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default NomadbookPage;
|
||||
35
src/pages/index/componments/NomadbookPage/index.scss
Normal file
35
src/pages/index/componments/NomadbookPage/index.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
.NomadbookPage {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
// width: 320px;
|
||||
// height: 230px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: red;
|
||||
border-radius: 20px;
|
||||
// border: solid 1px #8c8c8c;
|
||||
// background-color: yellow;
|
||||
|
||||
.book {
|
||||
// width: 100%;
|
||||
|
||||
// height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
// background-color: aquamarine;
|
||||
padding: 10px;
|
||||
.bookItem {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
// background-color: yellow;
|
||||
margin-top: 20px;
|
||||
// margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
src/pages/index/componments/RemoteJob/index.config.js
Normal file
3
src/pages/index/componments/RemoteJob/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: 'RemoteJob'
|
||||
})
|
||||
60
src/pages/index/componments/RemoteJob/index.jsx
Normal file
60
src/pages/index/componments/RemoteJob/index.jsx
Normal file
@@ -0,0 +1,60 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtDivider,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import remotework from "@/images/index/remotework.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
const RemoteJob = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View
|
||||
className="RemoteJob"
|
||||
style={
|
||||
{
|
||||
// backgroundImage: `url(${remotework})`,
|
||||
// backgroundRepeat:"no-repeat",
|
||||
// backgroundColor: "yellow",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={remotework}
|
||||
/>
|
||||
<View className="ReContent"> <View>远程工作职位</View>
|
||||
<AtDivider content="" />
|
||||
<View>1. 设计师</View>
|
||||
<View>2. 开发工程师</View>
|
||||
<View>3. 社交媒体营销</View>
|
||||
<View>4. 电商运营</View></View>
|
||||
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default RemoteJob;
|
||||
27
src/pages/index/componments/RemoteJob/index.scss
Normal file
27
src/pages/index/componments/RemoteJob/index.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
.RemoteJob {
|
||||
// padding: 10px;
|
||||
|
||||
|
||||
position: relative;
|
||||
|
||||
Image {
|
||||
z-index: -1;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ReContent {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
width: 320px;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: #eaff8f;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
border-radius: 20px;
|
||||
border: solid 1px #8c8c8c;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import touxiang from "@/images/index/touxiang.jpg";
|
||||
import wuhan from "@/images/city/wuhan.jpg";
|
||||
import hangzhou from "@/images/city/hangzhou.jpg";
|
||||
|
||||
|
||||
import a1 from "@/images/meetup/a1.jpg";
|
||||
import a2 from "@/images/meetup/a2.jpg";
|
||||
import a3 from "@/images/meetup/a3.jpg";
|
||||
@@ -30,15 +29,33 @@ import TabbarCom from "@/componments/TabbarCom";
|
||||
import QrCode from "@/componments/QrCode";
|
||||
import Nomadbook from "@/pages/index/componments/Nomadbook";
|
||||
import JoinWechat from "@/pages/index/componments/JoinWechat";
|
||||
import RemoteJob from "@/pages/index/componments/RemoteJob";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
// import beijing from "../../images/city/beijing.jpg";
|
||||
|
||||
export default function Index() {
|
||||
// 用户基本信息
|
||||
const [localuserInfo, setlocaluserInfo] = useState(null);
|
||||
const [userInfo, setuserInfo] = useState({
|
||||
wxid: null,
|
||||
openId: null,
|
||||
bighead: null,
|
||||
city: null,
|
||||
country: null,
|
||||
generator: null,
|
||||
id: null,
|
||||
labels: null,
|
||||
nickname: null,
|
||||
province: null,
|
||||
remark: null,
|
||||
sex: null, //男
|
||||
smallhead: null,
|
||||
source: null,
|
||||
sourceStr: null,
|
||||
usertype: null,
|
||||
v1: null,
|
||||
wxaccount: null,
|
||||
});
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
|
||||
@@ -53,16 +70,55 @@ export default function Index() {
|
||||
console.log("params", params);
|
||||
// const [wxid, openId] = params;
|
||||
|
||||
if (params.wxid) {
|
||||
// debug
|
||||
// params.wxid = "wxid_4413224132412";
|
||||
if (params?.wxid) {
|
||||
setuserInfo({
|
||||
wxid: params?.wxid, //个人号wxid
|
||||
// openId: params?.openId, //小程序openid
|
||||
});
|
||||
// 本地存储
|
||||
|
||||
try {
|
||||
// 本地存储
|
||||
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||
Taro.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
Taro.request({
|
||||
// url: "http://127.0.0.1:28369/login",
|
||||
url: "https://kunpeng.hackrobot.cn/login",
|
||||
data: {
|
||||
code: res.code,
|
||||
wxid: params?.wxid ?? null, //debug eric 的wxid
|
||||
},
|
||||
success: function (resUser) {
|
||||
console.log(resUser);
|
||||
console.log(resUser.data);
|
||||
setuserInfo({ ...resUser.data });
|
||||
// 本地存储
|
||||
Taro.setStorage({
|
||||
key: "userInfo",
|
||||
data: resUser.data,
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
console.log("登录失败!" + res.errMsg);
|
||||
}
|
||||
},
|
||||
});
|
||||
} catch (e) {}
|
||||
} else {
|
||||
try {
|
||||
let getuserInfo = Taro.getStorageSync("userInfo");
|
||||
if (getuserInfo) {
|
||||
setuserInfo(getuserInfo);
|
||||
console.log("本地用户信息存在");
|
||||
} else {
|
||||
console.log("本地用户信息,不存在");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("error", e);
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
@@ -116,7 +172,7 @@ export default function Index() {
|
||||
cityName: "加入微信群",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <JoinWechat />,
|
||||
customCom: <RemoteJob />,
|
||||
},
|
||||
{
|
||||
cityName: "广州",
|
||||
@@ -124,12 +180,12 @@ export default function Index() {
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
// {
|
||||
// cityName: "上海",
|
||||
// imagePath: shanghai,
|
||||
// isCustom: true,
|
||||
// customCom: <JoinWechat />,
|
||||
// },
|
||||
{
|
||||
cityName: "RemoteJob",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <JoinWechat />,
|
||||
},
|
||||
{
|
||||
cityName: "深圳",
|
||||
imagePath: shenzhen,
|
||||
@@ -153,8 +209,7 @@ export default function Index() {
|
||||
imagePath: hangzhou,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
}
|
||||
|
||||
},
|
||||
].map((item, index) => {
|
||||
return (
|
||||
// 设置自动换行
|
||||
@@ -186,35 +241,41 @@ export default function Index() {
|
||||
};
|
||||
|
||||
const ProvinceTag = () => {
|
||||
return ["北京", "上海", "广东", "浙江", "湖北"].map((item, index) => {
|
||||
return (
|
||||
<View>
|
||||
<AtTag
|
||||
onClick={() => {
|
||||
Taro.redirectTo({
|
||||
url: "/pages/index/index?wxid=1111111",
|
||||
});
|
||||
}}
|
||||
type="primary"
|
||||
circle
|
||||
>
|
||||
{item}
|
||||
</AtTag>
|
||||
</View>
|
||||
);
|
||||
});
|
||||
|
||||
return ["北京", "上海", "广东", "浙江", "湖北", "云南"].map(
|
||||
(item, index) => {
|
||||
return (
|
||||
<View className="Tags">
|
||||
<AtTag
|
||||
className="AtTag"
|
||||
onClick={() => {
|
||||
//pass
|
||||
}}
|
||||
type="primary"
|
||||
circle
|
||||
>
|
||||
{item}
|
||||
</AtTag>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="index">
|
||||
<View className="indexHome">
|
||||
{/* 顶部 */}
|
||||
<View className="indexHeader">
|
||||
{/* 头像 */}
|
||||
<AtAvatar circle image={touxiang}></AtAvatar>
|
||||
{/* color="#F00" */}
|
||||
<AtIcon value="chevron-down" size="30"></AtIcon>
|
||||
</View>
|
||||
{/* {userInfo?.smallhead ? ( */}
|
||||
{true? (
|
||||
|
||||
<View className="indexHeader">
|
||||
{/* 头像 */}
|
||||
<AtAvatar circle image={userInfo?.smallhead ?? touxiang}></AtAvatar>
|
||||
{/* color="#F00" */}
|
||||
<AtIcon value="chevron-down" size="30"></AtIcon>
|
||||
</View>
|
||||
) : null}
|
||||
|
||||
{/* 省份标签 */}
|
||||
<View className="provinceTag">
|
||||
|
||||
@@ -17,7 +17,20 @@
|
||||
flex-direction: row;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
flex-wrap: wrap;
|
||||
// background-color: red;
|
||||
.Tags {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
// background-color: yellow;
|
||||
.AtTag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.homeCards {
|
||||
@@ -69,7 +82,7 @@
|
||||
font-size: 40px;
|
||||
// z-index: 99;
|
||||
}
|
||||
Image{
|
||||
Image {
|
||||
// position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,16 @@ const Log = () => {
|
||||
<AtTimeline
|
||||
pending
|
||||
items={[
|
||||
{
|
||||
title: "2024年4月07日",
|
||||
content: ["1.新增图书列表页", "2.半屏小程序申请"],
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
title: "2024年3月24日",
|
||||
content: ["1.新增欢迎页", "2.默认用户头像显示"],
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
title: "2024年3月22日",
|
||||
content: ["1.新增我的-更新日志页面", "2.修复bug"],
|
||||
|
||||
3
src/pages/my/componments/Quesion/index.config.js
Normal file
3
src/pages/my/componments/Quesion/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '常见问题'
|
||||
})
|
||||
64
src/pages/my/componments/Quesion/index.jsx
Normal file
64
src/pages/my/componments/Quesion/index.jsx
Normal file
@@ -0,0 +1,64 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
import _ from 'lodash';
|
||||
|
||||
|
||||
const Quesion = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [AccordionArr, setAccordionArr] = useState([
|
||||
{
|
||||
title: "常见问题一",
|
||||
answer: "这是文本段落。这是文本段落。",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
title: "常见问题二",
|
||||
answer: "这是文本段落2。这是文本段落2。",
|
||||
open: false,
|
||||
},
|
||||
]);
|
||||
|
||||
return (
|
||||
<View className="Quesion">
|
||||
{AccordionArr.map((item, index) => {
|
||||
return (
|
||||
<AtAccordion
|
||||
open={item?.open}
|
||||
onClick={() => {
|
||||
// setopen(!item?.open);
|
||||
AccordionArr[index].open = !AccordionArr[index].open;
|
||||
console.log("AccordionArr", AccordionArr);
|
||||
// 深拷贝
|
||||
let newAccordionArr = _.cloneDeep(AccordionArr)
|
||||
setAccordionArr((newAccordionArr) );
|
||||
}}
|
||||
title={item?.title}
|
||||
>
|
||||
<View className="at-article__p">{item?.answer}</View>
|
||||
</AtAccordion>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Quesion;
|
||||
0
src/pages/my/componments/Quesion/index.scss
Normal file
0
src/pages/my/componments/Quesion/index.scss
Normal file
@@ -21,11 +21,15 @@ import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const my = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
useEffect(()=>{
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
// 获取路由参数
|
||||
const params= Taro.getCurrentInstance().router.params
|
||||
console.log('params',params)
|
||||
},[])
|
||||
const params = Taro.getCurrentInstance().router.params;
|
||||
console.log("params", params);
|
||||
}, []);
|
||||
|
||||
const handleClick = (value) => {
|
||||
setopen(true);
|
||||
@@ -35,42 +39,59 @@ const my = () => {
|
||||
<View className="myContent">
|
||||
<View className="myHeader">
|
||||
{/* 头像 */}
|
||||
<AtAvatar circle image={touxiang}></AtAvatar>
|
||||
<AtAvatar
|
||||
circle
|
||||
image={localuserInfo?.smallhead ?? touxiang}
|
||||
></AtAvatar>
|
||||
<View>
|
||||
<AtTag size="small">星球新居民</AtTag>
|
||||
<AtTag size="small">
|
||||
{localuserInfo?.nickname ?? "星球新居民"}
|
||||
</AtTag>
|
||||
{/* <AtTag size="small">女</AtTag> */}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 列表 */}
|
||||
<View className="mylist">
|
||||
<AtListItem
|
||||
{/* <AtListItem
|
||||
title="我参加的"
|
||||
arrow="right"
|
||||
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
|
||||
/>
|
||||
/> */}
|
||||
<AtListItem
|
||||
title="更新日志"
|
||||
// note="描述信息"
|
||||
arrow="right"
|
||||
thumb="http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png"
|
||||
onClick={()=>{
|
||||
onClick={() => {
|
||||
// 跳转到目的页面,打开新页面
|
||||
Taro.navigateTo({
|
||||
url: '/pages/my/componments/Log/index',
|
||||
})
|
||||
Taro.navigateTo({
|
||||
url: "/pages/my/componments/Log/index",
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<AtListItem
|
||||
title="常见问题"
|
||||
// note="描述信息"
|
||||
// extraText="详细信息"
|
||||
arrow="right"
|
||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||
onClick={() => {
|
||||
// 跳转到目的页面,打开新页面
|
||||
Taro.navigateTo({
|
||||
url: "/pages/my/componments/Quesion/index",
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{/* <AtListItem
|
||||
title="联系客服"
|
||||
// note="描述信息"
|
||||
// extraText="详细信息"
|
||||
arrow="right"
|
||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||
/>
|
||||
/> */}
|
||||
</View>
|
||||
|
||||
|
||||
{/* 个人客服 */}
|
||||
{/* <View className="wechat">
|
||||
<Button open-type="contact" className="wecahtBtn">
|
||||
|
||||
Reference in New Issue
Block a user