| | 1 | |---------------- |
| | 2 | {{{#!th height="30" width="200" |
| | 3 | 功能 |
| | 4 | }}} |
| | 5 | {{{#!th height="30" width="600" |
| | 6 | API |
| | 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" |
| | 17 | app:Magazine.trigger(1)/Magazine.trigger(0) [[BR]] |
| | 18 | html: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" |
| | 28 | sinaweibo: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" |
| | 38 | qqweibo: |
| | 39 | }}} |
| | 40 | {{{#!th height="30" width="200" |
| | 41 | |
| | 42 | }}} |
| | 43 | |---------------- |
| | 44 | {{{#!th height="30" width="200" |
| | 45 | QQ空间分享 |
| | 46 | }}} |
| | 47 | {{{#!th height="30" width="600" |
| | 48 | qzone: |
| | 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 | |
| | 62 | scene:1表示分享到朋友圈,0表示分享给好友" |
| | 63 | }}} |
| | 64 | {{{#!th height="30" width="200" |
| | 65 | url默认使用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 | |
| | 76 | scene:1表示分享到朋友圈,0表示分享给好友" |
| | 77 | }}} |
| | 78 | {{{#!th height="30" width="200" |
| | 79 | url默认使用itunes下载地址 |
| | 80 | }}} |
| | 81 | |---------------- |
| | 82 | {{{#!th height="30" width="200" |
| | 83 | 调用APP分享组件 |
| | 84 | }}} |
| | 85 | {{{#!th height="30" width="600" align="left" |
| | 86 | appshare://?title=分享文案&icon=图标&url=分享链接&sinatail=新浪尾巴&qqtail=腾讯微博尾巴 [[BR]] |
| | 87 | 尾巴用于区分分享文案当中新浪与腾讯区别 [[BR]] |
| | 88 | |
| | 89 | 注:icon=html-12134/logo.jpg 缩略图大小不能超过32K |
| | 90 | }}} |
| | 91 | {{{#!th height="30" width="200" |
| | 92 | url默认使用itunes下载地址 |
| | 93 | }}} |
| | 94 | |---------------- |
| | 95 | {{{#!th height="30" width="200" |
| | 96 | 成功发送微博后触发 |
| | 97 | }}} |
| | 98 | {{{#!th height="30" width="600" align="left" |
| | 99 | app:Magazine.trigger(2,{username:123,shareType:2}) [[BR]] |
| | 100 | html:Magazine.addEvent(2,func)/ Magazine.addEvent(2,func(args){args[0].username})[[BR]] |
| | 101 | |
| | 102 | shareType: |
| | 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" |
| | 117 | app:Magazine.trigger(3) |
| | 118 | }}} |
| | 119 | {{{#!th height="30" width="200" |
| | 120 | trigger3&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 | |
| | 135 | html:Magazine.addEvent(2,func)/ Magazine.addEvent(2,func(args) [[BR]] |
| | 136 | {args[0].username}) |
| | 137 | |
| | 138 | [[BR]] |
| | 139 | 说明:[[BR]] |
| | 140 | 1、isSuccess为0表示分享失败,1表示分享成功[[BR]] |
| | 141 | 2、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" |
| | 157 | login: |
| | 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" |
| | 167 | app:Magazine.trigger(4,{“user_id”:xxxxxxxx}) |
| | 168 | }}} |
| | 169 | {{{#!th height="30" width="200" |
| | 170 | 4后面传的是一个json格式的字符串,包含了用户的基本信息,以及cookie |
| | 171 | }}} |
| | 172 | |---------------- |
| | 173 | {{{#!th height="30" width="200" |
| | 174 | 调用trigger |
| | 175 | }}} |
| | 176 | {{{#!th height="30" width="600" |
| | 177 | calltrigger://?fun=XXX¶ms=XXX [[BR]] |
| | 178 | fun trigger值,如0、1、2、3...[[BR]] |
| | 179 | params 参数,如{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" |
| | 195 | saveimage: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" |
| | 205 | groupimage: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" |
| | 215 | http://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" |
| | 225 | url_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" |
| | 235 | url: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" |
| | 245 | url: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" |
| | 255 | magazineComments: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" |
| | 265 | magazineComments: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" |
| | 275 | backgroundaudio:?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" |
| | 290 | url: 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" |
| | 300 | adclick:本田广告 |
| | 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" |
| | 310 | herf="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" |
| | 332 | app(非html)视频自动播放 |
| | 333 | }}} |
| | 334 | {{{#!th height="30" width="600" |
| | 335 | abc.mp4/Y[[BR]] |
| | 336 | abc.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]] |
| | 350 | iOS系统 os_version[[BR]] |
| | 351 | 太平洋账号ID userid[[BR]] |
| | 352 | 太平洋账号昵称 username[[BR]] |
| | 353 | 太平洋账号头像 userimage[[BR]] |
| | 354 | openUDID串 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" |
| | 364 | app: webView增加接口:addJavascriptInterface(toChild, "touchToChild");(tochild:接口对象,touchToChild:js回调接口对象名称) |
| | 365 | |
| | 366 | JS: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" |
| | 376 | bgcamera:on 打开摄像头[[BR]] |
| | 377 | bgcamera:off 关闭摄像头[[BR]] |
| | 378 | camerashot 拍照[[BR]] |
| | 379 | camerascreenshot 屏幕合成拍照[[BR]] |
| | 380 | changeposition 前后摄像头切换[[BR]] |
| | 381 | zoomin 放大[[BR]] |
| | 382 | zoomout 缩小[[BR]] |
| | 383 | saveshot 保存到本地[[BR]] |
| | 384 | useshot 使用图片,生成base64传入页面[[BR]] |
| | 385 | trigger 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" |
| | 400 | passonclickevent[[BR]] |
| | 401 | adclick:[[BR]] |
| | 402 | itunes[[BR]] |
| | 403 | #custombrowser[[BR]] |
| | 404 | groupimage:[[BR]] |
| | 405 | bgcamera:[[BR]] |
| | 406 | camerashot[[BR]] |
| | 407 | camerascreenshot[[BR]] |
| | 408 | saveshot[[BR]] |
| | 409 | useshot[[BR]] |
| | 410 | changeposition[[BR]] |
| | 411 | zoomin[[BR]] |
| | 412 | zoomout[[BR]] |
| | 413 | page[[BR]] |
| | 414 | mailto:[[BR]] |
| | 415 | sinaweibo:[[BR]] |
| | 416 | qqweibo:[[BR]] |
| | 417 | qzone:[[BR]] |
| | 418 | weixinshare:[[BR]] |
| | 419 | wxfriendshare:[[BR]] |
| | 420 | qqshare:[[BR]] |
| | 421 | appshare:[[BR]] |
| | 422 | magazinecomments:[[BR]] |
| | 423 | openapps:[[BR]] |
| | 424 | saveimage:[[BR]] |
| | 425 | lockrotation:[[BR]] |
| | 426 | backgroundaudio:[[BR]] |
| | 427 | calltrigger:[[BR]] |
| | 428 | login |
| | 429 | }}} |
| | 430 | {{{#!th height="30" width="200" |
| | 431 | |
| | 432 | }}} |