LaneWeChat

PHP微信开发框架,高效开发微信公众号应用。简洁而又轻量

GitHub下载 查看手册

模板消息接口

Visits: 12353 Date: 2014-11-05 15:03:48 Power By 李轩Lane

    

1、类简介:模板消息仅用于公众号向用户发送重要的服务通知,只能用于符合其要求的服务场景中,如信用卡刷卡通知,商品购买成功通知等。不支持广告等营销类消息以及其它所有可能对用户造成骚扰的消息。


        关于使用规则,请注意:

            1、所有服务号都可以在功能->添加功能插件处看到申请模板消息功能的入口,但只有认证后的服务号才可以申请模板消息的使用权限并获得该权限;

            2、需要选择公众账号服务所处的2个行业,每月可更改1次所选行业;

            3、在所选择行业的模板库中选用已有的模板进行调用;

            4、每个账号可以同时使用15个模板。

            5、当前每个模板的日调用上限为10000次。


        关于接口文档,请注意:

            1、模板消息调用时主要需要模板ID和模板中各参数的赋值内容;

            2、模板中参数内容必须以".DATA"结尾,否则视为保留字;

            3、模板保留符号"{{ }}"。


        2、使用命名空间:use LaneWeChat\Core\TemplateMessage;


        3、向用户推送模板消息

            TemplateMessage::sendTemplateMessage($data, $touser, $templateId, $url, $topcolor='#FF0000'){

                $data = array(

                       'first'=>array('value'=>'您好,您已成功消费。', 'color'=>'#0A0A0A')

                       'keynote1'=>array('value'=>'巧克力', 'color'=>'#CCCCCC')

                       'keynote2'=>array('value'=>'39.8元', 'color'=>'#CCCCCC')

                       'keynote3'=>array('value'=>'2014年9月16日', 'color'=>'#CCCCCC')

                       'keynote3'=>array('value'=>'欢迎再次购买。', 'color'=>'#173177')

                );

                $touser 接收方的OpenId。

                $templateId 模板Id。在公众平台线上模板库中选用模板获得ID

                $url URL

                $topcolor 顶部颜色,可以为空。默认是红色


            注意:推送后用户到底是否成功接受,微信会向公众号推送一个消息。消息类型为事件消息,可以在lanewechat/wechatrequest.lib.php文件中的方法eventTemplateSendJobFinish(&$request)中收到这条消息。


        4、设置行业

            TemplateMessage::setIndustry($industryId1, $industryId2){

                $industryId1 公众号模板消息所属行业编号 请打开连接查看行业编号 http://mp.weixin.qq.com/wiki/17/304c1885ea66dbedf7dc170d84999a9d.html#.E8.AE.BE.E7.BD.AE.E6.89.80.E5.B1.9E.E8.A1.8C.E4.B8.9A

                $industryId2 公众号模板消息所属行业编号。在公众平台线上模板库中选用模板获得ID


        5、获得模板ID

            TemplateMessage::getTemplateId($templateIdShort)

                $templateIdShort 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式


Reply: Mamie On 2020-10-30 19:24:01

Yes This could be JAUNDICE. what exactly does viagra do? How much does viagra cost

回复

Reply: Jildcisona On 2020-11-09 16:14:25

п»їviagra online http://fmedrx.com/ <a href="http://fmedrx.com/#">where to buy viagra online safely</a> reddit viagra online

回复

Reply: Kmrfisona On 2020-11-12 07:03:47

best place to buy generic viagra forum http://usggrxmed.com/ <a href="http://usggrxmed.com/#">generic viagra review</a> generic viagra online canada

回复

Reply: Kmrfprot On 2020-11-15 23:37:39

viagra max safe dose <a href="https://purevigra.com/#">https://purevigra.com</a> renal failure and viagra

回复

Reply: Fbsgisona On 2020-11-18 18:03:11

potenssilääkkeet viagra <a href="https://buybuyviamen.com/#">women's form of viagra</a> using both viagra and cialis

回复

Reply: DevkAlado On 2020-11-19 17:32:50

viagra and cialis discount <a href="https://paradiseviagira.com/#">ordering viagra gold online</a> viagra online pharmacy

回复

Reply: JivhApery On 2020-11-20 02:32:49

delivrance du viagra <a href="https://purevigra.com/#">viagra en pharmacie besoin d ordonnance</a> lavitra or viagra

回复

Reply: Kbrgprot On 2020-11-21 00:32:20

viagra for sale in canada <a href="https://miraclevigra.com/#">australia viagra over the counter</a> how much is viagra 50 mg

回复

Reply: Fevbisona On 2020-11-21 13:15:34

buy viagra gold <a href="https://wowviaprice.com/#">viagra no precription travel taipei</a> viagra blindness 2010

回复

Reply: Fhsbisona On 2020-11-21 17:44:17

compra viagra online <a href="https://buybuyviamen.com/#">https://buybuyviamen.com</a> valor de um viagra

回复

Reply: Fmsgisona On 2020-11-26 19:12:32

q efectos tiene el viagra <a href="https://siviagmen.com/#">why no nitrates with viagra</a> comprar viagra uruguai

回复

Reply: FdbvAlado On 2020-11-26 19:44:59

average cost of 100mg viagra <a href="https://hopeviagrin.com/#">viagra where to buy in india</a> viagra brand name online

回复

Reply: DbsfAlado On 2020-11-27 14:39:01

viagra online without a prescription <a href="https://lightvigra.com/#">can you buy viagra in mexico</a> viagra usa 100mg

回复

Reply: JsweApery On 2020-11-27 22:05:22

where to order real viagra <a href="https://mygoviagar.com/#">can i buy sildenafil over the counter in canada</a> generic viagra online canadian

回复

Reply: Fsfisona On 2020-11-28 22:21:33

essay assignment sheet <a href="https://essayhelpbgs.com/#">in a research paper a thesis statement should</a> buy essay review

回复

Reply: Kwgdprot On 2020-11-29 01:40:26

interesting persuasive essays <a href="https://researchpaperssfk.com/#">writing an argumentative research paper</a> writing a essay

回复

Reply: Fnrhisona On 2020-11-30 05:20:12

50 mg generic viagra <a href="https://genqpviag.com/#">online viagra no prescription</a> viagra is used to treat erectile dysfunction. it works by helping to increase blood flow into the penis during sexual st..

回复

Reply: Fqfisona On 2020-11-30 18:58:04

my personal statement essay <a href="https://essaywritingservicesjy.com/#">top college admission essays</a> importance of college essay

回复

Reply: Fnrdisona On 2020-12-03 10:28:08

alternative ti viagra <a href="https://llviabest.com/#">viagra for sale malaysia</a> viagra mit paypal zahlen

回复

Reply: Fsfgisona On 2020-12-10 00:50:06

buy viagra in canada <a href="https://viagstorerx.com/#">on line viagra questionarre</a> buying viagra online forum

回复

Reply: Fqbfisona On 2020-12-10 21:18:27

cialis quick ship <a href="https://gocialirx.com/#">cialis international</a> cialis cipra

回复

Reply: FgnsAlado On 2020-12-11 17:31:13

side effects of cialis and grapefruits <a href="https://tadafcialirx.com/#">cialis black box warning</a> order cialis online pharmacy

回复

Reply: Fgrsisona On 2020-12-12 06:50:19

viagra online pay with paypal <a href="https://xviagrnorx.com/#">prescription viagra cost</a> generic viagra 100

回复

Reply: DvncAlado On 2020-12-12 11:14:26

cialis w/dapoxetine <a href="https://vipmenciall.com/#">sfter market cialis</a> cialis 10mg tablets

回复

Reply: Fbsbisona On 2020-12-12 19:50:34

cialis coupon code <a href="https://cialmenon.com/#">how to purchase cialis in canada</a> drugstore1st cialis

回复

Reply: JgsvApery On 2020-12-14 23:39:06

viagra sold cheap <a href="https://atviagrmenrx.com/#">female pink viagra</a> price 100mg viagra

回复

Reply: FhsnAlado On 2020-12-16 16:05:45

viagra cost cvs <a href="https://lightvigra.com/#">viagra uk</a> buy viagra in canada fast

回复

Reply: DvnjAlado On 2020-12-17 10:22:39

viagra rezeptfrei <a href="https://hopeviagrin.com/#">guaranteed natural viagra</a> professional strenght viagra

回复

Reply: Fwsxisona On 2021-01-09 19:02:35

global pharmacy canada <a href="http://canadapharmacyliiu.com/#">legit online pharmacy</a> best ed medication

回复

Reply: NllpAlado On 2021-01-09 19:22:00

24 hour drug store near me http://pharmacy-onlineasxs.com/ pharmacy rx world

回复

Reply: Khthprot On 2021-01-10 04:37:10

medical pharmacy <a href="http://onlinepharmacyzefb.com/#">treatment for erectile dysfunction</a> north drug store

回复

Reply: FgvdAlado On 2021-01-10 15:30:32

24 hour pharmacy near me <a href="http://canadapharmacyonlinestbh.com/#">canada rx pharmacy</a> cvs drugstore

回复

Reply: Aqwsisona On 2021-01-11 12:47:16

24 hour pharmacy near me <a href="http://canadadrugslopl.com/#">us pharmacy</a> canada drug pharmacy

回复

Reply: Jtmfisona On 2021-01-12 11:42:04

erectile dysfunction drug <a href="http://canadadrugsonlinevbyh.com/#">online pharmacies</a> canada online pharmacy

回复

Reply: Lokuisona On 2021-01-12 19:48:10

ed medication <a href="http://canadian-pharmaciesthsh.com/#">med rx pharmacy</a> pharmacy prices

回复

Reply: NlbxAlado On 2021-01-13 23:57:53

where to buy viagra seattle <a href="http://viashoprx.com/#">free viagra trial offer</a> can you buy viagra in mexico without perscription viagra buy paypal <a href="http://xviagarrx.com/#">female pink viagra</a> buy generic viagra online viagra ireland <a href="http://viagraviagria.com/#">buy viagra in south africa online</a> viagra purchase viagra no precription travel taipei <a href="http://asgenviagria.com/#">viagra pills for sale</a> by viagra online online viagra 100mg professional <a href="http://viagengen.com/#">viagra retail</a> 100 mg pfizer viagra no prescription

回复

Reply: FgnhAlado On 2021-01-14 19:11:35

viagra 100 mm <a href="http://ltdviagragogo.com/#">buy viagra without pre</a> the most powerful viagra in the world canada viagra paypal <a href="http://hdgenericviagraxk.com/#">is a prescription needed for viagra</a> viagra online united states what are the different kinds of viagra? <a href="http://buygenericviarga.com/#">buy viagra without prescription?</a> buying viagra in canada viagra discount coupons <a href="http://buyhdpillvia.com/#">viagra 100mg tablets</a> viagra, dapoxetine no prescription needed viagra australia <a href="http://genericviagrix.com/#">viagra with dapoxetine fast delivery</a> paypal viagra uk

回复

Reply: Klioprot On 2021-01-14 23:46:42

viagra in japan <a href="http://bestviagrx.com/#">overnight viagra delivery usa</a> %viagra online generic viagra online australia <a href="http://viarxhd.com/#">canadian viagra virus</a> buy viagra in canada generic viagra 100 <a href="http://viagetpill.com/#">viagra alternatives</a> viagra on the web real viagra paypal <a href="http://pillexrx.com/#">ordering viagra onl</a> viagra without prescription generic viagra forum <a href="http://usggrxmed.com/#">buy viagra on line seattle</a> viagra online australia

回复

Reply: JvcxApery On 2021-01-17 11:23:38

where to buy viagra in philippines drug store <a href="http://fmedrx.com/#">viagra 4 packs</a> best price viagra viagra black market <a href="http://edabcrx.com/#">where can i get viagra in melbourne</a> do they make generic viagra chinese viagra pills <a href="http://abcrxmed.com/#">trusted store viagra generic</a> viagra super force 100mg/60mg pills viagra (generic) 100mg <a href="http://cialedrx.com/#">viagra cialis enzyte</a> viagra cialis levitra sample pack pfizer viagra 100mg price <a href="http://hitrxmenvia.com/#">viagra 150 mg</a> viagra using paypal

回复

Reply: NlbxAlado On 2021-01-19 00:36:02

cialis generic for sale <a href="http://cialijomen.com/#">us cialis online pharmacy</a> cialis price http://cialijomen.com/ - generic cialis black 800 mg ’

回复

Reply: Fsbxisona On 2021-01-19 14:11:49

best aftermarket viagra <a href="http://genericrxxx.com/#">free samples by mail of viagra</a> viagra buy http://genericrxxx.com/ - buy viagra no prescription ’

回复

Reply: FbdhAlado On 2021-01-19 20:04:10

get generic cialis overnight <a href="http://21cialismen.com/#">generic cialis usps priority mail</a> viagra and cialis discount http://21cialismen.com/ - cialis soft tabs online ’

回复

Reply: Kbctprot On 2021-01-19 23:53:22

viagra cialis trial pack <a href="http://mycialedst.com/#">free samples for cialis</a> cialis online overnight http://mycialedst.com/ - buying cialis internet ’

回复

Reply: Aqbvisona On 2021-01-21 07:35:15

viagra purchase online usa <a href="http://acialaarx.com/#">viagra low cost</a> buying viagra without a prescription http://acialaarx.com/ - cheap viagra in us ’

回复

Reply: Jbdcisona On 2021-01-22 04:56:39

viagra uk <a href="http://llviabest.com/#">viagra australia net</a> viagra in los angeles http://llviabest.com/ - viagra vs cialis vs levitra reviews ’

回复

Reply: Lcxisona On 2021-01-22 12:19:34

generic viagra buy <a href="http://genqpviag.com/#">genaric viagra online</a> xanax with viagra http://genqpviag.com/ - 100mg viagra ’

回复

Reply: NmilAlado On 2021-01-23 20:32:33

viagra in kuwait <a href="http://xz-pharmacyonline.com/en/career-opportunities.html">viagra. no prescription</a> purchase viagra with paypal http://xz-pharmacyonline.com/en/career-opportunities.html - order viagra with dapoxetine ’

回复

Reply: Fmfvisona On 2021-01-24 09:10:46

cialis with dapoxetine overnight delivery australia <a href="http://sjcialis.com/#">canada pharmacy generic cialis</a> cialis oral http://sjcialis.com/ - cialis paypale ’

回复

Reply: FbgAlado On 2021-01-24 15:38:28

viagra online without prescription <a href="https://canadianpharmacy-usx.com/organic.htm">cheap viagra</a> viamedic viagra https://canadianpharmacy-usx.com/organic.htm - viagra amex ’

回复

Reply: Ahmdisona On 2021-01-26 01:29:22

cialis 80mg <a href="http://cialmenshoprx.com/#">is cialis as effective as viagra</a> buy cialis information http://cialmenshoprx.com/ - generic cialis for daily use ’

回复

Reply: JnhApery On 2021-01-26 16:41:47

paypal cialis <a href="http://loncialis.com/#">cheapest cialis india</a> cialis with dapoxetine 80mg http://loncialis.com/ - generic cialis ’

回复

Reply: NgscAlado On 2021-01-29 01:55:32

best price viagra <a href="http://canadianpharmacy-yy.com/Fitness/how-to-get-a-six-pack.html">buy viagra online from india</a> can i buy generic viagra http://canadianpharmacy-yy.com/Fitness/how-to-get-a-six-pack.html - purchase viagra online australia ’

回复

Reply: Fmnfisona On 2021-01-29 15:38:21

cialis for sale <a href="https://impotencecdny.com/info/history.php">cialis 20mg no prescription</a> buy cialis black https://impotencecdny.com/info/history.php - buy some cialis ’

回复

Reply: Kbbgprot On 2021-01-29 21:15:09

liquid viagra buy <a href="http://erectilejyzd.com/#">approved canadian pharmacies online</a> viagra 20 mg usa http://erectilejyzd.com/ - Zebeta ’

回复

Reply: Ahmdisona On 2021-01-31 08:38:07

cialis daily use side effects <a href="https://impotencecdny.com/">canadian pharmacy online viagra</a> cialis brand no prescription needed https://impotencecdny.com/ - viagra generic online pharmacy ’

回复

Reply: JnscApery On 2021-01-31 22:52:04

viagra buy india <a href="http://erectilejyzd.com/index.php?called=terms">where to buy viagra with paypal</a> viagra payment paypal http://erectilejyzd.com/index.php?called=terms - viagra 5mg tablets ’

回复

Reply: Kbcxprot On 2021-02-04 07:20:03

canadian drugs online pharmacies <a href="http://xuypharmacyonline.com/">walgreens online pharmacy</a> pharmacy online

回复

Reply: JbnbApery On 2021-02-05 13:44:21

walmart online pharmacy <a href="http://online21rxon.com/ ">brand viagra</a> prescription drug price comparison

回复

Reply: FvfcAlado On 2021-02-06 17:29:10

pharmeasy <a href="http://hopeviagrin.com/ ">buying viagra in australia with paypal</a> viagra tijuana mx

回复

Reply: AqcfGainnasix On 2021-02-09 18:32:06

free samples for cialis <a href="http://cialisvja.com/ ">cialis black review</a> cialis generic online

回复

Reply: Lbsxisona On 2021-02-09 23:47:43

canadian pharmacy uk delivery <a href="https://ssviagriia.com/ ">viagra gold</a> hepatitis c virus (hcv)

回复

Reply: Kvaxprot On 2021-02-11 05:45:37

payday loans for poor credit no brokers <a href="http://rirocash.com/ ">cheapest payday loans toronto</a> cash loans online nz

回复

Reply: Kbbfthink On 2021-02-14 08:34:55

viagra over night delivery <a href="https://kloviagrli.com/ ">viagra online </a> australia viagra online sales

回复

Reply: FbsgAlado On 2021-02-14 08:47:56

cialis uk <a href="https://llecialisjaw.com/ ">http://llecialisjaw.com/ </a> cialis purchase online

回复

Reply: Jbbnisona On 2021-02-16 03:51:15

generic cialis online canada <a href="http://ljcialishe.com/ ">cialis minutes before</a> does cialis cause insomnia

回复

Reply: AbcfGainnasix On 2021-02-18 13:22:42

generic drugs viagra <a href="http://viagriyvik.com/ ">http://viagriyvik.com/ </a> buying viagra from canada

回复

Reply: Kndnprot On 2021-02-27 07:44:09

viagra memes <a href="http://viagratx.com/ ">viagra boys sports</a> viagra alternatives

回复

Reply: FjjuAlado On 2021-03-01 12:35:04

is viagra bad for you <a href="https://viagraonlinejc.com/ ">http://viagraonlinejc.com/ </a> generic viagra without prescription

回复

Add Comment
©2014 lanewechat.lanecn.com , All rights reserved. Power By LaneWeChat 微信PHP开发框架.  京ICP备14005030号-1