feat: 我的-常见问题页面
This commit is contained in:
@@ -55,6 +55,7 @@
|
|||||||
"@tarojs/runtime": "3.6.25",
|
"@tarojs/runtime": "3.6.25",
|
||||||
"@tarojs/shared": "3.6.25",
|
"@tarojs/shared": "3.6.25",
|
||||||
"@tarojs/taro": "3.6.25",
|
"@tarojs/taro": "3.6.25",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.0.0",
|
||||||
"taro-ui": "^3.3.0"
|
"taro-ui": "^3.3.0"
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ export default defineAppConfig({
|
|||||||
'pages/index/componments/KeywordJoin/index',
|
'pages/index/componments/KeywordJoin/index',
|
||||||
'pages/my/index',
|
'pages/my/index',
|
||||||
'pages/my/componments/Log/index',
|
'pages/my/componments/Log/index',
|
||||||
|
'pages/my/componments/Quesion/index',
|
||||||
|
|
||||||
],
|
],
|
||||||
permission: {
|
permission: {
|
||||||
"scope.userLocation": {
|
"scope.userLocation": {
|
||||||
|
|||||||
@@ -119,20 +119,21 @@ const KeywordJoin = () => {
|
|||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
{/* 二级标题 */}
|
{/* 二级标题 */}
|
||||||
<View className="at-article__h2">这是二级标题</View>
|
{/* <View className="at-article__h2">这是二级标题</View> */}
|
||||||
{/* 三级标题 */}
|
{/* 三级标题 */}
|
||||||
<View className="at-article__h3">这是三级标题</View>
|
<View className="at-article__h3">群公告</View>
|
||||||
{/* 文本段落 */}
|
{/* 文本段落 */}
|
||||||
<View className="at-article__p">
|
<View className="at-article__p">
|
||||||
这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本落。这是文本段落。1234567890123456789012345678901234567890
|
这是文本段落。这是文本段落。这是文本段落。这是文本段落。这是文本段落。
|
||||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
||||||
</View>
|
</View>
|
||||||
<View className="at-article__p">这是文本段落。这是文本段落。</View>
|
<View className="at-article__p">这是文本段落。这是文本段落。</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="tabbbarDiv"></View>
|
<View className="tabbbarDiv"></View>
|
||||||
<AtButton type="primary" className="jsonWechatBtn">
|
<AtButton type="primary" className="jsonWechatBtn" onClick={()=>{
|
||||||
|
// 通过hook加入微信群邀请
|
||||||
|
}}>
|
||||||
点击加入
|
点击加入
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -265,7 +265,9 @@ export default function Index() {
|
|||||||
<View className="index">
|
<View className="index">
|
||||||
<View className="indexHome">
|
<View className="indexHome">
|
||||||
{/* 顶部 */}
|
{/* 顶部 */}
|
||||||
{userInfo?.smallhead ? (
|
{/* {userInfo?.smallhead ? ( */}
|
||||||
|
{true? (
|
||||||
|
|
||||||
<View className="indexHeader">
|
<View className="indexHeader">
|
||||||
{/* 头像 */}
|
{/* 头像 */}
|
||||||
<AtAvatar circle image={userInfo?.smallhead ?? touxiang}></AtAvatar>
|
<AtAvatar circle image={userInfo?.smallhead ?? touxiang}></AtAvatar>
|
||||||
|
|||||||
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
@@ -76,6 +76,12 @@ const my = () => {
|
|||||||
// extraText="详细信息"
|
// extraText="详细信息"
|
||||||
arrow="right"
|
arrow="right"
|
||||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
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
|
<AtListItem
|
||||||
title="联系客服"
|
title="联系客服"
|
||||||
|
|||||||
Reference in New Issue
Block a user