Переглянути джерело

UPS 迁移1.0.51-10.接口修改成baseResponse

YangZhiJie 1 рік тому
батько
коміт
661d89b39e

+ 7 - 1
src/customer/TabDataSort.vue

@@ -129,7 +129,13 @@ export default {
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
+        success: function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const data = response.data;
           if (data != undefined) {
             data.dataList.sort(function (a, b) {
               var index1 = a.data.sortNo.displayValue;

+ 7 - 1
src/window/tabFormView/TabFormEdit.vue

@@ -2056,7 +2056,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window/tabFormView/TabFormView.vue

@@ -1922,7 +1922,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window/tabGridView/SubTabGridEdit.vue

@@ -1056,7 +1056,13 @@ export default {
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
+        success: function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const data = response.data;
           var modelDatas = data.dataList;
           WindowClientUtil.setViewDisplayAttribute(modelDatas, 'editMode', false);
           WindowClientUtil.setViewDisplayAttribute(modelDatas, 'select', false);

+ 7 - 1
src/window/tabGridView/TabGridEdit.vue

@@ -779,7 +779,13 @@ export default {
 
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (data) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const data = response.data;
           var modelDatas = data.dataList;
           if (modelDatas != undefined) {
             for (var index = 0, len = modelDatas.length; index < len; index++) {

+ 7 - 1
src/window1/tabFormEdit/TabFormEdit.vue

@@ -2055,7 +2055,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window1/tabFormEdit/TabFormEditModal.vue

@@ -2163,7 +2163,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window1/tabFormView/TabFormView.vue

@@ -1923,7 +1923,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window1/tabFormView/TabFormViewModal.vue

@@ -1946,7 +1946,13 @@ export default {
       _self.loading = true;
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (gridData) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const gridData = response.data;
           var dataLists = gridData.dataList;
           if (dataLists != undefined && dataLists.length > 0) {
             _self.modelData = dataLists[0];

+ 7 - 1
src/window1/tabGridView/SubTabGridEdit.vue

@@ -1058,7 +1058,13 @@ export default {
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
+        success: function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const data = response.data;
           var modelDatas = data.dataList;
           WindowClientUtil.setViewDisplayAttribute(modelDatas, 'editMode', false);
           WindowClientUtil.setViewDisplayAttribute(modelDatas, 'select', false);

+ 7 - 1
src/window1/tabGridView/TabGridEdit.vue

@@ -797,7 +797,13 @@ export default {
 
       WindowServerUtil.queryTabData(
         tabQueryParam,
-        function (data) {
+        function (response) {
+          
+          if(response.errorCode != 0){
+            Notify.error('Error', response.errorMessage, false);
+            return;
+          }
+          const data = response.data;
           var modelDatas = data.dataList;
           if (modelDatas != undefined) {
             for (var index = 0, len = modelDatas.length; index < len; index++) {