diff --git a/src/app.tsx b/src/app.tsx index f5e6821..98430a8 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -8,7 +8,7 @@ import "./app.less"; import { Provider } from "react-redux"; import store from "./store"; - +import './iconfont/iconfont.css' import "taro-ui/rn/style/components/icon.scss"; import { go } from "./utils/traoAPI"; diff --git a/src/pages/recording/recording.less b/src/pages/recording/recording.less index 46fe1c8..05b752c 100644 --- a/src/pages/recording/recording.less +++ b/src/pages/recording/recording.less @@ -15,6 +15,10 @@ page { font-weight: 400; color: #666; padding: 0 32rpx; + position: sticky; + top: 176rpx; + z-index: 9; + } .tab { @@ -71,6 +75,9 @@ page { background: #f8f8f8; padding-top: 25rpx; padding-bottom: 29rpx; + position: sticky; + top: 286rpx; + z-index: 9; } .all { @@ -143,6 +150,7 @@ page { .statistic_item { flex: 1; + text-align: center; } .border { @@ -168,84 +176,90 @@ page { color: #999; } -.instrument_item { - margin-top: 20rpx; - background: #ffffff; - border-radius: 30rpx; - padding: 46rpx 36rpx; -} +// .instrument_item { +// margin-top: 20rpx; +// background: #ffffff; +// border-radius: 30rpx; +// padding: 46rpx 36rpx; +// margin: 0 auto 20rpx; +// width: 690rpx; +// height: 290rpx; +// box-sizing: border-box; +// padding: 41rpx 33rpx; +// } -.time { - font-size: 28rpx; - font-weight: bold; - color: #000; - margin-right: 23rpx; -} +// .time { +// font-size: 28rpx; +// font-weight: bold; +// color: #000; +// margin-right: 23rpx; +// } -.tag { - width: 90rpx; - height: 36rpx; - line-height: 36rpx; - background: #e5f9ee; - border-radius: 18rpx; - font-size: 24rpx; - font-weight: 400; - color: #57bc81; -} +// .tag { +// width: 90rpx; +// height: 36rpx; +// line-height: 36rpx; +// background: #e5f9ee; +// border-radius: 18rpx; +// font-size: 24rpx; +// font-weight: 400; +// color: #57bc81; +// text-align: center; +// } -.tag_active { - background: #f8f8f8; - color: #999; -} +// .tag_active { +// background: #f8f8f8; +// color: #999; +// } -.report_btn { - font-size: 26rpx; - font-weight: 400; - color: #666; - align-items: baseline; -} +// .report_btn { +// font-size: 26rpx; +// font-weight: 400; +// color: #666; +// align-items: baseline; +// } -.arrow_icon { - width: 10rpx; - height: 20rpx; - margin-left: 14rpx; -} +// .arrow_icon { +// width: 10rpx; +// height: 20rpx; +// margin-left: 14rpx; +// } -.instrument_middle { - margin-top: 40rpx; - text-align: left; -} +// .instrument_middle { +// margin-top: 40rpx; +// text-align: left; +// } -.instrument_cover { - width: 140rpx; - height: 140rpx; - border-radius: 20rpx; - margin-right: 37rpx; -} +// .instrument_cover { +// width: 140rpx; +// height: 140rpx; +// border-radius: 20rpx; +// margin-right: 37rpx; +// } -.instrument_content { - display: flex; - flex-direction: column; - flex: 1; -} +// .instrument_content { +// display: flex; +// flex-direction: column; +// flex: 1; +// } -.instrument_title { - font-size: 28rpx; - font-weight: bold; - color: #000; - padding-top: 3rpx; -} +// .instrument_title { +// font-size: 28rpx; +// font-weight: bold; +// color: #000; +// padding-top: 3rpx; +// } -.instrument_desc_box { - margin-top: 25rpx; - min-height: 73rpx; -} +// .instrument_desc_box { +// margin-top: 25rpx; +// min-height: 73rpx; +// } -.instrument_desc { - font-size: 24rpx; - font-weight: 400; - color: #999; -} +// .instrument_desc { +// font-size: 24rpx; +// font-weight: 400; +// color: #999; +// } .instrument_bottom { position: relative; @@ -378,7 +392,7 @@ page { .month_statistics { background: #fff; border-radius: 30rpx; - margin-top: 30rpx; + margin: 30rpx auto; padding: 46rpx 36rpx; } @@ -495,3 +509,92 @@ page { color: #666666; } } + +.recording-box { + box-sizing: border-box; + width: 690rpx; + height: 290rpx; + background-color: #fff; + padding: 41rpx 33rpx; + margin: 0 auto 20rpx; + border-radius: 30rpx; + + .box-top { + display: flex; + margin-bottom: 36rpx; + align-items: center; + justify-content: space-between; + .top-left { + display: flex; + .date { + width: 131rpx; + height: 22rpx; + font-size: 28rpx; + font-weight: bold; + color: #000000; + } + .tip { + width: 90rpx; + height: 36rpx; + background: #e5f9ee; + border-radius: 18rpx; + line-height: 36rpx; + text-align: center; + font-size: 24rpx; + font-family: PingFang SC; + font-weight: 500; + color: #57bc81; + margin-left: 23rpx; + } + } + .top-right { + font-size: 26rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + display: flex; + align-items: center; + + .arrow-icon { + font-size: 20rpx; + color: #999; + } + .arrow_icon { + width: 10rpx; + height: 20rpx; + margin-left: 14rpx; + } + } + } + .box-bottom { + display: flex; + .recording_img { + width: 140rpx; + height: 140rpx; + margin-right: 38rpx; + } + .bottom-right { + padding: 4rpx 0 3rpx; + .title { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: bold; + color: #000000; + margin-bottom: 10rpx; + } + .subtitle-box { + display: flex; + flex-flow: column; + justify-content: space-between; + height: 65rpx; + .subtitle { + font-size: 24rpx; + font-family: PingFang SC; + font-weight: 500; + color: #999999; + margin-top: 11rpx; + } + } + } + } +} diff --git a/src/pages/recording/recording.tsx b/src/pages/recording/recording.tsx index 0e27fc5..7c5c936 100644 --- a/src/pages/recording/recording.tsx +++ b/src/pages/recording/recording.tsx @@ -2,7 +2,7 @@ import Taro from "@tarojs/taro"; import classnames from "classnames"; import { Component, PropsWithChildren, useEffect, useState } from "react"; -import { Block, View, Text, Image, Input, Button } from "@tarojs/components"; +import { Block, View, Text, Image, Input, Button, ScrollView, Picker } from "@tarojs/components"; import { Tab, Tabs } from "@antmjs/vantui"; @@ -19,19 +19,22 @@ export default class Recording extends Component { this.state = { name: "护理历程", current: 0, + array: [1, 2, 3, 4, 5], }; } - async onLoad() {} - componentDidMount() {} + async onLoad() { } + componentDidMount() { } - componentWillUnmount() {} + componentWillUnmount() { } - componentDidShow() {} + componentDidShow() { } - componentDidHide() {} + componentDidHide() { } - async initData() {} + async initData() { } + + onChangeYear() { } onTab = async (event) => { const { current } = event.currentTarget.dataset; @@ -40,11 +43,11 @@ export default class Recording extends Component { }; render() { - let { current } = this.state; + let { current, array, name } = this.state; return ( - - + + { 打卡统计 + {current === 0 && + 全部 + + + + 画质抗老射频仪 + + } + {current === 0 && + array.length === + 0 && ( + + + + 暂无数据 + + + )} {current === 0 && ( - - - 暂无数据 - + {/* + + + 2024.1.23 + 在线 + + + 回看报告 + + + + + + + 小子弹智能射频仪 + + 模式:基础场景版 + 护理时间:15分00秒 + + + + */} + + + + {array.map((item: any, index: any) => ( + + + + 2024.1.31 + 在线 + + + 回看报告 + + + + + + + 小紫单智能射频仪 + + 模式:基础场景版 + 护理时间:15分00秒 + + + + + ))} )} {current === 1 && ( - - + + {/* - 暂无数据 + 暂无数据 + */} + + + + 年度打卡统计 + + + 2024年 + + + + + + + 5天 + + 1 + + + + + + + + 2024年1月 + + 展开更多 + + + + + + + 10 + 本月打卡天数 + + + 80% + 超越花至用户 + + + + + + 2024.5.23 + + + + 小紫弹智能射频仪、花至抗老射频仪PRO + 护理心得:真棒真棒真棒真棒真棒真棒真棒真棒真棒真棒 + + + )}