Parcourir la source

请求异常处理/界面设置bug

zhuth il y a 7 ans
Parent
commit
06d7f1e3a6

+ 1 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -164,7 +164,7 @@ Ext.define('saas.util.BaseUtil', {
                             return resolve(res);
                         } else {
                             res.message = res.message || '未知错误';
-                            throw new Error(res.message);
+                            return reject(res);
                         }
                     },
                     failure: function (response, opts) {

+ 1 - 1
frontend/saas-web/app/view/core/form/SettingWin.js

@@ -219,7 +219,7 @@ Ext.define('saas.view.core.form.SettingWin', {
                 for(let k in d) {
                     r.set(k, d[k]);
                 }
-                r.commit();
+                // r.commit();
             }
         }else {
             store.loadData(data);

+ 5 - 5
frontend/saas-web/app/view/core/form/SettingWinController.js

@@ -68,13 +68,13 @@ Ext.define('saas.view.core.form.SettingWinController', {
         win = me.getView(),
         grid = win.down('grid');
 
-        saas.util.BaseUtil.showConfirm('警告', '即将清空所有自定义配置,是否继续?<br/>'+'<span style="color: red;font-size: 12px;">(*保存后生效)</span>')
-        .then(function(bid) {
-            if(bid == 'yes') {
+        // saas.util.BaseUtil.showConfirm('警告', '即将清空所有自定义配置,是否继续?<br/>'+'<span style="color: red;font-size: 12px;">(*保存后生效)</span>')
+        // .then(function(bid) {
+        //     if(bid == 'yes') {
                 win.fieldItems = me.resetItems();
                 win.setStoreData();
-            }
-        })
+        //     }
+        // })
     },
 
     resetItems: function() {

+ 1 - 1
frontend/saas-web/overrides/data/Connection.js

@@ -61,7 +61,7 @@ Ext.define('saas.override.data.Connection', {
         if(res && res.code == 40001) {
             // 如果token超时则显示重新登陆弹窗
             saas.util.BaseUtil.showLoginWin();
-            throw new Error('话已过期');
+            throw new Error('话已过期');
         }
 
         if(Authorization) {