封装组件

master
rongweikang 2 years ago
parent db13a386bb
commit 09b8bdb39b

File diff suppressed because it is too large Load Diff

@ -287,7 +287,7 @@ function Index() {
return (
<Block>
<View className="box">
<View className='box'>
<Echarts
echarts={echarts}
option={option}
@ -296,324 +296,21 @@ function Index() {
// style自定义设置echarts宽高
style={{ width: "630rpx", height: "260rpx" }}
/>
<View className="box_background">
<Image className="full" src={require("@/img/full-scran.png")}></Image>
<View className="power"></View>
<View className='box_background'>
<Image className='full' src={require("@/img/full-scran.png")}></Image>
<View className='power'></View>
{level.map((item) => (
<View className="line" key={item}>
<View className="number">{item}</View>
<View className="bottom_line">8</View>
<View className='line' key={item}>
<View className='number'>{item}</View>
<View className='bottom_line'>8</View>
</View>
))}
<View className="line">
<View className="number">1</View>
<View className='line'>
<View className='number'>1</View>
</View>
<View className="time"></View>
<View className='time'></View>
</View>
</View>
<Block>
<View>
<View className="water_test">
<View className="test_step flex aitems sb">
{stepList.map((item, index) => {
return (
<View className="step_block flex aitems" key={index}>
<View className="step_top flex aitems">
<View className="drop"></View>
<View className="step_num">{item.value}</View>
{index != 2 && <View className="line"></View>}
</View>
<View className="step_name">{item.name}</View>
</View>
);
})}
</View>
<View className="test_txt">
</View>
</View>
<View className="testing">
<View className="testing_header flex aitems">
{stepList.map((item, index) => {
return (
<View
className="items flex aitems jcenter"
key={index}
style={stepIndex == index ? "background: #fff" : ""}
>
{stepIndex > index && (
<Image
className="finish_img"
src={require("@/img/full-scran.png")}
mode="aspectFill"
></Image>
)}
<View className="value">{item.value}</View>
<View className="name">{item.name}</View>
</View>
);
})}
</View>
<View className="testing_content">
<View className="progress_box flex aitems">
<View className="title">
{stepList[stepIndex].name + "水分测试"}
</View>
{/* <view class='progress_block flex aitems'> */}
<Progress
style={{
width: "300rpx",
}}
percentage="80"
strokeWidth="14"
showPivot={false}
color="#C2E5F3"
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className="finish_img"
src={require("@/img/finished.png")}
mode="aspectFill"
></Image>
) : (
<Image
className="finish_img"
src={require("@/img/no-finish.png")}
mode="aspectFill"
></Image>
)}
{/* </view> */}
</View>
{/* <view class='tips' wx:if='{{!finish}}'> */}
{/* 请参考视频指引,将仪器紧贴<text style='color: #000000'>额头区域</text> */}
{/* </view> */}
<View className="tips flex sb">
<View>
{(testIndex == 1 || testIndex == 2 || testIndex == 4) && (
<Text
style={{
color: "#000000",
}}
>
{stepList[stepIndex].name + "区域"}
</Text>
)}
{testIndex == 1 && (
<Text></Text>
)}
</View>
</View>
</View>
</View>
</View>
<View>
<View className="gear_adjust">
<View className="title"></View>
<View className="gear_box">
<View className="gear flex aitems">
<View className="pos"></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.forehead}
min={1}
max={10}
inactiveColor="#F8F8F8"
activeColor={
gearLevel.currentGearMode == "forehead"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "forehead"}
barHeight={6}
// useButtonSlot
data-key="forehead"
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "forehead" &&
"current-button")
}
>
<View className="circle"></View>
<View className="level">
{gearLevel.forehead + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className="gear flex aitems">
<View className="pos"></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.leftCheek}
min={1}
max={10}
inactiveColor="#F8F8F8"
activeColor={
gearLevel.currentGearMode == "leftCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "leftCheek"}
barHeight={6}
// useButtonSlot
data-key="leftCheek"
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "leftCheek" &&
"current-button")
}
>
<View className="circle"></View>
<View className="level">
{gearLevel.leftCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className="gear flex aitems">
<View className="pos"></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.rightCheek}
min={1}
max={10}
inactiveColor="#F8F8F8"
activeColor={
gearLevel.currentGearMode == "rightCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "rightCheek"}
barHeight={6}
// useButtonSlot
data-key="rightCheek"
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button flex jcenter aitems " +
(gearLevel.currentGearMode !== "rightCheek" &&
"current-button")
}
>
<View className="circle"></View>
<View className="level">
{gearLevel.rightCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
{/* <View className='level_box flex aitems'>
{(10).map((item, index) => {
return (
<View key={item}
className='level_num'
style={{
marginRight: '1.225rem',
}}
>
{item + 1}
</View>
)
})}
</View> */}
</View>
</View>
</View>
<View className="gear_adjustment">
<View className="gear_box">
<View className="gear flex aitems">
<View className="pos"></View>
<View className="gear_button flex aitems">
<View className="button_minus">
<Image
className="image"
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className="button_value">
<View className="number">1</View>
</View>
<View className="button_plus">
<Image
className="image"
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className="gear flex aitems">
<View className="pos"></View>
<View className="gear_button flex aitems">
<View className="button_minus">
<Image
className="image"
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className="button_value">
<View className="number">1</View>
</View>
<View className="button_plus">
<Image
className="image"
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className="gear flex aitems">
<View className="pos"></View>
<View className="gear_button flex aitems">
<View className="button_minus">
<Image
className="image"
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className="button_value">
<View className="number">1</View>
</View>
<View className="button_plus">
<Image
className="image"
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
</View>
</View>
</Block>
</Block>
);
}

