Auto-Accounting / AutoResource

自动记账资源提交平台,由GitBot自动化管理。
https://auto.ankio.net/
16 stars 10 forks source link

【微信】自动扣费@Ver.1 #70

Closed taigongzhaihua closed 3 years ago

taigongzhaihua commented 3 years ago

Update Log/更新日志

Data/数据

{"data":[{"app":"com.tencent.mm","dataId":"edqzUfdX7lRNx2vKHWhIQwF8fqDiS6kS","identify":"app","data":"{\"account_name1\":\"$8\",\"shopRemark\":\"$4($7)\",\"account_name2\":\"\",\"auto\":\"0\",\"regular_app\":\"com.tencent.mm\",\"identify\":\"app\",\"regex_input\":\"title:卡片消息.*?,title:扣费通知.*?,url:.*?&trans_id=(\\\\d+)&create_time=(\\\\d+),.*?,line_content:topline:value:.*?,word:¥(\\\\d+\\\\.\\\\d{2}),key:.*?,word:扣费金额,lines:line:\\\\[value:.*?,word:(.*?),key:.*?,word:扣费(项目|服务),(value:[^w]*?word:([^,]+),key:.*?word:扣费内容,)?value:.*?,word:(.*?),key:.*?,word:支付方式,value:color:.*?,word:(.*?),key:.*?,word:备注\\\\],opitems:opitem:\\\\[.*\\\\],.*,display_name:(.*?),\",\"fee\":\"\",\"shopName\":\"$10\",\"type\":\"0\",\"version\":1,\"dataId\":\"edqzUfdX7lRNx2vKHWhIQwF8fqDiS6kS\",\"money\":\"$3\",\"regular_name\":\"自动扣费\",\"str_input\":\"cache_user:美团平台商户,cache_user2:腾讯企业邮箱,cache_paytools:建设银行储蓄卡(0956),isSend:0,title:卡片消息,content:msg:appmsg:extinfo:,lowurl:,sourcedisplayname:,showtype:1,title:扣费通知,type:5,appattach:totallen:0,cdnthumburl:,aeskey:,attachid:,fileext:,cdnthumbaeskey:,content: t,content:,url:https://wx.tenpay.com/userroll/readtemplate?t=userroll/index_tmpl&type=userrolldetail&trans_id=4200001154202110077524203147&create_time=1633588170,soundtype:0,mmreader:template_detail:template_show_type:1,text_content:cover:,color:,text:,new_tmpl_type:0,line_content:topline:value:color:#000000,small_text_count:1,word:¥1.50,key:hide_dash_line:1,color:#888888,word:扣费金额,lines:line:[value:color:#000000,word:滴滴出行,key:color:#888888,word:扣费服务,value:color:#000000,word:滴滴出行服务,key:color:#888888,word:扣费内容,value:color:#000000,word:中国银行储蓄卡(7575),key:color:#888888,word:支付方式,value:color:#000000,word:如果对扣费有疑问,请联系商家确认,key:color:#888888,word:备注],opitems:opitem:[color:#000000,icon:,general_string:,weapp_path:pages/use/service.html?service_id=00003000000000158496531557187925,display_line_number:0,url:,weapp_version:139,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:gh_8aafc8cb4f64@app,op_type:1,is_rich_text:0,word:管理滴滴出行自动扣费,business_id:,weapp_state:0,color:#000000,icon:,general_string:,weapp_path:,display_line_number:0,url:https://pay.weixin.qq.com/mmpaykf/faqmanage?ver=v1&trans_id=4200001154202110077524203147&create_time=1633588170&wx_header=0&scene_code=payproof_cell,weapp_version:0,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:,op_type:0,is_rich_text:0,word:对订单有疑惑,business_id:,weapp_state:0,color:#000000,icon:,general_string:,weapp_path:pages/record/detail.html?bill_no=1000000000202110071524145450945,display_line_number:0,url:,weapp_version:139,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:gh_8aafc8cb4f64@app,op_type:1,is_rich_text:0,word:查看微信支付分服务订单,business_id:,weapp_state:0],show_type:1,publisher:nickname:微信支付,content: tt,username:wxzhifu,template_header:shortcut_icon_url:,hide_time:1,title:扣费凭证,show_icon_and_display_name:1,ignore_hide_title_and_time:1,hide_title_and_time:1,right_desc_name:,hide_icon_and_display_name_line:0,header_jump_url:,icon_url:http://mmbiz.qpic.cn/mmbiz/byPQsp0wEeYPqM7aQfgddiaYwVXuKZM7rLJshlsl2VPetIoJw5icTKKWNI6jC72Olgpficbk7tG6A6vcuu5KHMjNA/0?wx_fmt=png,transaction_id:,first_color:,title_color:,pay_style:1,finder_user_name:,pub_time:1633588171,header_jump_type:0,show_right_icon_and_desc_name:0,display_name:广州骑安,finder_nonceid:,show_finder_feed_entry:0,display_name_desc:,right_icon_url:,finder_feed_thumnail:,first_data:,finder_feedid:,category:item:is_pay_subscribe:0,video_height:0,sources:source:name:微信支付,content: t,content: t,appmsg_like_type:0,video_width:0,recommendation:,title:扣费凭证,native_url:,content: t,cover:,weapp_version:0,vid:,pic_num:0,digest:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,cover_235_1:,weapp_username:,fileid:0,player:,cover_1_1:,del_flag:0,play_url:,shorturl:,pub_time:1633588171,pic_urls:,cover_16_9:,general_string:,template_op_type:0,weapp_path:,url:https://wx.tenpay.com/userroll/readtemplate?t=userroll/index_tmpl&type=userrolldetail&trans_id=4200001154202110077524203147&create_time=1633588170,tweetid:,play_length:0,comment_topic_id:0,music_source:0,longurl:,styles:topColor:,style:[color:#000000,range:4,5,font:s,color:#000000,range:14,4,font:s,color:#000000,range:23,6,font:s,color:#000000,range:34,13,font:s,color:#000000,range:50,16,font:s],itemshowtype:4,contentattr:0,weapp_state:0,show_complaint_button:0,count:1,name:微信支付,topnew:cover:,width:0,digest:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,content: ttt,height:0,type:0,content: tt,content: t,forbid_forward:0,notify_msg:,des:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,appid:,sourceusername:,sdkver:0,action:,template_id:OqDMc7J-BuyL3PptuTuGTHEAAYOZT8_6y-hkAP-e6XM,thumburl:,contentattr:0,fromusername:gh_3dfda90e39d6,appinfo:appname:微信支付,version:0,isforceupdate:1,status:3,cache_money:¥20.00\",\"id\":\"29\",\"time\":\"$2\",\"regular_remark\":\"微信自动扣费规则\\n包含内容:账户、金额、商户、扣费项目、备注、订单号、扣费时间\\n规则编写:太公摘花\\n数据提供:太公摘花\"}","use":1,"name":"自动扣费","remark":"微信自动扣费规则\n包含内容:账户、金额、商户、扣费项目、备注、订单号、扣费时间\n规则编写:太公摘花\n数据提供:太公摘花","id":29,"sort":0,"version":"1","regular":";try{pattern=/title:卡片消息.*?,title:扣费通知.*?,url:.*?&trans_id=(\\d+)&create_time=(\\d+),.*?,line_content:topline:value:.*?,word:¥(\\d+\\.\\d{2}),key:.*?,word:扣费金额,lines:line:\\[value:.*?,word:(.*?),key:.*?,word:扣费(项目|服务),(value:[^w]*?word:([^,]+),key:.*?word:扣费内容,)?value:.*?,word:(.*?),key:.*?,word:支付方式,value:color:.*?,word:(.*?),key:.*?,word:备注\\],opitems:opitem:\\[.*\\],.*,display_name:(.*?),/;if(pattern.test(a)){var array=pattern.exec(a);var remark='$4($7)',account='$8',type='0',money='$3',shopName='$10',account2='',fee='',time='$2';for(var i=array.length-1;i>=1;i--){var rep=\"$\"+i.toString();var repStr=array[i];remark=remark.replace(rep,repStr);account=account.replace(rep,repStr);type=type.replace(rep,repStr);money=money.replace(rep,repStr);shopName=shopName.replace(rep,repStr);account2=account2.replace(rep,repStr);fee=fee.replace(rep,repStr);time=time.replace(rep,repStr)}return remark+'##'+account+'##'+type+'##'+money+'##'+account2+'##'+shopName+'##'+fee+'##'+time+'##0'}}catch(e){console.log(e)};"}],"from":"app","id":"edqzUfdX7lRNx2vKHWhIQwF8fqDiS6kS","version":"1"}
AnkioBot commented 3 years ago

