Merge branch 'lzwdev' of https://gitee.com/yunqiang_technology/flowsomwechat into rwkdev
@ -1,10 +1,16 @@
|
||||
const InstrumentTypeEnum = {
|
||||
//仪器类型
|
||||
FR200: 1,
|
||||
MATRIX: 2,
|
||||
WL200: 3,
|
||||
FR380: 4,
|
||||
FR390: 5,
|
||||
M01: 6,
|
||||
// FR200: 1,
|
||||
// MATRIX: 2,
|
||||
// WL200: 3,
|
||||
// FR380: 4,
|
||||
// FR390: 5,
|
||||
// M01: 6,
|
||||
FR200: "FR200",
|
||||
MATRIX: "MATRIX",
|
||||
WL200: "WL200",
|
||||
FR380: "FR380",
|
||||
FR390: "FR390",
|
||||
M01: "M01",
|
||||
};
|
||||
export default InstrumentTypeEnum;
|
||||
|
||||
@ -1,66 +1,66 @@
|
||||
/**蓝牙命令合集*/
|
||||
export const bleCommandSamples = {
|
||||
/**发送配对码*/
|
||||
match: {
|
||||
commandType: "BleMatch",
|
||||
bleCommandType: "SendMatchCode",
|
||||
},
|
||||
/**查询附属设备的配对状态*/
|
||||
querySubDevice: {
|
||||
commandType: "BleMatch",
|
||||
bleCommandType: "QueryMatchStatus",
|
||||
},
|
||||
/**查询设备状态指令*/
|
||||
queryDeviceStatus: {
|
||||
commandType: "DeviceStatusSync",
|
||||
deviceSyncCommandType: 'queryDeviceStatus'
|
||||
},
|
||||
/**查询版本指令*/
|
||||
queryDeviceVersionStatus: {
|
||||
commandType: "InfoQuery",
|
||||
infoQueryType: 'versionInfo',
|
||||
otaDeviceType: ''
|
||||
},
|
||||
/**查询当前记录*/
|
||||
queryCurrentMaskReportInfo: {
|
||||
commandType: "InfoQuery",
|
||||
infoQueryType: 'currentMaskReportInfo'
|
||||
}
|
||||
/**发送配对码*/
|
||||
match: {
|
||||
commandType: "BleMatch",
|
||||
bleCommandType: "SendMatchCode",
|
||||
},
|
||||
/**查询附属设备的配对状态*/
|
||||
querySubDevice: {
|
||||
commandType: "BleMatch",
|
||||
bleCommandType: "QueryMatchStatus",
|
||||
},
|
||||
/**查询设备状态指令*/
|
||||
queryDeviceStatus: {
|
||||
commandType: "DeviceStatusSync",
|
||||
deviceSyncCommandType: "queryDeviceStatus",
|
||||
},
|
||||
/**查询版本指令*/
|
||||
queryDeviceVersionStatus: {
|
||||
commandType: "InfoQuery",
|
||||
infoQueryType: "versionInfo",
|
||||
otaDeviceType: "",
|
||||
},
|
||||
/**查询当前记录*/
|
||||
queryCurrentMaskReportInfo: {
|
||||
commandType: "InfoQuery",
|
||||
infoQueryType: "currentMaskReportInfo",
|
||||
},
|
||||
};
|
||||
|
||||
/**控制设备命令合集*/
|
||||
export const deviceCommandSamples = {
|
||||
/**控制设备暂停 pause暂停 working启动 end关闭*/
|
||||
pause:{
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "pause",
|
||||
},
|
||||
standby:{
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "standby",
|
||||
},
|
||||
end:{
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "end",
|
||||
},
|
||||
/*
|
||||
* powerfulSoothing 强效舒缓 01
|
||||
* Stability 维稳维护 02
|
||||
* Brighten 均色提亮 03
|
||||
* FirmSkin 紧致淡纹 04
|
||||
* Custom 自定义模式 05
|
||||
* WaterLightEssence 水光精华模式 11
|
||||
* ShapeBeautyEssence 塑颜精华模式 12
|
||||
* DiyFacial DIY面膜模式 13
|
||||
* FacialMaskCustom 面膜定制模式 1A
|
||||
*/
|
||||
work:{
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "working",
|
||||
workMode: "",
|
||||
},
|
||||
gear:{
|
||||
commandType: "DeviceControl",
|
||||
partitionStatus: [{gear: 1},{gear: 1},{gear: 1},{gear: 1},]
|
||||
}
|
||||
/**控制设备暂停 pause暂停 working启动 end关闭*/
|
||||
pause: {
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "pause",
|
||||
},
|
||||
standby: {
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "standby",
|
||||
},
|
||||
end: {
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "end",
|
||||
},
|
||||
/*
|
||||
* powerfulSoothing 强效舒缓 01
|
||||
* Stability 维稳维护 02
|
||||
* Brighten 均色提亮 03
|
||||
* FirmSkin 紧致淡纹 04
|
||||
* Custom 自定义模式 05
|
||||
* WaterLightEssence 水光精华模式 11
|
||||
* ShapeBeautyEssence 塑颜精华模式 12
|
||||
* DiyFacial DIY面膜模式 13
|
||||
* FacialMaskCustom 面膜定制模式 1A
|
||||
*/
|
||||
work: {
|
||||
commandType: "DeviceControl",
|
||||
workStatus: "working",
|
||||
workMode: "",
|
||||
},
|
||||
gear: {
|
||||
commandType: "DeviceControl",
|
||||
partitionStatus: [{ gear: 1 }, { gear: 1 }, { gear: 1 }, { gear: 1 }],
|
||||
},
|
||||
};
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
.countdown-box {
|
||||
width: 400rpx;
|
||||
height: 400rpx;
|
||||
padding: 0;
|
||||
.countdown-title {
|
||||
margin-top: 52rpx;
|
||||
margin-bottom: 60rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #030000;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.countdown-content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.countdown-popup-loading {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.countdown-popup-loading-time {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
font-size: 54rpx;
|
||||
text-align: center;
|
||||
color: #ecf0f3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-loading__bg {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ecf0f3;
|
||||
/* background-image: conic-gradient(#3CACFF 100%,#000 0%); */
|
||||
}
|
||||
.ui-loading__bg::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ui-loading {
|
||||
position: absolute;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
box-sizing: border-box;
|
||||
border: 10rpx solid #3cacff;
|
||||
clip-path: polygon(0% 0%, 25% 0%, 50% 50%, 0% 25%);
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotateZ(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotateZ(360deg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
import classnames from "classnames";
|
||||
import { Component } from "react";
|
||||
|
||||
import { Block, View, PageMeta } from "@tarojs/components";
|
||||
|
||||
import { Popup } from "@antmjs/vantui";
|
||||
|
||||
import "./popup.less";
|
||||
import "./popup-countdown.less";
|
||||
|
||||
/** props
|
||||
* isShow 是否显示
|
||||
* isClose 右上角关闭图标
|
||||
* type: 1注册
|
||||
* @confirm 关闭回调
|
||||
*/
|
||||
export default class PopupCountdown extends Component<any, any> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
name: "倒计时",
|
||||
};
|
||||
}
|
||||
|
||||
async onLoad() {}
|
||||
componentDidMount() {}
|
||||
|
||||
componentWillUnmount() {}
|
||||
|
||||
componentDidShow() {}
|
||||
|
||||
componentDidHide() {}
|
||||
|
||||
async initData() {}
|
||||
|
||||
onClose = () => {
|
||||
this.props.close();
|
||||
};
|
||||
|
||||
onConfirm = () => {
|
||||
this.props.confirm();
|
||||
};
|
||||
|
||||
onClickStop = (e) => {
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
render() {
|
||||
let { isShow, isClose, countdown } = this.props;
|
||||
return (
|
||||
<Block>
|
||||
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />
|
||||
<Popup
|
||||
show={isShow}
|
||||
closeOnClickOverlay={false}
|
||||
round
|
||||
overlayStyle="width: 100vw;padding: 0;"
|
||||
onClick={this.onClickStop}
|
||||
>
|
||||
{isClose && (
|
||||
<View
|
||||
className="at-icon at-icon-close common-close"
|
||||
onClick={this.onClose}
|
||||
></View>
|
||||
)}
|
||||
<View className={classnames("common-box", "countdown-box")}>
|
||||
<View
|
||||
className={classnames("common-popup-title", "countdown-title")}
|
||||
>
|
||||
启动倒计时
|
||||
</View>
|
||||
<View className="common-popup-content-box">
|
||||
<View
|
||||
className={classnames(
|
||||
"common-popup-content",
|
||||
"countdown-content"
|
||||
)}
|
||||
>
|
||||
<View className="countdown-popup-loading">
|
||||
<View className="ui-loading__bg">
|
||||
<View className="ui-loading"></View>
|
||||
</View>
|
||||
{countdown >= 0 && (
|
||||
<View className="countdown-popup-loading-time">
|
||||
{countdown}
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Popup>
|
||||
</Block>
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
.step-popup-content-box {
|
||||
margin: 0;
|
||||
}
|
||||
.step-absolutely {
|
||||
width: 600rpx;
|
||||
height: 720rpx;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.step-img {
|
||||
display: block;
|
||||
width: 600rpx;
|
||||
height: 600rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
// .van-popup {
|
||||
// background-color: transparent;
|
||||
// }
|
||||
.site-close {
|
||||
position: absolute;
|
||||
right: 36rpx;
|
||||
top: 36rpx;
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
z-index: 100009;
|
||||
background-color: #ababab;
|
||||
border-radius: 50%;
|
||||
padding: 8rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.step-popup-btn {
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: calc(50% - 120rpx);
|
||||
width: 240rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #000;
|
||||
border-radius: 40rpx;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.step-tips-common-box {
|
||||
padding: 50rpx 35rpx 74rpx 35rpx;
|
||||
.tips-message {
|
||||
margin-top: 70rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #030000;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-btn-one {
|
||||
display: flex;
|
||||
margin-top: 60rpx;
|
||||
justify-content: center;
|
||||
.popup-btn {
|
||||
width: 270rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
border: 1rpx solid #000;
|
||||
border-radius: 45rpx;
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
}
|
||||
|
||||
.setp-footer-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
height: 30rpx;
|
||||
// padding: 10rpx;
|
||||
margin-top: 50rpx;
|
||||
.checked {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 26rpx;
|
||||
}
|
||||
.text {
|
||||
font-family: PingFang SC;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,214 @@
|
||||
import classnames from "classnames";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { Component } from "react";
|
||||
|
||||
import {
|
||||
Block,
|
||||
View,
|
||||
Image,
|
||||
Text,
|
||||
Button,
|
||||
PageMeta,
|
||||
Swiper,
|
||||
SwiperItem,
|
||||
} from "@tarojs/components";
|
||||
|
||||
import { Popup } from "@antmjs/vantui";
|
||||
|
||||
import "./popup.less";
|
||||
import "./popup-step-tips.less";
|
||||
import "./fade.css";
|
||||
|
||||
import { go } from "../../utils/traoAPI";
|
||||
|
||||
/** props
|
||||
* isLarge 是否大尺寸
|
||||
* isShow 是否显示
|
||||
* data 数据
|
||||
* title 动态标题
|
||||
* confirmButtonText 确定关闭按钮
|
||||
* @confirm 关闭回调
|
||||
* ***/
|
||||
export default class PopupStepTips extends Component<any, any> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
name: "步骤介绍弹窗", // 当前IOT使用
|
||||
current: 0,
|
||||
isLocal: false, // 是否缓存关闭,以后不再显示准备步骤
|
||||
};
|
||||
}
|
||||
|
||||
async onLoad() {}
|
||||
componentDidMount() {}
|
||||
|
||||
componentWillUnmount() {}
|
||||
|
||||
componentDidShow() {}
|
||||
|
||||
componentDidHide() {}
|
||||
|
||||
initData = () => {
|
||||
if (this.props.siteData) {
|
||||
let arr = JSON.parse(JSON.stringify(this.props.siteData));
|
||||
this.setState({ siteList: arr });
|
||||
}
|
||||
};
|
||||
|
||||
onClose = () => {
|
||||
let { isLocal } = this.state;
|
||||
this.props.close({ isLocal });
|
||||
};
|
||||
|
||||
onClickStop = (e) => {
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
// onChange(event) {
|
||||
// const current = event.detail.current;
|
||||
// const { current: curCurrent } = this.state;
|
||||
// const { siteData } = this.props;
|
||||
// if (curCurrent + 2 === siteData.length && current + 1 === siteData.length) {
|
||||
// this.setState({ toRight: true });
|
||||
// }
|
||||
// this.setState({ current });
|
||||
// }
|
||||
|
||||
onPrev = async () => {
|
||||
let { current } = this.state;
|
||||
this.setState({ current: current - 1 });
|
||||
};
|
||||
onNext = async () => {
|
||||
let { current } = this.state;
|
||||
|
||||
if (current === this.props.data.length) {
|
||||
this.onClose();
|
||||
} else {
|
||||
this.setState({ current: current + 1 });
|
||||
}
|
||||
};
|
||||
|
||||
onChangeLocal = () => {
|
||||
let { isLocal } = this.state;
|
||||
this.setState({ isLocal: !isLocal });
|
||||
};
|
||||
|
||||
render() {
|
||||
let { isShow, data, isLarge, title, content, confirmButtonText } =
|
||||
this.props;
|
||||
let { current, isLocal } = this.state;
|
||||
|
||||
return (
|
||||
<Block>
|
||||
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />
|
||||
<Popup
|
||||
style="background-color: #fff;"
|
||||
show={isShow}
|
||||
closeOnClickOverlay={false}
|
||||
round
|
||||
overlayStyle="width: 100vw;padding: 0;"
|
||||
onClick={this.onClickStop}
|
||||
>
|
||||
<View
|
||||
className="at-icon at-icon-close site-close"
|
||||
onClick={this.onClose}
|
||||
></View>
|
||||
<View
|
||||
className={classnames("common-box", "step-tips-common-box", {
|
||||
"common-large": isLarge,
|
||||
})}
|
||||
>
|
||||
<View
|
||||
className={classnames("common-popup-title", {
|
||||
"margin-samll": isLarge,
|
||||
})}
|
||||
>
|
||||
{data[current].openTitle}
|
||||
</View>
|
||||
{/* {title && (
|
||||
<View
|
||||
className={classnames("common-popup-title", {
|
||||
"margin-samll": isLarge,
|
||||
})}
|
||||
>
|
||||
{title}
|
||||
</View>
|
||||
)} */}
|
||||
<View className="step-popup-content-box">
|
||||
<Swiper
|
||||
className="step-absolutely"
|
||||
current={current}
|
||||
duration={800}
|
||||
indicatorDots={false}
|
||||
indicatorColor="#999"
|
||||
indicatorActiveColor="#333"
|
||||
disableTouch={true} // 禁止滑动
|
||||
>
|
||||
{data.map((item, index) => {
|
||||
return (
|
||||
<SwiperItem className="absolutely" key={"swiper_" + index}>
|
||||
<View className="step-img">
|
||||
<Image
|
||||
className="cover"
|
||||
src={item.openSourceUrl}
|
||||
mode="aspectFit"
|
||||
></Image>
|
||||
</View>
|
||||
<View className="tips-message">{item.openContent}</View>
|
||||
</SwiperItem>
|
||||
);
|
||||
})}
|
||||
</Swiper>
|
||||
</View>
|
||||
|
||||
<View>
|
||||
{data.length === 1 && (
|
||||
<View className="popup-btn-one">
|
||||
<Button className="popup-btn" onClick={this.onClose}>
|
||||
{confirmButtonText}
|
||||
</Button>
|
||||
</View>
|
||||
)}
|
||||
{data.length > 1 && current === 0 && (
|
||||
<View className="popup-btn-one">
|
||||
<Button className="popup-btn" onClick={this.onPrev}>
|
||||
下一步
|
||||
</Button>
|
||||
</View>
|
||||
)}
|
||||
{data.length > 1 && (
|
||||
<View className="common-popup-btns">
|
||||
<Button className="common-popup-btn2" onClick={this.onPrev}>
|
||||
{current > 0 && current < data.length - 1 && "上一步"}
|
||||
</Button>
|
||||
<Button className="common-popup-btn2" onClick={this.onNext}>
|
||||
{current > 0 && current < data.length - 1 && "下一步"}
|
||||
{current > 0 &&
|
||||
current === data.length - 1 &&
|
||||
confirmButtonText}
|
||||
</Button>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View className="setp-footer-btn" onClick={this.onChangeLocal}>
|
||||
{isLocal ? (
|
||||
<Image
|
||||
className="checked"
|
||||
src={require("../../img/welcome/checked.png")}
|
||||
></Image>
|
||||
) : (
|
||||
<Image
|
||||
className="checked"
|
||||
src={require("../../img/welcome/no-checked.png")}
|
||||
></Image>
|
||||
)}
|
||||
|
||||
<Text className="text">以后不再提示准备步骤</Text>
|
||||
</View>
|
||||
</View>
|
||||
</Popup>
|
||||
</Block>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 669 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 449 B |
@ -1,2 +0,0 @@
|
||||
错误类型收集
|
||||
MiniProgramError 页面跳转错误
|
||||
@ -1,3 +0,0 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "模板页",
|
||||
});
|
||||
@ -0,0 +1,57 @@
|
||||
.modelInfo-box {
|
||||
width: 690rpx;
|
||||
margin: 26rpx auto 0;
|
||||
padding: 37rpx 35rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 30rpx;
|
||||
overflow: visible;
|
||||
margin-bottom: 150rpx;
|
||||
.modelInfo-line {
|
||||
margin-bottom: 50rpx;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
.modelInfo-title {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
}
|
||||
.modelInfo-title {
|
||||
margin-bottom: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.modelInfo-effect {
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.modelInfo-light-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.modelInfo-light-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
/*margin-bottom: 20rpx;*/
|
||||
}
|
||||
|
||||
.modelInfo-light-color {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
margin-right: 10rpx;
|
||||
background-color: #f2c95b;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.modelInfo-light-colorname {
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
import Taro from "@tarojs/taro";
|
||||
import classnames from "classnames";
|
||||
import { Block, View, ScrollView, Image } from "@tarojs/components";
|
||||
import { useState, useEffect } from "react";
|
||||
import "./index.less";
|
||||
|
||||
interface Props {
|
||||
isShowNurse: boolean;
|
||||
ActiveModeItem: any;
|
||||
}
|
||||
function Index({ isShowNurse, ActiveModeItem }: Props) {
|
||||
const ModeColor = {
|
||||
"590nm": "#CF231D",
|
||||
"630nm": "#CF231D",
|
||||
"830nm": "#9C1D17",
|
||||
};
|
||||
return (
|
||||
<Block>
|
||||
{isShowNurse && (
|
||||
<View className="modelInfo-box">
|
||||
<View className="modelInfo-line is-effect">
|
||||
<View className="modelInfo-title">模式功效</View>
|
||||
<View className="modelInfo-effect">{ActiveModeItem.modeDesc}</View>
|
||||
</View>
|
||||
<View className="modelInfo-line">
|
||||
<View className="modelInfo-title">当前输出技术</View>
|
||||
<View className="modelInfo-light-box">
|
||||
{ActiveModeItem.combineData.map((item) => {
|
||||
return (
|
||||
<View className="modelInfo-light-item" key={item.id}>
|
||||
<View
|
||||
className="modelInfo-light-color"
|
||||
style={{
|
||||
backgroundColor: ModeColor[item.technologyInfo],
|
||||
}}
|
||||
></View>
|
||||
<View className="modelInfo-light-colorname">
|
||||
{item.effectContent}({item.technologyInfo})
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</Block>
|
||||
);
|
||||
}
|
||||
|
||||
export default Index;
|
||||
@ -0,0 +1,157 @@
|
||||
.mode-list-main {
|
||||
position: relative;
|
||||
font-family: PingFang SC;
|
||||
.change-all-mode-btn {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: -30rpx;
|
||||
width: 140rpx;
|
||||
height: 160rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx 0rpx 0rpx 30rpx;
|
||||
box-shadow: 1rpx 2rpx 16rpx 2rpx rgba(97, 97, 97, 0.1);
|
||||
text-align: center;
|
||||
// align-items: center;
|
||||
z-index: 20;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 33rpx;
|
||||
}
|
||||
.icon {
|
||||
display: block;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mode-list-box {
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
padding: 10rpx 26rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 30rpx;
|
||||
box-sizing: border-box;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.mode-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.mode-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 110rpx;
|
||||
min-width: 110rpx;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.mode-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 140rpx;
|
||||
height: 160rpx;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
/*padding: 17rpx 18rpx;*/
|
||||
box-sizing: border-box;
|
||||
transition: all 0.3s;
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
.new {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 48rpx;
|
||||
height: 24rpx;
|
||||
font-size: 16rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
background-color: #eb5858;
|
||||
border-radius: 15rpx 10rpx 12rpx 0rpx;
|
||||
z-index: 20;
|
||||
}
|
||||
.is-new {
|
||||
display: block;
|
||||
}
|
||||
.mode-info {
|
||||
min-width: 140rpx;
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
.mode-info-title {
|
||||
margin-bottom: 4rpx;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.mode-info-time {
|
||||
margin-bottom: 4rpx;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.mode-info-select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin: 10rpx auto 0;
|
||||
border: 3rpx solid #f1f1f1;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
&.is-select {
|
||||
background-color: #fff;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mode-info-select-point {
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
background-color: #000000;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mode-item + .mode-item {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.mode-item-active {
|
||||
// min-width: 300rpx;
|
||||
padding-right: 11rpx;
|
||||
background: linear-gradient(90deg, #efdcc2 0%, #fff2df 100%);
|
||||
}
|
||||
|
||||
.mode-pic {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
/*margin-left: 20rpx;*/
|
||||
background-color: #f1f1f1;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mode-pic image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,158 @@
|
||||
.iot-main {
|
||||
padding: 20rpx 30rpx;
|
||||
background: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
min-height: calc(100vh - 180rpx);
|
||||
.banner-box {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 690rpx;
|
||||
height: 790rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
.music-btn {
|
||||
position: absolute;
|
||||
top: 17rpx;
|
||||
right: 17rpx;
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
background: #f8f8f8;
|
||||
border-radius: 50%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.music-btn_icon {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
}
|
||||
}
|
||||
.video-or-image {
|
||||
display: block;
|
||||
width: 690rpx;
|
||||
height: 690rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.iot-device {
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 50rpx;
|
||||
}
|
||||
.border-right {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mode-box {
|
||||
// background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.iot-btn-start {
|
||||
width: 690rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
background-color: #ccc;
|
||||
border-radius: 45rpx;
|
||||
&.is-connect {
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
width: 100%;
|
||||
height: 153rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
box-sizing: border-box;
|
||||
.btn {
|
||||
width: 690rpx;
|
||||
height: 90rpx;
|
||||
background: #000;
|
||||
border-radius: 45rpx;
|
||||
color: #fff;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
margin: 21rpx 49rpx 42rpx 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn-disable {
|
||||
background-color: #ccc !important; /* 设置按钮背景颜色为灰色 */
|
||||
color: #fff !important; /* 设置按钮文字颜色为白色 */
|
||||
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
|
||||
}
|
||||
|
||||
.switch-btn-box {
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 34rpx;
|
||||
.btn-item {
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.btn-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
.btn-text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.border-right {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.battery_icon {
|
||||
width: 8rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 5rpx;
|
||||
& + .battery_icon {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.v1 {
|
||||
background: linear-gradient(0deg, #efdcc2 0%, #fff2df 100%);
|
||||
}
|
||||
|
||||
.v2 {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.v3 {
|
||||
background: linear-gradient(0deg, #ff4646, #ff6b6b, #f86f6f, #ff9494);
|
||||
}
|
||||
@ -1,30 +1,37 @@
|
||||
var log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
module.exports = {
|
||||
// var logger = Taro.getRealtimeLogManager ? Taro.getRealtimeLogManager() : null;
|
||||
var logger = Taro.getRealtimeLogManager();
|
||||
|
||||
const log = {
|
||||
debug() {
|
||||
if (!log) return
|
||||
log.debug.apply(log, arguments)
|
||||
if (!logger) return;
|
||||
logger.debug.apply(logger, arguments);
|
||||
},
|
||||
info() {
|
||||
if (!log) return
|
||||
log.info.apply(log, arguments)
|
||||
if (!logger) return;
|
||||
logger.info.apply(logger, arguments);
|
||||
},
|
||||
warn() {
|
||||
if (!log) return
|
||||
log.warn.apply(log, arguments)
|
||||
if (!logger) return;
|
||||
logger.warn.apply(logger, arguments);
|
||||
},
|
||||
error() {
|
||||
if (!log) return
|
||||
log.error.apply(log, arguments)
|
||||
if (!logger) return;
|
||||
logger.error.apply(logger, arguments);
|
||||
},
|
||||
setFilterMsg(msg) {
|
||||
// 从基础库2.7.3开始支持
|
||||
if (!logger || !logger.setFilterMsg) return;
|
||||
if (typeof msg !== "string") return;
|
||||
logger.setFilterMsg(msg);
|
||||
},
|
||||
setFilterMsg(msg) { // 从基础库2.7.3开始支持
|
||||
if (!log || !log.setFilterMsg) return
|
||||
if (typeof msg !== 'string') return
|
||||
log.setFilterMsg(msg)
|
||||
addFilterMsg(msg) {
|
||||
// 从基础库2.8.1开始支持
|
||||
if (!logger || !logger.addFilterMsg) return;
|
||||
if (typeof msg !== "string") return;
|
||||
logger.addFilterMsg(msg);
|
||||
},
|
||||
addFilterMsg(msg) { // 从基础库2.8.1开始支持
|
||||
if (!log || !log.addFilterMsg) return
|
||||
if (typeof msg !== 'string') return
|
||||
log.addFilterMsg(msg)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default log;
|
||||
|
||||