΢Ӧݱܶ๫˾ϣϢ쳵һdzҪ̻΢ŽӪһҵƷЧһ棬Ҳҵľֱ̺ӿͻ֮ľ롣΢ŻӦÿܣΪЭҵٴ΢ӦԼƽ̨ʹǿ΢ŵг˳Угҵľռøгر

΢ſںšҵ΢š΢СȷĿݣҪŵ΢APIӿڽзװ¼˵ûýļͼϢϢȺ΢֧ҵҡһҡ豸⡢΢Сꡢ΢ſؽӿڴ⻹ɨһɨͼƬλáH5ҳ濪ݣԼҵ΢ͨѶ¼ӿڡԱϢ໥͵ȷӿڡ

1ϵͳҪܽ

΢ŻӦùϵͳû MVC + Bootstrap + Ajax + Enterprise Libraryļ·ߣBoostrap + Metronicϵǰ˿ܣݷʲ֧OracleSQLServerMySQLPostgreSQLݿ⡣΢Żϵͳ棬ʵЩܲ

    1ʵֲ˵Ķ̬üµϣ

    2̬¼ӦϢʵֶԲͬҵͬIJ˵Ӧ

    3̬ӦָôʵӦϢ

    4ȡûûϢʵûϢάȲ

    5¶ýļͼϢݣΪͻϢ׼

    6ʹѡû߷ϢȺܡ

    7ṩûʶ𣬲ʶ¼жԽӣʵݵĴ

    8ṩԵλõļ¼չӦãʵֶ԰ٶӳӰƬӰԺΡͨϢȷĵӦõĶԽӡ

    9¼ûĻỰ¼ԸݻỰ¼ͻϢķ͡

    10΢ɨһɨĹܣʵͶάɨĹϣں̨Ӧ

    11΢¹ܣպͼѡ񡢿ٷ͵λõȹܣ

    12ɻȡעԱΨһIDûעȡͷ¼ȹܡ

    13΢֧ҵҡһҡ豸⡢΢Сꡢ΢ſؽӿڴ

    14ʵҵͨѶ¼ĹŹԱǩʹǿԸͬҵ΢Ϣ

    15ʵҵ΢ƵϢͣʹҵ͹עԱ֮乵ͨ˳

    16ҵ΢ıϢͼƬϢļϢϢƵϢͼϢݵķϣͳһӿڣ

    17ʵҵ΢Ų˵Ķ̬üµϣ̬˵¼ӦϢʵֲͬIJ˵Ӧ

    18ҵ΢ŵĶýļͬԼļд洢ʹ

    19ʹضܻûϢʵҵԱݵ֤ʹ

    20ƽ̨΢ſƽ̨ɨά¼ͨɨ󶨲ֱӵ½ϵͳ

    ……

2ϵͳܽ

2.1ϵͳ¼

 

ϵͳ¼˺źĬ˺adminΪգԳԱݽϵͳ档

ϵͳ¼ͨˮƽ˵к̨ܹ

2.2΢˺Ź

 ϵͳֶ֧΢˺ŵĽʹãͬʱֶ֧ĺšںšҵ΢šС˺á

 

ϵͳϽǽ˺ŵл

2.3˵

 ϵͳй˵ͨѲ˵ύϣʵֲ˵Ķ̬úɣܹΪϵͳӦֵҪʵĴ

΢Ų˵ӽʾ

 ΢Ų˵޸Ľʾ

 ΢Ų˵Ǵ洢ݿ棬Ҫύ΢ŷϲЧҪ΢APIӿڽдҳControllerһύĴ

΢ŷ˺ŵŻϣ˵ıЧʾ

֪΢ŵķ˿ͻֻͿ߷һ΢ŷϵĹ˺ŴӦIJ˵ͨϢĴݺӦʵûĽϢͼ

 

2.4˵¼Ĵ

ڶ̬ɵIJ˵ClickķʽҲҪÿ˵¼Ӧʹ΢ŵĻ˽⵽΢ŵĴ¼һӦûıϢͼƬϢͼϢݣ£һʹıϢͼϢӶࡣ

Ϊ˽һʵӦݵãǰѲ˵¼ݶзֿ¼ʹöıϢҲʹöͼϢϣʵָʹû

¼ʾ

¼Ӧݱ룬ѡߴ“༭”ťѡ񣬵ѡ“༭”ťѡʱϵͳһԻû¼Ӧݱѡ