@taigongzhaihua,您的规则提交/更新成功!cdn有缓存,您可能要等待5分钟-24小时后才能看到您的规则数据。 本次测试结果:您的规则云端测试数据如下:

 时间:1633588170(云端不解析时间,时间戳或者直接日期都行) 
 金额:1.50 
 手续费: 
 账户1:中国银行储蓄卡(7575)  
 账户2:  
 商户:广州骑安  
 商户备注:滴滴出行(滴滴出行服务)  

本次测试用例信息:

cache_user:美团平台商户,cache_user2:腾讯企业邮箱,cache_paytools:建设银行储蓄卡(0956),isSend:0,title:卡片消息,content:msg:appmsg:extinfo:,lowurl:,sourcedisplayname:,showtype:1,title:扣费通知,type:5,appattach:totallen:0,cdnthumburl:,aeskey:,attachid:,fileext:,cdnthumbaeskey:,content: t,content:,url:https://wx.tenpay.com/userroll/readtemplate?t=userroll/index_tmpl&type=userrolldetail&trans_id=4200001154202110077524203147&create_time=1633588170,soundtype:0,mmreader:template_detail:template_show_type:1,text_content:cover:,color:,text:,new_tmpl_type:0,line_content:topline:value:color:#000000,small_text_count:1,word:¥1.50,key:hide_dash_line:1,color:#888888,word:扣费金额,lines:line:[value:color:#000000,word:滴滴出行,key:color:#888888,word:扣费服务,value:color:#000000,word:滴滴出行服务,key:color:#888888,word:扣费内容,value:color:#000000,word:中国银行储蓄卡(7575),key:color:#888888,word:支付方式,value:color:#000000,word:如果对扣费有疑问,请联系商家确认,key:color:#888888,word:备注],opitems:opitem:[color:#000000,icon:,general_string:,weapp_path:pages/use/service.html?service_id=00003000000000158496531557187925,display_line_number:0,url:,weapp_version:139,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:gh_8aafc8cb4f64@app,op_type:1,is_rich_text:0,word:管理滴滴出行自动扣费,business_id:,weapp_state:0,color:#000000,icon:,general_string:,weapp_path:,display_line_number:0,url:https://pay.weixin.qq.com/mmpaykf/faqmanage?ver=v1&trans_id=4200001154202110077524203147&create_time=1633588170&wx_header=0&scene_code=payproof_cell,weapp_version:0,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:,op_type:0,is_rich_text:0,word:对订单有疑惑,business_id:,weapp_state:0,color:#000000,icon:,general_string:,weapp_path:pages/record/detail.html?bill_no=1000000000202110071524145450945,display_line_number:0,url:,weapp_version:139,ext_id:,is_show_red_dot:0,hint_word:,weapp_username:gh_8aafc8cb4f64@app,op_type:1,is_rich_text:0,word:查看微信支付分服务订单,business_id:,weapp_state:0],show_type:1,publisher:nickname:微信支付,content: tt,username:wxzhifu,template_header:shortcut_icon_url:,hide_time:1,title:扣费凭证,show_icon_and_display_name:1,ignore_hide_title_and_time:1,hide_title_and_time:1,right_desc_name:,hide_icon_and_display_name_line:0,header_jump_url:,icon_url:http://mmbiz.qpic.cn/mmbiz/byPQsp0wEeYPqM7aQfgddiaYwVXuKZM7rLJshlsl2VPetIoJw5icTKKWNI6jC72Olgpficbk7tG6A6vcuu5KHMjNA/0?wx_fmt=png,transaction_id:,first_color:,title_color:,pay_style:1,finder_user_name:,pub_time:1633588171,header_jump_type:0,show_right_icon_and_desc_name:0,display_name:广州骑安,finder_nonceid:,show_finder_feed_entry:0,display_name_desc:,right_icon_url:,finder_feed_thumnail:,first_data:,finder_feedid:,category:item:is_pay_subscribe:0,video_height:0,sources:source:name:微信支付,content: t,content: t,appmsg_like_type:0,video_width:0,recommendation:,title:扣费凭证,native_url:,content: t,cover:,weapp_version:0,vid:,pic_num:0,digest:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,cover_235_1:,weapp_username:,fileid:0,player:,cover_1_1:,del_flag:0,play_url:,shorturl:,pub_time:1633588171,pic_urls:,cover_16_9:,general_string:,template_op_type:0,weapp_path:,url:https://wx.tenpay.com/userroll/readtemplate?t=userroll/index_tmpl&type=userrolldetail&trans_id=4200001154202110077524203147&create_time=1633588170,tweetid:,play_length:0,comment_topic_id:0,music_source:0,longurl:,styles:topColor:,style:[color:#000000,range:4,5,font:s,color:#000000,range:14,4,font:s,color:#000000,range:23,6,font:s,color:#000000,range:34,13,font:s,color:#000000,range:50,16,font:s],itemshowtype:4,contentattr:0,weapp_state:0,show_complaint_button:0,count:1,name:微信支付,topnew:cover:,width:0,digest:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,content: ttt,height:0,type:0,content: tt,content: t,forbid_forward:0,notify_msg:,des:扣费金额¥1.50n扣费服务滴滴出行n扣费内容滴滴出行服务n支付方式中国银行储蓄卡(7575)n备注如果对扣费有疑问,请联系商家确认,appid:,sourceusername:,sdkver:0,action:,template_id:OqDMc7J-BuyL3PptuTuGTHEAAYOZT8_6y-hkAP-e6XM,thumburl:,contentattr:0,fromusername:gh_3dfda90e39d6,appinfo:appname:微信支付,version:0,isforceupdate:1,status:3,cache_money:¥20.00 

如果您需要删除规则,请打上useless的标签,机器人将自动删除。