new Mutants()
Members
-
_env :EnvClass
-
环境对象
Type:
- EnvClass
Properties:
Name Type Description browser
String 当前浏览器 , 取值范围请参考constant.browser
os
String 当前操作系统 , 取值范围请参考constant.os
platform
String 当前平台 , 取值范围请参考constant.platform
constant
JSONObject 环境常量 , 用来当作环境判断的对比值
Properties
Name Type Description browser
JSONObject 浏览器常量
Properties
Name Type Description chrome
String chrome浏览器
firefox
String firefox浏览器
ie
String ie浏览器
opera
String opera浏览器
safari
String safari浏览器
unknown
String unknown浏览器
os
JSONObject 操作系统常量
Properties
Name Type Description android
String 安卓操作系统
ios
String ios操作系统
computer
String PC机
mobile
String 手机
platform
JSONObject 平台常量
Properties
Name Type Description chanjet
String 畅捷通平台
weixin
String 微信平台
browser
String 浏览器 , 一般是开发环境
-
_options :JSONObject
-
设置参数
Type:
- JSONObject
Properties:
Name Type Description plugins
Array 所需要插件, 需要使用require返回插件class
auth
认证信息
Properties
Name Type Description chanjet
JSONObject chanjet平台认证信息
weixin
JSONObject 微信平台认证信息 , 详见微信开发文档
Properties
Name Type Description appId
String timestamp
String nonceStr
String signature
String Example
options = { plugins : [ require('chanjet-plugin-base'), require('chanjet-plugin-sms'), require('chanjet-plugin-share') ], auth : { chanjet : {}, weixin : { appId : 'insert appId here', timestamp : '1458198827123', nonceStr : 'dwqq2321321', signature : 'qq2233' } } }
Methods
-
exit()
-
退出当前APP ,暂时不做回调处理
-
ready(callback)
-
等待环境ready , 成功后回调callback
Parameters:
Name Type Description callback
function 成功后执行的回调