优化页面重启体验

This commit is contained in:
java110 2020-12-21 18:17:10 +08:00
parent 1f9a3ba540
commit 2399a8176e
2 changed files with 8 additions and 6 deletions

View File

@ -30,13 +30,15 @@
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
$('#machineStateModel').modal('hide');
vc.emit('machineManage', 'listMachine', {});
if (res.status != 200) {
vc.toast(json);
//关闭model
$('#machineStateModel').modal('hide');
vc.emit('machineManage', 'listMachine', {});
return;
}
vc.toast(json);
let _data = JSON.parse(json);
vc.toast(_data.msg);
},
function (errInfo, error) {
console.log('请求失败处理');

View File

@ -45,7 +45,7 @@
vc.component.machineManageInfo.conditions.page = _page;
vc.component.machineManageInfo.conditions.row = _rows;
var param = {
let param = {
params: vc.component.machineManageInfo.conditions
};
@ -54,7 +54,7 @@
'list',
param,
function (json, res) {
var _machineManageInfo = JSON.parse(json);
let _machineManageInfo = JSON.parse(json);
vc.component.machineManageInfo.total = _machineManageInfo.total;
vc.component.machineManageInfo.records = _machineManageInfo.records;
vc.component.machineManageInfo.machines = _machineManageInfo.machines;