import { RichText, View } from "@tarojs/components";
import { getTable } from "../../../../utils/index";
import moment from "moment";
import react, { useEffect } from "react";
import { Collapse, CollapseItem, Toast } from "@antmjs/vantui";
import "./index.scss";

const AbountUs = () => {
  useEffect(() => {
    // 设置标题
    definePageConfig({
      navigationBarTitleText: "关于我们",
    });
  }, []);

  const [values, setValues] = react.useState([]);
  const [versionArr, setversionArr] = react.useState([]);

  useEffect(() => {
    getTabledata();
  });
  // 版本跟心日志
  const getTabledata = async () => {
    let paramsObj = {
      tableName: "aboutUs",
      okFun: (res: any) => {
        // console.log("res", res);
        setversionArr(res?.data ?? []);
      },
    };
    await getTable({ ...paramsObj });
    return [];
  };
  return (
    <View>
      {versionArr?.reverse()?.map((item: any, index: any) => {
        return (
          <View onClick={() => {}} className="RichText"  style={{padding:'40px'}}> 
            <RichText nodes={item?.content} />
          </View>
        );
      })}

      <Toast id="collapse-mess" />
    </View>
  );
};

export default AbountUs;
