From 9ab7a3f5dde020e9da012a42055c8f2ab8645c7b Mon Sep 17 00:00:00 2001 From: ctrlcvs <1509167646@qq.com> Date: Sun, 28 May 2023 23:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3`#=E5=8E=9F=E7=A5=9E=E5=85=85?= =?UTF-8?q?=E5=80=BC`=20=E7=94=B1=E4=BA=8Emhy=E7=9A=84=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9=E4=BA=86=EF=BC=8C=E7=9B=AE?= =?UTF-8?q?=E5=89=8D=E6=97=A0=E6=B3=95=E6=94=AF=E6=8C=81=E5=BE=AE=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mhyTopUpLogin.js | 6 ++++-- model/mys/mihoyoApi.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/model/mhyTopUpLogin.js b/model/mhyTopUpLogin.js index 18fa6ba..342dd48 100644 --- a/model/mhyTopUpLogin.js +++ b/model/mhyTopUpLogin.js @@ -162,7 +162,7 @@ export default class mysTopLogin { this.e.reply(this.sendMsgPay) return true; } - let iswx = msg[0].includes('微信') ? 'weixin' : 'alipay' + let iswx = msg[0].includes('微信') ? 'wechatpay' : 'alipay' if (msg[1].length != 1) { this.e.reply(this.sendMsgPay) return true; @@ -178,7 +178,7 @@ export default class mysTopLogin { return true } let ckData = await utils.getCookieMap(this.e.cookie) - let device_id = utils.randomString(4) + let device_id = utils.randomString(16) let region = utils.getServer(this.e.uid) let order = { "account": ckData?.get('ltuid') || ckData?.get('account_id'), @@ -202,7 +202,9 @@ export default class mysTopLogin { order["pay_type"] = iswx order["pay_vendor"] = iswx } + console.log(order) let res = await this.user.getData('createOrder', { order, headers: { "x-rpc-device_id": device_id } }) + console.log(res) if (!res) return false; if (res?.code != 200 && res?.retcode != 0) { this.e.reply('生成充值订单失败:' + res.message) diff --git a/model/mys/mihoyoApi.js b/model/mys/mihoyoApi.js index 5c709e2..6e0c38b 100644 --- a/model/mys/mihoyoApi.js +++ b/model/mys/mihoyoApi.js @@ -302,7 +302,7 @@ export default class miHoYoApi { createOrder:{ url:`${mys.hk4_sdk}/hk4e_cn/mdk/atropos/api/createOrder`, body: { - // "special_info": "topup_center", + "special_info": "topup_center", "order": data.order, "sign": this.gen_sign(data.order) },