|
|
|
|
@ -255,16 +255,16 @@ class Index extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 页面初始化
|
|
|
|
|
async initData() {
|
|
|
|
|
initData = async () => {
|
|
|
|
|
let token = getStorageSync("token");
|
|
|
|
|
if (!token) {
|
|
|
|
|
// 如果token过期,先登录,登录完成后自动初始化
|
|
|
|
|
// await this.WCUserLogin();
|
|
|
|
|
await this.WCUserLogin();
|
|
|
|
|
} else {
|
|
|
|
|
// token没过期,直接请求数据
|
|
|
|
|
this.initPageData();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
initPageData = async () => {
|
|
|
|
|
const mobile = Taro.getStorageSync("mobile");
|
|
|
|
|
@ -292,7 +292,9 @@ class Index extends Component<any, any> {
|
|
|
|
|
await this.unbindingInstrumentInfoList(); // 获取未绑定设备
|
|
|
|
|
await this.getInstrumentInfoBySerial(); // 扫码序列号查询:注册后才调用,因为扫码未注册直接跳转注册页
|
|
|
|
|
|
|
|
|
|
console.log("this.props.isShowIndexFlag", this.props.isShowIndexFlag);
|
|
|
|
|
if (!this.props.isShowIndexFlag) {
|
|
|
|
|
this.initDeviceNursingHistory();
|
|
|
|
|
this.GetSitePopupList();
|
|
|
|
|
// 全局内存缓存,仅初次进入首页运行
|
|
|
|
|
this.props.setIndexFlag(true);
|
|
|
|
|
@ -897,7 +899,9 @@ class Index extends Component<any, any> {
|
|
|
|
|
isShowReConnectDeviceRecordWL200: false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// this.goNursing()
|
|
|
|
|
let item = getStorageSync("instrument_detail");
|
|
|
|
|
this.setState({ connectInstrument: item });
|
|
|
|
|
setTimeout(() => this.bindBlockLeft());
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 扫码绑定必须先完成注册弹窗:确定以后删除扫码缓存,防止死循环
|
|
|
|
|
@ -996,8 +1000,8 @@ class Index extends Component<any, any> {
|
|
|
|
|
<View>是否重新读取</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
cancelButtonText="暂不绑定"
|
|
|
|
|
confirmButtonText="确认"
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="连接设备"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeReConnectDeviceRecordWL200}
|
|
|
|
|
confirm={this.confirmReConnectDeviceRecordWL200}
|
|
|
|
|
|