版本更新日志
This commit is contained in:
2
dist/pages/my/index.js
vendored
2
dist/pages/my/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,18 +1,36 @@
|
||||
import { View } from "@tarojs/components";
|
||||
import { RichText, View } from "@tarojs/components";
|
||||
import react, { useEffect } from "react";
|
||||
import { Collapse, CollapseItem, Toast } from "@antmjs/vantui";
|
||||
import "./index.scss";
|
||||
import { getTable } from "../../../../utils/index";
|
||||
import moment from "moment";
|
||||
|
||||
const Version = () => {
|
||||
|
||||
useEffect(() => {
|
||||
// 设置标题
|
||||
definePageConfig({
|
||||
navigationBarTitleText: "版本日志",
|
||||
});
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
// 设置标题
|
||||
definePageConfig({
|
||||
navigationBarTitleText: "版本日志",
|
||||
});
|
||||
}, []);
|
||||
|
||||
const [values, setValues] = react.useState(["1"]);
|
||||
const [versionArr, setversionArr] = react.useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
getTabledata();
|
||||
});
|
||||
// 版本跟心日志
|
||||
const getTabledata = async () => {
|
||||
let paramsObj = {
|
||||
tableName: "version",
|
||||
okFun: (res: any) => {
|
||||
// console.log("res", res);
|
||||
setversionArr(res?.data ?? []);
|
||||
},
|
||||
};
|
||||
await getTable({ ...paramsObj });
|
||||
return [];
|
||||
};
|
||||
return (
|
||||
<View>
|
||||
<Collapse
|
||||
@@ -21,14 +39,16 @@ const Version = () => {
|
||||
// onOpen={(e) => Toast.show(`打开${e.detail}`)}
|
||||
// onClose={(e) => Toast.show(`关闭${e.detail}`)}
|
||||
>
|
||||
{[
|
||||
{ title: "2022-12-09", name: "name1", content: "content" },
|
||||
{ title: "2022-12-08", name: "name2", content: "content" },
|
||||
{ title: "2022-12-07", name: "name3", content: "content" },
|
||||
].map((item: any, index: any) => {
|
||||
{versionArr?.reverse()?.map((item: any, index: any) => {
|
||||
return (
|
||||
<CollapseItem title={item?.title} name={item?.name}>
|
||||
{item?.content}
|
||||
<CollapseItem
|
||||
title={moment(item?.date).format("YYYY-MM-DD")}
|
||||
name={item?.name}
|
||||
>
|
||||
{/* 富文本 */}
|
||||
<View onClick={() => {}} className="RichText">
|
||||
<RichText nodes={item?.content} />
|
||||
</View>
|
||||
</CollapseItem>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -350,7 +350,7 @@ const my = (props: any) => {
|
||||
<Icon name="wechat" size="16px" className="icon"></Icon>
|
||||
{/* <Text>微信客服</Text> */}
|
||||
<Button open-type="contact" className="wecahtBtn">
|
||||
联系我们
|
||||
联系客服
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
@@ -372,7 +372,7 @@ const my = (props: any) => {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* <Cell
|
||||
<Cell
|
||||
icon="friends"
|
||||
title="关于我们"
|
||||
isLink
|
||||
@@ -382,9 +382,9 @@ const my = (props: any) => {
|
||||
url: "/pages/my/components/AbountUs/index",
|
||||
});
|
||||
}}
|
||||
/> */}
|
||||
/>
|
||||
|
||||
{/* <Cell
|
||||
<Cell
|
||||
icon="setting"
|
||||
title="版本日志"
|
||||
isLink
|
||||
@@ -394,7 +394,7 @@ const my = (props: any) => {
|
||||
url: "/pages/my/components/Version/index",
|
||||
});
|
||||
}}
|
||||
/> */}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Toast id="vanToast-demo2" />
|
||||
|
||||
@@ -22,6 +22,8 @@ export const getparams = () => {
|
||||
let $instance: any = getCurrentInstance();
|
||||
return $instance?.router?.params;
|
||||
};
|
||||
|
||||
|
||||
// 添加数据
|
||||
export const addTable: any = ({ env, tableName, objData, okFun }: Typeint) => {
|
||||
// 数据库环境
|
||||
|
||||
Reference in New Issue
Block a user