diff --git "a/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.js" "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.js" new file mode 100644 index 0000000..36ed495 --- /dev/null +++ "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.js" @@ -0,0 +1,29 @@ +import { AliTools, BillType, RuleObject, toFloat } from 'common/index.js'; + +function autoTransfer(pl,t){ + let obj = new RuleObject(BillType.Transfer); + + obj.channel = `支付宝[转账到银行卡]`; + + let content = JSON.parse(pl.content); + obj.money = toFloat(content.money); + obj.shopName = "转账到银行卡"; + obj.shopItem = pl.title; + obj.time = t; + obj.accountNameFrom = '支付宝余额'; + AliTools.handleContentItems(content.content, obj); + + return obj; + +} + + +export function get(data) { + let json = JSON.parse(data)[0]; + let pl = JSON.parse(json.pl); + let t = json.mct; + if (pl.title.indexOf('转出到账成功') !== -1) { + return autoTransfer(pl, t); + } + return null; +} diff --git "a/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.test.js" "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.test.js" new file mode 100644 index 0000000..dd39731 --- /dev/null +++ "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/main.test.js" @@ -0,0 +1,23 @@ +const { get } = require('./main'); +const { testAnkio, testAnkioInit } = require('../../../../tests/TestUtils'); + + +testAnkioInit(get, __dirname, 'com.eg.android.AlipayGphone'); + + + +test('支付宝转账到银行卡', () => + testAnkio('支付宝转账到银行卡', [ + { + "type": "Transfer", + "money": 500, + "fee": 0, + "shopName": '转账到银行卡', + "shopItem": '转出到账成功', + "accountNameFrom": '支付宝余额', + "accountNameTo": '中信银行(5792)', + "currency": 'CNY', + "time": 1729359863000, + "channel": '支付宝[转账到银行卡]', + }, + ])); diff --git "a/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/tests/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241.txt" "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/tests/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241.txt" new file mode 100644 index 0000000..522ed6e --- /dev/null +++ "b/src/rule/com.eg.android.AlipayGphone/app/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241/tests/\346\224\257\344\273\230\345\256\235\350\275\254\350\264\246\345\210\260\351\223\266\350\241\214\345\215\241.txt" @@ -0,0 +1,10 @@ +[ +{ +"mk": 241060014423200001, +"st": 1, +"isSc": 0, +"appId": "", +"mct": 1729359863000, +"pl": "{\"templateType\":\"BN\",\"commandType\":\"UPDATE\",\"withPushNfc\":\"Y\",\"expireLink\":\"\",\"msgType\":\"TODO\",\"icon\":\"https://gw.alipayobjects.com/mdn/rms_f96971/afts/img/A*leNcS41oUu0AAAAAAAAAAABkARQnAQ\",\"link\":\"alipays://platformapi/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20241020019130201010290096463581&bizType=YEB?tagid=MB_SEND_PH\",\"businessId\":\"PAY_HELPER_CARD_2088822946736298\",\"msgId\":\"0c7739c58a0c4b2c6a24f51234bfbb7600629\",\"templateCode\":\"00059_00094_zfzs001\",\"templateId\":\"WALLET-BILL@BLPaymentHelper\",\"title\":\"转出到账成功\",\"content\":\"{\\\"status\\\":\\\"转出到账成功\\\",\\\"date\\\":\\\"10月20日\\\",\\\"amountTip\\\":\\\"\\\",\\\"money\\\":\\\"500.00\\\",\\\"unit\\\":\\\"元\\\",\\\"infoTip\\\":\\\"\\\",\\\"failTip\\\":\\\"\\\",\\\"goto\\\":\\\"alipays://platformapi/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20241020019130201010290096463581&bizType=YEB\\\",\\\"content\\\":[{\\\"title\\\":\\\"转入账户:\\\",\\\"content\\\":\\\"中信银行(5792)\\\"}],\\\"ad\\\":[],\\\"actions\\\":[{\\\"name\\\":\\\"\\\",\\\"url\\\":\\\"\\\"},{\\\"name\\\":\\\"查看详情\\\",\\\"url\\\":\\\"alipays://platformapi/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20241020019130201010290096463581&bizType=YEB\\\"}]}\",\"linkName\":\"\",\"bizName\":\"支付助手\",\"msgCategory\":\"bill\",\"scm\":\"27.gotone.card.0c7739c58a0c4b2c6a24f51234bfbb7600629.MB_SEND_PH.null.payment_assist.10090.10099.2019062521000502094325.9991746\",\"assistInfo\":\"{\\\"showInFriendTab\\\":false,\\\"icon\\\":\\\"https://gw.alipayobjects.com/mdn/rms_f96971/afts/img/A*ZapXT6AjvG0AAAAAAAAAAABkARQnAQ\\\",\\\"reminderType\\\":\\\"point\\\",\\\"hiddenMsgHeader\\\":false,\\\"title\\\":\\\"支付助手\\\",\\\"reminderTypeModifyEnable\\\":false,\\\"assistId\\\":\\\"payment_assist\\\",\\\"desc\\\":\\\"支付宝资金变动通知\\\"}\",\"ih\":\"{\\\"extInfo\\\":{},\\\"iid\\\":\\\"105\\\",\\\"ioty\\\":\\\"aor\\\",\\\"itemBasicInfo\\\":{\\\"dn\\\":\\\"服务提醒\\\",\\\"ic\\\":\\\"https://gw.alipayobjects.com/zos/bmw-prod/b96c31e0-64ba-4cbb-9a64-73ff17d701fd.webp\\\",\\\"lk\\\":\\\"alipays://platformapi/startapp?appId=20000235&source=friendTab\\\"},\\\"itemUserRelation\\\":{\\\"ilf\\\":\\\"N\\\",\\\"uc\\\":{\\\"top\\\":\\\"0\\\"},\\\"version\\\":0},\\\"ity\\\":\\\"105\\\",\\\"moty\\\":\\\"u\\\",\\\"msgInfo\\\":{\\\"bm\\\":\\\"转出到账成功¥500.00 \\\",\\\"cmid\\\":\\\"0c7739c58a0c4b2c6a24f51234bfbb7600629\\\",\\\"lmt\\\":1729359863036,\\\"msrid\\\":\\\"00059_00094_zfzs001\\\",\\\"ncs\\\":\\\"N\\\",\\\"rps\\\":\\\"num\\\",\\\"sam\\\":\\\"Y\\\",\\\"ssrid\\\":\\\"PAY_HELPER_CARD_2088822946736298\\\",\\\"urn\\\":1}}\",\"bizMonitor\":\"{\\\"serviceCode\\\":\\\"MB_SEND_PH\\\",\\\"bizName\\\":\\\"\\\",\\\"createTime\\\":1729359863118,\\\"businessId\\\":\\\"PAY_HELPER_CARD_2088822946736298\\\",\\\"messageId\\\":\\\"0c7739c58a0c4b2c6a24f51234bfbb7600629\\\",\\\"messageTitle\\\":\\\"转出到账成功\\\",\\\"pid\\\":\\\"2088822946736298\\\",\\\"templateId\\\":\\\"WALLET-BILL@BLPaymentHelper\\\",\\\"status\\\":\\\"\\\"}\",\"languageType\":\"zh-Hans\",\"subscribeConfig\":\"0\",\"gmtCreate\":1729359863036,\"gmtValid\":2040399863024,\"operate\":\"SEND\",\"templateName\":\"支付助手\",\"homePageTitle\":\"转出到账成功¥500.00 \",\"status\":\"\",\"extraInfo\":\"{\\\"topSubContent\\\":\\\"转出到账成功\\\",\\\"preValue\\\":\\\"¥\\\",\\\"languageType\\\":\\\"zh-Hans\\\",\\\"isPaymentMsg\\\":true,\\\"assistName2\\\":\\\"\\\",\\\"assistName3\\\":\\\"\\\",\\\"assistName1\\\":\\\"转入账户\\\",\\\"templateId\\\":\\\"WALLET-FWC@remindNumber\\\",\\\"content\\\":\\\"500.00\\\",\\\"linkName\\\":\\\"\\\",\\\"assistMsg3\\\":\\\"\\\",\\\"sceneExt2\\\":{\\\"sceneUrl\\\":\\\"alipays://platformapi/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20241020019130201010290096463581&bizType=YEB\\\",\\\"sceneType\\\":\\\"nativeApp\\\",\\\"sceneName\\\":\\\"中信银行\\\",\\\"sceneIcon\\\":\\\"https://mdn.alipayobjects.com/fin_instasset/uri/img/as/instasset/CITIC/BANK_LOGO/PURE?zoom=[pixelWidth]w_[pixelHeight]h.png\\\"},\\\"assistMsg2\\\":\\\"\\\",\\\"assistMsg1\\\":\\\"中信银行(5792)\\\",\\\"assistName4\\\":\\\"\\\",\\\"assistMsg5\\\":\\\"\\\",\\\"assistMsg4\\\":\\\"\\\",\\\"assistName5\\\":\\\"\\\",\\\"buttonLink\\\":\\\"\\\",\\\"cardAdInfo\\\":{\\\"p116\\\":{\\\"bizMonitor\\\":{\\\"marketingUniqueId\\\":\\\"MUd7b640fe57bc4e4f886095b6fec476d9\\\",\\\"marketingRuleId\\\":\\\"MR3149d4f6dba24f3abe06cd558c5bed0b\\\",\\\"style\\\":\\\"actionLine2\\\",\\\"marketingItemId\\\":\\\"MI5ff0025309f9429193144b30b0cfc50f\\\"},\\\"expireTime\\\":1760895863103,\\\"marketingUniqueId\\\":\\\"MUd7b640fe57bc4e4f886095b6fec476d9\\\",\\\"minClientVersion\\\":\\\"10.1.98\\\",\\\"recommendTemplateId\\\":\\\"actionLine2\\\",\\\"viewInfo\\\":{\\\"btnName\\\":\\\"支付奖励\\\",\\\"actionType\\\":\\\"link\\\",\\\"tagIcon\\\":\\\"https://mdn.alipayobjects.com/huamei_ekkls7/afts/img/A*h6FWQ6x3NT8AAAAAAAAAAAAADiGFAQ/original\\\",\\\"tagColor\\\":\\\"#FF6011\\\",\\\"actionUrl\\\":\\\"alipays://platformapi/startapp?appId=2021001168603174&page=/pages/marketing-index/index&chInfo=xiaoxidh\\\",\\\"tag\\\":\\\"领取你的摇红包福利\\\"}}}}\"}" +} +] diff --git a/src/utils/AliTools.js b/src/utils/AliTools.js index 162ff43..3e114d1 100644 --- a/src/utils/AliTools.js +++ b/src/utils/AliTools.js @@ -22,6 +22,7 @@ export const AliTools = { case '付款方式:': case '退款方式:': case 'Payment method:': + if (item.content === '账户余额' || item.content === 'Balance') { result.accountNameFrom = '支付宝余额'; break; @@ -34,6 +35,7 @@ export const AliTools = { result.shopItem = item.content; break; case '还款到:': + case '转入账户:': result.accountNameTo = item.content; break; }