ѡ󣬻صԭ棬ῴصļ¼ѡļ¼

΢¼ı༭ʾݡ

 

2.5΢Ϣݹ

˵˵¼ͨ¼д¼϶ϢݣϢӦͻСԪǿһıϢͼϢҲǶϢϣͬ͵Ļ

Ϊ˷ҰϢΪͼġָıͣҪԸҪϸΪ͵Ϣ

Ϣݵӽʾ

ıϢֻϽЧʾ

ﲻıϢͼϢͳһͼϢĶϢıϢֻҪȡΪϢ弴ɡ

ͼϢı༭ʾҪдݺͼƬԼҳϸӼɡ

ͻϵϵͳϢֻʾĽЧʾӣлϢתӵַġ

 

2.6Ӧָά

Ӧָάе¼ĹҪǶһЩõָ㹹ӦϵͳӦӶʵһIJָ

ں̨úӦָϵͳܸӦָдˡҪṩһӦʾ棬ʾ

ڲ˵ѡӦϵͳϵͳһıʾ棬ʾ

ʾһЩ̶İһЩҵ񰴼򵥵1~6ԶѡӦ

ǿĽ棬ָ1ϵͳһӦָȻгɹİʾ

Ǽҵ񰴼1ӦһͼϢҲǹڰϸ˵

ʱҲ*Űһ˵ġ

 

2.7ͷ

0ת˿ͷԻģʽκϢתͷϵͳˡ

 

ûϢ󣬿ͷ־ܼʱյϢͿͻӦˡ

 

ͨʹöͷĿͻˣϢdz㣬ܻÿͻĶԻϢˣڵԿͻϣĽʾ

ֻϵ̸ͼʾ

ܹͨ;ʱӦͻϢˡ

2.8û

Ϊ˸ЧûԼϢǿԴ΢ŷϻȡصϢ˽עûϢҲΪȺϢ׼ 

ûĹʾĬϿͨûĵв鿴ݣ-ʡ-ļչ

ҲԸݱǩ鿴ǩԽάԼΪǩƳԱͼʾ

ԼԸݷ鿴ʾ

ûԴ΢ŷϽͬأͬݣ԰ѷϵûصؽи»д롣

˫Բ鿴ûϢ鿴ûϸϢʾ

 

2.9ûǩ

΢Źںţҵ΢ŵ˼·˱ǩĹܣԹעķ˿ñǩʵָӷķܡ߿ʹûǩؽӿڣʵֶԹںŵıǩдѯ޸ġɾȲҲԶûдǩȡǩȲ

ǩûһֱǩԺܺùĵûǿͨװõ΢Žӿں׵ĻȡѶûǩбȻйͼʾ

ͬʱǰᵽˣڶûǩάģʾ

༭ǩϢʾ

 

2.10ý

ýָѱļϴ΢ŷϽб棬Ϣķ͵Ȳ΢ҪijЩϢϴϣȻʹýIDз͵ġ

ļɹϴб“ļϴʶһBASE64ıݣͬʱһϴʱΪ΢ŷֻ3ýݣ޵ݻᱻԶɾ

ͬʱб棬ҪĹܣϴѡļ¼ϴڵļ¼ǶԼýļ¸²

ӽʾ˸ϴĿؼļIJdz㡣ͬʱϴɹļбг

ýļ漸ַʽͼƬƵͼ

ݼ¼ļϴʶʱǿյģҪʹãϴ΢ŵķϣȻMediaIdϢķͣϴѡļ¼ʾ

ýļ˳ϴ󣬼¼Ϣʾ

 

2.11ͼϢ

ͼϢΪͼϢͶͼϢ֣ͼϢʾ

ͼϢʾ

ͶýݹһͼϢҲͨͬķʽйϴȻڽϢķͲýϢһʱ䷽Ҫ󣬾ǵ΢Żƽ̨ʾ

ͼϢʾ󣬿ڱ༭е“ͼб”棬ӶͼĵϢݡ

ӽУѡͼϢͼͨѡָģѾϴͼƬͼԴſԵġ

ӺĶͼбԽв鿴

¼Ȼϴϴļ¼ʾɹ󷵻һϴķʶʱʾ

 

2.12ỰϢ

Ϊ˷¼ͻͷϢ΢Żƽ̨¼ûݣỰϢʾ

ǿ˫48Сʱڵκһ¼ԸעĿͻϢķͲϢͳɹûֻ΢˺յصķϢˡ

 

