Compare commits

...

17 Commits

@ -55,12 +55,13 @@
"@tarojs/runtime": "3.6.19", "@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19", "@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19", "@tarojs/taro": "3.6.19",
"@visactor/taro-vchart": "^1.9.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"echarts": "^5.5.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-redux": "^9.0.3", "react-redux": "^9.0.3",
"taro-react-echarts": "^1.2.2",
"taro-ui": "^3.2.0" "taro-ui": "^3.2.0"
}, },
"devDependencies": { "devDependencies": {

@ -0,0 +1,53 @@
import Taro from "@tarojs/taro";
import { Component, PropsWithChildren } from "react";
import "./app.less";
// // html4
// import "@tarojs/taro/html.css";
// // html5
// import "@tarojs/taro/html5.css";
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";
class App extends Component {
// 可以使用所有的 React 生命周期方法
componentDidMount() {}
// 对应 onLaunch
onLaunch(options) {
// console.log("onLaunch", options);
if (options.scene == 1007 || options.scene == 1008) {
return;
}
// go("/pages/iotCarePlan/iotCarePlan");
// go("/pages/instrument_clickin_upload/index");
// go("/pages/instrument/intro");
// Taro.switchTab({
// url: "/pages/user/user",
// });
go("/pages/index/index");
}
onError(error) {
console.log("error 错误捕获", error);
}
// 对应 onShow
componentDidShow() {}
// 对应 onHide
componentDidHide() {}
// this.props.children 是将要会渲染的页面
render() {
// return this.props.children
return <Provider store={store} children={this.props.children}></Provider>;
}
}
export default App;

@ -0,0 +1,19 @@
.nodata {
width: 200rpx;
height: 300rpx;
margin: 0 auto;
// margin-top: 310rpx;
text-align: center;
.nodata_img {
display: inline-block;
width: 160rpx;
height: 160rpx;
margin-bottom: 34rpx;
}
.nodata_text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
}
}

@ -0,0 +1,45 @@
import classnames from "classnames";
import Taro from "@tarojs/taro";
import { Component } from "react";
import { Block, View, Image } from "@tarojs/components";
import "./nodata.less";
export default class NoDataComponent extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
name: "无数据组件",
};
}
async onLoad() {}
componentDidMount() {}
componentWillUnmount() {}
componentDidShow() {}
componentDidHide() {}
async initData() {}
showInit() {}
render() {
return (
<Block>
<View>
<View className="nodata">
<Image
className="nodata_img"
src={require("../../img/nodata.png")}
></Image>
<View className="nodata_text"></View>
</View>
</View>
</Block>
);
}
}

