feat: 封装增删查改函数
This commit is contained in:
@@ -9,13 +9,14 @@ import {
|
||||
Tag,
|
||||
} from "@antmjs/vantui";
|
||||
import { View } from "@tarojs/components";
|
||||
import React, { useCallback } from "react";
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import { Swiper, SwiperItem, Image } from "@antmjs/vantui";
|
||||
import react from "react";
|
||||
import { NoticeBar } from "@antmjs/vantui";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { Tabbar, TabbarItem } from "@antmjs/vantui";
|
||||
import TabbarCom from "../components/TabbarCom";
|
||||
import { getTable, getTableid } from "../../utils/index";
|
||||
|
||||
const Home = () => {
|
||||
// const { images } = COMMON
|
||||
@@ -27,6 +28,18 @@ const Home = () => {
|
||||
"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg",
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
let objParams={
|
||||
tableName: "test",
|
||||
id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||
okFun: (res) => {
|
||||
console.log("res", res);
|
||||
},
|
||||
}
|
||||
getTable(objParams)
|
||||
getTableid(objParams);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<View>
|
||||
{/* 通知条 */}
|
||||
@@ -126,7 +139,7 @@ const Home = () => {
|
||||
<TabbarItem icon="setting-o">我的</TabbarItem>
|
||||
</Tabbar> */}
|
||||
|
||||
<TabbarCom active={0}/>
|
||||
<TabbarCom active={0} />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
5
src/pages/mountainPeak/index.scss
Normal file
5
src/pages/mountainPeak/index.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
.peakContent{
|
||||
background-color: yellow;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
@@ -1,23 +1,49 @@
|
||||
import { View } from "@tarojs/components";
|
||||
import { RichText, View } from "@tarojs/components";
|
||||
import react from "react";
|
||||
import { Sidebar, SidebarItem } from "@antmjs/vantui";
|
||||
import "./index.scss";
|
||||
import {test} from '../../utils/index'
|
||||
|
||||
|
||||
const mountainPeak = () => {
|
||||
const state: any = {
|
||||
nodes: [
|
||||
{
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "div_class",
|
||||
style: "line-height: 60px; color: red;",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
type: "text",
|
||||
text: "Hello World!",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
return (
|
||||
<View>
|
||||
<View className={`peakContent`}>
|
||||
{" "}
|
||||
<Sidebar activeKey={0}>
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="梧桐山" />
|
||||
<SidebarItem title="标签名" />
|
||||
<SidebarItem title="标签名" />
|
||||
</Sidebar>
|
||||
<View onClick={()=>{
|
||||
test()
|
||||
}}>
|
||||
{" "}
|
||||
<RichText nodes={state.nodes} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user