2.13ȺϢ

Ϊ˶ԿͻӦӪʱҪָȺԱϢȺÿͻԵ˽DzƷϢͻ

ȺϢıϢֱӱ༭⣬ݣҪϴĶýļͼϢݣǰĶýͼϢҪΪȺϢĿġĶýͶͼϢǴƽ̨ѡ¼ɽзͣӶʡȴ鷳ʵָЧϢȺ

ȺϢ԰Ⱥв鿴Ҳ԰Ϣͽв鿴ʹǹݷ㡣

ͼϢѡıϢͼϢͼƬϢݣݲͬݣṩͬѡ

ϢȺͷΪ֣һǸݷ飬ôƽ̨ѡӦķ鼴ɣһǸûOpenIDзͣṩû롣ҪIJʾ

2.14ʹ

֪΢ʼʹеģʶȻҲͳΪ΢ŽһҪ;΢ŵĿӿڣҲṩ˶ϢҪʶ𣬶C#΢ŻӦõ¼Ĵʹǵ΢˺棬ӷͶԪûд

ϵͳ̨棬Ƿ΢ŵʶãôʱ򣬾ǺʹûıIJˣĴ߼ʾ

ҸʶѰǷû΢ŻIJ˵ƣҵӦIJ˵¼ôִв˵¼URLViewͲ˵û취ضָӣ˸һıʾû룻ûҵ˵¼ôǾͰʶΪһ¼д¼߼ûдôһĬϵӦʾͿˡ

΢ŻԽЧʾ

   

 Ϊ˷ԿͻỰļ¼ҵ΢Ż̨¼ûݣʾ

 

2.15ʹõλչӦ

֪λϢܶصӦãǿ֪ûڵλãԹһЩλõӦãӳӰƬ㣬ӰԺͨ¼ȵȣк͵λصϢǶԸҪһЩչӦáҪõλϢιʹЩӦõIJ 

1΢ŵĵλϢ 
ʹǰ΢ŵĽӿڣΪǶЩλõϢʵλõϢ΢ŷΪ棬һǽûĵλһûϱλòʱ͵ĵλϢ

λõϱĵطѡ+ŽӵλãȻѡǰָĵλõͼʾ

                 

ȶûλõҸݿøһûѡָʾʾ

Ϊ˶ԵλĴҶһڴָ

λõָӦкܺõתˡӦչĽЧʾ

   

 

 

2.16΢ɨ¼

ֽܶվ棬ʹ΢ſƽ̨ɨ¼֤൱ڰ֤ΪȨĵ֤ӦվԲҪ洢ûˡ

ûбĶάϣԶû΢ɨ󶨣ûɨ¼ֱɨ¼Ҫ˺롣

һɹû΢ţ΢Ŷ˻ᶨλһ󶨳ɹҳ棨ԶH5ҳ棩ʾ

ûѾ˶ά󶨣ڹȡ󶨣Խû˺ź΢֮Ĺ

 

2.17΢ҡһҡ

 ҡһҡܱߺӿΪ̻ṩķܡû̼ŵ³ͨҡһҡܱȡ̼ҷŵĺתЧ

߿ͨӿڿҡһҡܣص

  1. ѡʹģҳԶHtml5ҳ΢ԭҳ(use_templateֶΣ1Ϊʹģ壬2ΪʹԶHtml5ҳ)
  2. ԭҳͨںϢ·
  3. ṩעںûѡǷע(ѱʱЧ)
  4. ҳתӣת̻ԶHtml5ҳ
  5. ͬһûڵֻȡ1κ

ûཻ

ҡһҡʾûʹûԶģ壬ҲʹϵͳõģŬСҳ棬ҪԼ𿪡

ӿڵ

  1. ӿȨޣ¼ҡһҡ̨ܱ̻https://zb.weixin.qq.com ,뿪֧֣뿪ͨҡһҡӿ;
  2. Ԥµ΢֧apiкԤµ֪Ҫŵĺɺticket
  3. ¼Ϣҡܱƽ̨api¼봴¼ϢԤµʱɵĺticket
  4. jsapiҡҳͨjsapiкûԲ
  5. Ͻӿʱṩ̻ͺ̻ںҪһ¡

ҡһҡĴ̿ȵ˵Ȩ޺Ҫҡһҡ̨صĺҳ棬Ȼͨӿڴύݣͨҡһҡ豸ҡ棬ʹJSAPIʵֳȡIJʾ

