Authored by yyq

lint passport

@@ -17,15 +17,15 @@ module.exports = class extends global.yoho.BaseModel { @@ -17,15 +17,15 @@ module.exports = class extends global.yoho.BaseModel {
17 */ 17 */
18 getResourceAsync(resourceCode) { 18 getResourceAsync(resourceCode) {
19 return this.indexApi.getResourceAsync(resourceCode) 19 return this.indexApi.getResourceAsync(resourceCode)
20 - .then(result => {  
21 - if (result.code === 200) {  
22 - return result.data;  
23 - } else { 20 + .then(result => {
  21 + if (result.code === 200) {
  22 + return result.data;
  23 + } else {
  24 + return {};
  25 + }
  26 + })
  27 + .catch(() => {
24 return {}; 28 return {};
25 - }  
26 - })  
27 - .catch(() => {  
28 - return {};  
29 - }); 29 + });
30 } 30 }
31 }; 31 };