shawenguan %!s(int64=2) %!d(string=hai) anos
pai
achega
f633b351db
Modificáronse 1 ficheiros con 7 adicións e 6 borrados
  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();
 }