@ -0,0 +1,266 @@
page {
background: #f8f8f8;
background: #f3f3f3;
}
.gear_adjust {
padding: 2rpx 10rpx 40rpx 18rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.gear_box {
margin-top: 14rpx;
.slider_class {
height: 12rpx;
box-sizing: border-box;
flex: 1;
border-radius: 6rpx;
}
.gear {
padding: 20rpx 0;
}
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
}
}
.gear_adjustment {
box-sizing: border-box;
width: 690rpx;
height: 300rpx;
background: #ffffff;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx auto 200rpx;
.gear_box {
.gear {
margin-bottom: 30rpx;
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
.gear_button {
width: 500rpx;
height: 60rpx;
background: #f8f8f8;
border-radius: 30rpx;
justify-content: space-between;
font-size: 20rpx;
.button_minus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_plus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 0rpx 30rpx 30rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_value {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
width: 320rpx;
height: 60rpx;
line-height: 60rpx;
color: #666;
.number {
font-family: PingFang SC;
font-weight: 800;
font-size: 30rpx;
color: #000000;
margin-right: 4rpx;
}
}
}
}
}
}
.level_box {
padding-left: 109rpx;
.level_num {
font-size: 16rpx;
font-weight: 500;
color: #cccccc;
}
}
.custom-button {
position: relative;
width: 32rpx;
height: 32rpx;
background: linear-gradient(90deg, #ffe9c7, #eecda1);
border: 4rpx solid #ffffff;
border-radius: 50%;
box-sizing: border-box;
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
background: #ffffff;
border-radius: 50%;
}
.level {
position: absolute;
top: -30rpx;
left: 0;
width: 44rpx;
font-size: 20rpx;
font-weight: 500;
color: #bf8e49;
height: 28rpx;
}
}
.current-button {
background: #cccc;
.level {
color: #cccc;
}
}
.success_popup {
width: calc(100% - 110rpx);
box-sizing: border-box;
.popup_content {
width: 100%;
padding: 52rpx 0 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
color: #030000;
.title {
font-size: 36rpx;
font-weight: bold;
}
.success_icon {
width: 120rpx;
height: 120rpx;
margin: 52rpx 0;
}
.tips {
font-size: 30rpx;
}
}
& > .infobox1 {
padding: 0rpx 0 35rpx;
.tip {
font-size: 36rpx;
font-weight: bold;
color: #030000;
text-align: center;
}
.tip1 {
text-align: center;
margin-top: 71rpx;
font-size: 30rpx;
color: #030000;
}
.tip2 {
color: #202020;
font-size: 40rpx;
text-align: center;
}
.btnbox {
margin-top: 71rpx;
padding: 0 3rpx 10rpx 15rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn1 {
background: #fff;
width: 212rpx;
height: 66rpx;
line-height: 66rpx;
text-align: center;
font-size: 30rpx;
color: #e2c6a3;
border-radius: 32rpx;
border: 2rpx solid #e2c6a3;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #ffffff;
text-align: center;
border: 2rpx solid #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
}
.btn2 {
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
}
}
}
.flex {
display: flex;
}
.aitems {
align-items: center;
}
.jcenter {
justify-content: center;
}
.sb {
justify-content: space-between;
}
.sa {
justify-content: space-around;
}
.wrap {
flex-wrap: wrap;
}

@ -0,0 +1,235 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, Input } from "@tarojs/components";
import { Popup, Progress, Slider } from "@antmjs/vantui";
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const gearLevel = {
currentGear: null,
//现在工作的档位
currentGearMode: "forehead",
//现在工作模式
forehead: 5,
leftCheek: 5,
rightCheek: 5,
};
return (
<Block>
<View>
<View className='gear_adjust'>
<View className='title'></View>
<View className='gear_box'>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.forehead}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "forehead"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "forehead"}
barHeight={6}
// useButtonSlot
data-key='forehead'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "forehead" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.forehead + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.leftCheek}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "leftCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "leftCheek"}
barHeight={6}
// useButtonSlot
data-key='leftCheek'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "leftCheek" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.leftCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.rightCheek}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "rightCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "rightCheek"}
barHeight={6}
// useButtonSlot
data-key='rightCheek'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button flex jcenter aitems " +
(gearLevel.currentGearMode !== "rightCheek" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.rightCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
{/* <View className='level_box flex aitems'>
{(10).map((item, index) => {
return (
<View key={item}
className='level_num'
style={{
marginRight: '1.225rem',
}}
>
{item + 1}
</View>
)
})}
</View> */}
</View>
</View>
</View>
<View className='gear_adjustment'>
<View className='gear_box'>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
</View>
</View>
</Block>
);
}
export default Index;

