|---------------- {{{#!th height="30" width="200" style="background: #adf" 功能 }}} {{{#!th height="30" width="600" style="background: #adf" API }}} {{{#!th height="30" width="400" style="background: #adf" 备注 }}} |---------------- {{{#!th height="30" width="200" 获取动态分享内容[[BR]] }}} {{{#!th height="30" width="600" app 调用js方法:app.localShare() [[BR]] html:appLocalShare:?title=欢迎分享&icon=http://hyh.yqhapp.com/img/user.jpg&url=http://www.baidu.com }}} {{{#!th height="30" width="200" 备注:汽车杂志iphone版3.2.1,汽车杂志ipad版5.2.1之后用到(备注:传入分享组件的参数需要url 编码)。如果没有动态分享内容就用固定分享链接:http://www1.pcauto.com.cn/magazine/wechat/machine/?id=658_8678(id是由杂志id_文章id,拼接组合而成) }}} |---------------- {{{#!th height="30" width="200" 用户到达/离开[[BR]] 当前页面时触发 }}} {{{#!th height="30" width="600" app:Magazine.trigger(1)/Magazine.trigger(0) [[BR]] html:Magazine.addEvent(1,func)/ Magazine.addEvent(0,func) }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 进入阅读器时给页面返回当前的设备网络状态 }}} {{{#!th height="30" width="600" app:Magazine.trigger(7,{"type":"0"}) [[BR]] html:Magazine.addEvent(7,func) [[BR]] 说明:1:type为0表示无网络,1表示WiFi网络,2表示非WiFi网络 }}} {{{#!th height="30" width="200" 家居杂志iphone、ipad 3.3中添加 }}} |---------------- {{{#!th height="30" width="200" >新浪微博分享(Modify 16/2/5) }}} {{{#!th height="30" width="600" sinaweibo: }}} {{{#!th height="30" width="200" 代码同时做了只传标题的容错处理 }}} |---------------- {{{#!th height="30" width="200" 腾讯微博分享 }}} {{{#!th height="30" width="600" qqweibo: }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" QQ好友分享 }}} {{{#!th height="30" width="600" qzone: }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" >微信分享 }}} {{{#!th height="30" width="600" align="center" weixinshare:?title=标题文案&des=描述文案&icon=图标&url=分享链接&scene=1&type=1 [[BR]] 注:icon=html-12134/logo.jpg 分享为链接时 缩略图大小不能超过32K [[BR]] scene:0表示分享给好友,1表示分享到朋友圈(家居杂志,url前缀只使用weixinshare) [[BR]] type:0表示分享为链接,1表示分享为图片(注意这个选项只有当scene为1时有作用,当scene为0时type默认为0) [[BR]] url前缀 :weixinshare:好友,wxfriendshare:微信朋友圈(汽车ipad5.1.0和iphone3.1.0以及以前的版本) }}} {{{#!th height="30" width="200" 1、家居3.3.0中完善 url默认使用itunes下载地址[[BR]] 2、汽车ipad4.1.0 iphone1.2.1 开始支持[[BR]] }}} |---------------- {{{#!th height="30" width="200" 调用APP分享组件 }}} {{{#!th height="30" width="600" align="left" appshare://?title=标题文案&des=描述文案&icon=图标&url=分享链接&sinatail=新浪尾巴&qqtail=腾讯微博尾巴 [[BR]] 尾巴用于区分分享文案当中新浪与腾讯区别 [[BR]] 注:icon=html-12134/logo.jpg 缩略图大小不能超过32K }}} {{{#!th height="30" width="200" url默认使用itunes下载地址[[BR]] 尾巴是指拼接在文字后面的app名称 }}} |---------------- {{{#!th height="30" width="200" 热区点击微博分享,用户手动点击返回按钮 }}} {{{#!th height="30" width="600" app:Magazine.trigger(3) }}} {{{#!th height="30" width="200" trigger3&4启用版本:[[BR]] 汽车iPad 4.3.0[[BR]] 汽车iPhone1.5.0[[BR]] 家居iPad 3.0.0[[BR]] 家居iPhone 2.0.0[[BR]] 时尚iPad 1.4.0[[BR]] 时尚iPhone 1.4.0 }}} |---------------- {{{#!th height="30" width="200" >>热区分享状态(since 16/2/5) }}} {{{#!th height="30" width="600" align="left" "app:Magazine.trigger(6,{isSuccess:1,shareType:2})[[BR]] 
html:Magazine.addEvent(6,func) 说明:[[BR]] 1、isSuccess为0表示分享失败,1表示分享成功[[BR]] 2、shareType:
 * PCShareToSinaWeibo=1, /* 新浪微博 */ * PCShareToQQWeibo=2, /* QQ微博 */ * PCShareToQZone=3, /* QQ空间 */ * PCShareToWeixin=4, /* 微信 */ * PCShareToQQ=5, /* QQ */ " }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 页面调用登录模块 }}} {{{#!th height="30" width="600" login: }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" >热区点击登录完成(Modify 16/2/5) }}} {{{#!th height="30" width="600" app:Magazine.trigger(4,{“user_id”:xxxxxxxx}) }}} {{{#!th height="30" width="200" 4后面传的是一个json格式的字符串,包含了用户的基本信息,以及cookie }}} |---------------- {{{#!th height="30" width="200" 调用trigger }}} {{{#!th height="30" width="600" calltrigger://?fun=XXX¶ms=XXX [[BR]] fun trigger值,如0、1、2、3...[[BR]] params 参数,如{abc:xxxx} }}} {{{#!th height="30" width="200" 启用版本:[[BR]] 汽车iPad 4.2.0[[BR]] 汽车iPhone1.3.0[[BR]] 家居iPad 2.4.0[[BR]] 家居iPhone 1.3.0[[BR]] 时尚iPad 1.3.0[[BR]] 时尚iPhone 1.2.0 }}} |---------------- {{{#!th height="30" width="200" 跳到AppStore }}} {{{#!th height="30" width="600" pcopenappstore:http://itunes.apple.com/cn/app/id415249203?mt=8 }}} {{{#!th height="30" width="200" 后面拼上app的iTunes地址 }}} |---------------- {{{#!th height="30" width="200" 调用内嵌浏览器 }}} {{{#!th height="30" width="600" url_path#CustomBrowser }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 弹出菜单 }}} {{{#!th height="30" width="600" url:http://PassOnClickEvent }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 跳转文章 }}} {{{#!th height="30" width="600" url:http://article-123/page-0 }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 播放音乐 }}} {{{#!th height="30" width="600" align="left" backgroundaudio:?src=article-123/music.mp3&opt=play&volume=0.4&time=30 - src :音频文件的路径 - opt :操作(play pause stop) - volume :音量 - time :在音频的哪一秒开始播放 }}} {{{#!th height="30" width="200" play:播放 pause:暂停 stop:暂停. 点击后需重新导入音频才可播放 time:单位是秒 }}} |---------------- {{{#!th height="30" width="200" 外部链接打开应用 }}} {{{#!th height="30" width="600" url: openapps://pcauto://xxx }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 广告点击统计 }}} {{{#!th height="30" width="600" adclick:本田广告 }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 传入页面url参数 }}} {{{#!th height="30" width="600" 设备 machine[[BR]] 设备方向 statusBarOrientation[[BR]] 方向 orientation[[BR]] 版本号 app_version[[BR]] iOS系统 os_version[[BR]] 太平洋账号ID userid[[BR]] 太平洋账号昵称 username[[BR]] 太平洋账号头像 userimage[[BR]] 用户头像 userimage[[BR]] common_session_id[[BR]] cmu[[BR]] dev_id[[BR]] openUDID串 openudid }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 家居杂志安卓版JS回调app接口方法 }}} {{{#!th height="30" width="600" align="left" app: webView增加接口:addJavascriptInterface(toChild, "touchToChild");(tochild:接口对象,touchToChild:js回调接口对象名称) JS:JS端调用接口方法:window.touchToChild.changeChildTouchPermission(X);(X可以传值true或者false,true代表拦截app端触摸事件,将触控权限保留在JS端;false代表将触控权限交由给app端控制) }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 页面摄像头相关 }}} {{{#!th height="30" width="600" align="left" bgcamera:on 打开摄像头[[BR]] bgcamera:off 关闭摄像头[[BR]] camerashot 拍照[[BR]] camerascreenshot 屏幕合成拍照[[BR]] changeposition 前后摄像头切换[[BR]] zoomin 放大[[BR]] zoomout 缩小[[BR]] saveshot 保存到本地[[BR]] useshot 使用图片,生成base64传入页面[[BR]] trigger 5 使用图片后,触发trigger 5,返回base64 app:Magazine.trigger(5,base64) }}} {{{#!th height="30" width="200" 启用版本:[[BR]] 汽车iPhone2.1.0[[BR]] 家居iPhone 2.1.0[[BR]] 时尚iPhone 1.5.0[[BR]] }}} |---------------- {{{#!th height="30" width="200" 协议处理的优先级 }}} {{{#!th height="30" width="600" passonclickevent[[BR]] adclick:[[BR]] pcopenappstore:[[BR]] #custombrowser[[BR]] groupimage:[[BR]] bgcamera:[[BR]] camerashot[[BR]] camerascreenshot[[BR]] saveshot[[BR]] useshot[[BR]] changeposition[[BR]] zoomin[[BR]] zoomout[[BR]] page[[BR]] mailto:[[BR]] sinaweibo:[[BR]] qqweibo:[[BR]] qzone:[[BR]] weixinshare:[[BR]] wxfriendshare:[[BR]] qqshare:[[BR]] appshare:[[BR]] magazinecomments:[[BR]] openapps:[[BR]] saveimage:[[BR]] lockrotation:[[BR]] backgroundaudio:[[BR]] calltrigger:[[BR]] login }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" style="background: #8ff" 不常用协议 }}} {{{#!th height="30" width="600" style="background: #8ff" 不常用协议 }}} {{{#!th height="30" width="200" style="background: #8ff" 不常用协议 }}} |---------------- {{{#!th height="30" width="200" 保存图片 }}} {{{#!th height="30" width="600" saveimage:article-xxx/picture.png }}} {{{#!th height="30" width="200" 图片的绝对路径 }}} |---------------- {{{#!th height="30" width="200" 全屏组图 }}} {{{#!th height="30" width="600" groupimage:image_path }}} {{{#!th height="30" width="200" 图片的绝对路径 }}} |---------------- {{{#!th height="30" width="200" 看评论 }}} {{{#!th height="30" width="600" magazineComments:1 }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 写评论 }}} {{{#!th height="30" width="600" magazineComments:2 }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 写邮件 }}} {{{#!th height="30" width="600" align="left" herf="mailto:abc@pconline.com.cn?subject=%3F%3D&boby=你好3D" 其中subject、和boby内 - %3F : ?[[BR]] - %3D : = }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" 锁屏旋转 }}} {{{#!th height="30" width="600" 锁屏:lockrotation:1 [[BR]] 恢复:lockrotation:0 }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" app(非html)视频自动播放 }}} {{{#!th height="30" width="600" abc.mp4/Y[[BR]] abc.mp4/N }}} {{{#!th height="30" width="200" }}} |---------------- {{{#!th height="30" width="200" style="background: #8ff" 去掉的协议 }}} {{{#!th height="30" width="600" style="background: #8ff" 去掉的协议 }}} {{{#!th height="30" width="200" style="background: #8ff" 去掉的协议 }}} |---------------- {{{#!th height="30" width="200" 成功发送微博后触发 }}} {{{#!th height="30" width="600" align="left" app:Magazine.trigger(2,{username:123,shareType:2}) [[BR]] html:Magazine.addEvent(2,func)/ Magazine.addEvent(2,func(args){args[0].username})[[BR]] shareType: - PCShareToSinaWeibo=1, /* 新浪微博 */ - PCShareToQQWeibo=2, /* QQ微博 */ - PCShareToQZone=3, /* QQ空间 */ - PCShareToWeixin=4, /* 微信 */ - PCShareToQQ=5, /* QQ */ }}} {{{#!th height="30" width="200" }}}