|
|
|
|
@ -52,13 +52,13 @@ import {
|
|
|
|
|
setStorageSync,
|
|
|
|
|
showModal,
|
|
|
|
|
} from "@/utils/traoAPI";
|
|
|
|
|
|
|
|
|
|
const log = require("@/utils/log");
|
|
|
|
|
import commandMap from "@/utils/commandMap";
|
|
|
|
|
|
|
|
|
|
import InstrumentTypeEnum from "@/components/bluetoot/instrumentTypeEnum";
|
|
|
|
|
import OtaDeviceTypeEnum from "@/components/bluetoot/OtaDeviceTypeEnum";
|
|
|
|
|
|
|
|
|
|
const log = require("@/utils/log");
|
|
|
|
|
|
|
|
|
|
class Index extends Component<any, any> {
|
|
|
|
|
// pageCtx = Taro.getCurrentInstance().page;
|
|
|
|
|
$instance = Taro.getCurrentInstance();
|
|
|
|
|
@ -147,9 +147,9 @@ class Index extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
componentDidMount() { }
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
const tabbar = Taro.getTabBar<CustomTabBar>(this.$instance.page);
|
|
|
|
|
@ -158,7 +158,7 @@ class Index extends Component<any, any> {
|
|
|
|
|
this.showInit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidHide() {}
|
|
|
|
|
componentDidHide() { }
|
|
|
|
|
|
|
|
|
|
showInit() {
|
|
|
|
|
// 判断是否登录
|
|
|
|
|
@ -185,6 +185,9 @@ class Index extends Component<any, any> {
|
|
|
|
|
if (ids.length > 1) {
|
|
|
|
|
let serial = ids[1];
|
|
|
|
|
Taro.setStorageSync("serial", serial);
|
|
|
|
|
if (!Taro.getStorageSync("mobile")) {
|
|
|
|
|
go("/pages/register/register");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -205,7 +208,7 @@ class Index extends Component<any, any> {
|
|
|
|
|
this.isSancQrcodeEnter();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
fail: () => {},
|
|
|
|
|
fail: () => { },
|
|
|
|
|
complete: () => {
|
|
|
|
|
// 授权完成运行页面初始化
|
|
|
|
|
},
|
|
|
|
|
@ -363,7 +366,7 @@ class Index extends Component<any, any> {
|
|
|
|
|
this.setState({ isShowSiteSwiper: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bannerSwiperchange() {}
|
|
|
|
|
bannerSwiperchange() { }
|
|
|
|
|
|
|
|
|
|
gobanner(item) {
|
|
|
|
|
// 跳转类型:0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
|
|
|
|
|
@ -775,6 +778,7 @@ class Index extends Component<any, any> {
|
|
|
|
|
isExchangeBinding,
|
|
|
|
|
instrumentInfo,
|
|
|
|
|
instrumentList,
|
|
|
|
|
showEquipment,
|
|
|
|
|
|
|
|
|
|
// 蓝牙连接
|
|
|
|
|
isConnectShow,
|
|
|
|
|
@ -786,21 +790,21 @@ class Index extends Component<any, any> {
|
|
|
|
|
<View catchMove>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isNotRegister}
|
|
|
|
|
isClose={true}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="暂未授权注册,请点击注册"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
type="1"
|
|
|
|
|
isClose
|
|
|
|
|
title='提示'
|
|
|
|
|
content='暂未授权注册,请点击注册'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
type='1'
|
|
|
|
|
close={this.closeAlert}
|
|
|
|
|
confirm={this.closeAlert}
|
|
|
|
|
/>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isDev}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="页面正在开发中"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
title='提示'
|
|
|
|
|
content='页面正在开发中'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
close={this.closeDev}
|
|
|
|
|
confirm={this.closeDev}
|
|
|
|
|
/>
|
|
|
|
|
@ -820,30 +824,47 @@ class Index extends Component<any, any> {
|
|
|
|
|
/>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isBindingError}
|
|
|
|
|
title="提示"
|
|
|
|
|
title='提示'
|
|
|
|
|
content={
|
|
|
|
|
<Block>
|
|
|
|
|
<View>序列号信息仍在更新,请联系微信小助理</View>
|
|
|
|
|
<View>协助您绑定仪器</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
isClose={false}
|
|
|
|
|
close={this.onBindErrorClose}
|
|
|
|
|
confirm={this.onBindErrorConfirm}
|
|
|
|
|
></PopupAlert>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isBeforeBinding}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="您选择的仪器有误,请重新确认选择"
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
title='提示'
|
|
|
|
|
content='您选择的仪器有误,请重新确认选择'
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
isClose={false}
|
|
|
|
|
close={this.onBeforeBindClose}
|
|
|
|
|
confirm={this.onBeforeBindConfirm}
|
|
|
|
|
></PopupAlert>
|
|
|
|
|
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={showEquipment}
|
|
|
|
|
title='提示'
|
|
|
|
|
content={
|
|
|
|
|
<Block>
|
|
|
|
|
<View>仪器:小紫单美容仪</View>
|
|
|
|
|
<View>序列号:uniquie14231</View>
|
|
|
|
|
<View>您需要完成注册登录才能进行一起绑定</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
isClose={false}
|
|
|
|
|
close={this.onBindErrorClose}
|
|
|
|
|
confirm={this.onBindErrorConfirm}
|
|
|
|
|
></PopupAlert>
|
|
|
|
|
|
|
|
|
|
{/* <PopupPrivacyTest
|
|
|
|
|
closePrivacy={this.closePrivacy.bind(this)}
|
|
|
|
|
initData={this.initData.bind(this)}
|
|
|
|
|
@ -852,9 +873,9 @@ class Index extends Component<any, any> {
|
|
|
|
|
<PopupSiteSwiper
|
|
|
|
|
isShow={isShowSiteSwiper}
|
|
|
|
|
siteData={sitePopupList}
|
|
|
|
|
size="middle"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
size='middle'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
close={this.closeSiteSwiper}
|
|
|
|
|
confirm={this.closeSiteSwiper}
|
|
|
|
|
/>
|
|
|
|
|
@ -875,31 +896,31 @@ class Index extends Component<any, any> {
|
|
|
|
|
leftSlot={
|
|
|
|
|
<Block>
|
|
|
|
|
<View
|
|
|
|
|
className="message"
|
|
|
|
|
className='message'
|
|
|
|
|
onClick={this.gourl}
|
|
|
|
|
data-url="/pages/message/message"
|
|
|
|
|
data-url='/pages/message/message'
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="message-img"
|
|
|
|
|
className='message-img'
|
|
|
|
|
src={require("../../img/index/message.png")}
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
mode='aspectFill'
|
|
|
|
|
/>
|
|
|
|
|
{messagecount ? <View className="tip" /> : ""}
|
|
|
|
|
{messagecount ? <View className='tip' /> : ""}
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<View className="index">
|
|
|
|
|
<View className="date-title" onClick={this.toNursingRecords}>
|
|
|
|
|
<Text className="text">护理记录</Text>
|
|
|
|
|
<View className='index'>
|
|
|
|
|
<View className='date-title' onClick={this.toNursingRecords}>
|
|
|
|
|
<Text className='text'>护理记录</Text>
|
|
|
|
|
<Image
|
|
|
|
|
src={require("../../img/index/right.png")}
|
|
|
|
|
style="width: 20rpx;height: 20rpx;"
|
|
|
|
|
style='width: 20rpx;height: 20rpx;'
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="bg-while">
|
|
|
|
|
<View className='bg-while'>
|
|
|
|
|
<AtCalendar
|
|
|
|
|
hideArrow={true}
|
|
|
|
|
hideArrow
|
|
|
|
|
isSwiper={false}
|
|
|
|
|
currentDate={currentDate}
|
|
|
|
|
complete={calendarComplete}
|
|
|
|
|
@ -909,41 +930,41 @@ class Index extends Component<any, any> {
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="infobox5">
|
|
|
|
|
<View className='infobox5'>
|
|
|
|
|
{instrumentList.length > 0 && (
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="nurse_plan_box flex aitems sb">
|
|
|
|
|
<View className="title">前往护理</View>
|
|
|
|
|
<View className='nurse_plan_box flex aitems sb'>
|
|
|
|
|
<View className='title'>前往护理</View>
|
|
|
|
|
<View
|
|
|
|
|
className="txt_box flex jcenter aitems"
|
|
|
|
|
data-url="/pages/instrument/instrument"
|
|
|
|
|
className='txt_box flex jcenter aitems'
|
|
|
|
|
data-url='/pages/instrument/instrument'
|
|
|
|
|
onClick={this.gourl}
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="right_icon"
|
|
|
|
|
className='right_icon'
|
|
|
|
|
src={require("../../img/black-add.png")}
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
mode='aspectFill'
|
|
|
|
|
/>
|
|
|
|
|
<View className="txt">添加新设备</View>
|
|
|
|
|
<View className='txt'>添加新设备</View>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View style="overflow-x: auto;">
|
|
|
|
|
<View className="device_list flex">
|
|
|
|
|
<View style='overflow-x: auto;'>
|
|
|
|
|
<View className='device_list flex'>
|
|
|
|
|
{instrumentList.map((item, index) => {
|
|
|
|
|
if (item.status === 0) {
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
key={"instrumentList" + index}
|
|
|
|
|
className="device_item"
|
|
|
|
|
className='device_item'
|
|
|
|
|
onClick={this.goNursing.bind(this, item)}
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="banner_img"
|
|
|
|
|
className='banner_img'
|
|
|
|
|
src={item.banner}
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
mode='aspectFill'
|
|
|
|
|
/>
|
|
|
|
|
<View className="device_name ellipsis1">
|
|
|
|
|
<View className='device_name ellipsis1'>
|
|
|
|
|
{item.name}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
@ -956,34 +977,34 @@ class Index extends Component<any, any> {
|
|
|
|
|
)}
|
|
|
|
|
{instrumentList.length === 0 && (
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="nurse_plan_box flex aitems sb">
|
|
|
|
|
<View className="title">前往护理</View>
|
|
|
|
|
<View className='nurse_plan_box flex aitems sb'>
|
|
|
|
|
<View className='title'>前往护理</View>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="add_device flex jcenter aitems bg-while">
|
|
|
|
|
<View className="add_device_btn">
|
|
|
|
|
<View className="txt_box flex jcenter aitems">
|
|
|
|
|
<View className='add_device flex jcenter aitems bg-while'>
|
|
|
|
|
<View className='add_device_btn'>
|
|
|
|
|
<View className='txt_box flex jcenter aitems'>
|
|
|
|
|
<View
|
|
|
|
|
className="at-icon at-icon-add"
|
|
|
|
|
style="color: #fff;font-size: 30rpx;"
|
|
|
|
|
className='at-icon at-icon-add'
|
|
|
|
|
style='color: #fff;font-size: 30rpx;'
|
|
|
|
|
></View>
|
|
|
|
|
<View className="txt" onClick={this.addNewDevice}>
|
|
|
|
|
<View className='txt' onClick={this.addNewDevice}>
|
|
|
|
|
添加新设备
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="tips">您暂时还没有绑定任何设备</View>
|
|
|
|
|
<View className='tips'>您暂时还没有绑定任何设备</View>
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View style="margin: 20px">
|
|
|
|
|
<View style='margin: 20px'>
|
|
|
|
|
<View onClick={this.goIot}>假按钮跳转蓝牙调试设备页</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View className="infobox3">
|
|
|
|
|
<View className='infobox3'>
|
|
|
|
|
<Swiper
|
|
|
|
|
autoplay={true}
|
|
|
|
|
autoplay
|
|
|
|
|
onAnimationFinish={this.bannerSwiperchange.bind(this)}
|
|
|
|
|
current={bannerCurrent}
|
|
|
|
|
>
|
|
|
|
|
@ -993,13 +1014,13 @@ class Index extends Component<any, any> {
|
|
|
|
|
key={"banner_" + index}
|
|
|
|
|
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>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</Swiper>
|
|
|
|
|
</View>
|
|
|
|
|
<View style="height:200rpx"></View>
|
|
|
|
|
<View style='height:200rpx'></View>
|
|
|
|
|
</Block>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|