@ -0,0 +1,557 @@
page {
background: #f8f8f8;
background: #f3f3f3;
}
.water_test {
margin: 0 auto;
box-sizing: border-box;
padding: 42rpx 48rpx;
width: 690rpx;
height: 292rpx;
background: #ffffff;
border-radius: 30rpx;
.test_step {
.step_block {
flex-direction: column;
}
.step_top {
position: relative;
.line {
position: absolute;
top: 50%;
right: -117rpx;
width: 97rpx;
height: 0;
border-top: 2rpx dashed #f1f1f1;
}
.drop {
width: 10rpx;
height: 10rpx;
background: #999999;
border-radius: 50%;
}
.step_num {
font-size: 24rpx;
font-weight: 500;
color: #666666;
margin-left: 14rpx;
}
}
.step_name {
font-size: 26rpx;
font-weight: bold;
color: #000000;
margin-left: 14rpx;
padding-top: 12rpx;
letter-spacing: 2rpx;
}
}
.test_txt {
font-size: 24rpx;
font-weight: 500;
color: #999999;
padding-top: 48rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
}
.testing {
.testing_header {
.items {
flex: 1;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding: 25rpx 0 21rpx;
justify-content: space-evenly;
.finish_img {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
}
.value {
font-size: 24rpx;
font-weight: 500;
color: #666666;
line-height: 1;
}
.name {
font-size: 26rpx;
font-weight: bold;
color: #000000;
line-height: 1;
}
}
}
.testing_content {
width: 100%;
height: 228rpx;
background: #ffffff;
border-radius: 0rpx 0rpx 30rpx 30rpx;
padding: 51rpx 30rpx 0 36rpx;
box-sizing: border-box;
.progress_box {
width: 100%;
height: 36rpx;
line-height: 36rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
min-width: 200rpx;
margin-right: 60rpx;
letter-spacing: 2rpx;
}
}
.tips {
font-size: 24rpx;
font-weight: 500;
color: #999999;
margin-top: 45rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
.progress_block {
flex: 1;
}
.finish_img {
width: 36rpx;
height: 36rpx;
margin-left: 49rpx;
}
}
}
.isquanpingclass {
position: fixed;
width: calc(100% - 100rpx);
padding: 20rpx 50rpx;
margin: 0;
z-index: 999;
top: 0;
left: 0;
right: 0;
height: 100vh;
}
.canvas {
position: fixed;
top: -9999999px;
}
.popbox1 {
width: 600rpx;
height: 360rpx;
border-radius: 28rpx;
flex-direction: column;
.tip1 {
font-size: 40rpx;
color: #000000;
text-align: center;
font-weight: 400;
margin-top: 28rpx;
}
.tip2 {
font-size: 32rpx;
color: #000000;
text-align: center;
font-weight: 400;
margin-top: 36rpx;
height: 110rpx;
}
.btnbox {
.btn1 {
font-size: 30rpx;
color: #000000;
text-align: center;
font-weight: 400;
width: 240rpx;
height: 100rpx;
line-height: 100rpx;
border: 2rpx solid rgba(0, 0, 0, 0.3);
border-radius: 28rpx;
}
.btn2 {
font-size: 30rpx;
color: #000000;
text-align: center;
font-weight: 400;
width: 240rpx;
height: 100rpx;
line-height: 100rpx;
margin-left: 40rpx;
background: #e2c5a3;
border-radius: 28rpx;
}
}
}
.van-tabs__scroll--line {
background: transparent !important;
}
image {
width: 100%;
height: 100%;
display: flex;
}
/* .color{
color: #F1AB15;
} */
.ellipsis2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.nodata {
color: #666666;
text-align: center;
margin-top: 50rpx;
font-size: 28rpx;
}
.MT30 {
margin-top: 30rpx;
}
.submitbtn {
position: absolute;
bottom: 100rpx;
width: 400rpx;
left: 50%;
margin-left: -200rpx;
.btn {
position: absolute;
top: 20rpx;
color: #fff;
font-weight: bold;
font-size: 32rpx;
text-align: center;
width: 100%;
bottom: 0;
}
}
.avatar-wrapper {
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
top: 0;
z-index: 99;
opacity: 0;
}
.permeate_model_box {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 52rpx 30rpx 38rpx 30rpx;
box-sizing: border-box;
.my_moisture_box {
width: 600rpx;
height: 600rpx;
margin: 0 auto;
}
.permeate_title {
font-size: 36rpx;
font-weight: bold;
color: #030000;
line-height: 1;
padding-bottom: 54rpx;
box-sizing: border-box;
}
.permeate_tips {
font-size: 28rpx;
font-weight: 500;
color: #030000;
line-height: 60rpx;
padding: 37rpx 0;
box-sizing: border-box;
.txt {
font-size: 26rpx;
font-weight: 500;
color: #666666;
margin-left: 12rpx;
}
}
.permeate_btn {
height: 90rpx;
line-height: 90rpx;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
padding: 0 72rpx;
}
.close_box {
position: absolute;
top: 34rpx;
right: 29rpx;
padding: 50rpx;
}
.close_img {
position: absolute;
top: 0;
right: 0;
width: 24rpx;
height: 24rpx;
}
}
.gear_adjust {
padding: 2rpx 10rpx 40rpx 18rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.gear_box {
margin-top: 14rpx;
.slider_class {
height: 12rpx;
box-sizing: border-box;
flex: 1;
border-radius: 6rpx;
}
.gear {
padding: 20rpx 0;
}
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
}
}
.gear_adjustment {
box-sizing: border-box;
width: 690rpx;
height: 300rpx;
background: #ffffff;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx auto 200rpx;
.gear_box {
.gear {
margin-bottom: 30rpx;
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
.gear_button {
width: 500rpx;
height: 60rpx;
background: #f8f8f8;
border-radius: 30rpx;
justify-content: space-between;
font-size: 20rpx;
.button_minus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_plus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 0rpx 30rpx 30rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_value {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
width: 320rpx;
height: 60rpx;
line-height: 60rpx;
color: #666;
.number {
font-family: PingFang SC;
font-weight: 800;
font-size: 30rpx;
color: #000000;
margin-right: 4rpx;
}
}
}
}
}
}
.level_box {
padding-left: 109rpx;
.level_num {
font-size: 16rpx;
font-weight: 500;
color: #cccccc;
}
}
.custom-button {
position: relative;
width: 32rpx;
height: 32rpx;
background: linear-gradient(90deg, #ffe9c7, #eecda1);
border: 4rpx solid #ffffff;
border-radius: 50%;
box-sizing: border-box;
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
background: #ffffff;
border-radius: 50%;
}
.level {
position: absolute;
top: -30rpx;
left: 0;
width: 44rpx;
font-size: 20rpx;
font-weight: 500;
color: #bf8e49;
height: 28rpx;
}
}
.current-button {
background: #cccc;
.level {
color: #cccc;
}
}
.success_popup {
width: calc(100% - 110rpx);
box-sizing: border-box;
.popup_content {
width: 100%;
padding: 52rpx 0 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
color: #030000;
.title {
font-size: 36rpx;
font-weight: bold;
}
.success_icon {
width: 120rpx;
height: 120rpx;
margin: 52rpx 0;
}
.tips {
font-size: 30rpx;
}
}
& > .infobox1 {
padding: 0rpx 0 35rpx;
.tip {
font-size: 36rpx;
font-weight: bold;
color: #030000;
text-align: center;
}
.tip1 {
text-align: center;
margin-top: 71rpx;
font-size: 30rpx;
color: #030000;
}
.tip2 {
color: #202020;
font-size: 40rpx;
text-align: center;
}
.btnbox {
margin-top: 71rpx;
padding: 0 3rpx 10rpx 15rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn1 {
background: #fff;
width: 212rpx;
height: 66rpx;
line-height: 66rpx;
text-align: center;
font-size: 30rpx;
color: #e2c6a3;
border-radius: 32rpx;
border: 2rpx solid #e2c6a3;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #ffffff;
text-align: center;
border: 2rpx solid #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
}
.btn2 {
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
}
}
}
.flex {
display: flex;
}
.aitems {
align-items: center;
}
.jcenter {
justify-content: center;
}
.sb {
justify-content: space-between;
}
.sa {
justify-content: space-around;
}
.wrap {
flex-wrap: wrap;
}

@ -0,0 +1,139 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, Input } from "@tarojs/components";
import { Popup, Progress, Slider } from "@antmjs/vantui";
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const stepIndex = 0;
const testIndex = 1;
const stepList = [
{
value: "Step1",
name: "额头",
finish: false,
},
{
value: "Step2",
name: "左脸颊",
finish: false,
},
{
value: "Step3",
name: "右脸颊",
finish: false,
},
];
return (
<Block>
<View>
<View className='water_test'>
<View className='test_step flex aitems sb'>
{stepList.map((item, index) => {
return (
<View className='step_block flex aitems' key={index}>
<View className='step_top flex aitems'>
<View className='drop'></View>
<View className='step_num'>{item.value}</View>
{index != 2 && <View className='line'></View>}
</View>
<View className='step_name'>{item.name}</View>
</View>
);
})}
</View>
<View className='test_txt'>
</View>
</View>
<View className='testing'>
<View className='testing_header flex aitems'>
{stepList.map((item, index) => {
return (
<View
className='items flex aitems jcenter'
key={index}
style={stepIndex == index ? "background: #fff" : ""}
>
{stepIndex > index && (
<Image
className='finish_img'
src={require("@/img/full-scran.png")}
mode='aspectFill'
></Image>
)}
<View className='value'>{item.value}</View>
<View className='name'>{item.name}</View>
</View>
);
})}
</View>
<View className='testing_content'>
<View className='progress_box flex aitems'>
<View className='title'>
{stepList[stepIndex].name + "水分测试"}
</View>
{/* <view class='progress_block flex aitems'> */}
<Progress
style={{
width: "300rpx",
}}
percentage='80'
strokeWidth='14'
showPivot={false}
color='#C2E5F3'
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className='finish_img'
src={require("@/img/finished.png")}
mode='aspectFill'
></Image>
) : (
<Image
className='finish_img'
src={require("@/img/no-finish.png")}
mode='aspectFill'
></Image>
)}
{/* </view> */}
</View>
{/* <view class='tips' wx:if='{{!finish}}'> */}
{/* 请参考视频指引,将仪器紧贴<text style='color: #000000'>额头区域</text> */}
{/* </view> */}
<View className='tips flex sb'>
<View>
{(testIndex == 1 || testIndex == 2 || testIndex == 4) && (
<Text
style={{
color: "#000000",
}}
>
{stepList[stepIndex].name + "区域"}
</Text>
)}
{testIndex == 1 && (
<Text></Text>
)}
</View>
</View>
</View>
</View>
</View>
</Block>
);
}
export default Index;
Loading…
Cancel
Save