临时提交

master
blak-kong 2 years ago
parent df99d57457
commit 67070731fa

@ -4,7 +4,28 @@ module.exports = {
},
defineConstants: {
},
mini: {},
mini: {
debugReact: true,
webpackChain: (chain, webpack) => {
chain.merge({
plugin: {
install: {
plugin: require('terser-webpack-plugin'),
args: [
{
terserOptions: {
compress: true, // 默认使用terser压缩
// mangle: false,
keep_classnames: true, // 不改变class名称
keep_fnames: true, // 不改变函数名称
},
},
],
},
},
})
},
},
h5: {
/**
* WebpackChain

@ -373,9 +373,9 @@ class IotCarePlan extends Component<any, any> {
ModeList: res.data.data,
});
setTimeout(() => {
this.modeCurrentFun(res.data.data[0]);
}, 100);
// setTimeout(() => {
// this.modeCurrentFun(res.data.data[0]);
// }, 100);
} else {
this.setState({ ModeList: res.data.data });
}
@ -1468,7 +1468,7 @@ class IotCarePlan extends Component<any, any> {
// 仪器缓存模式,判断是否存在于现有模式中
let recordModeItem = ModeList.find((item) => {
return item.id == WL200NursingHistory.id;
return item.id == WL200NursingHistory.currentServiceData.id;
});
if (!WL200NursingHistory || !recordModeItem) {
console.log("仪器有数据, 但是缓存没有数据, 忽略");
@ -1838,8 +1838,11 @@ class IotCarePlan extends Component<any, any> {
pairingChange = () => {
this.setState({
isConnectShow: false,
isShowNurse: true,
});
setTimeout(() => {
this.onNursingTap("switch");
});
this.onNursingTap("switch");
};
connectionClose = () => {
this.setState({

@ -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}

@ -300,6 +300,10 @@ class Intro extends Component<any, any> {
this.setState({
isShowReConnectDeviceRecordWL200: false,
});
let item = getStorageSync("instrument_detail");
this.setState({ connectInstrument: item });
setTimeout(() => this.bindBlockLeft());
};
render() {
@ -354,8 +358,8 @@ class Intro extends Component<any, any> {
<View></View>
</Block>
}
cancelButtonText="暂不绑定"
confirmButtonText="确认"
cancelButtonText="取消"
confirmButtonText="连接设备"
textAlgin="center"
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}

Loading…
Cancel
Save