shawenguan 1 年之前
父节点
当前提交
64f8508bf9
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      Scripts/bilibili/bilibiliHelper.js

+ 6 - 2
Scripts/bilibili/bilibiliHelper.js

@@ -587,7 +587,7 @@ async function silver2coin() {
         },
         body: magicJS.objToQueryStr(body)
     }
-    await magicJS.http.get(myRequest).then(response => {
+    await magicJS.http.post(myRequest).then(response => {
         try {
             let result = response.body;
             let title = `银瓜子转硬币`;
@@ -618,7 +618,11 @@ async function silver2coin() {
         } catch (e) {
             magicJS.logger.error(JSON.stringify(e));
         }
-    })
+    }).catch(err => {
+        const msg = `兑换异常\n${JSON.stringify(err)}`;
+        magicJS.logger.error(msg);
+        reject(msg);
+    });
 }
 
 async function liveSign() {