if (response.data.code == 0) {
this.store.dispatch("setdeviceId", deviceId);
this.getEquipmentList();
this.$message.success("切换成功!");
} else if (response.data.code !== 0) {
if (response.data.code == 401 || response.data.code == 4011)
{
this.$message.error("登录超时,请重新登录!");
this.$router.push({
path: "/"
});
} else if (response.data.code == 4012) {
this.$message.error("您的账号已在另一台设备登录,如非本人操作请及时修改密码!");
this.$router.push({
path: "/"
});
} else {
this.$message.error(response.data.msg);
}
}
对接接口对错误的处理
最新推荐文章于 2023-07-04 16:02:58 发布