style: botton处理

This commit is contained in:
eric
2022-11-19 22:30:58 +08:00
parent 4f0a73864c
commit 5e6c468105
19 changed files with 122 additions and 70 deletions

View File

@@ -1,13 +1,22 @@
.detailContent {
// background-color: yellow;
// background-color: yellow;
padding: 20px;
background-color: #fafafa;
.RichText{
margin-top: 20px;
background-color: #fafafa;
}
.detailBtn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 100%;
width: 95%;
position: fixed;
// bottom: 0px;
// background-color: yellow;
}
}

View File

@@ -4,10 +4,11 @@ import Taro from "@tarojs/taro";
import react, { useEffect, useState } from "react";
import { getTable } from "../../../../utils/index";
import "./index.scss";
import { Image } from "@antmjs/vantui";
const details = () => {
const [dataSource, setdataSource] = useState<any>([]);
const [bottomheight,setbottomheight]=useState(0)
const [bottomheight, setbottomheight] = useState(0);
useEffect(() => {
// 设置标题
@@ -17,10 +18,10 @@ const details = () => {
}, []);
useEffect(() => {
const {screenHeight,safeArea={}}=Taro.getSystemInfoSync()
const { screenHeight, safeArea = {} } = Taro.getSystemInfoSync();
// @ts-ignore
let newBottom=screenHeight -safeArea?.bottom??0
setbottomheight(newBottom)
let newBottom = screenHeight - safeArea?.bottom ?? 0;
setbottomheight(newBottom);
let objParams = {
tableName: "cityNew",
@@ -38,17 +39,42 @@ const details = () => {
return (
<View className={`detailContent`}>
<View>
<View>{`活动标题活动标题活动标题活动标题活动标题活动标题活动标题`}</View>
<Image
width="100%"
height="120px"
fit="cover"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
{/* 头像列表 */}
{[1, 2, 3, 4].map((item: any) => {
return (
<Image
round
width="30px"
height="30px"
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
);
})}
</View>
{/* 富文本 */}
<View onClick={() => {}}>
<View>{dataSource?.[0]?.actTitle}</View>
<View onClick={() => {}} className='RichText'>
{/* <View>{dataSource?.[0]?.actTitle}</View> */}
<RichText nodes={dataSource?.[0]?.richText} />
</View>
<View className={`detailBtn`} style={{bottom:`${bottomheight??0}px`}}>
{/* style={{width:'375px'}} */}
<Button type="primary" block>
</Button>
<View
className={`detailBtn`}
style={{ bottom: `${bottomheight ?? 0}px` }}
>
{/* style={{width:'375px'}} */}
<Button type="primary" block>
</Button>
</View>
</View>
);

View File

@@ -77,7 +77,7 @@ const activityList = () => {
</View>
);
})}
<TabbarCom active={1} />;
<TabbarCom active={1} />
</View>
);
};

View File

@@ -33,7 +33,6 @@ const ActiveCard = () => {
<View className="btn">
{" "}
<Button plain hairline type="primary">
</Button>

View File

@@ -1,5 +1,6 @@
.homeContent{
padding: 20px;
padding-bottom: 150px;
.tagStyle{
font-size: 18px;
}

View File

@@ -157,7 +157,7 @@ const Home = () => {
<Divider />
</View>
{[1, 2].map((item: any) => {
{[1, 2,3,4].map((item: any) => {
return (
<View
onClick={() => {

View File

@@ -1,3 +1,7 @@
.myContentDiv{
padding: 20px;
}
.myContent{
// background-color: yellow;
display: flex;

View File

@@ -4,11 +4,10 @@ import react, { useEffect } from "react";
import TabbarCom from "../components/TabbarCom";
import { Image } from "@antmjs/vantui";
// import styles from './index.module.scss'
import './index.module.scss'
import { Tab, Tabs } from '@antmjs/vantui'
import "./index.module.scss";
import { Tab, Tabs } from "@antmjs/vantui";
import Taro from "@tarojs/taro";
import ActiveCard from "../components/ActiveCard";
const my = (props: any) => {
// const [active, setActive] = react.useState(props?.active ?? 0);
@@ -20,21 +19,25 @@ const my = (props: any) => {
});
}, []);
const CardCom=()=>{
return <Card
num=""
price=""
desc="活动描述信息"
title="活动标题"
thumb="cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"
/>
}
const CardCom = () => {
return (
<ActiveCard />
// <Card
// num=""
// price=""
// desc="活动描述信息"
// title="活动标题"
// thumb="cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"
// />
);
};
return (
<View>
<View className="myContentDiv">
{/* <View className={styles?.myContent}> */}
{/* 头像 */}
<View className={`myContent`}>
<View className={`myContent`}>
<Image
round
width="100px"
@@ -44,26 +47,33 @@ const my = (props: any) => {
</View>
<View>
<Tabs sticky={true}>
<Tab title="待审核">{CardCom()}</Tab>
<Tab title="已报名">{CardCom()}</Tab>
<Tab title="待参加">{CardCom()}</Tab>
<Tab title="已结束">{CardCom()}</Tab>
</Tabs>
</View>
<Tabs sticky={true}>
<Tab title="待审核">{CardCom()}</Tab>
<Tab title="已报名">{CardCom()}</Tab>
<Tab title="待参加">{CardCom()}</Tab>
<Tab title="已结束">{CardCom()}</Tab>
</Tabs>
</View>
<View>
<Cell title="个人资料" isLink />
{/* <Cell title="收藏" isLink /> */}
<Cell title="微信客服" isLink value="" onClick={()=>{
Taro.openCustomerServiceChat({
corpId:'wwb04af9a97514271c', //企业id
extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5'},
success: function (res) { }
})
}}/>
{/* <Cell title="单元格" isLink value="内容" arrowDirection="down" /> */}
</View>
<Cell title="个人资料" isLink />
{/* <Cell title="收藏" isLink /> */}
<Cell
title="微信客服"
isLink
value=""
onClick={() => {
Taro.openCustomerServiceChat({
corpId: "wwb04af9a97514271c", //企业id
extInfo: {
url: "https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5",
},
success: function (res) {},
});
}}
/>
{/* <Cell title="单元格" isLink value="内容" arrowDirection="down" /> */}
</View>
<TabbarCom active={2} />
</View>