shawenguan 2 anos atrás
pai
commit
f633b351db
1 arquivos alterados com 7 adições e 6 exclusões
  1. 7 6
      Scripts/others/dssy.js

+ 7 - 6
Scripts/others/dssy.js

@@ -16,13 +16,14 @@
 hostname = mars.inout.top
 
 *******************************/
-let body = $response.body;
 try {
-    let data = JSON.parse(body);
-    data.data['vip_expire_time'] = 4076744128000;
-    data.data['auto_subscribe_or_permanent_vip'] = true;
-    data.data['is_lifetime_membership'] = true;
-    $done({ body: JSON.stringify(body) });
+    let data = JSON.parse(typeof $response != "undefined" && $response.body || null);
+    if(data && data.data){
+        data.data['vip_expire_time'] = 4076744128000;
+        data.data['auto_subscribe_or_permanent_vip'] = true;
+        data.data['is_lifetime_membership'] = true;
+        $done({ body: JSON.stringify(body) });
+    }
 } catch {
     $done();
 }