解决冲突

master
qsj 2 years ago
commit 6f361b1912

@ -18,6 +18,7 @@
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev": "npm run build:weapp -- --watch",
"dev:weapp": "npm run build:weapp -- --watch",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",

@ -24,6 +24,9 @@ class App extends Component<PropsWithChildren> {
return;
}
// 每次进入小程序,删除可能残留的同步状态
Taro.removeStorageSync("isSyncHistory");
// go("/pages/iotCarePlan/iotCarePlan");
// go("/pages/instrument_clickin_upload/index");
// go("/pages/instrument/intro");

@ -104,7 +104,7 @@ class ConnectionBluetoot extends Component<any, any> {
searchError: false, //是否没有搜索到设备
connectionStatus: false, //是否连接成功状态
hasVersionInfo: false, // 是否已获得版本信息
hasSyncRecord: false,
hasSyncRecord: false, // 是否已同步记录
subDeviceConnectedStatus: false, //子设备是否连接成功状态
synchronousStatus: false, // 设备同步记录状态
islian: false, //是否获取离线记录状态
@ -131,11 +131,6 @@ class ConnectionBluetoot extends Component<any, any> {
// 只有非断开状态的弹窗才自动连接蓝牙
if (!this.props.isDisconnect) {
this.connection();
} else {
// 断开状态弹窗:自动设置为错误模式
this.setState({
error: true,
});
}
}
@ -989,22 +984,17 @@ class ConnectionBluetoot extends Component<any, any> {
this.sendGetVersion();
}
}
}, 1000);
}, 600);
// 5秒后没有收到版本返回直接跳去护理页
// if (isGetVersionTimer) clearTimeout(isGetVersionTimer);
// isGetVersionTimer = setTimeout(() => {
// that.setData({
// connectionStatus: true,
// // subDeviceConnectedStatus: true, // 子设备连接状态
// })
// this.sendSyncRecording()
// }, 5000);
if (isGetVersionTimer) clearTimeout(isGetVersionTimer);
isGetVersionTimer = setTimeout(() => {
this.sendSyncRecording();
}, 5000);
}
/** 发送同步记录 */
sendSyncRecording() {
const { deviceInfo } = this.props;
const versionCommand = {
commandType: "InfoQuery",
infoQueryType: "offlineClockSummary",
@ -1035,6 +1025,7 @@ class ConnectionBluetoot extends Component<any, any> {
console.log("onReconnect");
// 重置信息并重连
this.setState({
isBreak: false,
error: false,
searchError: false,
errorText: "",
@ -1077,6 +1068,7 @@ class ConnectionBluetoot extends Component<any, any> {
connectionSuccess={connectionSuccess}
isConnection={isConnection}
error={error}
isDisconnect={isDisconnect}
title="面罩模式启动中"
/>
</Block>

@ -84,6 +84,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
isConnection,
currentDeviceType,
error,
isDisconnect,
} = this.props;
return (
@ -103,7 +104,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
></View>
{/* 非错误弹窗 */}
{!error && (
{!error && !isDisconnect && (
<View className={classnames("common-box device-connection-box")}>
<View
className={classnames("common-popup-title", "margin-samll")}
@ -188,8 +189,48 @@ export default class DeviceConnectPopup extends Component<any, any> {
</View>
)}
{/* 错误与失败弹窗 */}
{error && (
{/* 断开弹窗 */}
{!error && isDisconnect && (
<View className={classnames("common-box", "device-connection-box")}>
<View
className={classnames("common-popup-title", "margin-samll")}
>
{data.bluetoothClosedTitle}
</View>
<View className="device-popup-content-box">
{!this.isImage(data.bluetoothClosed) ? (
<Video className="videos" src={data.bluetoothClosed} />
) : (
<Image
className="images"
src={data.bluetoothClosed}
mode="aspectFill"
/>
)}
<View className="error-block">
<View className="tip1"></View>
<View className="tip2">
{data.bluetoothClosedContent || "请重启设备后点击重新连接"}
</View>
</View>
</View>
<View className="common-popup-btns device-popup-btns">
<Button className="common-popup-btn2" onClick={this.onClose}>
</Button>
<Button
className="common-popup-btn2"
onClick={this.onReconnect}
>
</Button>
</View>
</View>
)}
{/* 错误失败弹窗 */}
{error && !isDisconnect && (
<View className={classnames("common-box", "device-connection-box")}>
<View
className={classnames("common-popup-title", "margin-samll")}

@ -22,26 +22,28 @@ function Index({ isShowNurse, ActiveModeItem }: Props) {
<View className="modelInfo-title"></View>
<View className="modelInfo-effect">{ActiveModeItem.modeDesc}</View>
</View>
<View className="modelInfo-line">
<View className="modelInfo-title"></View>
<View className="modelInfo-light-box">
{ActiveModeItem.combineData.map((item) => {
return (
<View className="modelInfo-light-item" key={item.id}>
<View
className="modelInfo-light-color"
style={{
backgroundColor: ModeColor[item.technologyInfo],
}}
></View>
<View className="modelInfo-light-colorname">
{item.effectContent}({item.technologyInfo})
{ActiveModeItem?.combineData && (
<View className="modelInfo-line">
<View className="modelInfo-title"></View>
<View className="modelInfo-light-box">
{ActiveModeItem.combineData.map((item) => {
return (
<View className="modelInfo-light-item" key={item.id}>
<View
className="modelInfo-light-color"
style={{
backgroundColor: ModeColor[item.technologyInfo],
}}
></View>
<View className="modelInfo-light-colorname">
{item.effectContent}({item.technologyInfo})
</View>
</View>
</View>
);
})}
);
})}
</View>
</View>
</View>
)}
</View>
)}
</Block>

@ -208,7 +208,9 @@ class IotCarePlan extends Component<any, any> {
// 按钮是否不可运行
isFooterBtnDisabled: true,
isFirstEntryMode: false, // 模式首次打开
// isFirstEntryMode: false, // 模式首次打开
isShowHistoryMsg: false, // 是否显示正在同步历史
};
}
@ -260,6 +262,7 @@ class IotCarePlan extends Component<any, any> {
if (obj) {
this.setState({
currentDevice: obj,
title: obj.name,
});
await this.GetModeList(obj.id);
@ -377,7 +380,7 @@ class IotCarePlan extends Component<any, any> {
// this.modeCurrentFun(res.data.data[0]);
// }, 100);
} else {
this.setState({ ModeList: res.data.data });
this.setState({ ModeList: [] });
}
}
};
@ -797,6 +800,13 @@ class IotCarePlan extends Component<any, any> {
jsonStatus
);
this.workStatus = jsonStatus.workStatus;
this.setState({
Electricity: jsonStatus.battery,
// fr200Electricity: jsonStatus.battery,
matrixElectricity: jsonStatus.matrixBattery,
});
// 判断设备主动上报的关机事件
if (jsonStatus.workStatus === MODE_WORKING_ENUM.END) {
// 判断id是否一致, 一致的话则生成护理报表, 并提示
@ -810,13 +820,6 @@ class IotCarePlan extends Component<any, any> {
return;
}
this.workStatus = jsonStatus.workStatus;
this.setState({
Electricity: jsonStatus.battery,
// fr200Electricity: jsonStatus.battery,
matrixElectricity: jsonStatus.matrixBattery,
});
if (jsonStatus?.workMode === this.state.ActiveModeItem.modeType) {
this.setState({
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
@ -1444,6 +1447,12 @@ class IotCarePlan extends Component<any, any> {
await sleep(2);
}
let isSyncHistory = Taro.getStorageSync("isSyncHistory");
if (isSyncHistory) {
this.setState({ isShowHistoryMsg: false });
Taro.removeStorageSync("isSyncHistory");
}
// 2.判断是否已存在缓存的护理记录:如果没有历史,则缓存
let workStatus = this.workStatus;
let WL200NursingHistory = this.WL200NursingHistory;
@ -1468,7 +1477,7 @@ class IotCarePlan extends Component<any, any> {
// 仪器缓存模式,判断是否存在于现有模式中
let recordModeItem = ModeList.find((item) => {
return item.id == WL200NursingHistory.currentServiceData.id;
return item.id == WL200NursingHistory.currentServiceData.modeId;
});
if (!WL200NursingHistory || !recordModeItem) {
console.log("仪器有数据, 但是缓存没有数据, 忽略");
@ -1541,6 +1550,17 @@ class IotCarePlan extends Component<any, any> {
/** 获取小程序本地缓存的历史记录 */
getWL200NursingHistory() {
this.WL200NursingHistory = Taro.getStorageSync("WL200NursingHistory");
// 是否同步历史记录
let isSyncHistory = Taro.getStorageSync("isSyncHistory");
if (isSyncHistory) {
// 直接进入开始护理状态
this.setState({
isShowNurse: true,
isShowHistoryMsg: true,
});
}
}
/** 设置WL200护理历史 */
setWL200NursingHistory = (jsonStatus: any) => {
@ -1607,7 +1627,7 @@ class IotCarePlan extends Component<any, any> {
/** 提交护理记录 */
PostNursingLogClock = async (data: any = null, isJump = true) => {
let { currentDevice, ActiveModeItem, } = this.state;
let { currentDevice, ActiveModeItem } = this.state;
let params = {};
if (data) {
@ -1631,8 +1651,8 @@ class IotCarePlan extends Component<any, any> {
};
// 上传护理完成的仪器ID
let res = await InstrumentInfo.apiClock.addClockInstrument(params);
console.log(res,'护理完成');
console.log(res, "护理完成");
this.rmWL200NursingHistory(this.WL200NursingHistory); // 护理完成,删除记录
if (isJump) {
this.setState({
@ -1982,7 +2002,7 @@ class IotCarePlan extends Component<any, any> {
nurseInfo,
isShowReReadRecordSave,
isFooterBtnDisabled,
isFirstEntryMode,
isShowHistoryMsg,
} = this.state;
return (
@ -2047,7 +2067,7 @@ class IotCarePlan extends Component<any, any> {
<PopupStepTips
isShow={isShowStepTips}
isLarge
isFirstEntry={isFirstEntryMode}
isFirstEntry={false}
confirmButtonText="知道了"
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
@ -2123,6 +2143,10 @@ class IotCarePlan extends Component<any, any> {
)}
</View>
{isShowHistoryMsg && (
<View className="sync-history-msg">...</View>
)}
<View>
<View className="iot-main">
<View className="banner-box">
@ -2192,10 +2216,12 @@ class IotCarePlan extends Component<any, any> {
/>
)}
<ModeContent
isShowNurse={isShowNurse}
ActiveModeItem={ActiveModeItem}
/>
{ActiveModeItem.combineData && (
<ModeContent
isShowNurse={isShowNurse}
ActiveModeItem={ActiveModeItem}
/>
)}
{/* <Echarts></Echarts> */}
</View>

@ -106,6 +106,7 @@ class Index extends Component<any, any> {
isBindingError: false, // 绑定失败
isBeforeBindingError: false, // 绑定前校验错误弹窗
BeforeBindingErrorText: "", // 绑定前校验错误文本
isBindingError203: false, // 绑定失败弹窗:已被别人绑定
instrumentList: [], // 仪器列表
ViewAddInstrument: true, // 查看是否添加有仪器
@ -163,11 +164,11 @@ class Index extends Component<any, any> {
}
}
componentDidMount() { }
componentDidMount() {}
componentWillUnmount() {
// 页面卸载监听
Taro.offAppHide((res) => { });
Taro.offAppHide((res) => {});
this.$instance = null;
}
@ -258,7 +259,7 @@ class Index extends Component<any, any> {
this.isSancQrcodeEnter();
}
},
fail: () => { },
fail: () => {},
complete: () => {
// 授权完成运行页面初始化
},
@ -430,14 +431,11 @@ class Index extends Component<any, any> {
}
// 查看所有设备是否绑定完
Alldevice = () => {
console.log(this.state.isDisabledClickAddDevic, '查看');
}
console.log(this.state.isDisabledClickAddDevic, "查看");
};
// 新增设备
addNewDevice = () => {
if (this.isRegister("addNewDevice")) {
if (this.state.isDisabledClickAddDevice) {
msg("您已绑定所有设备");
return;
@ -490,31 +488,26 @@ class Index extends Component<any, any> {
};
gourl = async (e) => {
console.log('添加新设备', e);
console.log("添加新设备", e);
const { url } = e.currentTarget.dataset;
if (this.isRegister()) {
if (url === '/pages/instrument/instrument') {
if (url === "/pages/instrument/instrument") {
let { data } = await InstrumentInfo.unbindingInstrumentInfoList();
console.log(data, '查看未绑定设备');
console.log(data, "查看未绑定设备");
if (data.data.length === 0) {
this.setState(
{
show: true
}
)
this.setState({
show: true,
});
setTimeout(() => {
this.setState({ show: false });
}, 1000); // 2秒后将 show 变量置为 false
} else {
go(url);
}
} else {
go(url);
}
}
};
@ -526,7 +519,7 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false });
};
bannerSwiperchange() { }
bannerSwiperchange() {}
gobanner(item) {
// 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@ -574,7 +567,7 @@ class Index extends Component<any, any> {
mask: true,
});
let { data: res } = await InstrumentInfo.bindingInstrumentList();
console.log(res, '查看绑定的设备');
console.log(res, "查看绑定的设备");
// Taro.hideLoading();
if (res.code === 200) {
@ -768,6 +761,8 @@ class Index extends Component<any, any> {
this.getInstrumentIntroInfo(instrumentInfo.id);
}, 1000);
return;
} else if (data.code === 203) {
this.setState({ isBindingError203: true });
} else if (data.code === 202) {
// 换绑操作
this.setState({ isExchangeBinding: true, isVisibleBinding: true });
@ -812,6 +807,7 @@ class Index extends Component<any, any> {
}
};
// 仪器绑定失败弹窗
// 绑定失败
onBindErrorClose = () => {
this.setState({ isBindingError: false });
this.removeScanFun();
@ -820,6 +816,15 @@ class Index extends Component<any, any> {
this.onBindErrorClose();
go("/pages/consultant/consultant?customBack=true");
};
// 已被别人绑定
onBindErrorClose203 = () => {
this.setState({ isBindingError203: false });
};
onBindErrorConfirm203 = () => {
this.onBindErrorClose203();
go("/pages/consultant/consultant");
};
// 绑定后弹窗
onBeforeBindClose = () => {
this.setState({ isBeforeBindingError: false });
this.removeScanFun();
@ -836,7 +841,6 @@ class Index extends Component<any, any> {
// 跳转仪器介绍页
goNursing = (item) => {
if (item.status === 0) {
setStorageSync("instrument_detail", item);
this.setState({ connectInstrument: item });
@ -852,7 +856,6 @@ class Index extends Component<any, any> {
/** 蓝牙逻辑 */
bindBlockLeft() {
if (!this.state.isRegisterBoolean) {
//未注册授权
this.alertRegister();
@ -1011,6 +1014,7 @@ class Index extends Component<any, any> {
let item = getStorageSync("instrument_detail");
this.setState({ connectInstrument: item });
setTimeout(() => this.bindBlockLeft());
Taro.setStorageSync("isSyncHistory", true);
};
// 扫码绑定必须先完成注册弹窗:确定以后删除扫码缓存,防止死循环
@ -1061,6 +1065,7 @@ class Index extends Component<any, any> {
isBindingError,
isBeforeBindingError,
BeforeBindingErrorText,
isBindingError203,
isRegisterBoolean,
isExchangeBinding,
instrumentInfo,
@ -1191,6 +1196,16 @@ class Index extends Component<any, any> {
confirm={this.onBeforeBindConfirm}
/>
<PopupAlert
isShow={isBindingError203}
title="提示"
content="序列码已被别人绑定,请联系微信助手"
confirmButtonText="知道了"
textAlgin="center"
close={this.onBindErrorClose203}
confirm={this.onBindErrorConfirm203}
></PopupAlert>
<PopupAlert
isShow={showEquipment}
title="提示"
@ -1325,7 +1340,7 @@ class Index extends Component<any, any> {
src={require("../../img/black-add.png")}
mode="aspectFill"
/>
<View className="txt" ></View>
<View className="txt"></View>
</View>
</View>

@ -1,4 +1,5 @@
import classnames from "classnames";
import { throttle } from "lodash";
import { Component, PropsWithChildren, useEffect, useState } from "react";
// import { InstrumentInfo } from "../../utils/Interface";
@ -16,7 +17,7 @@ import {
ScrollView,
Canvas,
} from "@tarojs/components";
import { InstrumentInfo } from "@/utils/Interface";
import { go, msg, setStorageSync } from "@/utils/traoAPI";
@ -49,7 +50,7 @@ export default class Instrument extends Component<any, any> {
serialImage: "",
serialCode: "",
},
show:true,
show: true,
equipmentList: [
{
id: 1,
@ -66,6 +67,7 @@ export default class Instrument extends Component<any, any> {
showLoginPopup: "",
fromUrl: "",
// 提示绑定与换绑
isVisibleBinding: false,
isRegisterBoolean: false,
isExchangeBinding: false,
@ -151,7 +153,7 @@ export default class Instrument extends Component<any, any> {
setTimeout(() => {
this.scanCodeBinding();
}, 10);
}, 100);
},
fail(err) {},
complete(res) {},
@ -181,13 +183,9 @@ export default class Instrument extends Component<any, any> {
console.log("success", res);
const tempFilePath = res.tempFiles[0].tempFilePath;
let img = await getImgInfo(tempFilePath);
console.log("img", img);
let compressImage = await contraction(img, "compressImage");
console.log("compressImage", compressImage);
// 压缩后文件地址
let compressTempFilePath = compressImage.tempFilePath;
console.log("tempFilePath", tempFilePath);
console.log("compressTempFilePath", compressTempFilePath);
setTimeout(() => {
let { channelInfo } = this.state;
channelInfo.serialImage = compressTempFilePath;
@ -244,8 +242,8 @@ export default class Instrument extends Component<any, any> {
// 未绑定列表
unbindingInstrumentInfoList = async () => {
let { data } = await InstrumentInfo.unbindingInstrumentInfoList();
console.log(data,'查看未绑定设备');
console.log(data, "查看未绑定设备");
if (data.code === 200) {
if (data.data.length) {
if (!this.isOnly) {
@ -294,14 +292,21 @@ export default class Instrument extends Component<any, any> {
});
Taro.hideLoading();
// 文件上传接口返回格式不需要加data
console.log("res.data", res);
let code = Number(res.code); // 强制类型转换
if (code === 200) {
this.openBindingVisible();
} else if (code === 204) {
this.setState({ isBindingCheckError: true });
} else {
this.setState({ isBindingError: true });
msg("绑定成功");
setTimeout(() => {
setStorageSync("instrument_item", JSON.stringify(channelInfo));
go("/pages/instrument/intro?id=" + channelInfo.id);
}, 1000);
} else if (res.data.code === 202) {
this.changeBindBox();
} else if (res.data.code === 203) {
this.setState({ isBindingError203: true });
} else if (res.data.code === 204) {
this.onBindCheckErrorOpen();
} else if (res.data.code === 205 || res.data.code === 206) {
this.onBindErrorOpen();
}
};
/**
@ -309,24 +314,37 @@ export default class Instrument extends Component<any, any> {
* @return code===204
*/
scanCodeBinding = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
// Taro.showLoading({
// title: "请求中...",
// mask: true,
// });
let { channelInfo } = this.state;
let res = await InstrumentInfo.scanCodeBinding({
serial: channelInfo.serialCode,
instrumentId: channelInfo.id,
});
Taro.hideLoading();
if (res.code === 200) {
// this.bindingInstrument();
this.openBindingVisible();
} else if (res.data.code === 204 || res.data.code === 205) {
this.setState({ isBindingCheckError: true });
} else {
this.setState({ isBindingError: true });
}
// Taro.hideLoading();
let code = Number(res.data.code);
console.log("scanCodeBinding code", code);
setTimeout(() => {
console.log("scanCodeBinding code", code, code === 204);
if (code === 200) {
msg("绑定成功");
setTimeout(() => {
setStorageSync("instrument_item", JSON.stringify(channelInfo));
go("/pages/instrument/intro?id=" + channelInfo.id);
}, 1000);
} else if (res.data.code === 202) {
this.changeBindBox();
} else if (res.data.code === 203) {
this.setState({ isBindingError203: true });
} else if (res.data.code === 204) {
this.onBindCheckErrorOpen();
} else if (res.data.code === 205 || res.data.code === 206) {
this.onBindErrorOpen();
}
}, 100);
};
// 调用绑定接口
@ -341,16 +359,24 @@ export default class Instrument extends Component<any, any> {
serial: channelInfo.serialCode,
});
Taro.hideLoading();
if (res.data.code === 200) {
// this.setState({ isVisibleBinding: false });
msg("绑定成功");
setStorageSync("instrument_item", JSON.stringify(channelInfo));
go("/pages/instrument/intro?id=" + channelInfo.id);
} else if (res.data.code === 204) {
this.setState({ isBindingCheckError: false });
} else {
this.setState({ isBindingError: true });
}
setTimeout(() => {
if (res.data.code === 200) {
// this.setState({ isVisibleBinding: false });
msg("绑定成功");
setStorageSync("instrument_item", JSON.stringify(channelInfo));
setTimeout(() => {
go("/pages/instrument/intro?id=" + channelInfo.id);
}, 1000);
} else if (res.data.code === 202) {
this.changeBindBox();
} else if (res.data.code === 203) {
this.setState({ isBindingError203: true });
} else if (res.data.code === 204) {
this.onBindCheckErrorOpen();
} else if (res.data.code === 205 || res.data.code === 206) {
this.onBindErrorOpen();
}
}, 100);
};
// 换绑仪器
exchangeBinding = async () => {
@ -362,7 +388,6 @@ export default class Instrument extends Component<any, any> {
let { data } = await InstrumentInfo.exchangeBinding({
serial: channelInfo.serialCode,
});
console.log("exchangeBinding", data);
Taro.hideLoading();
this.closeBinding();
if (data.code === 200) {
@ -370,6 +395,10 @@ export default class Instrument extends Component<any, any> {
}
};
/**绑定错误弹窗*/
onBindErrorOpen = () => {
this.setState({ isBindingError: true });
};
onBindErrorClose = () => {
this.setState({ isBindingError: false });
};
@ -377,6 +406,11 @@ export default class Instrument extends Component<any, any> {
this.onBindErrorClose();
go("/pages/consultant/consultant");
};
/**绑定错误:已被别人绑定弹窗*/
onBindErrorOpen203 = () => {
this.setState({ isBindingError203: true });
};
onBindErrorClose203 = () => {
this.setState({ isBindingError203: false });
};
@ -384,10 +418,17 @@ export default class Instrument extends Component<any, any> {
this.onBindErrorClose203();
go("/pages/consultant/consultant");
};
/**绑定错误:检查序列号弹窗*/
onBindCheckErrorOpen = () => {
this.setState({ isBindingCheckError: true });
};
onBindCheckErrorClose = () => {
this.setState({ isBindingCheckError: false });
};
/** 换绑弹窗 */
changeBindBox() {
this.setState({ isVisibleBinding: true, isExchangeBinding: true });
}
customBack = () => {
Taro.reLaunch({ url: "/pages/index/index" });
@ -661,7 +702,10 @@ export default class Instrument extends Component<any, any> {
</View>
<View className="footer">
{inputType == 1 && (
<View className="btn" onClick={this.onSubmit}>
<View
className="btn"
onClick={throttle(this.onSubmit.bind(this), 1000)}
>
</View>
)}
@ -676,7 +720,6 @@ export default class Instrument extends Component<any, any> {
</View>
)}
</View>
</Block>
);
}

@ -75,7 +75,7 @@ export const Ajax = (params) => {
content: String(msg),
showCancel: false,
});
// reject(res);
reject(res);
return false;
}
@ -108,6 +108,7 @@ export const Ajax = (params) => {
});
};
// 文件上传
export const AjaxUploadFile = (params, formData) => {
const app = Taro.getApp();
const global = store.getState().globalStore;
@ -141,12 +142,14 @@ export const AjaxUploadFile = (params, formData) => {
}
if (
o.code !== 200 &&
o.code !== 202 &&
o.code !== 203 &&
o.code !== 204 &&
o.code !== 205
o.code !== 205 &&
o.code !== 206
) {
let msg =
typeof o.msg == "string" ? o.msg : "系统异常,请联系管理人员";
// let msg = typeof o.msg == "string" ? o.msg : "系统异常,请联系管理人员";
let msg = "系统异常,请联系管理人员";
Taro.showModal({
title: "提示",
content: msg,
@ -171,6 +174,7 @@ export const AjaxUploadFile = (params, formData) => {
});
};
// 表单上传
export const AjaxFormData = (params) => {
const app = Taro.getApp();
const global = store.getState().globalStore;
@ -213,11 +217,20 @@ export const AjaxFormData = (params) => {
});
return false;
}
if (res.data.code !== 200 && o.code !== 204 && o.code !== 205) {
let msg =
typeof res.data.msg == "string"
? res.data.msg
: "系统异常,请联系管理人员";
let code = res.data.code;
if (
code !== 200 &&
code !== 202 &&
code !== 203 &&
code !== 204 &&
code !== 205 &&
code !== 206
) {
// let msg =
// typeof res.data.msg == "string"
// ? res.data.msg
// : "系统异常,请联系管理人员";
let msg = "系统异常,请联系管理人员";
if (msg == "请不要操作太快哦") {
reject(res);
return false;

Loading…
Cancel
Save