Authored by 李奇

开关逻辑优化

@@ -122,6 +122,8 @@ App({ @@ -122,6 +122,8 @@ App({
122 if (data['disableJavaApi'] && md5('disableJavaApi') === data['disableJavaApi']) { // TODO 键值确认 122 if (data['disableJavaApi'] && md5('disableJavaApi') === data['disableJavaApi']) { // TODO 键值确认
123 this.globalData.switch_javaApiEnable = false; 123 this.globalData.switch_javaApiEnable = false;
124 } 124 }
  125 + }, () => {
  126 + this.globalData.hasSetSwitch = true;
125 }); 127 });
126 let that = this 128 let that = this
127 let params = {}; 129 let params = {};
@@ -52,6 +52,9 @@ class Service { @@ -52,6 +52,9 @@ class Service {
52 app.globalData.switch_javaApiEnable = false; 52 app.globalData.switch_javaApiEnable = false;
53 } 53 }
54 return executeReq(); 54 return executeReq();
  55 + }, () => {
  56 + app.globalData.hasSetSwitch = true;
  57 + return executeReq();
55 }); 58 });
56 } else { 59 } else {
57 return executeReq(); 60 return executeReq();
@@ -87,6 +90,9 @@ class Service { @@ -87,6 +90,9 @@ class Service {
87 app.globalData.switch_javaApiEnable = false; 90 app.globalData.switch_javaApiEnable = false;
88 } 91 }
89 return executeReq(); 92 return executeReq();
  93 + }, () => {
  94 + app.globalData.hasSetSwitch = true;
  95 + return executeReq();
90 }); 96 });
91 } else { 97 } else {
92 return executeReq(); 98 return executeReq();