кӿڴǵһϵеĺӿʵֵģԤµ¼ϢȲʾ

 

 ΢֧Ϣ˺ŵϢ

 

 ҡһҡԼ΢źӿڣʹֻҡһҡúĹ̽Чʾ

Էװõ΢ŽӿڣӿڳɹúǿڹںŵĶԻ濴Ϣͼ𿪵Ĺ̡

Ҳѱ˽ӿڵķװҪѱʱֱӵѱĽӿڼʵֺ͵IJ

 

2.18΢H5ҳ漰JSDK

ǿ΢ҳʱҪõ˸ֳֵЧһʹBoostrapЧƲͬҳ棬΢ŶҲṩܶⷽԴJSSDKĽӿڣԼWeuiҳʽعҳ棬ṩ˺ܴı

1) JSSDK

΢JS-SDK΢Źƽ̨ҳṩĻ΢ڵҳ߰ͨʹ΢JS-SDKҳ߿ɽ΢ŸЧʹաѡͼλõֻϵͳͬʱֱʹ΢ŷɨһɨȯ֧΢еΪ΢ûṩʵҳ顣

ĿǰJSSDKֵ֧Ľӿڷ漸ࣺӿڡӿڡͼӿڡƵӿڡܽӿڡ豸Ϣλáҡһҡܱߡ΢ɨһɨ΢Сꡢ΢ſȯ΢֧΢ŹܵȫϣƸĽӿڻ½ų

2WeUIJquery WeUI

WeUI һͬ΢ԭӾһµĻʽ⣬΢ŹٷŶΪ΢ҳƣûʹø֪ͳһ΢ҳʹ WeUIƣ

ʽĿǰ buttoncelldialogprogresstoastarticleicon ȸʽԪأѾ GitHubϿԴ http://weui.github.io/weui/ ΢ɨ뼴Ԥ

jQuery WeUI ʹõǹٷ WeUI CSS 룬ṩ jQuery/Zepto 汾 API ʵ֡JQuery WeUIڹٷWeUIĻһЩչѷḻƺعܣǿԿֱӻJQuery  WeUIĻϽҳ濪ɡ

ǰһЩУWe UIʽкܶ΢H5ҳĹƣ΢֧ҳ桢ǩҳȵȡ

΢֧ҳʾ

     

ԼǩҳЧʾ

 

ȻǿԸҵҪӺܶ΢ɫʽһµҳ棬WeUIʽĽһԵĺô

ƪҪ΢H5ҳ濪ľܽᣬᵽJSSDKWeUI΢ӦõH5ҳпЧҲЩдġ

 

ֵݵİ󶨣

ͳҳһ΢ҳӦõʱ򣬺ܶҲԴֵݵģҪǶ̬ҳϣ΢ҳJQuery WeUIṩһЩбֵݵչʾЧʾ΢ſҲʹЩҳʵֵİ󶨴ʾ

ͬʱ΢źֵ̨άɽʵʱݸ¡

3豸άްܽ 

ڽܵ豸άް΢ӦóҪΧƹ̶ʲҽ豸΢Ӧչ¼뼰ѯʲϢʲ̵㡢豸άޱճѲ졢άޡ

΢ŶӦòõH5ҳԼ΢ŵJSDKصĽӿڿ΢ŵĽ񡣺˹DZ̨ϵͳ

3.1 ֯ûࣨɫ

ϵͳУϵͳӦãص֯ԼӦûࣨûɫݲͬĽɫȨͬĹܹ档

֯ʾ

ûɫʾ

ϵͳݽɫԲ˵вͬʾá

Ա˺adminΪգ½ϵͳԶ΢Źܽù

ͨԱ˺glΪ12345678¼ϵͳԶص豸Ϣάʾ

 

3.2 ΢Ų˵

 ΢ŶˣҪǵӦãһЩܲ˵ǿ̨ͨв˵ãȻͨӿύ΢ŷɡ

ύ˵ڹںϾͿԶصĹܽвˡ

 

3.3 豸Ӽ鿴

ӦϵͳУһ㶼Ϊÿ豸ָһ豸룬ͨɶά󣬿ͨ΢ɨ豸ϢӻƣԼصIJ 豸ά+豸ķʽɣʾ

豸άɲҳַǣ/h5/TestɶάĽЧʾ

ЩӵַĶά룬ûʹ΢ɨʱ򣬻ָӦӣʵӦ豸ӡάޱճѲ졢άޡ