@ -34,7 +34,7 @@ import {
getTimeCode, getTimeCode,
isNeedToUpdate, isNeedToUpdate,
} from "@/utils/util"; } from "@/utils/util";
const log = require("@/utils/log"); // const log = require("@/utils/log");
import commandMap from "@/utils/commandMap"; import commandMap from "@/utils/commandMap";
import { bleCommandSamples } from "./test"; import { bleCommandSamples } from "./test";
@ -129,7 +129,15 @@ class ConnectionBluetoot extends Component<any, any> {
async onLoad() {} async onLoad() {}
componentDidMount() { componentDidMount() {
// 只有非断开状态的弹窗才自动连接蓝牙
if (!this.props.isDisconnect) {
this.connection(); this.connection();
} else {
// 断开状态弹窗:自动设置为错误模式
this.setState({
error: true,
});
}
} }
componentWillUnmount() {} componentWillUnmount() {}
@ -944,7 +952,7 @@ class ConnectionBluetoot extends Component<any, any> {
// 超时未返回版本号 // 超时未返回版本号
if (isGetVersionTimer) clearTimeout(isGetVersionTimer); if (isGetVersionTimer) clearTimeout(isGetVersionTimer);
console.log("超时未返回版本号 this.pairingChange", this.state); console.log("超时未返回版本号 this.pairingChange", this.state);
// this.pairingChange(this.state); this.pairingChange(this.state);
} else { } else {
this.sendGetVersion(); this.sendGetVersion();
} }
@ -993,6 +1001,15 @@ class ConnectionBluetoot extends Component<any, any> {
onReconnect = () => { onReconnect = () => {
console.log("onReconnect"); console.log("onReconnect");
// 重置信息并重连
this.setState({
error: false,
searchError: false,
errorText: "",
});
setTimeout(() => {
this.connection();
});
// this.props.confirm("confirm"); // this.props.confirm("confirm");
}; };
@ -1005,8 +1022,8 @@ class ConnectionBluetoot extends Component<any, any> {
}; };
render() { render() {
let { name, isConnection, connectionSuccess, error } = this.state; let { isConnection, connectionSuccess, error } = this.state;
let { deviceInfo } = this.props; let { deviceInfo, isDisconnect } = this.props;
return ( return (
<Block> <Block>
<DeviceConnectPopup <DeviceConnectPopup
@ -1020,7 +1037,6 @@ class ConnectionBluetoot extends Component<any, any> {
error={error} error={error}
title="面罩模式启动中" title="面罩模式启动中"
/> />
<View>{name}</View>
</Block> </Block>
); );
} }

@ -13,12 +13,12 @@
// } // }
.site-close { .site-close {
position: absolute; position: absolute;
right: 36rpx; right: 16rpx;
top: 36rpx; top: 16rpx;
color: #fff; color: #000;
font-size: 36rpx; font-size: 36rpx;
z-index: 100009; z-index: 100009;
background-color: #ababab; background-color: transparent;
border-radius: 50%; border-radius: 50%;
padding: 8rpx; padding: 8rpx;
box-sizing: border-box; box-sizing: border-box;
@ -64,7 +64,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
width: 100%; width: 84%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
// column-gap: 30rpx; // column-gap: 30rpx;
@ -76,6 +76,7 @@
width: 36rpx; width: 36rpx;
min-width: 36rpx; min-width: 36rpx;
height: 36rpx; height: 36rpx;
margin-right: 36rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;

@ -149,7 +149,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
</Block> </Block>
)} )}
</View> </View>
<View className="block2"> {/* <View className="block2">
{connectionSuccess ? ( {connectionSuccess ? (
<Block> <Block>
<View className="icon"> <View className="icon">
@ -175,15 +175,16 @@ export default class DeviceConnectPopup extends Component<any, any> {
</View> </View>
</Block> </Block>
)} )}
</View> </View> */}
</View> </View>
<View className="common-popup-btns"> <View className="common-popup-btns">
<Button className="common-popup-btn2" onClick={this.onClose}> <Button
className="common-popup-btn"
style="background-color: #fff;color: #000"
onClick={this.onClose}
>
</Button> </Button>
<Button className="common-popup-btn2" onClick={this.onConfirm}>
</Button>
</View> </View>
</View> </View>
)} )}
@ -201,7 +202,8 @@ export default class DeviceConnectPopup extends Component<any, any> {
<View className="error-block"> <View className="error-block">
<View className="tip1"></View> <View className="tip1"></View>
<View className="tip2"> <View className="tip2">
{data.bluetoothConnectFailContent} {data.bluetoothConnectFailContent ||
"请重启设备后点击重新连接"}
</View> </View>
</View> </View>
</View> </View>

@ -104,10 +104,8 @@ class UpdateIotWL200 extends Component<any, any> {
let objStr = getStorageSync("instrument_detail"); let objStr = getStorageSync("instrument_detail");
if (objStr) { if (objStr) {
let info = JSON.parse(objStr);
this.setState({ this.setState({
currentDevice: info, currentDevice: objStr,
}); });
} }
setTimeout(() => { setTimeout(() => {

@ -36,7 +36,12 @@ export default class Navbar extends Component<any, any> {
} }
back = () => { back = () => {
//判断是否自定义跳转
if (!this.props.isCustomBack) {
back(); back();
} else {
this.props.customBack(); // 具体页面自定义返回逻辑
}
}; };
setStatusBar() { setStatusBar() {

@ -62,3 +62,9 @@
font-family: PingFang SC; font-family: PingFang SC;
} }
} }
.instrument-swiper-step {
width: 600rpx;
height: 720rpx;
margin: 0 auto;
}

@ -71,9 +71,7 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
} }
this.setState({ current }); this.setState({ current });
} }
onClickSwiperItem(item) {
goJump(item);
}
onFinish(event) { onFinish(event) {
const { current } = event.detail; const { current } = event.detail;
const { toRight, isClick } = this.state; const { toRight, isClick } = this.state;
@ -94,7 +92,7 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
onNext = async () => { onNext = async () => {
let { current } = this.state; let { current } = this.state;
if (current === this.props.data.length) { if (current === this.props.data.length - 1) {
this.onClose(); this.onClose();
} else { } else {
this.setState({ current: current + 1 }); this.setState({ current: current + 1 });
@ -122,25 +120,11 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
></View> ></View>
<View className={classnames("common-box upload-tips-common-box")}> <View className={classnames("common-box upload-tips-common-box")}>
<View className="site-popup-content-box"> <View className="site-popup-content-box">
<Swiper <View className="absolutely instrument-swiper-step">
className="absolutely"
style="width: 600rpx;height: 720rpx"
current={current}
onChange={this.onChange.bind(this)}
onAnimationFinish={this.onFinish.bind(this)}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
disableTouch={true} // 禁止滑动
>
{data.map((item, index) => { {data.map((item, index) => {
return ( return (
<SwiperItem current === index && (
className="absolutely" <View className="absolutely" key={"swiper_" + index}>
onClick={this.onClickSwiperItem.bind(this, item)}
key={"swiper_" + index}
>
<View <View
style={{ style={{
width: "100%", width: "100%",
@ -154,10 +138,11 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
></Image> ></Image>
</View> </View>
<View className="tips-message">{item.message}</View> <View className="tips-message">{item.message}</View>
</SwiperItem> </View>
)
); );
})} })}
</Swiper> </View>
</View> </View>
<View> <View>
@ -170,15 +155,19 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
)} )}
{data.length > 1 && current === 0 && ( {data.length > 1 && current === 0 && (
<View className="popup-btn-one"> <View className="popup-btn-one">
<Button className="popup-btn" onClick={this.onPrev}> <Button className="popup-btn" onClick={this.onNext}>
</Button> </Button>
</View> </View>
)} )}
{data.length > 1 && ( {data.length > 1 && current > 0 && (
<View className="common-popup-btns"> <View className="common-popup-btns">
<Button className="common-popup-btn2" onClick={this.onPrev}> <Button
{current > 0 && current < data.length - 1 && "上一步"} className="common-popup-btn2"
style="color:#000"
onClick={this.onPrev}
>
</Button> </Button>
<Button className="common-popup-btn2" onClick={this.onNext}> <Button className="common-popup-btn2" onClick={this.onNext}>
{current > 0 && current < data.length - 1 && "下一步"} {current > 0 && current < data.length - 1 && "下一步"}

@ -18,12 +18,12 @@
// } // }
.site-close { .site-close {
position: absolute; position: absolute;
right: 36rpx; right: 16rpx;
top: 36rpx; top: 16rpx;
color: #fff; color: #000;
font-size: 36rpx; font-size: 36rpx;
z-index: 100009; z-index: 100009;
background-color: #ababab; background-color: transparent;
border-radius: 50%; border-radius: 50%;
padding: 8rpx; padding: 8rpx;
box-sizing: border-box; box-sizing: border-box;

@ -24,6 +24,7 @@ import { go } from "../../utils/traoAPI";
/** props /** props
* isLarge * isLarge
* isShow * isShow
* isFirstEntry
* data * data
* title * title
* confirmButtonText * confirmButtonText
@ -59,6 +60,9 @@ export default class PopupStepTips extends Component<any, any> {
let { isLocal } = this.state; let { isLocal } = this.state;
this.props.close({ isLocal }); this.props.close({ isLocal });
}; };
onConfirm = () => {
this.props.close({ isLocal: true });
};
onClickStop = (e) => { onClickStop = (e) => {
e.stopPropagation(); e.stopPropagation();
@ -81,7 +85,7 @@ export default class PopupStepTips extends Component<any, any> {
onNext = async () => { onNext = async () => {
let { current } = this.state; let { current } = this.state;
if (current === this.props.data.length) { if (current === this.props.data.length - 1) {
this.onClose(); this.onClose();
} else { } else {
this.setState({ current: current + 1 }); this.setState({ current: current + 1 });
@ -94,8 +98,15 @@ export default class PopupStepTips extends Component<any, any> {
}; };
render() { render() {
let { isShow, data, isLarge, title, content, confirmButtonText } = let {
this.props; isShow,
data,
isLarge,
isFirstEntry,
title,
content,
confirmButtonText,
} = this.props;
let { current, isLocal } = this.state; let { current, isLocal } = this.state;
return ( return (
@ -123,7 +134,7 @@ export default class PopupStepTips extends Component<any, any> {
"margin-samll": isLarge, "margin-samll": isLarge,
})} })}
> >
{data.length > 0 ? data[current].openTitle : "暂无数据"} {data.length > 0 ? data[current].openTitle : "使用教程"}
</View> </View>
{/* {title && ( {/* {title && (
<View <View
@ -135,19 +146,17 @@ export default class PopupStepTips extends Component<any, any> {
</View> </View>
)} */} )} */}
<View className="step-popup-content-box"> <View className="step-popup-content-box">
<Swiper <View className="absolutely instrument-swiper-step">
className="step-absolutely"
current={current}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
disableTouch={true} // 禁止滑动
>
{data.map((item, index) => { {data.map((item, index) => {
return ( return (
<SwiperItem className="absolutely" key={"swiper_" + index}> current === index && (
<View className="step-img"> <View className="absolutely" key={"swiper_" + index}>
<View
style={{
width: "100%",
height: "600rpx",
}}
>
<Image <Image
className="cover" className="cover"
src={item.openSourceUrl} src={item.openSourceUrl}
@ -155,31 +164,36 @@ export default class PopupStepTips extends Component<any, any> {
></Image> ></Image>
</View> </View>
<View className="tips-message">{item.openContent}</View> <View className="tips-message">{item.openContent}</View>
</SwiperItem> </View>
)
); );
})} })}
</Swiper> </View>
</View> </View>
<View> <View>
{data.length === 1 && ( {data.length === 1 && (
<View className="popup-btn-one"> <View className="popup-btn-one">
<Button className="popup-btn" onClick={this.onClose}> <Button className="popup-btn" onClick={this.onClose}>
{confirmButtonText}
</Button> </Button>
</View> </View>
)} )}
{data.length > 1 && current === 0 && ( {data.length > 1 && current === 0 && (
<View className="popup-btn-one"> <View className="popup-btn-one">
<Button className="popup-btn" onClick={this.onPrev}> <Button className="popup-btn" onClick={this.onNext}>
</Button> </Button>
</View> </View>
)} )}
{data.length > 1 && ( {data.length > 1 && current > 0 && (
<View className="common-popup-btns"> <View className="common-popup-btns">
<Button className="common-popup-btn2" onClick={this.onPrev}> <Button
{current > 0 && current < data.length - 1 && "上一步"} className="common-popup-btn2"
style="color:#000"
onClick={this.onPrev}
>
</Button> </Button>
<Button className="common-popup-btn2" onClick={this.onNext}> <Button className="common-popup-btn2" onClick={this.onNext}>
{current > 0 && current < data.length - 1 && "下一步"} {current > 0 && current < data.length - 1 && "下一步"}
@ -191,6 +205,7 @@ export default class PopupStepTips extends Component<any, any> {
)} )}
</View> </View>
{!isFirstEntry && (
<View className="setp-footer-btn" onClick={this.onChangeLocal}> <View className="setp-footer-btn" onClick={this.onChangeLocal}>
{isLocal ? ( {isLocal ? (
<Image <Image
@ -206,6 +221,7 @@ export default class PopupStepTips extends Component<any, any> {
<Text className="text"></Text> <Text className="text"></Text>
</View> </View>
)}
</View> </View>
</Popup> </Popup>
</Block> </Block>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 22 KiB

@ -7,6 +7,7 @@ import Navbar from "../../components/navbar/navbar";
import "./consultant.less"; import "./consultant.less";
import { getContactWorker } from "../../utils/Interface"; import { getContactWorker } from "../../utils/Interface";
import { back } from "@/utils/traoAPI";
export default class Consultant extends Component<any, any> { export default class Consultant extends Component<any, any> {
constructor(props) { constructor(props) {
@ -16,6 +17,7 @@ export default class Consultant extends Component<any, any> {
pictureUrl: "", pictureUrl: "",
}; };
} }
$instance = Taro.getCurrentInstance();
async onLoad() { async onLoad() {
this.initData(); this.initData();
@ -36,11 +38,25 @@ export default class Consultant extends Component<any, any> {
} }
} }
customBack = () => {
let customBack = this.$instance.router?.params?.customBack;
if (customBack) {
Taro.switchTab({ url: "/pages/index/index" });
return;
}
back();
};
render() { render() {
const { pictureUrl } = this.state; const { pictureUrl } = this.state;
return ( return (
<Block> <Block>
<Navbar titleSlot="联系客服" isBack={true} /> <Navbar
titleSlot="联系客服"
isBack={true}
isCustomBack
customBack={this.customBack}
/>
<View className="img"> <View className="img">
<Image <Image
src={pictureUrl} src={pictureUrl}

@ -97,6 +97,10 @@ export default class Index extends Component<any, any> {
async initData() {} async initData() {}
GoIndex = () => {
Taro.switchTab({ url: "/pages/index/index" });
};
render() { render() {
let { name, statistics, recordList, recordData } = this.state; let { name, statistics, recordList, recordData } = this.state;
return ( return (
@ -221,7 +225,7 @@ export default class Index extends Component<any, any> {
<View className="footer flex aitems"> <View className="footer flex aitems">
<View className="btn"></View> <View className="btn"></View>
<View className="text flex aitems"> <View className="text flex aitems">
<View></View> <View onClick={this.GoIndex}></View>
<Image <Image
src={require("../../img/right.png")} src={require("../../img/right.png")}
mode="aspectFill" mode="aspectFill"

@ -55,20 +55,19 @@ import {
setStorageSync, setStorageSync,
showModal, showModal,
} from "@/utils/traoAPI"; } from "@/utils/traoAPI";
import commandMap from "@/utils/commandMap";
import InstrumentTypeEnum from "@/components/bluetoot/InstrumentTypeEnum"; // const log = require("@/utils/log");
import OtaDeviceTypeEnum from "@/components/bluetoot/OtaDeviceTypeEnum";
const log = require("@/utils/log");
class Index extends Component<any, any> { class Index extends Component<any, any> {
// pageCtx = Taro.getCurrentInstance().page;
$instance = Taro.getCurrentInstance(); $instance = Taro.getCurrentInstance();
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
isCommonError: false, // 是否显示通用错误提示
commonErrorText: [], // 通用错误提示
showEquipment: false, // 扫码绑定设备弹窗
isRegisterBoolean: false, // 是否已登录 isRegisterBoolean: false, // 是否已登录
isShowPrivacyPopup: false, isShowPrivacyPopup: false,
isShowSiteSwiper: false, isShowSiteSwiper: false,
@ -142,12 +141,13 @@ class Index extends Component<any, any> {
isShowVersionUpgrading: false, // 升级中 isShowVersionUpgrading: false, // 升级中
isShowVersionUpgradFinish: false, // 升级完成:升级内容公告 isShowVersionUpgradFinish: false, // 升级完成:升级内容公告
versionUpgradFinishNodes: "", // 公告内容 versionUpgradFinishNodes: "", // 公告内容
// 设备是否重连弹窗
isShowReConnectDeviceRecordWL200: false,
}; };
} }
async onLoad() { async onLoad() {
console.log(1123131233);
// 仅非扫码进入页面时,校验跳转欢迎页 // 仅非扫码进入页面时,校验跳转欢迎页
if (!this.$instance.router?.params?.q) { if (!this.$instance.router?.params?.q) {
const isFirst = Taro.getStorageSync("isWelcome"); const isFirst = Taro.getStorageSync("isWelcome");
@ -155,15 +155,14 @@ class Index extends Component<any, any> {
go("/pages/initiate/initiate"); go("/pages/initiate/initiate");
} }
} }
if (Taro.getStorageSync("skip")) { // 判断是否跳过了注册
this.setState({ showEquipment: true }) if (Taro.getStorageSync("skipRegister")) {
Taro.removeStorageSync('skip'); this.setState({ showEquipment: true });
Taro.removeStorageSync("skipRegister");
} }
} }
componentDidMount() { componentDidMount() {}
}
componentWillUnmount() {} componentWillUnmount() {}
@ -176,7 +175,7 @@ class Index extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
showInit() { showInit = async () => {
// 判断是否登录 // 判断是否登录
let mobile = Taro.getStorageSync("mobile"); let mobile = Taro.getStorageSync("mobile");
if (mobile) { if (mobile) {
@ -202,6 +201,7 @@ class Index extends Component<any, any> {
let serial = ids[1]; let serial = ids[1];
Taro.setStorageSync("serial", serial); Taro.setStorageSync("serial", serial);
if (!Taro.getStorageSync("mobile")) { if (!Taro.getStorageSync("mobile")) {
await this.onlyLogin();
go("/pages/register/register"); go("/pages/register/register");
} }
} }
@ -209,7 +209,7 @@ class Index extends Component<any, any> {
} }
this.checkShowPrivacyPopup(); this.checkShowPrivacyPopup();
} }
} };
// 检测是否弹出隐私协议 // 检测是否弹出隐私协议
checkShowPrivacyPopup() { checkShowPrivacyPopup() {
@ -445,12 +445,32 @@ class Index extends Component<any, any> {
}, 300); }, 300);
} else { } else {
msg("请求失败,尝试重新请求"); msg("请求失败,尝试重新请求");
setTimeout(() => {
this.WCUserLogin(); this.WCUserLogin();
}, 2000);
} }
} }
// 只登陆,不做其他操作
async onlyLogin() {
Taro.showLoading({
title: "请求中...",
mask: true,
});
const { code } = await Taro.login();
const { data } = await WCUserLogin({ code });
Taro.hideLoading();
if (data.code === 200) {
Taro.setStorageSync("isWelcome", true);
Taro.setStorageSync("mobile", data.data.mobile);
this.props.tokenRefresh(data.data);
} else {
msg("请求失败,尝试重新请求");
}
}
closeBinding = () => { closeBinding = () => {
Taro.removeStorageSync("isScan"); // 扫码弹窗显示完后,不需要再判断是否扫码
Taro.removeStorageSync("serial"); // 扫码弹窗显示完后,删除缓存的扫码序列号
this.setState({ isVisibleBinding: false }); this.setState({ isVisibleBinding: false });
}; };
confirmBinding = () => { confirmBinding = () => {
@ -494,6 +514,10 @@ class Index extends Component<any, any> {
instrumentInfo.bindingStatus === 1 || instrumentInfo.bindingStatus === 1 ||
instrumentInfo.bindingStatus === 2 instrumentInfo.bindingStatus === 2
) { ) {
// 判断是否已绑定同名仪器,如果已绑定,判断序列号是否一致
// 如果自己已绑定,判断扫码序列号和已绑定序列号是否一致,如果一致:忽略
// 如果自己已绑定,判断扫码序列号和已绑定序列号是否一致,如果不一致:提示换绑
// 以上逻辑交给后端处理,直接查询是否绑定或换绑
setTimeout(() => { setTimeout(() => {
this.isBindingSerial(); this.isBindingSerial();
}, 100); }, 100);
@ -502,6 +526,8 @@ class Index extends Component<any, any> {
// 获取失败和绑定失败一个弹窗 // 获取失败和绑定失败一个弹窗
this.setState({ isBindingError: true }); this.setState({ isBindingError: true });
} }
this.removeScanFun();
} }
}; };
@ -537,10 +563,11 @@ class Index extends Component<any, any> {
}); });
Taro.hideLoading(); Taro.hideLoading();
this.closeBinding(); this.closeBinding();
this.removeScanFun();
if (data.code === 200) { if (data.code === 200) {
msg("绑定成功"); msg("绑定成功");
setTimeout(() => { setTimeout(() => {
go("/pages/instrument/intro?id=" + instrumentInfo.id); go("/pages/instrument/intro??customBack=true&id=" + instrumentInfo.id);
}, 2000); }, 2000);
return; return;
} else if (data.code === 202) { } else if (data.code === 202) {
@ -554,6 +581,7 @@ class Index extends Component<any, any> {
} }
}; };
// 换绑仪器
exchangeBinding = async () => { exchangeBinding = async () => {
Taro.showLoading({ Taro.showLoading({
title: "请求中...", title: "请求中...",
@ -566,37 +594,46 @@ class Index extends Component<any, any> {
console.log("exchangeBinding", data); console.log("exchangeBinding", data);
Taro.hideLoading(); Taro.hideLoading();
this.closeBinding(); this.closeBinding();
if (data.code === 200) { if (data.code !== 200) {
} else { //todo
this.closeBinding();
this.setState({ isBindingError: true });
} }
}; };
// 仪器绑定失败弹窗 // 仪器绑定失败弹窗
onBindErrorClose = () => { onBindErrorClose = () => {
Taro.removeStorageSync("isScan"); // 扫码弹窗显示完后,不需要再判断是否扫码
Taro.removeStorageSync("serial"); // 扫码弹窗显示完后,删除缓存的扫码序列号
this.setState({ isBindingError: false }); this.setState({ isBindingError: false });
this.removeScanFun();
}; };
onBindErrorConfirm = () => { onBindErrorConfirm = () => {
this.onBindErrorClose(); this.onBindErrorClose();
go("/pages/consultant/consultant"); go("/pages/consultant/consultant?customBack=true");
}; };
onBeforeBindClose = () => { onBeforeBindClose = () => {
Taro.removeStorageSync("isScan"); // 扫码弹窗显示完后,不需要再判断是否扫码
Taro.removeStorageSync("serial"); // 扫码弹窗显示完后,删除缓存的扫码序列号
this.setState({ isBeforeBinding: false }); this.setState({ isBeforeBinding: false });
this.removeScanFun();
}; };
onBeforeBindConfirm = () => { onBeforeBindConfirm = () => {
this.setState({ isBeforeBinding: false }); this.setState({ isBeforeBinding: false });
this.removeScanFun();
};
/**删除扫码缓存*/
removeScanFun = () => {
Taro.removeStorageSync("isScan"); // 扫码弹窗显示完后,不需要再判断是否扫码
Taro.removeStorageSync("serial"); // 扫码弹窗显示完后,删除缓存的扫码序列号
}; };
// 跳转仪器介绍页 // 跳转仪器介绍页
goNursing = (item) => { goNursing = (item) => {
console.log("goNursing", item); if (item.status === 0) {
setStorageSync("instrument_detail", JSON.stringify(item)); setStorageSync("instrument_detail", item);
this.setState({ connectInstrument: item }); this.setState({ connectInstrument: item });
setTimeout(() => this.bindBlockLeft()); setTimeout(() => this.bindBlockLeft());
} else {
// todo
this.openCommonError([
"该仪器暂时无法进行在线护理,",
"请联系微信小助理",
]);
}
}; };
/* 扫码进入逻辑 */ /* 扫码进入逻辑 */
@ -655,27 +692,15 @@ class Index extends Component<any, any> {
// return; // return;
} }
onUnloginConfirm() { onUnloginConfirm() {
this.setState({ showEquipment: false }) this.setState({ showEquipment: false });
} }
onUnloginClose() { onUnloginClose() {
this.setState({ showEquipment: false }) this.setState({ showEquipment: false });
} }
//连接完成时数据的回调 //连接完成时数据的回调
offlineChange = async (e) => { offlineChange = async (e) => {
console.log("offlineChange", e); console.log("offlineChange", e);
// log.info( this.pairingChange("offlineChange");
// commandMap.versionInfoHome,
// `offlineChange::e::${JSON.stringify(e)}`
// );
//offlineDataList 离线数据
//versioninfo 版本号
let { offlineDataList, versionInfo } = e.detail;
this.setState({
versionInfo,
});
let offlinelist: any = [];
console.log(offlinelist);
}; };
connectionOpen = async () => { connectionOpen = async () => {
@ -728,6 +753,7 @@ class Index extends Component<any, any> {
); );
this.setState({ this.setState({
isShowVersionUpgrading: false, isShowVersionUpgrading: false,
isShowVersionUpgradFinish: true, // 升级介绍
versionUpgradFinishNodes: nodes, versionUpgradFinishNodes: nodes,
}); });
}; };
@ -745,8 +771,55 @@ class Index extends Component<any, any> {
}; };
/** iot版本升级 END */ /** iot版本升级 END */
/**
* @name WL200
* @description
*/
initDeviceNursingHistory = async () => {
let WL200NursingHistory = Taro.getStorageSync("WL200NursingHistory");
if (WL200NursingHistory) {
this.setState({
isShowReConnectDeviceRecordWL200: true,
});
}
};
closeReConnectDeviceRecordWL200 = () => {
Taro.removeStorageSync("WL200NursingHistory");
this.setState({
isShowReConnectDeviceRecordWL200: false,
});
};
confirmReConnectDeviceRecordWL200 = () => {
let WL200NursingHistory = Taro.getStorageSync("WL200NursingHistory");
console.log("WL200NursingHistory", WL200NursingHistory);
this.setState({
isShowReConnectDeviceRecordWL200: false,
});
// this.goNursing()
};
/**
* @name
* @description
* @params
*/
openCommonError = (text) => {
this.setState({
commonErrorText: text,
isCommonError: true,
});
};
onCommonErrorFun = () => {
this.setState({
isCommonError: false,
});
};
render() { render() {
let { let {
isCommonError,
commonErrorText,
calendarComplete, calendarComplete,
calendarInComplete, calendarInComplete,
currentDate, currentDate,
@ -778,11 +851,46 @@ class Index extends Component<any, any> {
// 蓝牙连接 // 蓝牙连接
isConnectShow, isConnectShow,
connectInstrument, connectInstrument,
// 设备存在记录,是否重连
isShowReConnectDeviceRecordWL200,
} = this.state; } = this.state;
return ( return (
<Block> <Block>
<View catchMove> <View catchMove>
<PopupAlert
isShow={isCommonError}
title="提示"
content={
<Block>
{commonErrorText.map((item) => {
return <View>{item}</View>;
})}
</Block>
}
confirmButtonText="知道了"
textAlgin="center"
close={this.onCommonErrorFun}
confirm={this.onCommonErrorFun}
/>
<PopupConfirm
isShow={isShowReConnectDeviceRecordWL200}
isClose
title="提示"
zIndex={10020}
myClassName="level-up"
content={
<Block>
<View></View>
<View></View>
</Block>
}
cancelButtonText="暂不绑定"
confirmButtonText="确认"
textAlgin="center"
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}
/>
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title="提示" title="提示"
@ -794,27 +902,26 @@ class Index extends Component<any, any> {
} }
confirmButtonText="知道了" confirmButtonText="知道了"
textAlgin="center" textAlgin="center"
isClose={false}
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isNotRegister} isShow={isNotRegister}
isClose isClose
title='提示' title="提示"
content='暂未授权注册,请点击注册' content="暂未授权注册,请点击注册"
confirmButtonText='确定' confirmButtonText="确定"
textAlgin='center' textAlgin="center"
type='1' type="1"
close={this.closeAlert} close={this.closeAlert}
confirm={this.closeAlert} confirm={this.closeAlert}
/> />
<PopupAlert <PopupAlert
isShow={isDev} isShow={isDev}
title='提示' title="提示"
content='页面正在开发中' content="页面正在开发中"
confirmButtonText='确定' confirmButtonText="确定"
textAlgin='center' textAlgin="center"
close={this.closeDev} close={this.closeDev}
confirm={this.closeDev} confirm={this.closeDev}
/> />
@ -834,43 +941,42 @@ class Index extends Component<any, any> {
/> />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title='提示' title="提示"
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
isClose={false}
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isBeforeBinding} isShow={isBeforeBinding}
title='提示' title="提示"
content='您选择的仪器有误,请重新确认选择' content="您选择的仪器有误,请重新确认选择"
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
isClose={false}
close={this.onBeforeBindClose} close={this.onBeforeBindClose}
confirm={this.onBeforeBindConfirm} confirm={this.onBeforeBindConfirm}
/> />
<PopupAlert <PopupAlert
isShow={showEquipment} isShow={showEquipment}
title='提示' title="提示"
content={ content={
<Block> <Block>
<View className='mb10'></View> <View className="mb10">
<View className='mb10'>uniquie14231</View> {instrumentInfo.instrumentName}
<View className='mb10'></View> </View>
<View className="mb10">{instrumentInfo.serial}</View>
<View className="mb10"></View>
</Block> </Block>
} }
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
isClose={false}
close={this.onUnloginClose.bind(this)} close={this.onUnloginClose.bind(this)}
confirm={this.onUnloginConfirm.bind(this)} confirm={this.onUnloginConfirm.bind(this)}
></PopupAlert> ></PopupAlert>
@ -883,9 +989,9 @@ class Index extends Component<any, any> {
<PopupSiteSwiper <PopupSiteSwiper
isShow={isShowSiteSwiper} isShow={isShowSiteSwiper}
siteData={sitePopupList} siteData={sitePopupList}
size='middle' size="middle"
confirmButtonText='确定' confirmButtonText="确定"
textAlgin='center' textAlgin="center"
close={this.closeSiteSwiper} close={this.closeSiteSwiper}
confirm={this.closeSiteSwiper} confirm={this.closeSiteSwiper}
/> />
@ -901,7 +1007,7 @@ class Index extends Component<any, any> {
upgradeFun={this.upgradeFun} upgradeFun={this.upgradeFun}
/> />
)} )}
<PopupConfirm <PopupAlert
isLarge isLarge
isClose isClose
isShow={isShowUpdateVersionTip} isShow={isShowUpdateVersionTip}
@ -913,7 +1019,6 @@ class Index extends Component<any, any> {
</Block> </Block>
} }
textAlgin="center" textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定" confirmButtonText="确定"
close={this.cancelUpdateVersionTip} close={this.cancelUpdateVersionTip}
confirm={this.confirmUpdateVersionTip} confirm={this.confirmUpdateVersionTip}
@ -948,29 +1053,29 @@ class Index extends Component<any, any> {
leftSlot={ leftSlot={
<Block> <Block>
<View <View
className='message' className="message"
onClick={this.gourl} onClick={this.gourl}
data-url='/pages/message/message' data-url="/pages/message/message"
> >
<Image <Image
className='message-img' className="message-img"
src={require("../../img/index/message.png")} src={require("../../img/index/message.png")}
mode='aspectFill' mode="aspectFill"
/> />
{messagecount ? <View className='tip' /> : ""} {messagecount ? <View className="tip" /> : ""}
</View> </View>
</Block> </Block>
} }
/> />
<View className='index'> <View className="index">
<View className='date-title' onClick={this.toNursingRecords}> <View className="date-title" onClick={this.toNursingRecords}>
<Text className='text'></Text> <Text className="text"></Text>
<Image <Image
src={require("../../img/index/right.png")} src={require("../../img/index/right.png")}
style='width: 20rpx;height: 20rpx;' style="width: 20rpx;height: 20rpx;"
/> />
</View> </View>
<View className='bg-while'> <View className="bg-while">
<AtCalendar <AtCalendar
hideArrow hideArrow
isSwiper={false} isSwiper={false}
@ -982,46 +1087,44 @@ class Index extends Component<any, any> {
/> />
</View> </View>
</View> </View>
<View className='infobox5'> <View className="infobox5">
{instrumentList.length > 0 && ( {instrumentList.length > 0 && (
<Block> <Block>
<View className='nurse_plan_box flex aitems sb'> <View className="nurse_plan_box flex aitems sb">
<View className='title'></View> <View className="title"></View>
<View <View
className='txt_box flex jcenter aitems' className="txt_box flex jcenter aitems"
data-url='/pages/instrument/instrument' data-url="/pages/instrument/instrument"
onClick={this.gourl} onClick={this.gourl}
> >
<Image <Image
className='right_icon' className="right_icon"
src={require("../../img/black-add.png")} src={require("../../img/black-add.png")}
mode='aspectFill' mode="aspectFill"
/> />
<View className='txt'></View> <View className="txt"></View>
</View> </View>
</View> </View>
<View style='overflow-x: auto;'> <View style="overflow-x: auto;">
<View className='device_list flex'> <View className="device_list flex">
{instrumentList.map((item, index) => { {instrumentList.map((item, index) => {
if (item.status === 0) {
return ( return (
<View <View
key={"instrumentList" + index} key={"instrumentList" + index}
className='device_item' className="device_item"
onClick={this.goNursing.bind(this, item)} onClick={this.goNursing.bind(this, item)}
> >
<Image <Image
className='banner_img' className="banner_img"
src={item.banner} src={item.banner}
mode='aspectFill' mode="aspectFill"
/> />
<View className='device_name ellipsis1'> <View className="device_name ellipsis1">
{item.name} {item.name}
</View> </View>
</View> </View>
); );
}
})} })}
</View> </View>
</View> </View>
@ -1029,32 +1132,32 @@ class Index extends Component<any, any> {
)} )}
{instrumentList.length === 0 && ( {instrumentList.length === 0 && (
<Block> <Block>
<View className='nurse_plan_box flex aitems sb'> <View className="nurse_plan_box flex aitems sb">
<View className='title'></View> <View className="title"></View>
</View> </View>
<View className='add_device flex jcenter aitems bg-while'> <View className="add_device flex jcenter aitems bg-while">
<View className='add_device_btn'> <View className="add_device_btn">
<View className='txt_box flex jcenter aitems'> <View className="txt_box flex jcenter aitems">
<View <View
className='at-icon at-icon-add' className="at-icon at-icon-add"
style='color: #fff;font-size: 30rpx;' style="color: #fff;font-size: 30rpx;"
></View> ></View>
<View className='txt' onClick={this.addNewDevice}> <View className="txt" onClick={this.addNewDevice}>
</View> </View>
</View> </View>
</View> </View>
<View className='tips'></View> <View className="tips"></View>
</View> </View>
</Block> </Block>
)} )}
</View> </View>
<View style='margin: 20px'> <View style="margin: 20px">
<View onClick={this.goIot}></View> <View onClick={this.goIot}></View>
</View> </View>
<View className='infobox3'> <View className="infobox3">
<Swiper <Swiper
autoplay autoplay
onAnimationFinish={this.bannerSwiperchange.bind(this)} onAnimationFinish={this.bannerSwiperchange.bind(this)}
@ -1066,13 +1169,13 @@ class Index extends Component<any, any> {
key={"banner_" + index} key={"banner_" + index}
onClick={this.gobanner.bind(this, item)} onClick={this.gobanner.bind(this, item)}
> >
<Image style='width:100%;height:100%' src={item.fileUrl} /> <Image style="width:100%;height:100%" src={item.fileUrl} />
</SwiperItem> </SwiperItem>
); );
})} })}
</Swiper> </Swiper>
</View> </View>
<View style='height:200rpx'></View> <View style="height:200rpx"></View>
</Block> </Block>
); );
} }
@ -1095,3 +1198,4 @@ const mapDispatchToProps = (dispatch) => ({
}, },
}); });
export default connect(mapStateToProps, mapDispatchToProps)(Index); export default connect(mapStateToProps, mapDispatchToProps)(Index);
// instrumentId

