feat: 底部按钮
This commit is contained in:
@@ -9,18 +9,27 @@ import {
|
||||
Icon,
|
||||
} from "@antmjs/vantui";
|
||||
import { Input, View } from "@tarojs/components";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { getCurrentInstance } from "@tarojs/taro";
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import './index.scss'
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import "./index.scss";
|
||||
|
||||
const CheckIn = () => {
|
||||
const formIt = Form.useForm();
|
||||
const [bottomheight, setbottomheight] = useState(0);
|
||||
let newBottom =0
|
||||
|
||||
let $instance:any = getCurrentInstance()
|
||||
const {fileID}=$instance?.router?.params
|
||||
console.log('fileID---',fileID)
|
||||
useEffect(() => {
|
||||
const { screenHeight, safeArea = {} } = Taro.getSystemInfoSync();
|
||||
// @ts-ignore
|
||||
newBottom = screenHeight - safeArea?.bottom ?? 0;
|
||||
setbottomheight(newBottom);
|
||||
}, []);
|
||||
|
||||
let $instance: any = getCurrentInstance();
|
||||
const { fileID } = $instance?.router?.params;
|
||||
console.log("fileID---", fileID);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// 设置标题
|
||||
definePageConfig({
|
||||
@@ -41,18 +50,13 @@ console.log('fileID---',fileID)
|
||||
onFinish={(errs, res) => console.info(errs, res)}
|
||||
>
|
||||
<View>
|
||||
<Image
|
||||
width="100%"
|
||||
height="500px"
|
||||
fit="cover"
|
||||
src={fileID}
|
||||
/>
|
||||
<Image width="100%" height="500px" fit="cover" src={fileID} />
|
||||
</View>
|
||||
<FormItem
|
||||
label="留言"
|
||||
name="userName"
|
||||
required
|
||||
layout='vertical'
|
||||
layout="vertical"
|
||||
// rules={{
|
||||
// rule: /[\u4e00-\u9fa5]/,
|
||||
// message: '用户名仅支持中文',
|
||||
@@ -71,10 +75,12 @@ console.log('fileID---',fileID)
|
||||
border={false}
|
||||
/>
|
||||
</FormItem>
|
||||
<View style={{ bottom: `${bottomheight ?? 0}px` }}>
|
||||
<Button type="primary" block>
|
||||
提交
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
<Button type="primary" block>
|
||||
提交
|
||||
</Button>
|
||||
<Dialog id="form-demo3" />
|
||||
</Form>
|
||||
</View>
|
||||
|
||||
@@ -52,8 +52,8 @@ const my = (props: any) => {
|
||||
</View>
|
||||
|
||||
<View className="cellArr">
|
||||
{/* <Cell icon="manager" title="打卡记录" isLink />
|
||||
<Cell icon="manager" title="个人资料" isLink /> */}
|
||||
<Cell icon="manager" title="打卡记录" isLink />
|
||||
{/* <Cell icon="manager" title="个人资料" isLink /> */}
|
||||
|
||||
<Cell
|
||||
title="微信客服"
|
||||
|
||||
Reference in New Issue
Block a user