΢ŶʹöӦĹܲ˵ɨ루ʹá豸=>豸Ϣ¼롿ɨ豸ά룩ôͿԽ豸ϢӲˡ

 

豸Ϣ鿴ô΢ŶгҪ豸Ϣ

ҲԵ鿴ϸ豸ϸϢ

3.4豸

豸̵豸ʾ 

 

Ԥά豸ʾ

 

3.5 豸

 豸Ϣ΢ź̨ϸ鿴½豸ϢбԽصIJѯ޸ġɾ鿴ϸȲ

豸ϸϢ鿴ں̨Чʾ

Լ豸صάϢ

 

4΢Žӿڷװ

4.1΢APIװ

ں̨Ĺܣͨ΢APIķװʵֵģڿӦǰѾе΢ṩĽӿڽЧķװ΢ŵؽӿڵĹ

ںŽӿڵķͼʾ

ҵ΢Žӿڵķͼʾ

ڸֳģ棬дݣ϶ͨԶʵķʽдݣע⣺ʵҸݳ򿪷ҪԼģ΢űʵdzǴÿҪͬϢݣ׳⣬ǿ͵ͣǿ΢Ӧõǿ׳ͺ͸ЧԡЩʵĶһļ̳йϵģǵļ̳йϵʾ

 

΢ŵĻظϢҲǼ̳BaseMessageʵģͬͼʵ༰̳йϵҲԶģ򿪷Ĺϵʾ

 

 4.2΢ſĿģ

ڿ΢صӦõʱһҪƵĻģ֧֣΢Źںţ΢ҵ΢ţ΢СȣԼһЩҵģ֧֣һŹܵ࣬ҪdzĽ綨ǵĹϵģķֲԼϲҪǵĴãҾ򵥶ظ

1ںģװ

΢ſҪǵԣC#ԣΪõAPIӿʵֽһķװʹã΢APIģݺܶ࣬ſԷΪĿ

Щӿڹܵķװֻ࣬ﳤĵһǻҪΧЩӿڣԼǵҵģʵָཻܵġ

WHC.Weixin.Dataģ棬˰ںŵϢɴӿڣɽӿǶԽ΢ŷĸϢ¼Ӧģ黹һЩݴ洢עû˵ݵȷݵĴ洢ʾ

ȻWHC.Weixin.DataǼߣҪʹWHC.Weixin.APIĿύͬʱҲҪʹڲݴ洢ģ顣

 

2ҵ΢ģװ

ҵ΢ŵ͹ںƣҲҪ΢ṩĸAPIзװǺĽӿڵãҵ΢Ŀǰֵ֧ĹԹںһЩŰлӿڡҵ΢Ӧýӿڡ˵ͨѶ¼Ϣҡһҡܱߵģ顣ҵ΢Źܵƺͼ룬ѶһЩģ顣

 

ͬDzο΢ŹںŵҲǽһݴ洢ĿΪ΢Ϣ¼ĴڣͬʱҲ洢һЩݣҪͬûǩŵݡ

΢Źںźҵ΢ŵĹͳһܶӿڵĽݼһģǿ԰ѹõʵಿΪһĿ㹫ںźҵ΢ĿĹͬʹãĿΪWHC.Common.Entity

ǼĿϵʾ

ĿĿ¼ʾ˻ģ顢ҡһҡ˵ýģ顢Ϣģ顢ϢӦģ顢ҡһҡܱߡ΢֧ȡ

΢֧Ľӿʵ֣ҵ΢ź͹ںԱȽ϶һAPIӿȺǿ΢ֶ֧ΪһӿʵںŻҵ΢Ҫʱ򣬰ȥʹüɡ

ǰΪWHC.Common.APIĿ

ҵӿڰٶȵĵλýӿڡӰԺϢѯϢѯͨϢѯϢѯȣжšʼ͵ȳӿڣʹַʽдӿڵЧչʾʾ

ЩWHC.CommonĿϾǿͨڹںźҵ΢ߵĿģˣǰǰܹļģ飬ʾ

ȻЩ֮⣬Ŀһ㻹漰һЩģ飬繫⣬ԼͨѶ¼Ȩ޹ģݣǿ԰Ѻ߼ģһɻģ顣

 

3΢ŽĿ

΢Ž沿ǰģۺʹã΢Ӧ棬һҪʹ80˿ں΢ŷͬʱҲĿĶ˿ڵַ