Changes between Initial Version and Version 1 of magazine_zhizuoAndApp_protocol


Ignore:
Timestamp:
03/02/2016 10:16:21 AM (10 years ago)
Author:
huzhixiang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • magazine_zhizuoAndApp_protocol

    v1 v1  
     1|---------------- 
     2{{{#!th height="30" width="200" 
     3功能 
     4}}} 
     5{{{#!th height="30" width="600" 
     6API 
     7}}} 
     8{{{#!th height="30" width="200" 
     9备注 
     10}}} 
     11|---------------- 
     12{{{#!th height="30" width="200" 
     13用户到达/离开[[BR]] 
     14当前页面时触发 
     15}}} 
     16{{{#!th height="30" width="600" 
     17app:Magazine.trigger(1)/Magazine.trigger(0) [[BR]] 
     18html:Magazine.addEvent(1,func)/ Magazine.addEvent(0,func) 
     19}}} 
     20{{{#!th height="30" width="200" 
     21 
     22}}} 
     23|---------------- 
     24{{{#!th height="30" width="200" 
     25>新浪微博分享(Modify 16/2/5) 
     26}}} 
     27{{{#!th height="30" width="600" 
     28sinaweibo:title=分享文案&icon=图标 
     29}}} 
     30{{{#!th height="30" width="200" 
     31代码同时做了只传标题的容错处理 
     32}}} 
     33|---------------- 
     34{{{#!th height="30" width="200" 
     35腾讯微博分享 
     36}}} 
     37{{{#!th height="30" width="600" 
     38qqweibo: 
     39}}} 
     40{{{#!th height="30" width="200" 
     41 
     42}}} 
     43|---------------- 
     44{{{#!th height="30" width="200" 
     45QQ空间分享 
     46}}} 
     47{{{#!th height="30" width="600" 
     48qzone: 
     49}}} 
     50{{{#!th height="30" width="200" 
     51 
     52}}} 
     53|---------------- 
     54{{{#!th height="30" width="200" 
     55>微信分享(Modify 16/2/5) 
     56}}} 
     57{{{#!th height="30" width="600" align="left" 
     58"weixinshare:?title=分享文案&icon=图标&url=分享链接&scene=1 
     59 
     60注:icon=html-12134/logo.jpg 缩略图大小不能超过32K 
     61 
     62scene:1表示分享到朋友圈,0表示分享给好友" 
     63}}} 
     64{{{#!th height="30" width="200" 
     65url默认使用itunes下载地址 
     66}}} 
     67|---------------- 
     68{{{#!th height="30" width="200" 
     69>朋友圈分享(Modify 16/2/5) 
     70}}} 
     71{{{#!th height="30" width="600" align="left" 
     72"weixinshare:?title=分享文案&icon=图标&url=分享链接&scene=1 
     73 
     74注:icon=html-12134/logo.jpg 缩略图大小不能超过32K 
     75 
     76scene:1表示分享到朋友圈,0表示分享给好友" 
     77}}} 
     78{{{#!th height="30" width="200" 
     79url默认使用itunes下载地址 
     80}}} 
     81|---------------- 
     82{{{#!th height="30" width="200" 
     83调用APP分享组件 
     84}}} 
     85{{{#!th height="30" width="600" align="left" 
     86appshare://?title=分享文案&icon=图标&url=分享链接&sinatail=新浪尾巴&qqtail=腾讯微博尾巴 [[BR]] 
     87尾巴用于区分分享文案当中新浪与腾讯区别 [[BR]] 
     88 
     89注:icon=html-12134/logo.jpg 缩略图大小不能超过32K 
     90}}} 
     91{{{#!th height="30" width="200" 
     92url默认使用itunes下载地址 
     93}}} 
     94|---------------- 
     95{{{#!th height="30" width="200" 
     96成功发送微博后触发 
     97}}} 
     98{{{#!th height="30" width="600" align="left" 
     99app:Magazine.trigger(2,{username:123,shareType:2}) [[BR]] 
     100html:Magazine.addEvent(2,func)/ Magazine.addEvent(2,func(args){args[0].username})[[BR]] 
     101 
     102shareType: 
     103- PCShareToSinaWeibo=1,     /* 新浪微博 */ 
     104- PCShareToQQWeibo=2,       /* QQ微博 */ 
     105- PCShareToQZone=3,             /* QQ空间 */ 
     106- PCShareToWeixin=4,        /* 微信 */ 
     107- PCShareToQQ=5,                /* QQ */ 
     108}}} 
     109{{{#!th height="30" width="200" 
     110 
     111}}} 
     112|---------------- 
     113{{{#!th height="30" width="200" 
     114热区点击分享后终止触发 
     115}}} 
     116{{{#!th height="30" width="600" 
     117app:Magazine.trigger(3) 
     118}}} 
     119{{{#!th height="30" width="200" 
     120trigger3&4启用版本:[[BR]] 
     121汽车iPad 4.3.0[[BR]] 
     122汽车iPhone1.5.0[[BR]] 
     123家居iPad 3.0.0[[BR]] 
     124家居iPhone 2.0.0[[BR]] 
     125时尚iPad 1.4.0[[BR]] 
     126时尚iPhone 1.4.0 
     127}}} 
     128|---------------- 
     129{{{#!th height="30" width="200"  
     130>>热区分享状态(since 16/2/5) 
     131}}} 
     132{{{#!th height="30" width="600" align="left" 
     133"app:Magazine.trigger(6,{isSuccess:1,shareType:2})[[BR]] 
     134 
     135html:Magazine.addEvent(2,func)/ Magazine.addEvent(2,func(args) [[BR]] 
     136{args[0].username}) 
     137 
     138[[BR]] 
     139说明:[[BR]] 
     1401、isSuccess为0表示分享失败,1表示分享成功[[BR]] 
     1412、shareType: 
     142 
     143* PCShareToSinaWeibo=1, /* 新浪微博 */ 
     144* PCShareToQQWeibo=2, /* QQ微博 */ 
     145* PCShareToQZone=3, /* QQ空间 */ 
     146* PCShareToWeixin=4, /* 微信 */ 
     147* PCShareToQQ=5, /* QQ */ " 
     148}}} 
     149{{{#!th height="30" width="200" 
     150 
     151}}} 
     152|---------------- 
     153{{{#!th height="30" width="200" 
     154页面调用登录模块 
     155}}} 
     156{{{#!th height="30" width="600" 
     157login: 
     158}}} 
     159{{{#!th height="30" width="200" 
     160 
     161}}} 
     162|---------------- 
     163{{{#!th height="30" width="200" 
     164>热区点击登录完成(Modify 16/2/5) 
     165}}} 
     166{{{#!th height="30" width="600" 
     167app:Magazine.trigger(4,{“user_id”:xxxxxxxx}) 
     168}}} 
     169{{{#!th height="30" width="200" 
     1704后面传的是一个json格式的字符串,包含了用户的基本信息,以及cookie 
     171}}} 
     172|---------------- 
     173{{{#!th height="30" width="200" 
     174调用trigger 
     175}}} 
     176{{{#!th height="30" width="600" 
     177calltrigger://?fun=XXX&params=XXX [[BR]] 
     178fun trigger值,如0、1、2、3...[[BR]] 
     179params  参数,如{abc:xxxx} 
     180}}} 
     181{{{#!th height="30" width="200" 
     182启用版本:[[BR]] 
     183汽车iPad 4.2.0[[BR]] 
     184汽车iPhone1.3.0[[BR]] 
     185家居iPad 2.4.0[[BR]] 
     186家居iPhone 1.3.0[[BR]] 
     187时尚iPad 1.3.0[[BR]] 
     188时尚iPhone 1.2.0 
     189}}} 
     190|---------------- 
     191{{{#!th height="30" width="200" 
     192保存图片 
     193}}} 
     194{{{#!th height="30" width="600" 
     195saveimage:article-xxx/picture.png 
     196}}} 
     197{{{#!th height="30" width="200" 
     198 
     199}}} 
     200|---------------- 
     201{{{#!th height="30" width="200" 
     202全屏组图 
     203}}} 
     204{{{#!th height="30" width="600" 
     205groupimage:image_path 
     206}}} 
     207{{{#!th height="30" width="200" 
     208 
     209}}} 
     210|---------------- 
     211{{{#!th height="30" width="200" 
     212打开iTunes链接 
     213}}} 
     214{{{#!th height="30" width="600" 
     215http://itunes.apple.com/cn/app/id415249203?mt=8 
     216}}} 
     217{{{#!th height="30" width="200" 
     218 
     219}}} 
     220|---------------- 
     221{{{#!th height="30" width="200" 
     222调用内嵌浏览器 
     223}}} 
     224{{{#!th height="30" width="600" 
     225url_path#CustomBrowser 
     226}}} 
     227{{{#!th height="30" width="200" 
     228 
     229}}} 
     230|---------------- 
     231{{{#!th height="30" width="200" 
     232弹出菜单 
     233}}} 
     234{{{#!th height="30" width="600" 
     235url:http://PassOnClickEvent 
     236}}} 
     237{{{#!th height="30" width="200" 
     238 
     239}}} 
     240|---------------- 
     241{{{#!th height="30" width="200" 
     242跳转文章 
     243}}} 
     244{{{#!th height="30" width="600" 
     245url:http://article-123/page-0 
     246}}} 
     247{{{#!th height="30" width="200" 
     248 
     249}}} 
     250|---------------- 
     251{{{#!th height="30" width="200" 
     252看评论 
     253}}} 
     254{{{#!th height="30" width="600" 
     255magazineComments:1  
     256}}} 
     257{{{#!th height="30" width="200" 
     258 
     259}}} 
     260|---------------- 
     261{{{#!th height="30" width="200" 
     262写评论 
     263}}} 
     264{{{#!th height="30" width="600" 
     265magazineComments:2 
     266}}} 
     267{{{#!th height="30" width="200" 
     268 
     269}}} 
     270|---------------- 
     271{{{#!th height="30" width="200" 
     272播放音乐 
     273}}} 
     274{{{#!th height="30" width="600" align="left" 
     275backgroundaudio:?src=article-123/music.mp3&opt=play&volume=0.4&time=30 
     276 
     277- src :音频参数 
     278- opt :操作(play pause stop) 
     279- volume :音量 
     280- time :在音频的哪一秒开始播放 
     281}}} 
     282{{{#!th height="30" width="200" 
     283 
     284}}} 
     285|---------------- 
     286{{{#!th height="30" width="200" 
     287外部链接打开应用 
     288}}} 
     289{{{#!th height="30" width="600" 
     290url: openapps://pcauto://xxx 
     291}}} 
     292{{{#!th height="30" width="200" 
     293 
     294}}} 
     295|---------------- 
     296{{{#!th height="30" width="200" 
     297广告点击统计 
     298}}} 
     299{{{#!th height="30" width="600" 
     300adclick:本田广告 
     301}}} 
     302{{{#!th height="30" width="200" 
     303 
     304}}} 
     305|---------------- 
     306{{{#!th height="30" width="200" 
     307写邮件 
     308}}} 
     309{{{#!th height="30" width="600" align="left" 
     310herf="mailto:abc@pconline.com.cn?subject=%3F%3D&boby=你好3D" 
     311 
     312其中subject、和boby内 
     313- %3F : ?[[BR]] 
     314- %3D : = 
     315}}} 
     316{{{#!th height="30" width="200" 
     317 
     318}}} 
     319|---------------- 
     320{{{#!th height="30" width="200" 
     321锁屏旋转 
     322}}} 
     323{{{#!th height="30" width="600" 
     324锁屏:lockrotation:1 [[BR]] 
     325恢复:lockrotation:0 
     326}}} 
     327{{{#!th height="30" width="200" 
     328 
     329}}} 
     330|---------------- 
     331{{{#!th height="30" width="200" 
     332app(非html)视频自动播放 
     333}}} 
     334{{{#!th height="30" width="600" 
     335abc.mp4/Y[[BR]] 
     336abc.mp4/N 
     337}}} 
     338{{{#!th height="30" width="200" 
     339 
     340}}} 
     341|---------------- 
     342{{{#!th height="30" width="200" 
     343传入页面url参数 
     344}}} 
     345{{{#!th height="30" width="600" 
     346设备 machine[[BR]] 
     347设备方向 statusBarOrientation[[BR]] 
     348方向 orientation[[BR]] 
     349版本号 app_version[[BR]] 
     350iOS系统 os_version[[BR]] 
     351太平洋账号ID userid[[BR]] 
     352太平洋账号昵称 username[[BR]] 
     353太平洋账号头像 userimage[[BR]] 
     354openUDID串 openudid 
     355}}} 
     356{{{#!th height="30" width="200" 
     357 
     358}}} 
     359|---------------- 
     360{{{#!th height="30" width="200" 
     361家居杂志安卓版JS回调app接口方法 
     362}}} 
     363{{{#!th height="30" width="600" align="left" 
     364app:  webView增加接口:addJavascriptInterface(toChild, "touchToChild");(tochild:接口对象,touchToChild:js回调接口对象名称) 
     365 
     366JS:JS端调用接口方法:window.touchToChild.changeChildTouchPermission(X);(X可以传值true或者false,true代表拦截app端触摸事件,将触控权限保留在JS端;false代表将触控权限交由给app端控制) 
     367}}} 
     368{{{#!th height="30" width="200" 
     369 
     370}}} 
     371|---------------- 
     372{{{#!th height="30" width="200" 
     373页面摄像头相关 
     374}}} 
     375{{{#!th height="30" width="600" align="left" 
     376bgcamera:on    打开摄像头[[BR]] 
     377bgcamera:off    关闭摄像头[[BR]] 
     378camerashot      拍照[[BR]] 
     379camerascreenshot    屏幕合成拍照[[BR]] 
     380changeposition       前后摄像头切换[[BR]] 
     381zoomin         放大[[BR]] 
     382zoomout       缩小[[BR]] 
     383saveshot      保存到本地[[BR]] 
     384useshot       使用图片,生成base64传入页面[[BR]] 
     385trigger 5       使用图片后,触发trigger 5,返回base64 app:Magazine.trigger(5,base64) 
     386}}} 
     387{{{#!th height="30" width="200" 
     388启用版本:[[BR]] 
     389汽车iPhone2.1.0[[BR]] 
     390家居iPhone 2.1.0[[BR]] 
     391时尚iPhone 1.5.0[[BR]] 
     392<iPad版无此功能> 
     393 
     394}}} 
     395|---------------- 
     396{{{#!th height="30" width="200" 
     397协议处理的优先级 
     398}}} 
     399{{{#!th height="30" width="600" 
     400passonclickevent[[BR]] 
     401adclick:[[BR]] 
     402itunes[[BR]] 
     403#custombrowser[[BR]] 
     404groupimage:[[BR]] 
     405bgcamera:[[BR]] 
     406camerashot[[BR]] 
     407camerascreenshot[[BR]] 
     408saveshot[[BR]] 
     409useshot[[BR]] 
     410changeposition[[BR]] 
     411zoomin[[BR]] 
     412zoomout[[BR]] 
     413page[[BR]] 
     414mailto:[[BR]] 
     415sinaweibo:[[BR]] 
     416qqweibo:[[BR]] 
     417qzone:[[BR]] 
     418weixinshare:[[BR]] 
     419wxfriendshare:[[BR]] 
     420qqshare:[[BR]] 
     421appshare:[[BR]] 
     422magazinecomments:[[BR]] 
     423openapps:[[BR]] 
     424saveimage:[[BR]] 
     425lockrotation:[[BR]] 
     426backgroundaudio:[[BR]] 
     427calltrigger:[[BR]] 
     428login 
     429}}} 
     430{{{#!th height="30" width="200" 
     431 
     432}}}