优化代码

This commit is contained in:
java110 2022-08-03 15:42:17 +08:00
parent c9dc28586b
commit da56e33cb4

View File

@ -48,8 +48,7 @@
};
//发送get请求
vc.http.get('serviceManage',
'list',
vc.http.apiGet('/service.listServices',
param,
function(json, res) {
var _serviceManageInfo = JSON.parse(json);
@ -61,7 +60,8 @@
dataCount: vc.component.serviceManageInfo.total,
currentPage: _page
});
},function(errInfo,error){
},
function(errInfo, error) {
console.log('请求失败处理');
}
);
@ -96,9 +96,9 @@
_loadDataByParam: function() {
vc.component.serviceManageInfo.conditions.appId = vc.getParam("appId");
//如果 floodId 没有传 则,直接结束
if(vc.component.serviceManageInfo.conditions.appId == null
|| vc.component.serviceManageInfo.conditions.appId == undefined
|| vc.component.serviceManageInfo.conditions.appId == ''){
if (vc.component.serviceManageInfo.conditions.appId == null ||
vc.component.serviceManageInfo.conditions.appId == undefined ||
vc.component.serviceManageInfo.conditions.appId == '') {
vc.component._listServices(DEFAULT_PAGE, DEFAULT_ROWS);
return;
}