Closed LX1639193100 closed 1 month ago
该数据已适配,以下为自动识别的结果:
{
type: 'Expend',
money: 4.99,
fee: 0,
shopName: '中国电信',
shopItem: '付款成功¥4.99 ,你有支付奖励待领取',
accountNameFrom: '花呗',
accountNameTo: '',
currency: 'CNY',
time: 1726820434000,
channel: '支付宝[消费-支出]'
}
![Uploading Screenshot_2024-09-20-20-35-18-04_696fc9dfea9e2f51729e0646b2031c10.jpg…]()
显示未命中任何规则
显示未命中任何规则
@LX1639193100 删除分类规则,更新到最新版再试
试了还是无用
日志
[2024-09-20 20:49:43] [ auto_server ] [ ] [ INFO ] 规则识别结果: missing ) after condition (JavaScript#4) [2024-09-20 20:49:43] [ auto_server ] [ ] [ ERROR ] missing ) after condition (JavaScript#4) [2024-09-20 20:49:43] [ auto_server ] [ ] [ INFO ] var window = JSON.parse(data); var common=function(t){"use strict";var e={Expend:"Expend",Income:"Income",Transfer:"Transfer"},n={"美元":"USD","阿联酋迪拉姆":"AED","阿富汗尼":"AFN","阿尔巴尼亚列克":"ALL","亚美尼亚德拉姆":"AMD","荷属安的列斯盾":"ANG","安哥拉宽扎":"AOA","阿根廷比索":"ARS","澳大利亚元":"AUD","阿鲁巴弗罗林":"AWG","阿塞拜疆马纳特":"AZN","波斯尼亚马克":"BAM","巴巴多斯元":"BBD","孟加拉塔卡":"BDT","保加利亚列弗":"BGN","巴林第纳尔":"BHD","布隆迪法郎":"BIF","百慕大元":"BMD","文莱元":"BND","玻利维亚诺":"BOB","巴西雷亚尔":"BRL","巴哈马元":"BSD","不丹努尔特鲁姆":"BTN","博茨瓦纳普拉":"BWP","白俄罗斯卢布":"BYN","伯利兹元":"BZD","加拿大元":"CAD","刚果法郎":"CDF","瑞士法郎":"CHF","智利比索":"CLP","人民币":"CNY","哥伦比亚比索":"COP","哥斯达黎加科朗":"CRC","古巴可兑换比索":"CUC","古巴比索":"CUP","佛得角埃斯库多":"CVE","捷克克朗":"CZK","吉布提法郎":"DJF","丹麦克朗":"DKK","多米尼加比索":"DOP","阿尔及利亚第纳尔":"DZD","埃及镑":"EGP","厄立特里亚纳克法":"ERN","埃塞俄比亚比尔":"ETB","欧元":"EUR","斐济元":"FJD","福克兰群岛镑":"FKP","英镑":"GBP","格鲁吉亚拉里":"GEL","根西岛镑":"GGP","加纳塞地":"GHS","直布罗陀镑":"GIP","冈比亚达拉西":"GMD","几内亚法郎":"GNF","危地马拉格查尔":"GTQ","圭亚那元":"GYD","港币":"HKD","洪都拉斯伦皮拉":"HNL","克罗地亚库纳":"HRK","海地古德":"HTG","匈牙利福林":"HUF","印尼盾":"IDR","以色列新谢克尔":"ILS","曼岛镑":"IMP","印度卢比":"INR","伊拉克第纳尔":"IQD","伊朗里亚尔":"IRR","冰岛克朗":"ISK","泽西岛镑":"JEP","牙买加元":"JMD","约旦第纳尔":"JOD","日元":"JPY","肯尼亚先令":"KES","吉尔吉斯斯坦索姆":"KGS","柬埔寨瑞尔":"KHR","基里巴斯元":"KID","科摩罗法郎":"KMF","韩元":"KRW","科威特第纳尔":"KWD","开曼群岛元":"KYD","哈萨克斯坦坚戈":"KZT","老挝基普":"LAK","黎巴嫩镑":"LBP","斯里兰卡卢比":"LKR","利比里亚元":"LRD","莱索托洛蒂":"LSL","利比亚第纳尔":"LYD","摩洛哥迪拉姆":"MAD","摩尔多瓦列伊":"MDL","马达加斯加阿里亚里":"MGA","北马其顿代纳尔":"MKD","缅甸元":"MMK","蒙古图格里克":"MNT","澳门币":"MOP","毛里塔尼亚乌吉亚":"MRU","毛里求斯卢比":"MUR","马尔代夫拉菲亚":"MVR","马拉维克瓦查":"MWK","墨西哥比索":"MXN","马来西亚林吉特":"MYR","莫桑比克梅蒂卡尔":"MZN","纳米比亚元":"NAD","尼日利亚奈拉":"NGN","尼加拉瓜科多巴":"NIO","挪威克朗":"NOK","尼泊尔卢比":"NPR","新西兰元":"NZD","阿曼里亚尔":"OMR","巴拿马巴波亚":"PAB","秘鲁索尔":"PEN","巴布亚新几内亚基那":"PGK","菲律宾比索":"PHP","巴基斯坦卢比":"PKR","波兰兹罗提":"PLN","巴拉圭瓜拉尼":"PYG","卡塔尔里亚尔":"QAR","罗马尼亚列伊":"RON","塞尔维亚第纳尔":"RSD","俄罗斯卢布":"RUB","卢旺达法郎":"RWF","沙特里亚尔":"SAR","所罗门群岛元":"SBD","塞舌尔卢比":"SCR","苏丹镑":"SDG","瑞典克朗":"SEK","新加坡元":"SGD","圣赫勒拿镑":"SHP","塞拉利昂利昂":"SLL","索马里先令":"SOS","苏里南元":"SRD","南苏丹镑":"SSP","圣多美多普拉":"STN","叙利亚镑":"SYP","斯威士兰里兰吉尼":"SZL","泰铢":"THB","塔吉克斯坦索莫尼":"TJS","土库曼斯坦马纳特":"TMT","突尼斯第纳尔":"TND","汤加潘加":"TOP","土耳其里拉":"TRY","特立尼达和多巴哥元":"TTD","图瓦卢元":"TVD","新台币":"TWD","坦桑尼亚先令":"TZS","乌克兰格里夫纳":"UAH","乌干达先令":"UGX","乌拉圭比索":"UYU","乌兹别克斯坦索姆":"UZS","委内瑞拉玻利瓦尔":"VES","越南盾":"VND","瓦努阿图瓦图":"VUV","萨摩亚塔拉":"WST","中非金融合作法郎":"XAF","东加勒比元":"XCD","特别提款权":"XDR","西非金融合作法郎":"XOF","太平洋法郎":"XPF","也门里亚尔":"YER","南非兰特":"ZAR","赞比亚克瓦查":"ZMW","津巴布韦元":"ZWL"};function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(t)).next,0===e);else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(13===t.length)return parseInt(t);if(0===t.length)return 1e4Math.floor(Date.now()/1e4);if(!e.match(/[YMDhis]+/g))throw new Error("Invalid format string");var n=e.replace(/Y/g,"(\d{4})").replace(/M/g,"(\d{1,2})").replace(/D/g,"(\d{1,2})").replace(/h/g,"(\d{1,2})").replace(/i/g,"(\d{1,2})").replace(/s/g,"(\d{1,2})"),r=t.match(new RegExp("^".concat(n,"$")));if(!r)throw console.log(n,t,r),new Error("Invalid time format");for(var o=e.match(/[YMDhis]/g),a={},i=0;i<o.length;i++)a[o[i]]=r[i+1];var c=new Date,l={Y:a.Y||c.getFullYear(),M:a.M||c.getMonth()+1,D:a.D||c.getDate(),h:a.h||c.getHours()+8,m:a.i||0,s:a.s||0};return new Date(l.Y,l.M-1,l.D,l.h,l.m,l.s).getTime()}function c(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("number"==typeof t)return t;if("string"==typeof t){t=t.replace(/[^\d.-]/g,"");var n=parseFloat(t);return isNaN(n)?0:!e&&n<0?-n:n}return 0}function l(t){return+parseFloat(c(t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]).toFixed(2))}var u=o((function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Expend,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:n["人民币"],f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=r,this.money=o,this.fee=u,this.shopName=a,this.shopItem=i,this.accountNameFrom=c,this.accountNameTo=l,this.currency=s,this.time=f,this.channel=h})),s={handleContentItems:function(t,e){t.forEach((function(t){switch(t.title){case"交易对象:":case"付款方:":case"付款人:":case"对方账户:":e.shopName=t.content;break;case"付款方式:":case"退款方式:":if("账户余额"===t.content){e.accountNameFrom="支付宝余额";break}e.accountNameFrom=t.content;break;case"扣款说明:":case"退款说明:":case"转账备注:":e.shopItem=t.content}}))},handleBillItems:function(t,n){t.forEach((function(t){if(void 0!==t.value){var r=JSON.parse(t.value);switch(t.templateId){case"BLDetailTitle":n.shopName=r.content;break;case"BLDetailPrice":n.money=l(r.amount),n.money<0&&(n.money=-n.money),r.amount.includes("-")?n.type=e.Expend:r.amount.includes("+")?n.type=e.Income:n.type=e.Transfer;break;default:/创建时间/.test(r.title)||/支付时间/.test(r.title)?n.time=i(r.data[0].content,"Y-M-D h:i:s"):/付款方式/.test(r.title)?(n.accountNameFrom=r.data[0].content,/账户余额|余额/.test(n.accountNameFrom)&&(n.accountNameFrom="支付宝余额")):/商品说明|转账备注/.test(r.title)&&(n.shopItem=r.data[0].content)}}}))}};return t.AliTools=s,t.BillType=e,t.Currency=n,t.RuleObject=u,t.findNonEmptyString=function(){for(var t=Array.from(arguments),e=0;e<t.length;e++)if(""!==t[e]&&"string"==typeof t[e])return t[e];return""},t.formatDate=i,t.isTimeInRange=function(t,e,n){function r(t){var e=a(t.split(":").map(Number),2);return 60e[0]+e[1]}var o=r(t),i=r(e),c=r(n);return o<=i?c>=o&&c<=i:c>=o||c<=i},t.stripHtml=function(t){return t.replace(/<[^>]*>/g,"")},t.toDoubleFloat=function(t){return l(c(t)/100)},t.toFloat=l,t}({});
[Uploading log.txt…]()
让你删分类规则你没删呐...... 自定义分类规则
这儿的
OK了