@ -127,7 +127,10 @@ class Initiate extends Component<any, any> {
}, 300); }, 300);
} else { } else {
msg("请求失败,尝试重新请求"); msg("请求失败,尝试重新请求");
// 防止快速请求
setTimeout(() => {
this.WCUserLogin(); this.WCUserLogin();
}, 2000);
} }
} }

@ -18,13 +18,15 @@ import {
} from "@tarojs/components"; } from "@tarojs/components";
import { InstrumentInfo } from "@/utils/Interface"; import { InstrumentInfo } from "@/utils/Interface";
import { go, back, msg, setStorageSync, getStorageSync } from "@/utils/traoAPI"; import { go, msg, setStorageSync } from "@/utils/traoAPI";
import { getImgInfo, contraction } from "@/utils/compressImage"; import { getImgInfo, contraction } from "@/utils/compressImage";
/* 自定义组件 */ /* 自定义组件 */
import Navbar from "@/components/navbar/navbar"; import Navbar from "@/components/navbar/navbar";
import PopupAlert from "@/components/popup/popup-alert"; import PopupAlert from "@/components/popup/popup-alert";
import PopupBinding from "@/components/popup/popup-binding";
import NoDataComponent from "@/components/base/nodata";
/* 组件 */ /* 组件 */
import "./instrument.less"; import "./instrument.less";
@ -61,17 +63,43 @@ export default class Instrument extends Component<any, any> {
userinfo: null, userinfo: null,
showLoginPopup: "", showLoginPopup: "",
fromUrl: "", fromUrl: "",
isVisibleBinding: false,
isRegisterBoolean: false,
isExchangeBinding: false,
/** INPUT序列号拎出来防止上传图片被清空bug */
serialCodeValue: "",
}; };
} }
$instance = Taro.getCurrentInstance();
isOnly: boolean = false;
currentDevice: any = null;
id: any = "";
async onLoad() { async onLoad() {}
this.unbindingInstrumentInfoList();
}
componentDidMount() {} componentDidMount() {}
componentWillUnmount() {} componentWillUnmount() {}
componentDidShow() {} componentDidShow() {
// 进入页面判断是否注册,用于扫码登录
let mobile = Taro.getStorageSync("mobile");
if (mobile) {
this.setState({ isRegisterBoolean: true });
}
// 用于判断是否只显示一个设备
let params: any = this.$instance.router?.params;
if (params?.isOnly && params?.id) {
if (params?.isOnly === "true") {
this.isOnly = true;
this.id = params?.id;
}
}
console.log("params", params);
this.unbindingInstrumentInfoList();
}
componentDidHide() {} componentDidHide() {}
@ -79,24 +107,9 @@ export default class Instrument extends Component<any, any> {
onSerial = (event) => { onSerial = (event) => {
const { value } = event.detail; const { value } = event.detail;
let { channelInfo } = this.state; this.setState({ serialCodeValue: value });
channelInfo.serialCode = value;
this.setState({ channelInfo });
}; };
// onScanCode() {
// Taro.scanCode({
// scanType: ["qrCode"],
// success: (res) => {
// let { channelInfo } = this.state;
// channelInfo.serialCode = res.result;
// this.setState({ channelInfo });
// },
// });
// }
onTipShow = () => { onTipShow = () => {
this.setState({ tipShow: true }); this.setState({ tipShow: true });
}; };
@ -140,88 +153,6 @@ export default class Instrument extends Component<any, any> {
}); });
}; };
// getBindCodeInfo = async () => {
// const { bindCode, instrumentList, channelInfo } = this.state;
// // // 1.查询资料
// // try {
// // const { data } = await InstrumentCodeCheck({
// // code: bindCode,
// // });
// // const bindCodeInfo = { ...data.data.bindCodeInfo };
// // // 2.判断是否是选中的仪器, 如果不是, 直接弹出scanErrorPopup
// // if (channelInfo.id != bindCodeInfo.instrument_id) {
// // this.setState({
// // bindPopup: "scanErrorPopup",
// // });
// // return;
// // }
// // const match = instrumentList.find((item) => {
// // if (item.id == bindCodeInfo.instrument_id && item.serial) {
// // // 找到同一个仪器
// // bindCodeInfo.hadBindSame = true;
// // if (item.serial == bindCodeInfo.antifakeCode) {
// // // 找到同一个序列号
// // bindCodeInfo.hadBindSameCode = true;
// // } else {
// // bindCodeInfo.hadBindSameCode = false;
// // }
// // return item;
// // }
// // if (item.id == bindCodeInfo.instrument_id) {
// // const { channelInfo } = this.state;
// // if (channelInfo.id === item.id) return;
// // this.setState({
// // channelInfo: item,
// // isVideo: isVideo(item.bind_intro_video),
// // });
// // }
// // });
// // if (match) {
// // bindCodeInfo.hadBind = true;
// // } else {
// // bindCodeInfo.hadBindSame = false;
// // }
// // this.setState({
// // bindCodeInfo,
// // });
// // this.judgeBindCode();
// // } catch (e) {
// // this.judgeBindCode();
// // }
// };
// judgeBindCode = () => {
// const { bindCode, bindCodeInfo } = this.state;
// const opts: any = {};
// if (bindCode && !bindCodeInfo) {
// // 有仪器码, 但是没有找到信息时
// opts.bindPopup = "noFoundPopup";
// } else if (bindCode && bindCodeInfo && bindCodeInfo.isLabelCode) {
// opts.bindPopup = "labelPopup";
// } else if (
// bindCode &&
// bindCodeInfo.hadBindSame &&
// bindCodeInfo.hadBindSameCode
// ) {
// // 有仪器码, 如果有登录, 判断是绑定了同样的仪器和仪器的序列号是一致 -- 不弹弹窗, 回到首页
// opts.bindCode = ""; // 重置bindCode
// opts.bindPopup = ""; // 隐藏bindPopup
// } else if (
// bindCode &&
// bindCodeInfo.hadBindSame &&
// !bindCodeInfo.hadBindSameCode
// ) {
// // 有仪器码, 如果有登录, 判断是绑定了同样的仪器, 但仪器的序列号不一致 -- 判断换绑
// opts.bindPopup = "switchBindCodePopup";
// } else if (bindCode && !bindCodeInfo.hadBindSame) {
// // 有仪器码, 如果有登录, 判断不是绑定了同样的仪器 -- 绑定
// opts.bindPopup = "toBindPopup";
// }
// if (Object.keys(opts).length) {
// this.setState(opts);
// }
// };
onCustomerTap = () => { onCustomerTap = () => {
this.onCancelBind2Tap(); this.onCancelBind2Tap();
go("/pages/consultant/consultant"); go("/pages/consultant/consultant");
@ -247,16 +178,20 @@ export default class Instrument extends Component<any, any> {
let compressImage = await contraction(img, "compressImage"); let compressImage = await contraction(img, "compressImage");
// 压缩后文件地址 // 压缩后文件地址
let compressTempFilePath = compressImage.tempFilePath; let compressTempFilePath = compressImage.tempFilePath;
setTimeout(() => {
let { channelInfo } = this.state; let { channelInfo } = this.state;
channelInfo.serialImage = compressTempFilePath; channelInfo.serialImage = compressTempFilePath;
this.setState({ channelInfo }); this.setState({ channelInfo });
});
}, },
}); });
}; };
onSubmit = () => { onSubmit = () => {
const { serialCode, serialImage, id } = this.state.channelInfo; const { serialImage } = this.state.channelInfo;
if (!serialCode?.trim()) return msg("请填写序列号");
if (!this.state.serialCodeValue?.trim()) return msg("请填写序列号");
if (!serialImage) return msg("请上传序列号照片"); if (!serialImage) return msg("请上传序列号照片");
this.manualCodeBinding(); this.manualCodeBinding();
}; };
@ -265,15 +200,21 @@ export default class Instrument extends Component<any, any> {
const { channelInfo } = this.state; const { channelInfo } = this.state;
if (channelInfo.id === item.id) return; if (channelInfo.id === item.id) return;
channelInfo.serialCode = ""; channelInfo.serialCode = "";
channelInfo.manualCodeBinding = "";
channelInfo.scanCodeBinding = "";
this.setState({ this.setState({
channelInfo: item, channelInfo: channelInfo,
isVideo: this.isVideo(item.banner), isVideo: this.isVideo(item.banner),
serialCodeValue: "",
}); });
}
public back = () => { setTimeout(() => {
back(); this.setState({
}; channelInfo: item,
});
}, 10);
}
closeDev = () => { closeDev = () => {
// go("/pages/user/user"); // go("/pages/user/user");
@ -297,18 +238,35 @@ export default class Instrument extends Component<any, any> {
let { data } = await InstrumentInfo.unbindingInstrumentInfoList(); let { data } = await InstrumentInfo.unbindingInstrumentInfoList();
if (data.code === 200) { if (data.code === 200) {
if (data.data.length) { if (data.data.length) {
let item = data.data[0]; if (!this.isOnly) {
let equipmentList = data.data.filter((item) => item.status === 0);
if (equipmentList.length === 0) {
return;
}
let item = equipmentList[0];
item.serialCode = "";
this.setState({
equipmentList: equipmentList,
channelInfo: item,
isVideo: this.isVideo(item.banner),
});
} else {
let item = data.data.find((item) => String(item.id) === this.id);
if (item) {
item.serialCode = ""; item.serialCode = "";
this.setState({ this.setState({
equipmentList: data.data, equipmentList: [item],
channelInfo: item, channelInfo: item,
isVideo: this.isVideo(item.banner), isVideo: this.isVideo(item.banner),
}); });
} }
} }
}
}
}; };
// 绑定仪器 // 手写绑定仪器
manualCodeBinding = async () => { manualCodeBinding = async () => {
Taro.showLoading({ Taro.showLoading({
title: "请求中...", title: "请求中...",
@ -317,14 +275,14 @@ export default class Instrument extends Component<any, any> {
let { channelInfo } = this.state; let { channelInfo } = this.state;
let res = await InstrumentInfo.manualCodeBinding({ let res = await InstrumentInfo.manualCodeBinding({
serial: channelInfo.serialCode, serial: this.state.serialCodeValue,
serialImage: channelInfo.serialImage, serialImage: channelInfo.serialImage,
instrumentId: channelInfo.id, instrumentId: channelInfo.id,
}); });
console.log("bindingInstrument", res);
Taro.hideLoading(); Taro.hideLoading();
// 文件上传接口返回格式不需要加data
if (res.code === 200) { if (res.code === 200) {
this.binding(); this.openBindingVisible();
} else if (res.code === 204) { } else if (res.code === 204) {
this.setState({ isBindingCheckError: false }); this.setState({ isBindingCheckError: false });
} else { } else {
@ -343,7 +301,8 @@ export default class Instrument extends Component<any, any> {
}); });
Taro.hideLoading(); Taro.hideLoading();
if (res.data.code === 200) { if (res.data.code === 200) {
this.binding(); // this.bindingInstrument();
this.openBindingVisible();
} else if (res.data.code === 204) { } else if (res.data.code === 204) {
this.setState({ isBindingCheckError: true }); this.setState({ isBindingCheckError: true });
} else { } else {
@ -351,7 +310,8 @@ export default class Instrument extends Component<any, any> {
} }
}; };
binding = async () => { // 调用绑定接口
bindingInstrument = async () => {
Taro.showLoading({ Taro.showLoading({
title: "请求中...", title: "请求中...",
mask: true, mask: true,
@ -373,6 +333,24 @@ export default class Instrument extends Component<any, any> {
this.setState({ isBindingError: true }); this.setState({ isBindingError: true });
} }
}; };
// 换绑仪器
exchangeBinding = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let { channelInfo } = this.state;
let { data } = await InstrumentInfo.exchangeBinding({
serial: channelInfo.serialCode,
});
console.log("exchangeBinding", data);
Taro.hideLoading();
this.closeBinding();
if (data.code === 200) {
msg("换绑成功");
}
};
onBindErrorClose = () => { onBindErrorClose = () => {
this.setState({ isBindingError: false }); this.setState({ isBindingError: false });
}; };
@ -385,6 +363,29 @@ export default class Instrument extends Component<any, any> {
this.setState({ isBindingCheckError: false }); this.setState({ isBindingCheckError: false });
}; };
customBack = () => {
Taro.switchTab({ url: "/pages/index/index" });
};
// 打开绑定弹窗
openBindingVisible = () => {
this.setState({ isVisibleBinding: true });
};
closeBinding = () => {
this.setState({ isVisibleBinding: false });
};
confirmBinding = () => {
let { isExchangeBinding } = this.state;
if (!isExchangeBinding) {
// 绑定仪器
this.bindingInstrument();
} else {
// 换绑仪器
this.exchangeBinding();
}
};
render() { render() {
let { let {
isBindingError, isBindingError,
@ -393,6 +394,10 @@ export default class Instrument extends Component<any, any> {
inputType, inputType,
style, style,
equipmentList, equipmentList,
isVisibleBinding,
isRegisterBoolean,
isExchangeBinding,
serialCodeValue,
} = this.state; } = this.state;
return ( return (
<Block> <Block>
@ -406,16 +411,30 @@ export default class Instrument extends Component<any, any> {
close={this.closeDev} close={this.closeDev}
confirm={this.closeDev} confirm={this.closeDev}
/> */} /> */}
<Navbar titleSlot="仪器绑定" isBack={true} /> <Navbar
titleSlot="仪器绑定"
isBack
isCustomBack
customBack={this.customBack}
/>
<PopupBinding
type={channelInfo.bindingStatus}
isShow={isVisibleBinding}
isRegisterBoolean={isRegisterBoolean}
isExchangeBinding={isExchangeBinding}
data={channelInfo}
close={this.closeBinding}
confirm={this.confirmBinding}
/>
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title="提示" title="提示"
content="序列号库仍在更新,请联系微信助手" content="序列号库仍在更新,请联系微信助手"
confirmButtonText="知道了" confirmButtonText="知道了"
textAlgin="center" textAlgin="center"
isClose={false}
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorClose} confirm={this.onBindErrorConfirm}
></PopupAlert> ></PopupAlert>
<PopupAlert <PopupAlert
isShow={isBindingCheckError} isShow={isBindingCheckError}
@ -423,7 +442,6 @@ export default class Instrument extends Component<any, any> {
content="您选择的仪器有误,请重新选择确认" content="您选择的仪器有误,请重新选择确认"
confirmButtonText="知道了" confirmButtonText="知道了"
textAlgin="center" textAlgin="center"
isClose={false}
close={this.onBindCheckErrorClose} close={this.onBindCheckErrorClose}
confirm={this.onBindCheckErrorClose} confirm={this.onBindCheckErrorClose}
></PopupAlert> ></PopupAlert>
@ -482,7 +500,8 @@ export default class Instrument extends Component<any, any> {
style="width: 100%; white-space: nowrap;" style="width: 100%; white-space: nowrap;"
scrollIntoView={"scroll" + channelInfo.id} scrollIntoView={"scroll" + channelInfo.id}
> >
{equipmentList.map((item, index) => { {equipmentList.length > 0 &&
equipmentList.map((item, index) => {
return ( return (
<View <View
className={classnames("cover", { className={classnames("cover", {
@ -502,6 +521,14 @@ export default class Instrument extends Component<any, any> {
</View> </View>
); );
})} })}
{equipmentList.length === 0 && (
<Block>
<View>
<NoDataComponent />
</View>
</Block>
)}
</ScrollView> </ScrollView>
</View> </View>
<View className="form_item is-tab"> <View className="form_item is-tab">
@ -556,7 +583,7 @@ export default class Instrument extends Component<any, any> {
placeholder="例如FR10*********1" placeholder="例如FR10*********1"
placeholder-style={style} placeholder-style={style}
onInput={this.onSerial} onInput={this.onSerial}
value={channelInfo.serialCode} value={serialCodeValue}
></Input> ></Input>
</View> </View>
</View> </View>

@ -12,12 +12,12 @@ import {
} from "@tarojs/components"; } from "@tarojs/components";
/* 自定义组件 */ /* 自定义组件 */
import Navbar from "../../components/navbar/navbar"; import Navbar from "@/components/navbar/navbar";
// import PopupAlert from "../../components/popup/popup-alert"; // import PopupAlert from "../../components/popup/popup-alert";
/* 组件 */ /* 组件 */
import { InstrumentInfo } from "../../utils/Interface"; import { InstrumentInfo } from "@/utils/Interface";
import { setStorageSync, getStorageSync, go } from "../../utils/traoAPI"; import { setStorageSync, getStorageSync, go, back } from "@/utils/traoAPI";
import "./intro.less"; import "./intro.less";
@ -25,28 +25,28 @@ class Intro extends Component<any, any> {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
name: "template模板页", name: "仪器介绍页",
current: 0, current: 0,
instrument: {}, instrument: {},
introList: [], introList: [],
isNursing: false,
}; };
} }
$instance = Taro.getCurrentInstance();
async onLoad() {} async onLoad() {}
componentDidMount() {} componentDidMount() {
let strObj = getStorageSync("instrument_detail");
if (strObj) {
let instrument = strObj;
this.getInstrumentInfo(instrument.id);
this.setState({ instrument });
}
}
componentWillMount() { componentWillMount() {
// let params = Taro.Current?.router?.params; // let params = Taro.Current?.router?.params;
// if (params) { // if (params) {
// this.getInstrumentInfo(params.id); // this.getInstrumentInfo(params.id);
// } // }
let strObj = getStorageSync("instrument_item");
if (strObj) {
let instrument = JSON.parse(strObj);
this.getInstrumentInfo(instrument.id);
this.setState({ instrument });
}
} }
componentWillUnmount() {} componentWillUnmount() {}
@ -63,41 +63,53 @@ class Intro extends Component<any, any> {
} }
// 获取设备信息 // 获取设备信息
async getInstrumentInfo(id) { getInstrumentInfo = async (id) => {
let res = await InstrumentInfo.instructionInfo({ let res = await InstrumentInfo.instructionInfo({
instrumentId: id, instrumentId: id,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ introList: res.data.data }); this.setState({ introList: res.data.data });
} }
} };
toNursing() { /** 跳转至打卡页或护理页 */
// if (this.state.info.iot === 2) { toNursing = () => {
// this.setState({ isNursing: true }, () => { const { instrument } = this.state;
// this.toHomePage(); console.log("instrument", instrument);
// });
// } else { if (instrument.type === 1) {
// go("/pages/clock_in2/clock_in2?iid=" + this.state.info.id); go("/pages/instrumentClickinUpload/index");
// } } else {
go("/pages/iotCarePlan/iotCarePlan");
} }
};
toHomePage() { toHomePage = () => {
// const { isNursing, info } = this.state;
// if (isNursing) {
// setStorageSync("introduceId", info.id);
// }
const url = "/pages/index/index"; const url = "/pages/index/index";
Taro.switchTab({ Taro.switchTab({
url, url,
}); });
};
customBack = () => {
let customBack = this.$instance.router?.params?.customBack;
if (customBack) {
Taro.switchTab({ url: "/pages/index/index" });
return;
} }
back();
};
render() { render() {
let { current, introList, instrument } = this.state; let { current, introList, instrument } = this.state;
return ( return (
<Block> <Block>
<Navbar titleSlot="仪器绑定" isBack={true} /> <Navbar
titleSlot="仪器绑定"
isBack
isCustomBack
customBack={this.customBack}
/>
<View style="position: relative"> <View style="position: relative">
<Swiper <Swiper
className="main" className="main"

@ -216,7 +216,8 @@ page {
.block1_1 { .block1_1 {
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
width: 134rpx; // width: 134rpx;
min-width: 80rpx;
.icon { .icon {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;

@ -82,30 +82,29 @@ export default class InstrumentClickInUpload extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
let objStr = getStorageSync("instrument_detail"); let obj = getStorageSync("instrument_detail");
if (objStr) { if (obj) {
let instrumentDetail = JSON.parse(objStr); this.setState({ instrumentDetail: obj });
this.setState({ instrumentDetail });
} }
const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id");
setTimeout(() => { setTimeout(() => {
this.firstNurseInfo(); this.firstNurseInfo();
this.getLatestClockRecord(); this.getLatestClockRecord();
this.modeInfoList(id); this.modeInfoList(this.state.instrumentDetail.id);
}, 10); }, 10);
} }
// 打卡介绍 // 首次护理弹窗
firstNurseInfo = async () => { firstNurseInfo = async () => {
let { instrumentDetail } = this.state; let { instrumentDetail } = this.state;
let res = await InstrumentInfo.firstNurseInfo({ let res = await InstrumentInfo.firstNurseInfo({
instrumentId: instrumentDetail.id, instrumentId: instrumentDetail.id,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
let isTipShow = getStorageSync("first_instrument_" + instrumentDetail.id); // 仅在有数据的时候执行
if (res.data.length) {
let isTipShow = getStorageSync(
"first_instrument_" + instrumentDetail.id
);
if (!isTipShow) { if (!isTipShow) {
// 首次进入页面:自动打开打卡介绍弹窗 // 首次进入页面:自动打开打卡介绍弹窗
this.setState({ nurseInfo: res.data.data, isTipShow: true }); this.setState({ nurseInfo: res.data.data, isTipShow: true });
@ -113,21 +112,24 @@ export default class InstrumentClickInUpload extends Component<any, any> {
this.setState({ nurseInfo: res.data.data }); this.setState({ nurseInfo: res.data.data });
} }
} }
}
}; };
// 获取最新一条打卡记录 // 获取最新一条打卡记录
getLatestClockRecord = async () => { getLatestClockRecord = async () => {
let { punchInInfo } = this.state; let { punchInInfo } = this.state;
let res = await InstrumentInfo.apiClock.getLatestClockRecord(); let res = await InstrumentInfo.apiClock.getLatestClockRecord();
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.data) {
punchInInfo.clockContent = res.data.data.clockContent; punchInInfo.clockContent = res.data.data.clockContent;
punchInInfo.clockImageList = res.data.data.clockImg; punchInInfo.clockImageList = res.data.data.clockImg;
} }
}
this.setState({ punchInInfo }); this.setState({ punchInInfo });
}; };
// 获取仪器模式列表 // 获取仪器模式列表
modeInfoList = async (id) => { modeInfoList = async (id) => {
let res = await InstrumentInfo.modeInfoList({ let res = await InstrumentInfo.modeInfoList({
instrumentId: "84", instrumentId: id,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.data.length) { if (res.data.data.length) {
@ -267,7 +269,11 @@ export default class InstrumentClickInUpload extends Component<any, any> {
}; };
onTipShowOpen = async () => { onTipShowOpen = async () => {
if (this.state.nurseInfo.length) {
this.setState({ isTipShow: true }); this.setState({ isTipShow: true });
} else {
msg("暂无数据");
}
}; };
onTipShowClose = async () => { onTipShowClose = async () => {
setStorageSync( setStorageSync(
@ -386,10 +392,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
}} }}
> >
<View className="block1"> <View className="block1">
<View <View className="block1_1 flex aitems ">
className="block1_1 flex aitems "
style="min-width: 80rpx"
>
<View className="tip1">{item.modeName}</View> <View className="tip1">{item.modeName}</View>
<View className="tip2">{item.modeDesc}</View> <View className="tip2">{item.modeDesc}</View>

@ -33,10 +33,9 @@ export default class InstrumentDetail extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
let objStr = getStorageSync("instrument_detail"); let obj = getStorageSync("instrument_detail");
if (objStr) { if (obj) {
let info = JSON.parse(objStr); this.bindingInstrumentInfo(obj.id);
this.bindingInstrumentInfo(info.id);
} }
} }

@ -87,39 +87,46 @@ export default class InstrumentManage extends Component<any, any> {
} }
}; };
goIntro(item) { goIntro = (item) => {
console.log("item", item);
setStorageSync("instrument_detail", item);
let bindid = item.id; let bindid = item.id;
go("/pages/introduce/introduce?id=" + bindid); go("/pages/instrument/intro?id=" + bindid);
} };
goBind(item) { goBind = (item) => {
let bindid = item.id; let bindid = item.id;
go("/pages/instrument/instrument?id=" + bindid); go("/pages/instrument/instrument?isOnly=true&id=" + bindid); // 只显示当前仪器内容
} };
goBindInfo(item) { goBindInfo = (item) => {
// let bindid = item.id; // let bindid = item.id;
setStorageSync("instrument_detail", JSON.stringify(item)); setStorageSync("instrument_detail", item);
go("/pages/instrument_detail/index"); go("/pages/instrument_detail/index");
} };
async lesgobuy(item) { lesgobuy = (item) => {
console.log(item); console.log(item);
// if (item.programs_json) { if (item.isPurchase === 1) {
// item.programs_json = JSON.parse(item.programs_json); if (item.programs_json) {
// // console.log(item.programs_json) item.programs_json = JSON.parse(item.programs_json);
// Taro.navigateToMiniProgram({ // console.log(item.programs_json)
// appId: item.programs_json.buylink, Taro.navigateToMiniProgram({
// path: item.programs_json.buypath, appId: item.programs_json.buylink,
// envVersion: "release", path: item.programs_json.buypath,
// success(res) { envVersion: "release",
// // 打开成功 success(res) {
// }, // 打开成功
// fail() {}, },
// }); fail() {},
// } else { });
// msg("暂无购买链接"); } else {
// } msg("暂无购买链接");
}
} else {
msg("暂无购买链接");
} }
};
render() { render() {
let { bindList, unBindList, current } = this.state; let { bindList, unBindList, current } = this.state;
@ -127,10 +134,11 @@ export default class InstrumentManage extends Component<any, any> {
<Block> <Block>
<Navbar titleSlot="设备管理" background="#fff" isBack={true} /> <Navbar titleSlot="设备管理" background="#fff" isBack={true} />
<View className="instrument_box"> <View className="instrument_box">
{bindList.length > 0 && {bindList.length > 0 && (
<Block> <Block>
<View className="title"></View> <View className="title"></View>
<View className="scroll"> <View className="scroll">
{bindList.length > 0 && (
<Swiper <Swiper
className="bind_list" className="bind_list"
current={current} current={current}
@ -145,46 +153,10 @@ export default class InstrumentManage extends Component<any, any> {
return ( return (
<SwiperItem key={index}> <SwiperItem key={index}>
<View className="wrapper" key={"bind_" + index}> <View className="wrapper" key={"bind_" + index}>
<View className="cover" onClick={this.goIntro}>
<Image
className="Image"
src={item.banner}
mode="aspectFill"
></Image>
<View className="bind_status"></View>
<View className="intro">
<View className="tips" onClick={this.goIntro}>
</View>
<View className="right">
<Image
src={require("../../img/index/right.png")}
mode="widthFix"
style="height: 20rpx;"
/>
</View>
</View>
</View>
<View className="bind_cont">
<View className="title">{item.name}</View>
<View <View
className="bindinfo" className="cover"
onClick={this.goBindInfo.bind(this, item)} onClick={this.goIntro.bind(this, item)}
> >
</View>
</View>
</View>
</SwiperItem>
);
})}
</Swiper>
{/* <ScrollView scroll-x="true" className="bind_list">
{bindList.map((item, index) => {
if (item.status === 0) {
return (
<View className="wrapper" key={"bind_" + index}>
<View className="cover" onClick={this.goIntro}>
<Image <Image
className="Image" className="Image"
src={item.banner} src={item.banner}
@ -192,7 +164,10 @@ export default class InstrumentManage extends Component<any, any> {
></Image> ></Image>
<View className="bind_status"></View> <View className="bind_status"></View>
<View className="intro"> <View className="intro">
<View className="tips" onClick={this.goIntro}> <View
className="tips"
onClick={this.goIntro.bind(this, item)}
>
</View> </View>
<View className="right"> <View className="right">
@ -214,13 +189,18 @@ export default class InstrumentManage extends Component<any, any> {
</View> </View>
</View> </View>
</View> </View>
</SwiperItem>
); );
}
})} })}
</ScrollView> */} </Swiper>
)}
</View> </View>
</Block> </Block>
} )}
{/* 当且仅当未绑定仪器存在时显示 */}
{unBindList.length > 0 && (
<Block>
<View className="title"></View> <View className="title"></View>
<View className="scroll"> <View className="scroll">
<ScrollView scroll-x="true" className="un_bind_list"> <ScrollView scroll-x="true" className="un_bind_list">
@ -228,16 +208,15 @@ export default class InstrumentManage extends Component<any, any> {
if (item.status === 0) { if (item.status === 0) {
return ( return (
<View className="wrapper" key={index}> <View className="wrapper" key={index}>
<View <View className="cover">
className="cover"
onClick={this.lesgobuy.bind(this, item)}
>
<Image <Image
className="image" className="image"
src={item.banner} src={item.banner}
mode="aspectFill" mode="aspectFill"
></Image> ></Image>
<View className="name">{item.name}</View> <View className="name">{item.name}</View>
{item.isPurchase === 1 && (
<View <View
className="buy" className="buy"
onClick={this.lesgobuy.bind(this, item)} onClick={this.lesgobuy.bind(this, item)}
@ -251,6 +230,7 @@ export default class InstrumentManage extends Component<any, any> {
/> />
</View> </View>
</View> </View>
)}
</View> </View>
<View className="bind_cont"> <View className="bind_cont">
<View <View
@ -266,6 +246,8 @@ export default class InstrumentManage extends Component<any, any> {
})} })}
</ScrollView> </ScrollView>
</View> </View>
</Block>
)}
</View> </View>
</Block> </Block>
); );

@ -0,0 +1,62 @@
.box {
width: 690rpx;
height: 320rpx;
margin: 28rpx auto;
background-color: #fff;
border-radius: 30rpx;
padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box;
position: relative;
}
.box_background {
position: absolute;
top: 0;
left: 0;
width: 690rpx;
height: 320rpx;
border-radius: 30rpx;
background-color: #fff;
.power {
margin: 34rpx 0 28rpx 28rpx;
font-family: PingFang-SC;
font-weight: 500;
font-size: 18rpx;
color: #cccccc;
}
.full{
width: 24rpx;
height: 24rpx;
position: absolute;
top: 32rpx;
right: 26rpx;
}
.line {
margin: 0 0 6rpx 35rpx;
font-family: PingFang-SC;
font-size: 14rpx;
color: #cccccc;
display: flex;
position: relative;
height: 18rpx;
.bottom_line {
border-bottom: 1rpx #ccc dashed;
width: 550rpx;
margin-left: 20rpx;
position: absolute;
bottom: -6rpx;
right: 74rpx;
height: 4rpx;
color: #fff;
}
}
.time {
position: absolute;
bottom: 22rpx;
right: 24rpx;
font-family: PingFang-SC;
font-size: 18rpx;
color: #cccccc;
}
}

@ -0,0 +1,284 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text } from "@tarojs/components";
import { useRef } from 'react'
import Echarts, { EChartOption, EchartsHandle } from 'taro-react-echarts'
import echarts from '@/utils/echarts.min.js'
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const echartsRef = useRef<EchartsHandle>(null)
const option: EChartOption = {
grid: { // 让图表占满容器
top: "28rpx",
left: "18rpx",
right: "28rpx",
bottom: "17rpx"
},
xAxis: {
// name: '',
// nameGap: 5,
// nameTextStyle: {
// color: '#e4e4e4',
// fontSize:7
// },
type: 'category',
axisLine: {
//坐标轴轴线相关设置。数学上的x轴
show: true,
lineStyle: {
color: '#cccccc'
}
},
axisLabel: {
//坐标轴刻度标签的相关设置
color: '#cccccc',
fontSize: 8
},
axisTick: {
show: false
},
data: [
'00:01',
'00:02',
'00:03',
'00:04',
'00:05',
'00:06',
'00:07',
'00:08',
'00:09',
'00:10'
]
},
yAxis: {
type: 'value',
min: 0,
max: 8,
splitNumber: 8,
splitLine: {
show: false,
lineStyle: {
color: '#cccccc',
type: [4, 2],
dashOffset: 4
}
},
axisLine: {
show: false
},
axisLabel: {
show: false
},
axisTick: {
show: false
}
},
visualMap: {
z: 1,
top: 0,
right: 0,
seriesIndex: 0,
show: false,
pieces: [
{
gt: 0,
lte: 1,
color: '#fff8c9'
},
{
gt: 1,
lte: 2,
color: '#fff0c6'
},
{
gt: 2,
lte: 3,
color: '#ffe5c3'
},
{
gt: 3,
lte: 4,
color: '#ffdbbf'
},
{
gt: 4,
lte: 5,
color: '#ffcfbb'
},
{
gt: 5,
lte: 6,
color: '#ffbab5'
},
{
gt: 6,
lte: 7,
color: '#ffb4b3'
},
{
gt: 7,
lte: 8,
color: '#ffb4b3'
}
],
outOfRange: {
color: '#ff8410'
}
},
series: [
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: 'line',
smooth: true,
z: 1,
areaStyle: {},
color: 'red'
},
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: 'line',
smooth: true,
symbolSize: 5,
lineStyle: {
color: '#ff8410',
width: 1
},
itemStyle: {
color: '#ff8410'
}
},
{
name: 'a',
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
barWidth: 12,
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ffcf56'
}
},
{
name: 'b',
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#febb22'
}
},
{
name: 'c',
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ffac28'
}
},
{
name: 'd',
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ff8410'
}
},
{
name: 'e',
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#f85804'
}
},
{
name: 'f',
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#e02e14'
}
},
{
name: 'h',
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#b30016'
}
},
{
name: 'i',
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#750010'
}
}
]
}
const level = [8, 7, 6, 5, 4, 3, 2]
return (
<View className='box' >
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// 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>
{
level.map(item => (
<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>
<View className='time'></View>
</View>
</View>
);
}
export default Index;

@ -91,15 +91,7 @@ function Index({
<View className="v2 battery_icon"></View> <View className="v2 battery_icon"></View>
</Block> </Block>
)} )}
{Electricity === 1 && ( {Electricity <= 1 && (
<Block>
<View className="v1 battery_icon"></View>
<View className="v2 battery_icon"></View>
<View className="v2 battery_icon"></View>
<View className="v2 battery_icon"></View>
</Block>
)}
{Electricity === 0 && (
<Block> <Block>
<View className="v3 battery_icon"></View> <View className="v3 battery_icon"></View>
<View className="v2 battery_icon"></View> <View className="v2 battery_icon"></View>

@ -0,0 +1,76 @@
.iot-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;
}
.btn-disable {
color: #fff !important; /* 设置按钮文字颜色为白色 */
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
background-color: #fff !important; /* 设置按钮背景颜色为灰色 */
.btn-text {
color: #ccc !important; /* 设置按钮文字颜色为白色 */
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
background-color: #fff !important; /* 设置按钮背景颜色为灰色 */
}
}
}
}

@ -5,44 +5,52 @@ import { useState, useEffect } from "react";
import "./index.less"; import "./index.less";
interface Props { interface Props {
isCanClick: boolean;
isShowNurse: boolean; isShowNurse: boolean;
isStopNurse: boolean; isStopNurse: boolean;
isDisabled: boolean; // 是否禁用开始暂停按钮:模式与连接设备是否一致
onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件 onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件
onEmitSwitchChange: Function; onEmitSwitchChange: Function;
onEmitEndPlan: Function; onEmitEndPlan: Function;
onEmitErrorTips: Function; // 不可点击,提示错误
} }
function Index({ function Index({
isCanClick,
isShowNurse, isShowNurse,
isStopNurse, isStopNurse,
isDisabled,
onEmitStartNurse, onEmitStartNurse,
onEmitSwitchChange, onEmitSwitchChange,
onEmitEndPlan, onEmitEndPlan,
onEmitErrorTips,
}: Props) { }: Props) {
const onStartNurse = () => { const onStartNurse = () => {
onEmitStartNurse(); onEmitStartNurse();
}; };
const onSwitchChange = () => { const onSwitchChange = () => {
if (!isDisabled) {
onEmitSwitchChange(); onEmitSwitchChange();
}
}; };
const onEndPlan = () => { const onEndPlan = () => {
onEmitEndPlan(); onEmitEndPlan();
}; };
const onErrorTips = () => {
onEmitErrorTips();
};
return ( return (
<Block> <Block>
<View className="footer"> <View className="iot-footer">
{!isShowNurse && ( {!isShowNurse && (
<Block> <Block>
{isCanClick ? ( {isDisabled ? (
<View className="btn" onClick={onStartNurse}> <View className="btn btn-disable" onClick={onStartNurse}>
</View> </View>
) : ( ) : (
<View className="btn btn-disable" onClick={onStartNurse}> <View className="btn" onClick={onStartNurse}>
</View> </View>
)} )}
@ -50,6 +58,7 @@ function Index({
)} )}
{isShowNurse && ( {isShowNurse && (
<View className="switch-btn-box"> <View className="switch-btn-box">
{!isDisabled && (
<View className="btn-item border-right" onClick={onSwitchChange}> <View className="btn-item border-right" onClick={onSwitchChange}>
{isStopNurse ? ( {isStopNurse ? (
<Block> <Block>
@ -58,7 +67,7 @@ function Index({
src={require("../../../../img/iot/start_nurse.png")} src={require("../../../../img/iot/start_nurse.png")}
mode="aspectFill" mode="aspectFill"
/> />
<Text className="btn-text"></Text> <Text className="btn-text"></Text>
</Block> </Block>
) : ( ) : (
<Block> <Block>
@ -71,6 +80,39 @@ function Index({
</Block> </Block>
)} )}
</View> </View>
)}
{isDisabled && (
<View
className="btn-item border-right btn-disable"
onClick={onErrorTips}
>
{isStopNurse ? (
<Block>
<Image
className="btn-icon"
style="color: #ccc"
src={require("../../../../img/iot/start_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
</Text>
</Block>
) : (
<Block>
<Image
className="btn-icon"
style="color: #ccc"
src={require("../../../../img/iot/pause_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
</Text>
</Block>
)}
</View>
)}
<View className="btn-item" onClick={onEndPlan}> <View className="btn-item" onClick={onEndPlan}>
<Image <Image

@ -9,7 +9,6 @@ interface Props {
activeModeID: any; activeModeID: any;
ModeList: any; ModeList: any;
ModeType: string; // all visor cabin yimeish ModeType: string; // all visor cabin yimeish
ActiveModeItem: any;
isShowNurse: boolean; // 是否已进入护理详情页 isShowNurse: boolean; // 是否已进入护理详情页
isPop: boolean; // 是否弹窗 isPop: boolean; // 是否弹窗
onEmit: Function; // 每次点击item回调事件和数据给父组件 onEmit: Function; // 每次点击item回调事件和数据给父组件
@ -20,7 +19,6 @@ function Index({
isPop, isPop,
ModeList, ModeList,
ModeType, ModeType,
ActiveModeItem,
ModeID, ModeID,
activeModeID, activeModeID,
onEmit, onEmit,
@ -30,9 +28,7 @@ function Index({
let CabinList = ModeList.filter((item) => item.modeClass === 2); // 舱体模式 let CabinList = ModeList.filter((item) => item.modeClass === 2); // 舱体模式
let YimeishList = ModeList.filter((item) => item.modeClass === 3); // 医美术后 let YimeishList = ModeList.filter((item) => item.modeClass === 3); // 医美术后
// const [ModeID, setModeID] = useState<any>("mode_" + ActiveModeItem.id); console.log("ModeType", ModeType);
// const [activeModeID, setactiveModeID] = useState<any>(ActiveModeItem.id);
const yimeishClick = (item) => { const yimeishClick = (item) => {
onEmit(item); onEmit(item);
}; };
@ -105,7 +101,11 @@ function Index({
{activeModeID === item.id && ( {activeModeID === item.id && (
<View className="mode-pic"> <View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" /> <Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View> </View>
)} )}
</View> </View>
@ -159,7 +159,11 @@ function Index({
{activeModeID === item.id && ( {activeModeID === item.id && (
<View className="mode-pic"> <View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" /> <Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View> </View>
)} )}
</View> </View>
@ -213,7 +217,11 @@ function Index({
{activeModeID === item.id && ( {activeModeID === item.id && (
<View className="mode-pic"> <View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" /> <Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View> </View>
)} )}
</View> </View>

@ -32,6 +32,7 @@
width: 690rpx; width: 690rpx;
height: 640rpx; height: 640rpx;
border-radius: 30rpx; border-radius: 30rpx;
animation-iteration-count: 1; // gif只播放一次
} }
.iot-device { .iot-device {
width: 690rpx; width: 690rpx;
@ -74,10 +75,10 @@
} }
.msg-tips { .msg-tips {
position: absolute; position: absolute;
top: 50%; top: 40%;
left: 0; left: 0;
right: 0; right: 0;
transform: translateY(-50%); transform: translateY(-40%);
display: flex; display: flex;
align-items: center; align-items: center;
max-width: 635rpx; max-width: 635rpx;
@ -86,6 +87,7 @@
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
box-sizing: border-box; box-sizing: border-box;
border-radius: 30rpx; border-radius: 30rpx;
z-index: 10100 !important; // 提升层级,防止被其他元素遮挡
.msg-tips-img { .msg-tips-img {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
@ -119,73 +121,6 @@
} }
} }
.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 { .battery_icon {
width: 8rpx; width: 8rpx;
height: 20rpx; height: 20rpx;
@ -206,3 +141,8 @@
.v3 { .v3 {
background: linear-gradient(0deg, #ff4646, #ff6b6b, #f86f6f, #ff9494); background: linear-gradient(0deg, #ff4646, #ff6b6b, #f86f6f, #ff9494);
} }
#chart {
width: 690rpx;
height: 320rpx;
}

File diff suppressed because it is too large Load Diff

@ -104,7 +104,7 @@ export default class Recording extends Component<any, any> {
let res = await InstrumentInfo.apiClock.getLatestClockRecord(); let res = await InstrumentInfo.apiClock.getLatestClockRecord();
if (res.data.code === 200) { if (res.data.code === 200) {
if (!res.data.data) { if (!res.data.data) {
this.setShow(true); // this.setShow(true);
} else { } else {
let punchInInfo = { let punchInInfo = {
clockImageList: res.data.data.clockImg, clockImageList: res.data.data.clockImg,

@ -55,7 +55,9 @@ class Register extends Component<any, any> {
url: "/pages/index/index", url: "/pages/index/index",
}); });
}; };
back() { skipRegister() {
// 跳过注册
Taro.setStorageSync("skipRegister", true);
Taro.navigateBack({ Taro.navigateBack({
delta: 1, delta: 1,
}); });
@ -161,6 +163,7 @@ class Register extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
console.log("MpSplashDetail Register");
const { data } = await MpSplashDetail({ const { data } = await MpSplashDetail({
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
@ -210,7 +213,7 @@ class Register extends Component<any, any> {
> >
</Button> </Button>
<View className="text" onClick={this.back}> <View className="text" onClick={this.skipRegister}>
&gt; &gt;
</View> </View>
</View> </View>

@ -77,10 +77,13 @@ page {
.infobox1 .info2 { .infobox1 .info2 {
border-radius: 20rpx; border-radius: 20rpx;
height: 200rpx; height: 200rpx;
margin: 40rpx 28rpx 0; display: flex;
justify-content: space-between;
margin: 40rpx 28rpx 0 28rpx;
} }
.infobox1 .info3 { .infobox1 .info3 {
margin: 22rpx 30rpx 0; margin: 0 30rpx;
margin-top: 22rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
@ -98,8 +101,10 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: flex-start;
padding: 36rpx 0 26rpx 36rpx; padding: 36rpx 0 26rpx 36rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 0;
} }
.infobox1 .info2 .block .bg_img { .infobox1 .info2 .block .bg_img {
@ -166,6 +171,7 @@ page {
width: 25%; width: 25%;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
margin-top: 0;
.img image { .img image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;

@ -267,12 +267,12 @@ class User extends Component<any, any> {
)} )}
</View> </View>
</View> </View>
<View className="info2 flex aitems sa"> <View className="info2">
<View <View
style="margin-top:0"
className="block" className="block"
data-url="/pages/instrument_manage/index?isback=1" data-url="/pages/instrument_manage/index?isback=1"
onClick={this.goUrlNoRegister} onClick={this.goUrlNoRegister}
// onClick={this.devOpen}
> >
<Image <Image
className="bg_img" className="bg_img"
@ -289,6 +289,7 @@ class User extends Component<any, any> {
<View className="txt"></View> <View className="txt"></View>
</View> </View>
<View <View
style="margin-top:0"
className="block" className="block"
onClick={this.goUrlNoRegister} onClick={this.goUrlNoRegister}
data-url="/pages/integral_list/integral_list" data-url="/pages/integral_list/integral_list"
@ -308,10 +309,52 @@ class User extends Component<any, any> {
</View> </View>
</View> </View>
<View className="num">{userInfo.credit}</View> <View className="num">{userInfo.credit}</View>
{/* <View className="txt"></View> */}
<View className="txt"></View> <View className="txt"></View>
</View> </View>
</View> </View>
{/* <View className="info2 flex aitems sa">
<View
className="block"
data-url="/pages/instrument_manage/index?isback=1"
onClick={this.goUrlNoRegister}
>
<Image
className="bg_img"
src={require("../../img/device_bg.png")}
mode="aspectFill"
></Image>
<View className="tip flex aitems">
<View className="tip1"></View>
<View className="right">
<Image src="/img/my_right.png" mode="aspectFill" />
</View>
</View>
<View className="num">{userInfo.devicesNum}</View>
<View className="txt"></View>
</View>
<View
className="block"
onClick={this.goUrlNoRegister}
data-url="/pages/integral_list/integral_list"
>
<Image
className="bg_img"
src={require("../../img/point_bg.png")}
mode="aspectFill"
></Image>
<View className="tip flex aitems">
<View className="tip1"></View>
<View className="right">
<Image
src={require("../../img/my_right.png")}
mode="aspectFill"
/>
</View>
</View>
<View className="num">{userInfo.credit}</View>
<View className="txt"></View>
</View>
</View> */}
<View className="info3"> <View className="info3">
{lastDay} : {userInfo.expireCredit} {lastDay} : {userInfo.expireCredit}
</View> </View>
@ -358,7 +401,7 @@ class User extends Component<any, any> {
<View className="tip1"></View> <View className="tip1"></View>
</View> </View>
</View> </View>
<View className="title2"></View> <View className="title2"></View>
<View className="info flex aitems"> <View className="info flex aitems">
<View <View
className="block flex aitems" className="block flex aitems"
@ -389,6 +432,7 @@ class User extends Component<any, any> {
</View> </View>
<View className="tip1"></View> <View className="tip1"></View>
</View> </View>
<View className="block flex aitems">{/* 样式留空 */}</View>
{/* <View {/* <View
className="block flex aitems" className="block flex aitems"
data-url="/pages/privacyPolicy/privacyPolicy" data-url="/pages/privacyPolicy/privacyPolicy"

File diff suppressed because one or more lines are too long

@ -1,7 +1,8 @@
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// var logger = Taro.getRealtimeLogManager ? Taro.getRealtimeLogManager() : null; // var logger = Taro.getRealtimeLogManager ? Taro.getRealtimeLogManager() : null;
var logger = Taro.getRealtimeLogManager(); // var logger = Taro.getRealtimeLogManager();
var logger = console;
const log = { const log = {
debug() { debug() {

@ -51,7 +51,6 @@ export const Ajax = (params) => {
}, },
data: params.data, data: params.data,
success(res) { success(res) {
// console.log("res", res);
if (res.data.code == 401 || res.data.code == 403) { if (res.data.code == 401 || res.data.code == 403) {
// 自动重新登录 // 自动重新登录
Taro.removeStorageSync("token"); Taro.removeStorageSync("token");
@ -59,14 +58,6 @@ export const Ajax = (params) => {
return; return;
} }
// if (res.statusCode !== 200) {
// Taro.showModal({
// title: "提示",
// content: String("错误码:" + res.statusCode),
// showCancel: false,
// });
// return false;
// }
if (res.data.code === 500) { if (res.data.code === 500) {
let msg = "系统异常,请联系管理人员"; let msg = "系统异常,请联系管理人员";
@ -148,7 +139,7 @@ export const AjaxUploadFile = (params, formData) => {
}); });
return false; return false;
} }
if (o.code !== 200) { if (o.code !== 200 && o.code !== 204 && o.code !== 205) {
let msg = let msg =
typeof o.msg == "string" ? o.msg : "系统异常,请联系管理人员"; typeof o.msg == "string" ? o.msg : "系统异常,请联系管理人员";
Taro.showModal({ Taro.showModal({
@ -217,7 +208,7 @@ export const AjaxFormData = (params) => {
}); });
return false; return false;
} }
if (res.data.code !== 200) { if (res.data.code !== 200 && o.code !== 204 && o.code !== 205) {
let msg = let msg =
typeof res.data.msg == "string" typeof res.data.msg == "string"
? res.data.msg ? res.data.msg

Loading…
Cancel
Save