chenxiong 4 лет назад
Сommit
dbbfb09366
100 измененных файлов с 19533 добавлено и 0 удалено
  1. 19 0
      .gitignore
  2. 33 0
      App.vue
  3. 49 0
      common/api.js
  4. 12 0
      common/checking/licensePlate.js
  5. 2 0
      common/eventHub.js
  6. 28 0
      common/httpList/answer.js
  7. 62 0
      common/httpList/apply.js
  8. 52 0
      common/httpList/base.js
  9. 29 0
      common/httpList/business.js
  10. 166 0
      common/httpList/course.js
  11. 13 0
      common/httpList/exam.js
  12. 421 0
      common/httpList/goods.js
  13. 29 0
      common/httpList/grade.js
  14. 28 0
      common/httpList/informUser.js
  15. 45 0
      common/httpList/lock.js
  16. 159 0
      common/httpList/login.js
  17. 40 0
      common/httpList/myStudent.js
  18. 26 0
      common/httpList/note.js
  19. 107 0
      common/httpList/order.js
  20. 31 0
      common/httpList/oss.js
  21. 13 0
      common/httpList/polyvVideo.js
  22. 38 0
      common/httpList/profileStamp.js
  23. 61 0
      common/httpList/profileTp.js
  24. 33 0
      common/httpList/study.js
  25. 14 0
      common/httpList/system.js
  26. 61 0
      common/httpList/systemPlan.js
  27. 56 0
      common/httpList/userInfo.js
  28. 29 0
      common/httpList/wxpay.js
  29. 24 0
      common/layer.js
  30. 333 0
      common/methodTool.js
  31. 18 0
      common/navTo.js
  32. 132 0
      common/request.js
  33. 404 0
      common/signature.js
  34. 137 0
      common/socket.js
  35. 59 0
      common/wxPay.js
  36. 50 0
      common/wxShare.js
  37. 647 0
      components/course/courseChapter.vue
  38. 167 0
      components/course/courseModule.vue
  39. 535 0
      components/course/courseSection.vue
  40. 56 0
      components/mask1/mask1.vue
  41. 69 0
      components/nav-bar/nav-bar.vue
  42. 137 0
      components/pick-regions/pick-regions.vue
  43. 0 0
      components/pick-regions/regions.json
  44. 180 0
      components/tab-swiper-warp/index.vue
  45. 20 0
      components/tab-swiper-warp/swiper-item/index.vue
  46. 19 0
      components/tab-swiper-warp/swiper-tab/index.vue
  47. 151 0
      components/tki-tree/style.css
  48. 103 0
      components/tki-tree/tki-tree.vue
  49. 435 0
      components/uni-data-picker/uni-data-picker.vue
  50. 468 0
      components/uni-data-pickerview/uni-data-picker.js
  51. 271 0
      components/uni-data-pickerview/uni-data-pickerview.vue
  52. 10 0
      components/uni-load-more/config.json
  53. 21 0
      components/uni-load-more/uni-load-more.vue
  54. 200 0
      hello H5+/about.html
  55. BIN
      hello H5+/audio/alice.mp3
  56. BIN
      hello H5+/audio/shake.wav
  57. 122 0
      hello H5+/css/common.css
  58. 135 0
      hello H5+/doc/accelerometer.html
  59. 290 0
      hello H5+/doc/ad.html
  60. 152 0
      hello H5+/doc/android.html
  61. 352 0
      hello H5+/doc/audio.html
  62. 324 0
      hello H5+/doc/barcode.html
  63. 373 0
      hello H5+/doc/bluetooth.html
  64. 78 0
      hello H5+/doc/cache.html
  65. 214 0
      hello H5+/doc/camera.html
  66. 44 0
      hello H5+/doc/console.html
  67. 407 0
      hello H5+/doc/contacts.html
  68. 304 0
      hello H5+/doc/device.html
  69. 321 0
      hello H5+/doc/downloader.html
  70. 96 0
      hello H5+/doc/events.html
  71. 137 0
      hello H5+/doc/fingerprint.html
  72. 277 0
      hello H5+/doc/gallery.html
  73. 342 0
      hello H5+/doc/geolocation.html
  74. 198 0
      hello H5+/doc/ibeacon.html
  75. 24 0
      hello H5+/doc/interface-orientation.html
  76. 759 0
      hello H5+/doc/io.html
  77. 87 0
      hello H5+/doc/ios.html
  78. 145 0
      hello H5+/doc/key.html
  79. 1000 0
      hello H5+/doc/maps.html
  80. 116 0
      hello H5+/doc/messaging.html
  81. 30 0
      hello H5+/doc/native.js.html
  82. 675 0
      hello H5+/doc/nativeUI.html
  83. 1357 0
      hello H5+/doc/nativeobj.html
  84. 337 0
      hello H5+/doc/navigator.html
  85. 483 0
      hello H5+/doc/oauth.html
  86. 132 0
      hello H5+/doc/orientation.html
  87. 407 0
      hello H5+/doc/payment.html
  88. 78 0
      hello H5+/doc/proximity.html
  89. 218 0
      hello H5+/doc/push.html
  90. 61 0
      hello H5+/doc/res/doc.css
  91. 14 0
      hello H5+/doc/res/doc.js
  92. 1658 0
      hello H5+/doc/res/prettify.js
  93. 124 0
      hello H5+/doc/res/prettify.sons.css
  94. 320 0
      hello H5+/doc/runtime.html
  95. 539 0
      hello H5+/doc/share.html
  96. 261 0
      hello H5+/doc/speech.html
  97. 58 0
      hello H5+/doc/splashscreen.html
  98. 94 0
      hello H5+/doc/sqlite.html
  99. 42 0
      hello H5+/doc/statistic.html
  100. 46 0
      hello H5+/doc/storage.html

+ 19 - 0
.gitignore

@@ -0,0 +1,19 @@
+.DS_Store
+node_modules/
+/dist/
+unpackage/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+/test/unit/coverage/
+/test/e2e/reports/
+selenium-debug.log
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+.hbuilderx

+ 33 - 0
App.vue

@@ -0,0 +1,33 @@
+<script>
+	import plv from './pages3/static/polyv-sdk/index';
+	export default {
+		onLaunch: function(option) {
+			let inviteCode = option.inviteCode
+			if(inviteCode&&inviteCode!=''){
+				console.log(inviteCode)
+				uni.setStorageSync("inviteCode",inviteCode)
+			}
+			console.log(plv)
+			 plv.setApp({
+				apiId: 'ezl5uy4zei',
+				apiSecret: '2bf5bb3c31d34531943df10284edd50b'
+			});
+
+		}, 
+		methods: { 
+	
+		},
+		onShow: function() {
+			
+		},
+		onHide: function() {
+			uni.$emit('playPause')
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*每个页面公共css */
+	@import "/iconfont/iconfont.css";
+	@import "uview-ui/index.scss";
+</style>

+ 49 - 0
common/api.js

@@ -0,0 +1,49 @@
+import login from './httpList/login.js'
+import polyvVideo from './httpList/polyvVideo.js'
+import oss from './httpList/oss.js'
+import userInfo from './httpList/userInfo.js'
+import wxpay from './httpList/wxpay.js'
+import system from './httpList/system.js'
+import goods from './httpList/goods.js'
+import business from './httpList/business.js'
+import course from './httpList/course.js'
+import grade from './httpList/grade.js'
+import base from './httpList/base.js'
+import apply from './httpList/apply.js'
+import systemPlan from './httpList/systemPlan.js'
+import myStudent from './httpList/myStudent.js'
+import order from './httpList/order.js'
+import informUser from './httpList/informUser.js'
+import study from './httpList/study.js'
+import profileTp from './httpList/profileTp.js'
+import answer from './httpList/answer.js'
+import note from './httpList/note.js'
+import exam from './httpList/exam.js'
+import profileStamp from './httpList/profileStamp.js'
+import lock from './httpList/lock.js'
+
+export default {
+	...login,
+	...polyvVideo,
+	...oss,
+	...userInfo,
+	...system,
+	...wxpay,
+	...goods,
+	...business,
+	...course,
+	...grade,
+	...base,
+	...apply,
+	...systemPlan,
+	...myStudent,
+	...order,
+	...informUser,
+	...study,
+	...profileTp,
+	...answer,
+	...note,
+	...exam,
+	...profileStamp,
+	...lock
+}

+ 12 - 0
common/checking/licensePlate.js

@@ -0,0 +1,12 @@
+const plate = (options) => {
+	// 验证车牌号 是否 合格
+	let result = false;
+	if (options.length == 7){
+	  let express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+	  result = express.test(options);
+	}
+	
+	return result;
+}
+
+export default plate

+ 2 - 0
common/eventHub.js

@@ -0,0 +1,2 @@
+import Vue from 'vue'
+export default new Vue()

+ 28 - 0
common/httpList/answer.js

@@ -0,0 +1,28 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//答疑列表
+	answerList(data) {
+		return myRequest({
+			url: '/app/answer/list',
+			method: 'get',
+			data: data,
+			noLoading:true
+		})
+	},
+	postAnswer(data) {
+		return myRequest({
+			url: '/app/answer',
+			method: 'post',
+			data: data
+		})
+	},
+	delAnswer(data) {
+		return myRequest({
+			url: '/app/answer/edit',
+			method: 'post',
+			data: data
+		})
+	}
+}

+ 62 - 0
common/httpList/apply.js

@@ -0,0 +1,62 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增用户预约考试
+	addApply(data) {
+		return myRequest({
+			url: '/apply',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改用户预约考试
+	editApply(data) {
+		return myRequest({
+			url: '/apply/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询报考数据列表
+	getApplylist(data) {
+		return myRequest({
+			url: '/apply/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//点击预约报考按钮
+	getApplysubscribe(data) {
+		return myRequest({
+			url: '/apply/subscribe',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考试地点
+	getApplysubscribeApplySite(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySite',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考培地点
+	getApplysubscribeApplySiteTrain(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySiteTrain',
+			method: 'get',
+			data: data
+		})
+	},
+	//预约报考下一步按钮 1 进入有考陪有考试地点得预约考试 2进入无考陪有考试地点预约考试 3无考试次数购买商品
+	getApplysubscribeNext(data) {
+		return myRequest({
+			url: '/apply/subscribeNext',
+			method: 'get',
+			data: data
+		})
+	}
+	
+}

+ 52 - 0
common/httpList/base.js

@@ -0,0 +1,52 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	getProvinceList(data) {
+		return myRequest({
+			url: '/apply/areas/list',
+			method: 'get',
+			data: data
+		})
+	},
+	getCityList(data) {
+		return myRequest({
+			url: '/apply/areas/cityList',
+			method: 'get',
+			data: data
+		})
+	},
+	getExamine(data) {
+		return myRequest({
+			url: '/course/examine/list',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	advertisingHomeLocation(data) {
+		return myRequest({
+			url: '/app/common/base/advertising/homeLocation',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	advertisingList(data) {
+		return myRequest({
+			url: '/app/common/base/advertising/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	appCommonConfig(data) {
+		return myRequest({
+			url: '/app/common/config',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	}
+	
+}

+ 29 - 0
common/httpList/business.js

@@ -0,0 +1,29 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	educationTypeList(data) {
+		return myRequest({
+			url: '/app/common/course/educationType/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	businessList(data) {
+		return myRequest({
+			url: '/app/common/course/business/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	subjectList(data) {
+		return myRequest({
+			url: '/app/common/course/subject/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	}
+}

+ 166 - 0
common/httpList/course.js

@@ -0,0 +1,166 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	polyvSign(data) {
+		return myRequest({
+			url: '/polyv/video/sign/auth',
+			method: 'get',
+			data: data
+		})
+	},
+	recordLast(data) {
+		return myRequest({
+			url: '/study/record/last',
+			method: 'get',
+			data: data
+		})
+	},
+	menuExamList(data) {
+		return myRequest({
+			url: '/course/menu/exam/list',
+			method: 'get',
+			data: data
+		})
+	},
+	reSectionList(data) {
+		return myRequest({
+			url: '/course/sectionList',
+			method: 'get',
+			data: data
+		})
+	},
+	reChapterList(data) {
+		return myRequest({
+			url: '/course/chapterList',
+			method: 'get',
+			data: data
+		})
+	},
+	appBeforeAddress(data) {
+		return myRequest({
+			url: '/app/before/address',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	
+
+	reMenuList(data) {
+		return myRequest({
+			url: '/course/menuList',
+			method: 'get',
+			data: data
+		})
+	},
+	menuList(data) {
+		return myRequest({
+			url: '/app/common/course/menuList',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	chapterList(data) {
+		return myRequest({
+			url: '/app/common/course/chapterList/'+data,
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	sectionList(data) {
+		return myRequest({
+			url: '/app/common/course/sectionList/'+data,
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	courseGoodsList(data) {
+		return myRequest({
+			url: '/course/goodsList',
+			method: 'get',
+			data: data
+		})
+	},
+	courseCourseList(data) {
+		return myRequest({
+			url: '/course/courseList',
+			method: 'get',
+			data: data
+		})
+	},
+	courseDetail(data) {
+		return myRequest({
+			url: '/course/'+data,
+			method: 'get'
+		})
+	},
+	courseBusiness(data) {
+		return myRequest({
+			url: '/app/common/course/business/'+data,
+			method: 'get',
+			noToken:true
+		})
+	},
+	
+	courseHandouts(data) {
+		return myRequest({
+			url: '/course/handouts/'+data,
+			method: 'get'
+		})
+	},
+	
+	courseGoodsRebuildStatus(data) {
+		return myRequest({
+			url: '/course/goodsRebuildStatus',
+			method: 'get',
+			data:data
+		})
+	},
+	faceCertificationIDCardOCR(data) {
+		return myRequest({
+			url: '/face/certification/IDCardOCR',
+			method: 'post',
+			data:data
+		})
+	},
+	
+	facCertificationImageRecognition(data) {
+		return myRequest({
+			url: '/face/certification/ImageRecognition',
+			method: 'post',
+			data:data
+		})
+	},
+	
+	faceCertificationIdCardCompareFace(data) {
+			return myRequest({
+				url: '/face/certification/idCardCompareFace',
+				method: 'post',
+				data:data
+			})
+		},
+	
+	faceCertificationCompareFace(data) {
+		return myRequest({
+			url: '/face/certification/CompareFace',
+			method: 'post',
+			data:data
+		})
+	},
+	
+	gradeCheckGoodsStudy(data) {
+		return myRequest({
+			url: '/grade/grade/checkGoodsStudy',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	
+	
+	
+}

+ 13 - 0
common/httpList/exam.js

@@ -0,0 +1,13 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+
+	getExamDetail(data) {
+		return myRequest({
+			url: '/bank/exam/'+data,
+			method: 'get',
+			data: data
+		})
+	}
+}

+ 421 - 0
common/httpList/goods.js

@@ -0,0 +1,421 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	goodsList(data) {
+		return myRequest({
+			url: '/app/common/goods/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	
+	commonSystemTime() {
+		return myRequest({
+			url: '/app/common/system/dict/data/sys/time',
+			method: 'get',
+			noToken: true
+		})
+	},
+	
+	
+	commonGoodsDetail(data) {
+		return myRequest({
+			url: '/app/common/goods/'+ data,
+			method: 'get',
+			noToken: true
+		})
+	},
+	goodsBank(data) {
+		return myRequest({
+			url: '/goods/bank/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	goodsBank(data) {
+		return myRequest({
+			url: '/goods/bank/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	
+	bankExamExamList(data) {
+		return myRequest({
+			url: '/bank/exam/exam/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	
+	
+	goodsDetail(data) {
+		return myRequest({
+			url: '/goods/'+ data,
+			method: 'get'
+		})
+	},
+	goodsCourseList(data) {
+		return myRequest({
+			url: '/app/common/goods/course/list/'+ data,
+			method: 'get',
+			noToken: true
+		})
+	},
+	collectQuestion(data) {
+		return myRequest({
+			url: '/collect/question',
+			data:data,
+			method: 'POST'
+		})
+	},
+	bankRecordEdit(data) {
+		return myRequest({
+			url: '/bank/record/edit',
+			data:data,
+			method: 'POST'
+		})
+	},
+	
+	
+	
+	deleteCollectQuestion(data) {
+		return myRequest({
+			url: '/collect/question/delete/'+data,
+			method: 'POST',
+		})
+	},
+	examRecord(data) {
+		return myRequest({
+			url: '/exam/record',
+			data:data,
+			method: 'POST',
+		})
+	},
+	examRecordRightList(data) {
+		return myRequest({
+			url: '/exam/record/right_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	examRecordWrongList(data) {
+		return myRequest({
+			url: '/exam/record/wrong_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	 
+	
+	bankRecord(data) {
+		return myRequest({
+			url: '/bank/record',
+			data:data,
+			method: 'POST',
+		})
+	},
+	
+	
+	
+	examWrongRecord(data) {
+		return myRequest({
+			url: '/exam/wwrong/record',
+			data:data,
+			method: 'POST',
+		})
+	},
+	
+	examRecordEdit(data) {
+		return myRequest({
+			url: '/exam/record/edit',
+			data:data,
+			method: 'POST',
+		})
+	},
+	
+	goodsBankQuestionNum(data) {
+		return myRequest({
+			url: '/goods/bank/questionNum/'+data,
+			data:data,
+			method: 'get',
+		})
+	},
+	
+	bankExamNextExam(data) {
+		return myRequest({
+			url: '/bank/exam/nextExam',
+			data:data,
+			method: 'get',
+		})
+	},
+	
+	
+	
+	examReport(data) {
+		return myRequest({
+			url: '/exam/record/'+data,
+			method: 'get',
+		})
+	},
+	
+	examRecordCount(data) {
+		return myRequest({
+			url: '/exam/record/count',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	examaperList(data) {
+		return myRequest({
+			url: '/exam/paper/list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	examRecordList(data) {
+		return myRequest({
+			url: '/exam/record/list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	examRecordGroupList(data) {
+		return myRequest({
+			url: '/exam/record/group_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	collectQuestionTypeList(data) {
+		return myRequest({
+			url: '/collect/question/type_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	wrongRecordTypeQuestionList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/type_question_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	bankRecordDoNum(data) {
+		return myRequest({
+			url: '/bank/record/doNum',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	wrongRecordTypeList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/type_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+
+	listGoodsUserQuestion(data) {
+		return myRequest({
+			url: '/bank/question/listGoodsUserQuestion',
+			data:data,
+			method: 'get'
+		})
+	},
+	getCollectInfo(data) {
+		return myRequest({
+			url: '/collect/question/getInfo',
+			data:data,
+			method: 'get'
+		})
+	},
+	
+	goodsBankList(data) {
+		return myRequest({
+			url: '/app/common/bank/list',
+			method: 'get',
+			data:data,
+			noToken: true
+		})
+	},
+	
+	wrongRecordList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/list',
+			method: 'get',
+			data:data
+		})
+	},
+	
+
+	goodsChapterList(data) {
+		return myRequest({
+			url: '/app/common/bank/chapter/list',
+			method: 'get',
+			data:data,
+			noToken: true
+		})
+	},
+	wrongRecordExamQuestionList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/exam_question_list',
+			method: 'get',
+			data:data,
+		})
+	},
+	
+	wrongRecordDelete(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/delete/question',
+			method: 'post',
+			data:data
+		})
+	},
+	
+	examWrongRecordWrongNum(data) {
+		return myRequest({
+			url:`/exam/wwrong/record/wrongNum/${data}`,
+			method: 'get'
+		})
+	},
+	
+	collectQuestionExamQuestionList(data) {
+		return myRequest({
+			url:`/collect/question/exam_question_list`,
+			method: 'get',
+			data:data
+		})
+	},
+	
+	
+	
+	bankExam(data) {
+		return myRequest({
+			url: '/bank/exam/'+data,
+			method: 'get',
+		})
+	},
+	
+	goodsCollectExamList(data) {
+		return myRequest({
+			url: '/collect/question/exam_list',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	goodsBankDolist(data) {
+		return myRequest({
+			url: '/goods/bank/dolist',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	goodsChapterDolist(data) {
+		return myRequest({
+			url: '/goods/chapter/dolist',
+			method: 'get',
+			data:data
+		})
+	},
+	goodsExamDolist(data) {
+		return myRequest({
+			url: '/goods/exam/dolist',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	
+	
+	goodsCollectList(data) {
+		return myRequest({
+			url: '/collect/question/list',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	goodsExamList(data) {
+		return myRequest({
+			url: '/app/common/bank/exam/list',
+			method: 'get',
+			data:data,
+			noToken: true
+		})
+	},
+	
+	studyRecordMenuAllList(data) {
+		return myRequest({
+			url: '/study/record/menuAllList',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	
+	
+	goodsTodayStudySectionNum(data) {
+		return myRequest({
+			url: '/goods/todayStudySectionNum',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	goodsQuestionList(data) {
+		return myRequest({
+			url: '/app/common/bank/question/list',
+			method: 'get',
+			data:data,
+			noToken: true
+		})
+	},
+	
+	
+
+	addCart(data) {
+		return myRequest({
+			url: '/base/cart',
+			method: 'post',
+			data: data
+		})
+	},
+	cartList(data) {
+		return myRequest({
+			url: '/base/cart/list',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	questionRecordList(data) {
+		return myRequest({
+			url: '/bank/question/record/list',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	
+	deleteCart(data) {
+		return myRequest({
+			url: '/base/cart/delete/'+data,
+			method: 'post',
+			data: data
+		})
+	}
+}

+ 29 - 0
common/httpList/grade.js

@@ -0,0 +1,29 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	goodsGradeList(data) {
+		return myRequest({
+			url: '/grade/grade/list',
+			method: 'get',
+			data: data
+		})
+	},
+	goodsGradeInfo(data) {
+		return myRequest({
+			url: '/grade/grade/'+data,
+			method: 'get'
+		})
+	},
+	
+	changeGrade(data) {
+		return myRequest({
+			url: '/grade/grade/changeGrade',
+			method: 'post',
+			data:data
+		})
+	}
+	
+	
+	
+}

+ 28 - 0
common/httpList/informUser.js

@@ -0,0 +1,28 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//修改通知学员
+	courseappinformUser(data) {
+		return myRequest({
+			url: '/app/informUser',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询通知学员列表
+	getappinformUserlist(data) {
+		return myRequest({
+			url: '/app/informUser/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取通知学员详细信息
+	getappinformUserId(data) {
+		return myRequest({
+			url: '/app/informUser/' + data,
+			method: 'get',
+		})
+	},
+}

+ 45 - 0
common/httpList/lock.js

@@ -0,0 +1,45 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	/**
+	 * @param {Object} data
+	 * 锁定行为
+	 */
+	lockLockAction(data) {
+		return myRequest({
+			url: '/lock/lockAction',
+			method: 'post',
+			data: data,
+			noLoading:true,
+		})
+	},
+	
+	/**
+	 * @param {Object} data
+	 * 删除锁定行为
+	 */
+	lockDelLock(data) {
+		return myRequest({
+			url: '/lock/delLock',
+			method: 'post',
+			data: data,
+			noLoading:true,
+		})
+	},
+	
+	/**
+	 * @param {Object} data
+	 * 查看锁定状态
+	 */
+	lockLockStatus(data) {
+		return myRequest({
+			url: '/lock/lockStatus',
+			method: 'post',
+			data: data,
+		})
+	},
+	
+	
+	
+}

+ 159 - 0
common/httpList/login.js

@@ -0,0 +1,159 @@
+import {
+	myRequest
+} from '../request.js'
+import store from '@/store/index.js'    
+export default {
+	
+	//我的列表数据
+	getinfoAttached(data) {
+		return myRequest({
+			url: '/app/user/infoAttached',
+			method: 'get',
+			data: data
+		})
+	},
+	//登录
+	login(data) {
+		return myRequest({
+			url: '/login',
+			// url: '/testLogin',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//登录用户信息
+	getInfo() {
+		return myRequest({
+			url: '/app/user/getInfo',
+			method: 'get',
+		})
+	},
+	/**
+	 * @param {Object} data 
+	 * 微信登录
+	 */
+	wxLogin(data) {
+		return myRequest({
+			url: '/app/common/bindLogin',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	
+	
+	//刷新令牌
+	refreshToken(data) {
+		return myRequest({
+			url: '/refreshToken/' + data,
+			method: 'get',
+			noToken: true
+		})
+	},
+	//查询等级列表
+	gradelist(data) {
+		return myRequest({
+			url: '/grade/list',
+			method: 'get',
+			data: data
+		})
+	},
+	refreshUserInfo() {
+		this.getInfo().then(resdata => {
+			if(resdata.data.code == 200){
+			store.commit('updateUserInfo',{userInfo:resdata.data.data})
+			}	
+		});
+	},
+	//注册短信
+	registerSms(data) {
+		return myRequest({
+			url: '/app/common/sms/register',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//获取重新绑定手机短信
+	bindNewSms(data) {
+		return myRequest({
+			url: '/app/common/sms/bindNew',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	
+	//重新绑定手机
+	bindNewTel(data) {
+		return myRequest({
+			url: '/app/user/bindNewTel',
+			method: 'post',
+			data: data
+		})
+	},
+
+	//注册用户
+	registerUser(data) {
+		return myRequest({
+			url: '/app/common/register_small',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//登录短信
+	loginSms(data) {
+		return myRequest({
+			url: '/app/common/sms/login',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//忘记短信
+	forgetSms(data) {
+		return myRequest({
+			url: '/app/common/sms/forget',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//忘记用户
+	forgetUser(data) {
+		return myRequest({
+			url: '/app/common/register_forget',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//短信登录用户
+	smsLogin(data) {
+		return myRequest({
+			url: '/app/common/sms_login',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//账号登录用户
+	accountLogin(data) {
+		return myRequest({
+			url: '/app/common/account_login',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//绑定身份证号信息
+	bindId(data) {
+		return myRequest({
+			url: '/app/user/bind_idcard',
+			method: 'post',
+			data: data
+		})
+	}
+}

+ 40 - 0
common/httpList/myStudent.js

@@ -0,0 +1,40 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//确认重学
+	courseperiodrebuild(data) {
+		return myRequest({
+			url: '/course/period/rebuild',
+			method: 'post',
+			data: data
+		})
+	},
+	//查看班级作弊重学详细情况
+	getcourseperiodcheat(data) {
+		return myRequest({
+			url: '/course/period/cheat',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询用户拥有商品的学时记录
+	getcourseperiodlistGoods(data) {
+		return myRequest({
+			url: '/course/period/listGoods',
+			method: 'get',
+			data: data
+		})
+	},
+	/**
+	 * @param {Object} data
+	 * 查询用户证书列表
+	 */
+	getUserCertificateList(data) {
+		return myRequest({
+			url: '/user/certificate/list',
+			method: 'get',
+			data: data
+		})
+	},
+}

+ 26 - 0
common/httpList/note.js

@@ -0,0 +1,26 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	noteList(data) {
+		return myRequest({
+			url: '/user/note/listDate',
+			method: 'get',
+			data: data
+		})
+	},
+	postNote(data) {
+		return myRequest({
+			url: '/user/note',
+			method: 'post',
+			data: data
+		})
+	},
+	delNote(data) {
+		return myRequest({
+			url: '/user/note/edit',
+			method: 'post',
+			data: data
+		})
+	}
+}

+ 107 - 0
common/httpList/order.js

@@ -0,0 +1,107 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//修改订单
+	eddOrder(data) {
+		return myRequest({
+			url: '/order/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询订单商品列表
+	getordergoodslists(data) {
+		return myRequest({
+			url: '/order/goods/list',
+			method: 'get',
+			data: data
+		})
+	},
+	/**
+	 * @param {Object} data
+	 * 查询订单商品退款列表
+	 */
+	orderRefundList(data) {
+		return myRequest({
+			url: '/order/refund/list',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	
+	//查询订单列表
+	getorderlists(data) {
+		return myRequest({
+			url: '/order/list',
+			method: 'get',
+			data: data
+		})
+	},
+	placeSmallOrder(data) {
+		return myRequest({
+			url: '/order/placeSmallOrder',
+			method: 'post',
+			data: data
+		})
+	},
+	resumeSmallOrder(data) {
+		return myRequest({
+			url: '/order/resumeSmallOrder',
+			method: 'post',
+			data: data
+		})
+	},
+	refundSmallOrder(data) {
+		return myRequest({
+			url: '/order/refund',
+			method: 'post',
+			data: data
+		})
+	},
+	
+	orderInvoiceCanInvoiceList(data) {
+		return myRequest({
+			url: '/order/invoice/canInvoiceList',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	orderInvoice(data) {
+		return myRequest({
+			url: '/order/invoice',
+			method: 'post',
+			data: data
+		})
+	},
+	
+	orderInvoiceList(data) {
+		return myRequest({
+			url: '/order/invoice/list',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	orderInvoiceCancel(data) {
+		return myRequest({
+			url: '/order/invoice/cancel',
+			method: 'post',
+			data: data
+		})
+	},
+	orderInfo(data) {
+		return myRequest({
+			url: '/order/info',
+			method: 'get',
+			data: data
+		})
+	}
+	
+	
+	
+
+
+}

+ 31 - 0
common/httpList/oss.js

@@ -0,0 +1,31 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//回调
+	aliyuncallback(data) {
+		return myRequest({
+			url: '/aliyun/oss/callback',
+			method: 'post',
+			data: data
+		})
+	},
+	//policy获得
+	aliyunpolicy(data) {
+		return myRequest({
+			url: '/aliyun/oss/policy',
+			method: 'get',
+			data: data,
+			// noToken: true
+		})
+	},
+	//上传图片
+	aliyunpolicyupload(data) {
+		return myRequest({
+			url: '/aliyun/oss/upload',
+			method: 'post',
+			data: data
+			// noToken: true
+		})
+	},
+}

+ 13 - 0
common/httpList/polyvVideo.js

@@ -0,0 +1,13 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//获取保利威视频小程序播放凭证
+	polyvVideoSign(data) {
+		return myRequest({
+			url: '/polyv/video/sign/' + data,
+			method: 'get',
+			// noToken: true
+		})
+	},
+}

+ 38 - 0
common/httpList/profileStamp.js

@@ -0,0 +1,38 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增填写盖章审核
+	addbaseprofileStamp(data) {
+		return myRequest({
+			url: '/base/profileStamp',
+			method: 'post',
+			data: data
+		})
+	},
+	//导出盖章word
+	addWordbaseprofileStamp(data) {
+		return myRequest({
+			url: '/base/profileStamp/addWord',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改填写盖章审核
+	editbaseprofileStamp(data) {
+		return myRequest({
+			url: '/base/profileStamp/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取填写盖章审核详细信息
+	getbaseprofileStampgetInfo(data) {
+		return myRequest({
+			url: '/base/profileStamp/getInfo',
+			method: 'get',
+			data: data
+		})
+	},
+
+}

+ 61 - 0
common/httpList/profileTp.js

@@ -0,0 +1,61 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增资料模板
+	addbaseprofiletp(data) {
+		return myRequest({
+			url: '/base/profile/tp',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改资料模板
+	editbaseprofiletp(data) {
+		return myRequest({
+			url: '/base/profile/tp/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取所有使用商品ID
+	getbaseprofiletplist(data) {
+		return myRequest({
+			url: '/base/profile/tp/goods_list',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取填写资料审核详细信息
+	getbaseprofiletpgetInfo(data) {
+		return myRequest({
+			url: '/base/profile/tp/getInfo',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询资料模板列表
+	getbaseprofiletplists(data) {
+		return myRequest({
+			url: '/base/profile/tp/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询填写资料审核列表
+	getbaseprofiletplistProfile(data) {
+		return myRequest({
+			url: '/base/profile/tp/listProfile',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取资料模板详细信息
+	getbaseprofiletpId(data) {
+		return myRequest({
+			url: '/base/profile/tp/' + data,
+			method: 'get'
+		})
+	},
+
+}

+ 33 - 0
common/httpList/study.js

@@ -0,0 +1,33 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	studyRecord(data) {
+		return myRequest({
+			url: '/study/record',
+			method: 'post',
+			data: data
+		})
+	},
+	studyExamPhotoRecord(data) {
+		return myRequest({
+			url: '/bank/record/addPhoto',
+			method: 'post',
+			data: data
+		})
+	},
+	coursePhotoRecord(data) {
+		return myRequest({
+			url: '/course/photo/log',
+			method: 'post',
+			data: data
+		})
+	},
+	getPhotoLastRecord(data) {
+		return myRequest({
+			url: '/course/photo/log/getLastInfo',
+			method: 'get',
+			data: data
+		})
+	}
+}

+ 14 - 0
common/httpList/system.js

@@ -0,0 +1,14 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	dictList(data) {
+		return myRequest({
+			url: '/app/common/system/dict/data/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	
+}

+ 61 - 0
common/httpList/systemPlan.js

@@ -0,0 +1,61 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增学习计划
+	addsystemplan(data) {
+		return myRequest({
+			url: '/system/plan',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改学习计划
+	editsystemplan(data) {
+		return myRequest({
+			url: '/system/plan/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询学习计划列表
+	getsystemplanlist(data) {
+		return myRequest({
+			url: '/system/plan/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询学员拥有商品能生成学习计划的商品
+	getsystemplanlistGoods(data) {
+		return myRequest({
+			url: '/system/plan/listGoods',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得展示的日历学习计划,不添加到数据库
+	getsystemplanlistPlan(data) {
+		return myRequest({
+			url: '/system/plan/listPlan',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取学习计划详细信息
+	systemplanInfo(data) {
+		return myRequest({
+			url: '/system/plan/inFo',
+			method: 'get',
+			data: data
+		})
+	},
+	userPlanSeven(data) {
+		return myRequest({
+			url: '/system/plan/userPlanSeven',
+			method: 'get',
+			data: data
+		})
+	}
+
+}

+ 56 - 0
common/httpList/userInfo.js

@@ -0,0 +1,56 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//修改客户端用户
+	appuserInfo(data) {
+		return myRequest({
+			url: '/app/user/edit',
+			method: 'post',
+			data: data,
+		})
+	},
+	appInfoAttached(data) {
+		return myRequest({
+			url: '/app/user/infoAttached',
+			method: 'get',
+			data: data,
+		})
+	},
+	getSchoolInfo(data) {
+		return myRequest({
+			url: '/school/info/getInfo',
+			method: 'get',
+			data: data,
+		})
+	},
+	updateSchoolInfo(data) {
+		return myRequest({
+			url: '/school/info/edit',
+			method: 'post',
+			data: data,
+		})
+	},
+	getUserBuy(data) {
+		return myRequest({
+			url: '/system/user/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	rankList(data) {
+		return myRequest({
+			url: '/app/user/rankingList',
+			method: 'get',
+			data: data,
+		})
+	},
+	getUserSubscribeRecentExam(data) {
+		return myRequest({
+			url: '/user/subscribe/recentExam',
+			method: 'get',
+			data: data,
+		})
+	},
+	
+}

+ 29 - 0
common/httpList/wxpay.js

@@ -0,0 +1,29 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//获取支付回调凭证
+	wxCallback(data) {
+		return myRequest({
+			url: '/wx/pay/callback',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取支付凭证
+	wxPayment(data) {
+		return myRequest({
+			url: '/wx/pay/payment',
+			method: 'post',
+			data: data
+		})
+	},
+	wxOpenid(data) {
+		return myRequest({
+			url: '/wx/getOpenid',
+			method: 'post',
+			data: data
+		})
+	},
+	
+}

+ 24 - 0
common/layer.js

@@ -0,0 +1,24 @@
+const layer = (options) => {
+	// 弹框对象
+	let Layer = {
+		alter(data, obj){
+			uni.showModal({
+			    title: data.title,
+				content: data.content,
+				showCancel: false,
+				success: obj
+			});
+		},
+		confirm(content, success){
+			uni.showModal({
+			    title: '提示',
+				content: content,
+				success: success
+			});
+		}
+	};
+	
+	return Layer;
+}
+
+export default layer

+ 333 - 0
common/methodTool.js

@@ -0,0 +1,333 @@
+import store from '@/store/index.js'
+import * as baseUrls from '@/common/request.js'
+import api from '@/common/api.js'
+
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'
+
+export default {
+	isGoLogin(isBack = true) {
+		if (!uni.getStorageSync('user_account')) {
+			uni.navigateTo({
+				url: '/pages4/login/login?isBack=' + isBack
+			});
+			return true;
+		} else {
+			return false
+		}
+	},
+	isLogin() {
+		if (uni.getStorageSync('user_account')) {
+			return true;
+		} else {
+			return false
+		}
+	},
+	isLogout() {
+		// uni.removeStorageSync('user_account')
+		// uni.removeStorageSync('token')
+	},
+	//提示
+	showToast(title, icon = 'none', time = 2000) {
+		return setTimeout(() => {
+			uni.showToast({
+				title: title,
+				icon: icon,
+				duration: time
+			})
+		}, 500)
+	},
+	//图片路径填补
+	splitImgHost(url, scale = false, width = 250) {
+		if (!url) {
+			return ''
+		} else if (url.indexOf("http") != -1 || url.indexOf("https") != -1 || url.indexOf("wxfile") != -1) {
+
+		} else {
+			url = baseUrls.BASE_IMG_URL + url
+		}
+		if (scale) {
+			url = url + "?x-oss-process=image/resize,w_" + width
+		}
+		return url;
+
+	},
+	exit() {
+		uni.removeStorageSync('user_account')
+		uni.removeStorageSync('token')
+		store.state.userInfo = null
+		uni.reLaunch({
+			url: '/pages/index/index'
+		});
+	},
+	/* 时间戳转换成日期
+	 * @param timestamp
+	 * @returns {*}
+	 */
+	timestampToTime(timestamp, isDay = true,hasChinese) {
+		var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+		var Y = date.getFullYear() + (hasChinese ? '' : '-');
+		var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + (hasChinese ? '' : '-');
+		var D = date.getDate() < 10 ? '0' + date.getDate() + (hasChinese ? '' : ' ') : date.getDate() + (hasChinese ? '' :' ');
+		var h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
+		var m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
+		var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+		if (isDay) {
+			
+			if(hasChinese) {
+				return Y +'年'+ M +'月'+ D + '日';
+			} else {
+				return Y + M + D;
+			}
+			
+		}
+		
+		if(hasChinese) {
+			return Y +'年'+ M +'月'+ D + '日' + h + m + s;
+		} else {
+			return Y + M + D + h + m + s;
+		}
+		
+	},
+	//当前时间距离目标时间还有多久
+	GetRTime(EndTime, isDay = true) {
+		var EndTime = EndTime //结束时间
+		var NowTime = new Date(); //当前时间
+		//后台给我的是10位 精确到秒的 所有下面我就除以了1000,不要小数点后面的
+		var t = EndTime - (NowTime.getTime() / 1000).toFixed(0);
+		if (t <= 0) {
+			return '已结束'
+		}
+		//如果后台给的是毫秒 上面不用除以1000 下面的计算时间也都要除以1000 这里我去掉1000了
+		var d = Math.floor(t / 60 / 60 / 24); //天 var d=Math.floor(t/1000/60/60/24)
+		var h = Math.floor(t / 60 / 60 % 24); //时 var h=Math.floor(t/1000/60/60%24)
+		var m = Math.floor(t / 60 % 60); //分 var m=Math.floor(t/1000/60%60)
+		var s = Math.floor(t % 60); //秒 var s=Math.floor(t/1000%60)
+		if (parseInt(d) < 10) {
+			d = "0" + d;
+		}
+		if (parseInt(h) < 10) {
+			h = "0" + h;
+		}
+		if (parseInt(m) < 10) {
+			m = "0" + m;
+		}
+		if (parseInt(s) < 10) {
+			s = "0" + s;
+		}
+		if (isDay) {
+			return d;
+		}
+		return d + '天' + h + '小时' + m + '分' + s + '秒'
+	},
+	TimeTotimestamp(date) {
+		var date = date.replace(/-/g, '/');
+		var newDate = new Date(date)
+		return (newDate.getTime() / 1000)
+	},
+	timest() {
+		var tmp = Date.parse(new Date()).toString();
+		tmp = tmp.substr(0, 10);
+		return tmp;
+	},
+	//压缩图片
+	imageInfos(url) {
+		var self = this;
+		return new Promise((resolve, reject) => {
+			uni.getImageInfo({
+				src: url,
+				success: async res => {
+					let canvasWidth = res.width; //图片原始长宽
+					let canvasHeight = res.height;
+					if (canvasWidth > 2000 || canvasHeight > 2000) {
+						uni.compressImage({
+							src: url,
+							quality: 75,
+							width: '35%',
+							height: '35%',
+							success:async rest => {
+								const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
+						console.log(waitUpload,'waitUpload')
+								resolve(waitUpload);
+							}
+						});
+					} else if(canvasWidth > 1000 || canvasHeight > 1000){
+						uni.compressImage({
+							src: url,
+							quality: 75,
+							width: '50%',
+							height: '50%',
+							success: async rest => {
+								const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
+						console.log(waitUpload,'waitUpload')
+								resolve(waitUpload);
+							}
+						});
+					} else {
+						const waitUpload = await self.uploadFile(url, 0);
+						console.log(waitUpload,'waitUpload')
+						resolve(waitUpload);
+						// console.log('无需压缩', url);
+						// resolve(url);
+					}
+				}
+			});
+		});
+	},
+	//上传图片
+	uploadFile(options, int) {
+		return new Promise((resolve, reject) => {
+			var self = this;
+			if (options.indexOf('//tmp') === -1 && options.indexOf('//temp') === -1) {
+				resolve(options)
+				return
+			}
+			var data = {
+				imageStatus: int
+			};
+			api.aliyunpolicy(data).then(res => {
+				var ossToken = res.data.data.resultContent;
+				uni.uploadFile({
+					url: ossToken.host,
+					name: 'file',
+					filePath: options,
+					fileType: 'image',
+					header: {
+						AuthorizationToken: 'WX ' + uni.getStorageSync('token')
+					},
+					formData: {
+						key: ossToken.dir,
+						OSSAccessKeyId: ossToken.accessid,
+						policy: ossToken.policy,
+						Signature: ossToken.signature,
+						callback: ossToken.callback,
+						success_action_status: 200
+					},
+					success: result => {
+						if (result.statusCode === 200) {
+							resolve(ossToken.dir);
+						} else {
+							uni.showToast({
+								title: '上传失败',
+								icon: 'none'
+							});
+							return;
+						}
+					},
+					fail: error => {
+						uni.showToast({
+							title: '上传接口报错',
+							icon: 'none'
+						});
+						return;
+					}
+				});
+			});
+		});
+	},
+	getYears(strBirthday) {
+
+		if (!strBirthday) {
+			return '-';
+		}
+		var returnAge;
+		var strBirthdayArr = strBirthday.split('-');
+		var birthYear = strBirthdayArr[0];
+		var birthMonth = strBirthdayArr[1];
+		var birthDay = strBirthdayArr[2];
+		var d = new Date();
+		var nowYear = d.getFullYear();
+		var nowMonth = d.getMonth() + 1;
+		var nowDay = d.getDate();
+
+		if (nowYear == birthYear) {
+			returnAge = 0; //同年 则为0岁
+		} else {
+			var ageDiff = nowYear - birthYear; //年之差
+			if (ageDiff > 0) {
+				if (nowMonth == birthMonth) {
+					var dayDiff = nowDay - birthDay; //日之差
+					if (dayDiff < 0) {
+						returnAge = ageDiff - 1;
+					} else {
+						returnAge = ageDiff;
+					}
+				} else {
+					var monthDiff = nowMonth - birthMonth; //月之差
+					if (monthDiff < 0) {
+						returnAge = ageDiff - 1;
+					} else {
+						returnAge = ageDiff;
+					}
+				}
+			} else {
+				returnAge = -1; //返回-1 表示出生日期输入错误 晚于今天
+			}
+		}
+		return returnAge; //返回周岁年龄
+	},
+	getDate () {
+	  let nowDate = new Date()
+	  let date = {
+	    year: nowDate.getFullYear(),
+	    month: nowDate.getMonth() + 1,
+	    date: nowDate.getDate()
+	  }
+	  return  date.year + '-' + date.month + '-' + date.date
+	},
+	getZeroTime () {
+		return Number(new Date(new Date().toLocaleDateString()).getTime()/1000)
+	},
+	setClock:function(time){
+	            	var that=this, sec= parseInt(time) , clockCount={}, strTimer="";
+	            	    clockCount=setInterval(function(){
+	            	    	if(sec==0){
+			                        $(".js-count-down").html("活动已经结束");
+			                       clearInterval(clockCount);
+			                       return false;
+	                        }
+						    strTimer = that.secondToDate(sec);
+						    $(".js-count-down").html(strTimer);
+						    sec--;
+	                    },1000)
+	            },
+	secondToDate(result){
+		var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
+		var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+		var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+			if(h==0){
+				result = m + ":" + s;
+			}else{
+				result = h+':'+m + ":" + s
+			}
+		return result;
+	 },
+	 /**
+      * 
+      * @param {int} result 
+      * @returns {string}
+      * @remard 单位S转小时分钟秒
+      */
+     secondToTime(result,Diszing = true) {
+         var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
+         var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+         var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+         if (h == 0 && Diszing) {
+             result = m + ":" + s;
+         } else {
+             result = h + ':' + m + ":" + s
+         }
+         return result;
+     },
+	/**
+	 * @param {Object} length  长度
+	 * 获取随机字符串
+	 */
+	getRandomString(length) {
+	   var str = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+	   var result = '';
+	   for (var i = length; i > 0; --i) 
+		 result += str[Math.floor(Math.random() * str.length)];
+	   return result;
+	 },
+	 
+}

+ 18 - 0
common/navTo.js

@@ -0,0 +1,18 @@
+const togo = function(url, data) {
+	url += (url.indexOf('?') < 0 ? '?' : '&') + param(data)
+	
+	uni.navigateTo({
+		url: url
+	})
+}
+
+export function param(data) {
+	let url = ''
+	for (var k in data) {
+		let value = data[k] !== undefined ? data[k] : ''
+		url += '&' + k + '=' + encodeURIComponent(value)
+	}
+	return url ? url.substring(1) : ''
+}
+
+export {togo}

+ 132 - 0
common/request.js

@@ -0,0 +1,132 @@
+// 'http://192.168.1.222:8088','https://file-dev.xyyxt.net/'线下
+// 'https://api.xyyxt.net' 'https://file.xyyxt.net/'线上
+import store from '@/store/index.js'
+import api from './api.js'
+var num = 1
+//接口api   
+export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'http://120.79.166.78:19009'   //预发布
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test 
+// export const BASE_URL = 'http://192.168.1.222:5055'    //dev
+
+ //图片上传api
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+
+// export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test
+// export const socket_url = 'ws://120.79.166.78:19009/webSocket/'  //预发布
+// export const socket_url = 'wss://api.xyyxt.net/webSocket/'  //release
+
+export const  PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4qkbwIKErstK1sFESPEhOShpR
+pj4+sOVpJHxl5r/2xLBfA/MrXcAEra5Ro9cXNQSqmLLt8wecoLk/glfa5IdhXV0h
+RVQplIVs5z3MxcUa9ptKPHUTgh8xMCBvl8sUJKwkmn4vYWeDfHT22EL7Hr1pTMwU
+hF6WiNlWfQTVoF1rhwIDAQAB
+-----END PUBLIC KEY-----`;
+
+export const version = '5.2.5' 
+export const tenantId = '867735392558919680' 
+export const myRequest = (options) => {
+	if (store.state.allowLoading && !options.noLoading) {
+		uni.showLoading({
+			title: '拼命加载中...',
+			mask:true,
+		})
+	}
+
+	return new Promise((resolve, reject) => {
+		let token = uni.getStorageSync('token')
+		
+		uni.request({
+			url: BASE_URL + options.url,
+			method: options.method || 'GET',
+			data: options.data,
+			header: options.noToken ? {
+				TenantId: tenantId,
+			} : {
+				AuthorizationToken: 'WX ' + (token ? token : uni.getStorageSync('token_temp')),
+				TenantId: tenantId
+			},
+			success: async (res) => {
+				// if(num == 2) {
+				// 	return;
+				// } else {
+				// 	num++
+				// }
+				// doRequest(options)
+					
+				if (res.data.code == 401) {
+					if (num <= 2) {
+						if (!uni.getStorageSync('user_account')) {
+							var pages = getCurrentPages() // 获取栈实例
+							let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+							if(currentRoute != 'pages4/login/login') {
+								uni.navigateTo({
+									url: '/pages4/login/login'
+								});
+							}
+						} else {
+							num++
+							res = await doRequest(options)
+						}
+
+					}else{
+						uni.removeStorageSync('user_account');
+						var pages = getCurrentPages() // 获取栈实例
+						let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+						if(currentRoute != 'pages4/login/login') {
+							uni.navigateTo({
+								url: '/pages4/login/login'
+							});
+						}
+					}
+				}
+				resolve(res)
+			},
+			fail: (err) => {
+				uni.showToast({
+					title: "请求接口失败",
+					icon: 'none'
+				})
+				reject(JSON.stringify(err))
+			},
+			complete: () => {
+				uni.hideLoading()
+				//		uni.hideToast()
+			}
+		})
+	})
+	async function doRequest(response) {
+		let user_account = uni.getStorageSync('user_account')
+		var datas = {
+			url: '/refreshToken/' + user_account,
+			method: 'get',
+			noToken: true
+		}
+		const res = await myRequest(datas)
+		if (res.data.code === 200) {
+			uni.setStorageSync('token', res.data.data.token)
+
+			var userInfo = {
+				url: '/app/user/getInfo',
+				method: 'get',
+			}
+			const resUser = await myRequest(userInfo)
+			if (resUser.data.code === 200) {
+				store.state.userInfo = resUser.data.data
+				uni.setStorageSync('user_account',user_account)
+				num = 1;
+			}
+			let onset = await myRequest(response)
+			return onset
+		} else {
+			var pages = getCurrentPages() // 获取栈实例
+			let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+			if(currentRoute != 'pages4/login/login') {
+				uni.navigateTo({
+					url: '/pages4/login/login'
+				});
+			}
+		}
+	}
+}

+ 404 - 0
common/signature.js

@@ -0,0 +1,404 @@
+class Handwriting {
+	// 内置数据
+	ctx = '';
+	canvasWidth = 300;
+	canvasHeight = 900;
+	linePrack = []; //划线轨迹 ; 生成线条的实际点
+	currentLine = [];
+	transparent = 1; // 透明度
+	pressure = 0.5; // 默认压力
+	smoothness = 100; //顺滑度,用60的距离来计算速度
+	lineSize = 1.5; // 笔记倍数
+	lineMin = 0.5; // 最小笔画半径
+	lineMax = 2; // 最大笔画半径
+	currentPoint = {};
+	firstTouch = true; // 第一次触发
+	radius = 1; //画圆的半径
+	cutArea = {
+		top: 0,
+		right: 0,
+		bottom: 0,
+		left: 0
+	}; //裁剪区域
+	lastPoint = 0;
+	chirography = []; //笔迹
+	startY = 0;
+	deltaY = 0;
+	startValue = 0;
+	constructor(opts) {
+		console.log(opts);
+		this.lineColor = opts.lineColor || '#1A1A1A' // 颜色
+		this.slideValue = opts.slideValue || 50
+		this.canvasName = opts.canvasName || 'handWriting'
+		this.init()
+	}
+	init() {
+		this.ctx = uni.createCanvasContext(this.canvasName)
+		var query = uni.createSelectorQuery();
+		query.select('.handCenter').boundingClientRect(rect => {
+			if(rect) {
+				
+				if (rect.width) {
+					this.canvasWidth = rect.width;
+				}
+				if (rect.height) {
+					this.canvasHeight = rect.height;
+				}
+			}
+		}).exec();
+		this.selectSlideValue(this.slideValue);
+	}
+
+	// 笔迹开始
+	uploadScaleStart(event) {
+		console.log('start');
+		let e = event.mp
+		console.log(e.touches[0])
+		if (e.type != 'touchstart') return false;
+		this.ctx.setFillStyle(this.lineColor); // 初始线条设置颜色
+		this.ctx.setGlobalAlpha(this.transparent); // 设置半透明
+		this.currentPoint = {
+			x: e.touches[0].x,
+			y: e.touches[0].y
+		}
+		this.currentLine.unshift({
+			time: new Date().getTime(),
+			dis: 0,
+			x: this.currentPoint.x,
+			y: this.currentPoint.y
+		})
+		if (this.firstTouch) {
+			this.cutArea = {
+				top: this.currentPoint.y,
+				right: this.currentPoint.x,
+				bottom: this.currentPoint.y,
+				left: this.currentPoint.x
+			}
+			this.firstTouch = false
+		}
+		this.pointToLine(this.currentLine);
+	}
+	// 笔迹移动
+	uploadScaleMove(event) {
+		let e = event.mp
+		if (e.type != 'touchmove') return false;
+		if (e.cancelable) {
+			// 判断默认行为是否已经被禁用
+			if (!e.defaultPrevented) {
+				e.preventDefault();
+			}
+		}
+		let point = {
+			x: e.touches[0].x,
+			y: e.touches[0].y
+		}
+		//测试裁剪
+		if (point.y < this.cutArea.top) {
+			this.cutArea.top = point.y;
+		}
+		if (point.y < 0) this.cutArea.top = 0;
+
+		if (point.x > this.cutArea.right) {
+			this.cutArea.right = point.x;
+		}
+		if (this.canvasWidth - point.x <= 0) {
+			this.cutArea.right = this.canvasWidth;
+		}
+		if (point.y > this.cutArea.bottom) {
+			this.cutArea.bottom = point.y;
+		}
+		if (this.canvasHeight - point.y <= 0) {
+			this.cutArea.bottom = this.canvasHeight;
+		}
+		if (point.x < this.cutArea.left) {
+			this.cutArea.left = point.x;
+		}
+		if (point.x < 0) this.cutArea.left = 0;
+
+		this.lastPoint = this.currentPoint;
+		this.currentPoint = point
+		this.currentLine.unshift({
+			time: new Date().getTime(),
+			dis: this.distance(this.currentPoint, this.lastPoint, 'move'),
+			x: point.x,
+			y: point.y
+		})
+		this.pointToLine(this.currentLine);
+	}
+	// 笔迹结束
+	uploadScaleEnd(event) {
+		let e = event.mp
+		if (e.type != 'touchend') return 0;
+		console.log(e);
+		let point = {
+			x: e.changedTouches[0].x,
+			y: e.changedTouches[0].y
+		}
+
+		this.lastPoint = this.currentPoint;
+		this.currentPoint = point
+		this.currentLine.unshift({
+			time: new Date().getTime(),
+			dis: this.distance(this.currentPoint, this.lastPoint, 'end'),
+			x: point.x,
+			y: point.y
+		})
+		if (this.currentLine.length > 2) {
+			var info = (this.currentLine[0].time - this.currentLine[this.currentLine.length - 1].time) / this
+				.currentLine.length;
+			//$("#info").text(info.toFixed(2));
+		}
+		//一笔结束,保存笔迹的坐标点,清空,当前笔迹
+		//增加判断是否在手写区域;
+		this.pointToLine(this.currentLine);
+		var currentChirography = {
+			lineSize: this.lineSize,
+			lineColor: this.lineColor
+		};
+		this.chirography.unshift(currentChirography);
+		this.linePrack.unshift(this.currentLine);
+		this.currentLine = []
+	}
+	retDraw() {
+		this.ctx.clearRect(0, 0, 700, 730)
+		this.ctx.draw()
+		this.linePrack = []
+	}
+
+	//画两点之间的线条;参数为:line,会绘制最近的开始的两个点;
+	pointToLine(line) {
+		this.calcBethelLine(line);
+		// this.calcBethelLine1(line);
+		return;
+	}
+	//计算插值的方式;
+	calcBethelLine(line) {
+		if (line.length <= 1) {
+			line[0].r = this.radius;
+			return;
+		}
+		let x0, x1, x2, y0, y1, y2, r0, r1, r2, len, lastRadius, dis = 0,
+			time = 0,
+			curveValue = 0.5;
+		if (line.length <= 2) {
+			x0 = line[1].x
+			y0 = line[1].y
+			x2 = line[1].x + (line[0].x - line[1].x) * curveValue;
+			y2 = line[1].y + (line[0].y - line[1].y) * curveValue;
+			//x2 = line[1].x;
+			//y2 = line[1].y;
+			x1 = x0 + (x2 - x0) * curveValue;
+			y1 = y0 + (y2 - y0) * curveValue;;
+
+		} else {
+			x0 = line[2].x + (line[1].x - line[2].x) * curveValue;
+			y0 = line[2].y + (line[1].y - line[2].y) * curveValue;
+			x1 = line[1].x;
+			y1 = line[1].y;
+			x2 = x1 + (line[0].x - x1) * curveValue;
+			y2 = y1 + (line[0].y - y1) * curveValue;
+		}
+		//从计算公式看,三个点分别是(x0,y0),(x1,y1),(x2,y2) ;(x1,y1)这个是控制点,控制点不会落在曲线上;实际上,这个点还会手写获取的实际点,却落在曲线上
+		len = this.distance({
+			x: x2,
+			y: y2
+		}, {
+			x: x0,
+			y: y0
+		}, 'calc');
+		lastRadius = this.radius;
+		for (let n = 0; n < line.length - 1; n++) {
+			dis += line[n].dis;
+			time += line[n].time - line[n + 1].time;
+			if (dis > this.smoothness) break;
+		}
+		this.radius = Math.min(time / len * this.pressure + this.lineMin, this.lineMax) * this.lineSize
+		line[0].r = this.radius;
+		//计算笔迹半径;
+		if (line.length <= 2) {
+			r0 = (lastRadius + this.radius) / 2;
+			r1 = r0;
+			r2 = r1;
+			//return;
+		} else {
+			r0 = (line[2].r + line[1].r) / 2;
+			r1 = line[1].r;
+			r2 = (line[1].r + line[0].r) / 2;
+		}
+		let n = 5;
+		let point = [];
+		for (let i = 0; i < n; i++) {
+			let t = i / (n - 1);
+			let x = (1 - t) * (1 - t) * x0 + 2 * t * (1 - t) * x1 + t * t * x2;
+			let y = (1 - t) * (1 - t) * y0 + 2 * t * (1 - t) * y1 + t * t * y2;
+			let r = lastRadius + (this.radius - lastRadius) / n * i;
+			point.push({
+				x: x,
+				y: y,
+				r: r
+			});
+			if (point.length == 3) {
+				let a = this.ctaCalc(point[0].x, point[0].y, point[0].r, point[1].x, point[1].y, point[1].r, point[
+					2].x, point[2].y, point[2].r);
+				a[0].color = this.lineColor;
+				this.bethelDraw(a, 1);
+				point = [{
+					x: x,
+					y: y,
+					r: r
+				}];
+			}
+		}
+	}
+	//求两点之间距离
+	distance(a, b, type) {
+		let x = b.x - a.x;
+		let y = b.y - a.y;
+		return Math.sqrt(x * x + y * y) * 5;
+	}
+	ctaCalc(x0, y0, r0, x1, y1, r1, x2, y2, r2) {
+		let a = [],
+			vx01, vy01, norm, n_x0, n_y0, vx21, vy21, n_x2, n_y2;
+		vx01 = x1 - x0;
+		vy01 = y1 - y0;
+		norm = Math.sqrt(vx01 * vx01 + vy01 * vy01 + 0.0001) * 2;
+		vx01 = vx01 / norm * r0;
+		vy01 = vy01 / norm * r0;
+		n_x0 = vy01;
+		n_y0 = -vx01;
+		vx21 = x1 - x2;
+		vy21 = y1 - y2;
+		norm = Math.sqrt(vx21 * vx21 + vy21 * vy21 + 0.0001) * 2;
+		vx21 = vx21 / norm * r2;
+		vy21 = vy21 / norm * r2;
+		n_x2 = -vy21;
+		n_y2 = vx21;
+		a.push({
+			mx: x0 + n_x0,
+			my: y0 + n_y0,
+			color: "#1A1A1A"
+		});
+		a.push({
+			c1x: x1 + n_x0,
+			c1y: y1 + n_y0,
+			c2x: x1 + n_x2,
+			c2y: y1 + n_y2,
+			ex: x2 + n_x2,
+			ey: y2 + n_y2
+		});
+		a.push({
+			c1x: x2 + n_x2 - vx21,
+			c1y: y2 + n_y2 - vy21,
+			c2x: x2 - n_x2 - vx21,
+			c2y: y2 - n_y2 - vy21,
+			ex: x2 - n_x2,
+			ey: y2 - n_y2
+		});
+		a.push({
+			c1x: x1 - n_x2,
+			c1y: y1 - n_y2,
+			c2x: x1 - n_x0,
+			c2y: y1 - n_y0,
+			ex: x0 - n_x0,
+			ey: y0 - n_y0
+		});
+		a.push({
+			c1x: x0 - n_x0 - vx01,
+			c1y: y0 - n_y0 - vy01,
+			c2x: x0 + n_x0 - vx01,
+			c2y: y0 + n_y0 - vy01,
+			ex: x0 + n_x0,
+			ey: y0 + n_y0
+		});
+		a[0].mx = a[0].mx.toFixed(1);
+		a[0].mx = parseFloat(a[0].mx);
+		a[0].my = a[0].my.toFixed(1);
+		a[0].my = parseFloat(a[0].my);
+		for (let i = 1; i < a.length; i++) {
+			a[i].c1x = a[i].c1x.toFixed(1);
+			a[i].c1x = parseFloat(a[i].c1x);
+			a[i].c1y = a[i].c1y.toFixed(1);
+			a[i].c1y = parseFloat(a[i].c1y);
+			a[i].c2x = a[i].c2x.toFixed(1);
+			a[i].c2x = parseFloat(a[i].c2x);
+			a[i].c2y = a[i].c2y.toFixed(1);
+			a[i].c2y = parseFloat(a[i].c2y);
+			a[i].ex = a[i].ex.toFixed(1);
+			a[i].ex = parseFloat(a[i].ex);
+			a[i].ey = a[i].ey.toFixed(1);
+			a[i].ey = parseFloat(a[i].ey);
+		}
+		return a;
+	}
+	bethelDraw(point, is_fill, color) {
+		this.ctx.beginPath();
+		this.ctx.moveTo(point[0].mx, point[0].my);
+		if (undefined != color) {
+			this.ctx.setFillStyle(color);
+			this.ctx.setStrokeStyle(color);
+		} else {
+			this.ctx.setFillStyle(point[0].color);
+			this.ctx.setStrokeStyle(point[0].color);
+		}
+		for (let i = 1; i < point.length; i++) {
+			this.ctx.bezierCurveTo(point[i].c1x, point[i].c1y, point[i].c2x, point[i].c2y, point[i].ex, point[i]
+				.ey);
+		}
+		this.ctx.stroke();
+		if (undefined != is_fill) {
+			this.ctx.fill(); //填充图形 ( 后绘制的图形会覆盖前面的图形, 绘制时注意先后顺序 )
+		}
+		this.ctx.draw(true)
+	}
+
+	selectColorEvent(lineColor) {
+		this.lineColor = lineColor;
+	}
+
+	selectSlideValue(slideValue) {
+		switch (slideValue) {
+			case 0:
+				this.lineSize = 0.1;
+				this.lineMin = 0.1;
+				this.lineMax = 0.1;
+				break;
+			case 25:
+				this.lineSize = 1;
+				this.lineMin = 0.5;
+				this.lineMax = 2;
+				break;
+			case 50:
+				this.lineSize = 1.5;
+				this.lineMin = 1;
+				this.lineMax = 3;
+				break;
+			case 75:
+				this.lineSize = 1.5;
+				this.lineMin = 2;
+				this.lineMax = 3.5;
+				break;
+			case 100:
+				this.lineSize = 3;
+				this.lineMin = 2;
+				this.lineMax = 3.5;
+				break;
+		}
+	}
+
+	saveCanvas() {
+		return new Promise((resolve, rej) => {
+			uni.canvasToTempFilePath({
+				canvasId: this.canvasName,
+				success: function(res) {
+					resolve(res.tempFilePath);
+				},
+				fail: function(err) {
+					console.log('图片生成失败:' + err)
+					rej(err);
+				}
+			})
+		})
+	}
+}
+
+export default Handwriting;

+ 137 - 0
common/socket.js

@@ -0,0 +1,137 @@
+import store from '@/store/index.js'
+import method from '@/common/methodTool'
+let isSocketClose = false; // 是否关闭socket
+let heartbeatInterval = null; // 心跳定时器
+let socketTask = null; // websocket对象
+let againTimer = null; //断线重连定时器
+
+
+let url = null;
+
+/**
+ * sockeUrl:websocet的地址
+ * */
+const sokcet = (sockeUrl) => {
+	url = sockeUrl;
+	isSocketClose = false;
+	//判断是否有websocet对象,有的话清空
+	if (socketTask) {
+		socketTask.close();
+		socketTask = null;
+		clearInterval(heartbeatInterval);
+	}
+
+	// 连接
+	console.log(url)
+	socketTask = uni.connectSocket({
+		url: url,
+		success(data) {
+			console.log("websocket连接成功");
+			clearInterval(againTimer) //断线重连定时器
+		},
+		fail: (err) => {
+			console.log("报错", err);
+		}
+	});
+	// 连接打开
+	socketTask.onOpen((res) => {
+		console.log('WebSocket打开');
+		clearInterval(againTimer) //断线重连定时器
+		clearInterval(heartbeatInterval);
+		// // 30秒发送一次心跳
+		// heartbeatInterval = setInterval(() => {
+		// 	sendMsg('心跳ing')
+		// }, 30000)
+	})
+	// 监听连接失败
+	socketTask.onError((err) => {
+		console.log('WebSocket连接打开失败,请检查', err);
+		//停止发送心跳
+		clearInterval(heartbeatInterval)
+		//如果不是人为关闭的话,进行重连
+		if (!isSocketClose) {
+			reconnect(url)
+		}
+	})
+
+	// // 监听连接关闭 -
+	socketTask.onClose((e) => {
+		console.log('WebSocket连接关闭!',e);
+		clearInterval(heartbeatInterval)
+		if (!isSocketClose) {
+			reconnect(url)
+		}
+	})
+
+	// 监听收到信息
+	socketTask.onMessage((res) => {
+		console.log(res, 'res监听收到信息')
+		
+		if(res.data == 'offLine') {
+			stop();
+			uni.setStorageSync('needToLogin','1')
+			uni.showToast({
+				icon:'none',
+				title:'用户在其他终端登录,强制下线',
+				duration:3000,
+			})
+			setTimeout(() => {
+				method.exit();
+			},3000)
+		}
+	});
+
+
+}
+
+const reconnect = (url) => {
+	console.log('进入断线重连', isSocketClose);
+	clearInterval(againTimer) //断线重连定时器
+	clearInterval(heartbeatInterval);
+	console.log(socketTask)
+	socketTask && socketTask.close(); // 确保已经关闭后再重新打开
+	socketTask = null;
+	// 连接  重新调用创建websocet方法
+	againTimer = setInterval(() => {
+		sokcet(url)
+		console.log('在重新连接中...');
+	}, 20000)
+
+
+}
+
+const sendMsg = (msg) => { //向后端发送心跳包
+	console.log(msg)
+	try {
+		//通过 WebSocket 连接发送数据
+		socketTask.send({
+			data:msg
+		});
+	} catch (e) {
+		console.log(e,'msg')
+		if (isSocketClose) {
+			return
+		} else {
+			reconnect(url)
+		}
+
+	}
+}
+
+const stop = () => {
+	isSocketClose = true
+	clearInterval(heartbeatInterval);
+	clearInterval(againTimer) //断线重连定时器
+	socketTask && socketTask.close(); // 确保已经关闭后再重新打开
+	socketTask = null;
+}
+
+
+
+
+
+export const websocket = {
+	sokcet,
+	stop,
+	sendMsg
+};

+ 59 - 0
common/wxPay.js

@@ -0,0 +1,59 @@
+/*
+    微信支付方法(uni-app h5)适用
+    获取微信加签信息
+    @param{data}:获取的微信加签
+    @param{res}:成功回调
+    @param{fail}:失败回调
+     
+    @warn:因为package为严格模式下的保留字,不能用作变量.
+    @use
+        wxPay({
+            appId,
+            timeStamp,
+            nonceStr,
+            signature,
+            package,
+            paySign
+        },res=>{
+            console.log('调用成功!');
+        },fail=>{
+            console.log('调用失败!');
+        })
+*/
+const wx = require('jweixin-module');
+const wxPay = (data, callback, errCallback) => {
+	let [appId, timestamp, nonceStr, signature, packages, paySign] = [data.appId, String(data.timeStamp), data.nonceStr, data.paySign, data.package, data.paySign]
+
+	wx.config({
+        debug: false, 
+        appId, // 必填,公众号的唯一标识
+        timestamp, // 必填,生成签名的时间戳
+        nonceStr, // 必填,生成签名的随机串
+        signature, // 必填,签名,见附录1
+        jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+    });
+
+	wx.ready(function() {
+
+		wx.chooseWXPay({
+			timestamp,
+			nonceStr,
+			'package': packages,
+			signType: 'MD5',
+			paySign, // 支付签名
+			success(res) {
+				// 支付成功后的回调函数
+				callback(res);
+			},
+			fail (res) {
+				errCallback(res);
+			}
+		})
+	});
+	
+	wx.error(function(res) {
+		console.log(res)
+	});
+}
+
+export default wxPay;

+ 50 - 0
common/wxShare.js

@@ -0,0 +1,50 @@
+
+const wx = require('jweixin-module');
+const wxShare = (config, data, callback, errCallback) => {
+	
+	let [appId, timestamp, nonceStr, signature] = [config.appId, String(config.timestamp), config.nonceStr, config.signature]
+	
+	wx.config({
+	    debug: true, 
+	    appId, // 必填,公众号的唯一标识
+	    timestamp, // 必填,生成签名的时间戳
+	    nonceStr, // 必填,生成签名的随机串
+	    signature, // 必填,签名,见附录1
+	    jsApiList: [
+			'updateAppMessageShareData',
+			'updateTimelineShareData',
+			'showOptionMenu'
+		] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+	});
+	
+	wx.ready(function() {
+		
+		wx.showOptionMenu();
+	
+		wx.updateAppMessageShareData({
+			title: share.title, // 分享标题
+			desc: share.desc, // 分享描述
+			link: share.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+			imgUrl: share.imgUrl, // 分享图标
+			success: function () {
+				alert('分享成功')
+			  // 设置成功
+			}
+		})
+		
+		wx.updateTimelineShareData({ 
+		    title: share.title, // 分享标题
+		    link: share.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+		    imgUrl: share.imgUrl, // 分享图标
+		    ssuccess: function () {
+		      // 设置成功
+		    }
+		})
+	});
+	
+	wx.error(function(res) {
+		console.log(res)
+	});
+}
+
+export default wxShare;

+ 647 - 0
components/course/courseChapter.vue

@@ -0,0 +1,647 @@
+<template>
+  <view style="margin: 20rpx 0">
+    <view class="title" @click="openChapter(menuItem)">
+      <image src="/static/icon/up1.png" class="icon_up" v-if="down"></image>
+      <image src="/static/icon/down1.png" class="icon_up" v-if="!down"></image>
+      <text style="margin-left: 30rpx">{{ menuItem.name }}</text>
+    </view>
+    <view v-show="!down">
+      <view v-for="(itemM, indexM) in list" :key="indexM">
+        <view v-if="itemM.type != 2">
+          <courseSection
+						:orderGoodsId="orderGoodsId"
+            :sectionMaxNum="sectionMaxNum"
+            :preItem="list[indexM - 1] || preItem"
+            :learningOrder="learningOrder"
+            :courseId="courseId"
+            @playEnd="refreshList($event)"
+            :goodsId="goodsId"
+            :isBuy="isBuy"
+            :nextMenuItem="findNextSection(indexM)"
+            :isRebuild="isRebuild"
+            :gradeId="gradeId"
+            :menuItem="itemM"
+            :levelId="levelId + '-' + itemM.sectionId"
+          ></courseSection>
+          <u-line v-if="indexM < list.length - 1"></u-line>
+        </view>
+        <view v-if="itemM.type == 2">
+          <u-line></u-line>
+          <view
+            class="examBox"
+            @click="
+              toDo(
+                itemM.typeId,
+                goodsId,
+                itemM.moduleId,
+                itemM.chapterId,
+                itemM,
+                indexM
+              )
+            "
+          >
+            <view class="exam">
+              <view class="eTag">{{
+                itemM.doType == 1 ? "练习" : "考试"
+              }}</view>
+              <view style="margin-left: 15rpx;flex:1;">{{ itemM.name }}</view>
+            </view>
+            <view v-if="isRebuild || itemM.rebuild > 0" class="tagRe"
+              >待重修</view
+            >
+            <view v-else>
+              <view
+                :class="{
+                  tagGreen: itemM.learning == 1,
+                  tagRe: itemM.learning == 0 || itemM.rebuild > 0,
+                }"
+              >
+                <text v-if="itemM.rebuild > 0">待重测</text>
+                <text v-else-if="itemM.learning == 1">合格</text>
+                <text v-else-if="itemM.learning == 0">不合格</text>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { mapGetters, mapMutations } from "vuex";
+import courseSection from "@/components/course/courseSection.vue";
+export default {
+  name: "courseChapter",
+  props: {
+		orderGoodsId:{
+			default:0
+		},
+    preItem: {
+      default: undefined,
+    },
+    learningOrder: {
+      //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
+      type: Number,
+      default: 0,
+    },
+    needOpen: {
+      //是否默认展开
+      type: Boolean,
+      default: false,
+    },
+    menuItem: {
+      type: Object,
+      default: {},
+    },
+    isBuy: {
+      type: Boolean,
+      default: false,
+    },
+    levelId: {
+      type: String,
+      default: "",
+    },
+    goodsId: {
+      type: Number,
+      default: 0,
+    },
+    courseId: {
+      type: Number,
+      default: 0,
+    },
+    isRebuild: {
+      type: Boolean,
+      default: false,
+    },
+    gradeId: {
+      type: Number,
+      default: 0,
+    },
+    sectionMaxNum: {
+      default: undefined,
+    },
+  },
+  components: {
+    courseSection,
+  },
+  data() {
+    return {
+      down: true,
+      list: [],
+      examList: {},
+      canLearn: false, //是否全部视频看完才可以练习、测试
+    };
+  },
+  onLoad() {},
+  created() {},
+  mounted() {
+    if (this.needOpen && this.chapterOpen) {
+      this.updateChapterOpen(false);
+      this.openChapter(this.menuItem);
+    }
+  },
+  onPageShow() {
+    if (this.isBuy) {
+      this.refreshList({ isRebuild: this.isRebuild });
+    }
+  },
+  methods: {
+    ...mapMutations(["updateChapterOpen"]),
+    goodsTodayStudySectionNum() {
+      return new Promise((resolve) => {
+        this.$api
+          .goodsTodayStudySectionNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              resolve(res.data.data);
+            }
+          });
+      });
+    },
+    refreshList(isRebuild) {
+      console.log(9999);
+      let moduleId = this.menuItem.moduleId ? this.menuItem.moduleId : 0;
+      if (this.isRebuild) {
+        this.getReSectionList(
+          this.menuItem.id,
+          this.menuItem.courseId,
+          moduleId
+        );
+      } else {
+        this.getBuySectionList(
+          this.menuItem.id,
+          this.menuItem.courseId,
+          moduleId
+        );
+        //				this.getMenuExamList(item.id,item.courseId,moduleId)
+      }
+
+      this.$emit("playEnd", { isRebuild: isRebuild.isRebuild });
+      console.log(10000);
+      // let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
+      // this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
+    },
+    findNextSection(index) {
+      for (let i = index + 1; i < this.list.length; i++) {
+        return this.list[i];
+      }
+      return {};
+    },
+    studyRecordMenuAllList() {
+      return new Promise((resolve) => {
+        this.$api
+          .studyRecordMenuAllList({
+            courseId: this.courseId,
+            gradeId: this.gradeId,
+            goodsId: this.goodsId,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              resolve(res.data.data);
+            }
+          });
+      });
+    },
+		gradeCheckGoodsStudy(id) {
+			let moduleId = this.menuItem.moduleId || 0;
+			let chapterId = this.menuItem.chapterId || 0;
+			let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+			return new Promise(resolve => {
+				this.$api.gradeCheckGoodsStudy({
+					goodsId:this.goodsId,
+					gradeId:this.gradeId,
+					moduleId:this.menuItem.moduleId || 0,
+					chapterId:this.menuItem.chapterId || 0,
+					examId:id,
+				}).then( res => {
+					resolve(res.data.data)
+				})
+			})
+		},
+    /**
+     * 去做题
+     */
+    async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
+      let learnNum = await this.goodsTodayStudySectionNum()
+			let hasLearn = await this.gradeCheckGoodsStudy(id);
+
+      if(this.sectionMaxNum > 0) {
+      	if(learnNum >= this.sectionMaxNum && !hasLearn) {
+      		uni.showToast({
+      			icon:'none',
+      			title:`每天最多学习${this.sectionMaxNum}节`
+      		})
+      		return;
+      	}
+      }
+      console.log(this.learningOrder, "this.learningOrder");
+      if (this.learningOrder == 1) {
+        if (this.canLearn) {
+          let num = await this.bankRecordDoNum(item.typeId);
+          //有次数限制
+          if (item.answerNum - num > 0 && item.answerNum > 0) {
+            // this.$set(this.list[index],'doNum',(item.doNum+1))
+            console.log(this.list[index]);
+            uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                id +
+                "&goodsid=" +
+                goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+                "&orderGoodsId=" + this.orderGoodsId,
+            });
+            //没有答题次数限制
+          } else if (item.answerNum == 0) {
+            uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                id +
+                "&goodsid=" +
+                goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+                "&orderGoodsId=" + this.orderGoodsId,
+            });
+          } else {
+            uni.showToast({
+              icon: "none",
+              title: "该试卷只能答题" + item.answerNum + "次",
+            });
+
+            return;
+          }
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "请按顺序学完视频课程再进行练习和测试",
+          });
+        }
+      } else if (this.learningOrder == 2 && !item.rebuild) {
+        let canLearn = this.list[index - 1].learning == 1;
+        let rows = await this.studyRecordMenuAllList();
+        let isStop = false;
+        let newRows = [];
+        for (let i = 0; i < rows.length; i++) {
+          let moduleTrue = rows[i].moduleId == moduleId;
+          let chapterTrue = rows[i].chapterId == chapterId;
+          if (moduleTrue && chapterTrue) {
+            isStop = true;
+            if (rows[i].sectionType != 2) {
+              //忽略直播
+              newRows.push(rows[i]);
+            }
+          } else {
+            if (!isStop) {
+              if (rows[i].sectionType != 2) {
+                //忽略直播
+                newRows.push(rows[i]);
+              }
+            } else {
+              break;
+            }
+          }
+        }
+        console.log(newRows);
+        let isAllLearn = newRows.every((item) => {
+          return item.studyStatus == 1;
+        });
+
+        if (isAllLearn) {
+          //之前的都学完了
+
+          // if(canLearn) { //视频的上一节学完
+
+          let num = await this.bankRecordDoNum(item.typeId);
+          //有次数限制
+          if (item.answerNum - num > 0 && item.answerNum > 0) {
+            // this.$set(this.list[index],'doNum',(item.doNum+1))
+            console.log(this.list[index]);
+            uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                id +
+                "&goodsid=" +
+                goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+                "&orderGoodsId=" + this.orderGoodsId,
+            });
+            //没有答题次数限制
+          } else if (item.answerNum == 0) {
+            uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                id +
+                "&goodsid=" +
+                goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+                "&orderGoodsId=" + this.orderGoodsId,
+            });
+          } else {
+            uni.showToast({
+              icon: "none",
+              title: "该试卷只能答题" + item.answerNum + "次",
+            });
+
+            return;
+          }
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "请学完视频课程再进行练习和测试",
+          });
+        }
+      } else {
+        let num = await this.bankRecordDoNum(item.typeId);
+        //有次数限制
+        if (item.answerNum - item.doNum > 0 && item.answerNum > 0) {
+          // this.$set(this.list[index],'doNum',(item.doNum+1))
+          console.log(this.list[index]);
+          uni.navigateTo({
+            url:
+              "/pages2/class/questionBank?courseId=" +
+              this.courseId +
+              "&gradeId=" +
+              this.gradeId +
+              "&isFromVideo=1&id=" +
+              id +
+              "&goodsid=" +
+              goodsId +
+              "&moduleId=" +
+              moduleId +
+              "&chapterId=" +
+              chapterId +
+              "&orderGoodsId=" + this.orderGoodsId,
+          });
+          //没有答题次数限制
+        } else if (item.answerNum == 0) {
+          uni.navigateTo({
+            url:
+              "/pages2/class/questionBank?courseId=" +
+              this.courseId +
+              "&gradeId=" +
+              this.gradeId +
+              "&isFromVideo=1&id=" +
+              id +
+              "&goodsid=" +
+              goodsId +
+              "&moduleId=" +
+              moduleId +
+              "&chapterId=" +
+              chapterId +
+              "&orderGoodsId=" + this.orderGoodsId,
+          });
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "该试卷只能答题" + item.answerNum + "次",
+          });
+
+          return;
+        }
+      }
+    },
+    bankRecordDoNum(examId) {
+      return new Promise((resolve) => {
+        this.$api
+          .bankRecordDoNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            chapterId: this.menuItem.id,
+            courseId: this.courseId,
+            moduleId: 0,
+            examId: examId,
+          })
+          .then((res) => {
+            resolve(res.data.data);
+          });
+      });
+    },
+    openChapter(item) {
+      console.log(this.menuItem);
+      this.down = !this.down;
+      if (!this.down && this.list.length == 0) {
+        console.log(item.id, 69);
+        if (this.isBuy) {
+          let moduleId = item.moduleId ? item.moduleId : 0;
+          if (this.isRebuild) {
+            this.getReSectionList(item.id, item.courseId, moduleId);
+          } else {
+            this.getBuySectionList(item.id, item.courseId, moduleId);
+            //				this.getMenuExamList(item.id,item.courseId,moduleId)
+          }
+        } else {
+          this.getSectionList(item.id);
+        }
+      }
+    },
+    getMenuExamList(chapterId, courseId, moduleId) {
+      let self = this;
+      this.$api
+        .menuExamList({
+          chapterId: chapterId,
+          courseId: courseId,
+          moduleId: moduleId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            self.examList = res.data.rows;
+          }
+        });
+    },
+    getSectionList(chapterId) {
+      let self = this;
+      this.$api.sectionList(chapterId).then((res) => {
+        if (res.data.code == 200) {
+          for (let i = 0; i < res.data.data.length; i++) {
+            let item = res.data.data[i];
+            item.id = item.sectionId;
+            item.menuType = 3;
+            //判断是否试听
+            item.tryListen = false;
+            if (self.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
+              item.tryListen = true;
+            }
+          }
+
+          let newArr = res.data.data.filter((item) => {
+            console.log(item);
+            return item.type != 2;
+          });
+          this.canLearn = newArr.every((item) => {
+            console.log(item);
+            if (item.learning == 1) {
+              return true;
+            } else {
+              return false;
+            }
+          });
+          self.list = res.data.data;
+        }
+      });
+    },
+    getReSectionList(chapterId, courseId, moduleId) {
+      let self = this;
+      this.$api
+        .reSectionList({
+          chapterId: chapterId,
+          gradeId: this.gradeId,
+          courseId: courseId,
+          rebuild: 1,
+          moduleId: moduleId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            for (let i = 0; i < res.data.data.length; i++) {
+              let item = res.data.data[i];
+              item.id = item.sectionId;
+              item.menuType = 3;
+              //判断是否试听
+              item.tryListen = false;
+              if (self.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
+                item.tryListen = true;
+              }
+            }
+            let newArr = res.data.data.filter((item) => {
+              console.log(item);
+              return item.type != 2;
+            });
+            this.canLearn = newArr.every((item) => {
+              console.log(item);
+              if (item.learning == 1) {
+                return true;
+              } else {
+                return false;
+              }
+            });
+            self.list = res.data.data;
+          }
+        });
+    },
+    getBuySectionList(chapterId, courseId, moduleId) {
+      let self = this;
+      this.$api
+        .reSectionList({
+          chapterId: chapterId,
+          gradeId: this.gradeId,
+          courseId: courseId,
+          moduleId: moduleId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            for (let i = 0; i < res.data.data.length; i++) {
+              let item = res.data.data[i];
+              item.id = item.sectionId;
+              item.menuType = 3;
+              //判断是否试听
+              item.tryListen = false;
+              if (self.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
+                item.tryListen = true;
+              }
+            }
+            let newArr = res.data.data.filter((item) => {
+              return item.type != 2;
+            });
+            this.canLearn = newArr.every((item) => {
+              console.log(item);
+              if (item.learning == 1) {
+                return true;
+              } else {
+                return false;
+              }
+            });
+            self.list = res.data.data;
+          }
+        });
+    },
+  },
+  computed: { ...mapGetters(["goodsAuditionConfigIdList", "chapterOpen"]) },
+};
+</script>
+
+<style scoped>
+.tagRe {
+  width: 80rpx;
+  height: 28rpx;
+  background: #ff3b30;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+.tagGreen {
+  width: 80rpx;
+  height: 28rpx;
+  background: #34c759;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+.eTag {
+	width:56rpx;
+	height:42rpx;
+	text-align: center;
+	line-height: 42rpx;
+	font-size: 20rpx;
+  background: #007aff;
+  border-radius: 8rpx;
+  color: #ffffff;
+}
+.examBox {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.exam {
+  font-size: 30rpx;
+  display: flex;
+  align-items: center;
+  margin: 20rpx 0;
+}
+.icon_up {
+  width: 24rpx;
+  height: 24rpx;
+}
+.title {
+  font-size: 30rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #666666;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  margin-bottom: 30rpx;
+}
+</style>

+ 167 - 0
components/course/courseModule.vue

@@ -0,0 +1,167 @@
+<template>
+	<view style="margin: 20rpx 0;">
+		<view class="title" @click="openModule(menuItem)">
+		<image src="/static/icon/up1.png" class="icon_up" v-if="down"></image>
+		<image src="/static/icon/down1.png" class="icon_up" v-if="!down"></image>
+		<text style="margin-left: 10rpx;">{{menuItem.name}}</text>
+		</view>
+		<view v-show="!down">
+			<view v-for="(itemM,indexM) in list" :key="indexM">
+				<courseChapter :orderGoodsId="orderGoodsId" :preItem="list[indexM - 1] || preItem" :sectionMaxNum="sectionMaxNum" :needOpen="needOpen" @playEnd="playEnd($event)" @toDo="toDo($event)" :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
+				<u-line v-if="indexM<list.length-1"></u-line>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+import courseChapter from '@/components/course/courseChapter.vue';
+export default {
+	name: 'courseModule',
+	props: {
+		orderGoodsId:{
+			default:0
+		},
+		preItem:{
+			default:undefined
+		},
+		learningOrder:{ //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
+			type:Number,
+			defaule:0
+		},
+		needOpen:{ //是否默认展开
+			type:Boolean,
+			default:false,
+		},
+		menuItem: {
+			type: Object,
+			default: {}
+		},
+		goodsId: {
+			type: Number,
+			default: 0
+		},
+		courseId: {
+			type: Number,
+			default: 0
+		},
+		isBuy: { //是否是已购买商品
+			type: Boolean,
+			default: false
+		},
+		levelId: {
+			type: String,
+			default: ""
+		},
+		isRebuild: {  //是否重修目录
+			type: Boolean,
+			default: false
+		},
+		gradeId: {  //重修需要班级ID
+			type: Number,
+			default: 0
+		},
+		sectionMaxNum:{
+			default:undefined
+		}
+	},
+	components: {
+		courseChapter
+	},
+	data() {
+		return {
+			 down:true,
+			 list:[],
+		};
+	},
+	onLoad() {},
+	created() {
+		
+	},
+	mounted() {
+		if(this.needOpen && this.chapterOpen) {
+			this.openModule(this.menuItem)
+		}
+	},
+	methods: {
+		playEnd(isRebuild) {
+			this.$emit('playEnd',{isRebuild:isRebuild.isRebuild})
+		},
+		toDo(item) {
+			this.$emit('toDo',item)
+		},
+		openModule(item){
+			this.down = !this.down
+			if(!this.down&&this.list.length==0){
+				if(this.isBuy){
+					if(this.isRebuild){
+						this.getReChapterList(item.id,item.courseId)
+					}else{
+						this.getBuyChapterList(item.id,item.courseId) //已购买目录
+					}
+				}else{
+					this.getChapterList(item.id) //未购买目录
+				}
+				
+			}
+		},
+			getChapterList(moduleId) {
+					let self = this
+					this.$api.chapterList(moduleId).then(res => {
+						if(res.data.code==200){
+							for(let i=0;i<res.data.data.length;i++){
+								let item = res.data.data[i]
+								item.id = item.chapterId
+								item.menuType = 2;
+							}
+							self.list = res.data.data
+						}
+					});
+				},
+		getReChapterList(moduleId,courseId) {
+			let self = this
+			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId,rebuild:1}).then(res => {
+				if(res.data.code==200){
+					for(let i=0;i<res.data.data.length;i++){
+						let item = res.data.data[i]
+						item.id = item.chapterId
+						
+					}
+					self.list = res.data.data
+				}
+			});
+		},
+		getBuyChapterList(moduleId,courseId) {
+			let self = this
+			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId}).then(res => {
+				if(res.data.code==200){
+					for(let i=0;i<res.data.data.length;i++){
+						let item = res.data.data[i]
+						item.id = item.chapterId
+						item.menuType = 2;
+					}
+					self.list = res.data.data
+				}
+			});
+		},
+	},computed: { ...mapGetters(['chapterOpen']) },
+};
+</script>
+
+<style scoped>
+	.icon_up{
+		width: 24rpx;
+		height: 24rpx;
+	}
+.title{
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis; 
+	margin-bottom:30rpx;
+}
+</style>

+ 535 - 0
components/course/courseSection.vue

@@ -0,0 +1,535 @@
+<template>
+	<view style="display: flex;justify-content: space-between;align-items: center;" @click="getVideo">
+		<view style="display: flex;justify-content: space-between;margin: 20rpx 0;width: 100%;">
+			<view style="display: flex;align-items: center;flex:1;">
+				<view class="tag tagColor1" v-if="menuItem.sectionType==1">录播</view>
+				<view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
+				<view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
+				<view class="t_content">
+					<view v-if="menuItem.sectionType==1" :class="playSectionId==newId && playNextId==playId?'color1':''">{{menuItem.name || ''}}</view>
+					<view v-if="menuItem.sectionType==2" :class="playSectionId==newId && playNextId==playId?'color2':''">{{menuItem.name || ''}}</view>
+					<view v-if="menuItem.sectionType==3" :class="playSectionId==newId && playNextId==playId?'color3':''">{{menuItem.name || ''}}</view>
+					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
+						<view v-if="menuItem.liveStartTime>nowTime">
+							<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
+							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false)}}</text>
+						</view>
+						<!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+							<text>直播中</text>
+						</view>
+						<view v-if="menuItem.liveEndTime<nowTime">
+							<text>回放</text>
+						</view> -->
+					</view>
+				</view>
+				<view v-if="menuItem.sectionType==null">{{menuItem.name || ''}}</view>
+			</view>
+			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
+				<view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
+					<text>待开播</text>
+				</view>
+				<view class="tagPlaying" v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+					<text>直播中</text>
+				</view>
+				<view class="tagPlayed" v-if="menuItem.liveEndTime<nowTime">
+					<text>已结束</text>
+				</view>
+			</view>
+			<view v-if="(isRebuild||menuItem.rebuild>0)" class="tagRe">待重修</view>
+			<view v-else>
+				<view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
+			</view>
+			
+		</view>
+		<view v-if="menuItem.tryListen&&!isBuy" class="tryBox">
+			试看
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+import eventHub from '@/common/eventHub.js'
+export default {
+	name: 'courseSection',
+	props: {
+		orderGoodsId:{
+			default:0
+		},
+		preItem:{
+			default:undefined,
+		},
+		learningOrder:{ //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
+			type:Number,
+			default:0
+		},
+		courseId: {
+			type: Number,
+			default: 0
+		},
+		goodsId: {
+			type: Number,
+			default: 0
+		},
+		menuItem: {
+			type: Object,
+			default: {}
+		},
+		isBuy: {
+			type: Boolean,
+			default: false
+		},
+		levelId: {
+			type: String,
+			default: ""
+		},
+		isRebuild: {
+			type: Boolean,
+			default: false
+		},
+		gradeId: {
+			type: Number,
+			default: 0
+		},
+		nextMenuItem: {
+			type: Object,
+			default: {}
+		},
+		sectionMaxNum:{
+			default:undefined,
+		},
+	},
+	watch:{
+		menuItem(val) {
+			console.log(val,'val')
+		}
+	},
+	data() {
+		return {
+			nowTime:0,
+			newId:0,
+			playId:'',
+			clickLock:false, //点击锁,防止连续点击多次
+		};
+	},
+	onLoad() {
+	},
+	created() {
+		
+	},
+	mounted() {
+		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
+		this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
+		console.log(this.isRebuild)
+		console.log(this.nextMenuItem,'nextMenuItem')
+		console.log(this.menuItem,'this.menuItem')
+		let moduleId = this.menuItem.moduleId || 0;
+		let chapterId = this.menuItem.chapterId || 0;
+		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+		let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
+		this.playId = playNextId;
+		uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
+		uni.$once('playNext'+playNextId, (data) => {
+			//到时会触发每个节的监听事件,只允许当前节的接收
+			let self = this
+			
+			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){  // fromRebuild 来自重修目录的点击才弹出播放下一节
+				//重修存在下一节
+				uni.showModal({
+				    title: '提示',
+				    content: '是否播放下一节',
+				    success: function (res) {
+				        if (res.confirm) {
+				            console.log('用户点击确定');
+							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
+							//设置播放的节ID
+							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
+							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
+							let ids = self.levelId.split('-');
+							ids[2] = nextId 
+							uni.$emit('levelId', ids.join('-'))
+							uni.$emit('getSection', self.nextMenuItem)
+							self.$emit('playEnd',{isRebuild:self.isRebuild})
+							// uni.$off('playend')
+							// uni.$on('playend',res => {
+							// 	console.log('playend2')
+							// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+							// })
+							
+				        } else {
+							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
+							//设置播放的节ID
+							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
+							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
+							let ids = self.levelId.split('-');
+							ids[2] = nextId 
+							self.$emit('playEnd',{isRebuild:self.isRebuild})
+						}
+				    }
+				});
+			} else {
+				this.$emit('playEnd',{isRebuild:this.isRebuild})
+			}
+		});
+	},
+	methods: {
+		studyRecordMenuAllList() {
+			return new Promise(resolve => {
+				
+				this.$api.studyRecordMenuAllList({
+					courseId:this.courseId,
+					gradeId:this.gradeId,
+					goodsId:this.goodsId
+				}).then(res => {
+					if(res.data.code == 200) {
+						resolve(res.data.data)
+					}
+				})
+			})
+		},
+		gradeCheckGoodsStudy() {
+			let moduleId = this.menuItem.moduleId || 0;
+			let chapterId = this.menuItem.chapterId || 0;
+			let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+			return new Promise(resolve => {
+				this.$api.gradeCheckGoodsStudy({
+					goodsId:this.goodsId,
+					gradeId:this.gradeId,
+					moduleId:this.menuItem.moduleId || 0,
+					chapterId:this.menuItem.chapterId || 0,
+					sectionId:this.menuItem.sectionId || this.menuItem.menuId
+				}).then( res => {
+					resolve(res.data.data)
+				})
+			})
+		},
+		goodsTodayStudySectionNum() {
+			return new Promise(resolve => {
+				this.$api.goodsTodayStudySectionNum({goodsId:this.goodsId,gradeId:this.gradeId}).then(res => {
+					if(res.data.code == 200) {
+						resolve(res.data.data)
+					}
+				})
+			})
+		},
+		async getVideo(){
+			if(this.clickLock) {
+				return;
+			}
+
+			this.clickLock = true;
+			
+			if(this.learningOrder == 2 && !this.menuItem.isRebuild) { //要按从头到尾顺序学习, 且不是重修课程
+				if(this.preItem) {
+					let rows = await this.studyRecordMenuAllList();
+					let newRows = [];
+					for(let i = 0; i < rows.length; i++ ) {
+						let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
+						let chapterTrue = rows[i].chapterId == this.menuItem.chapterId || rows[i].chapterId == 0;
+						let sectionTrue = (rows[i].sectionId == this.menuItem.sectionId) || (rows[i].sectionId ==  this.menuItem.menuId);
+						if(moduleTrue && chapterTrue && sectionTrue) {
+							break;
+						} else {
+							if(rows[i].sectionType != 2) {
+								newRows.push(rows[i])
+							}
+							
+						}
+					}
+					console.log(newRows)
+					let isAllLearn = newRows.every(item => {
+						return item.studyStatus == 1;
+					})
+					
+					if(isAllLearn) {
+						this.playVideo();
+					} else {
+						uni.showToast({
+							icon:'none',
+							title:'请按顺序学习视频课程'
+						})
+					}
+					
+					// if(this.preItem.menuType == 3) { //上一个是节
+					// 	if(this.preItem.learning == 1) { //上一节学完
+					// 		this.playVideo();
+					// 	} else {
+					// 		uni.showToast({
+					// 			icon:'none',
+					// 			title:'请按顺序学习视频课程'
+					// 		})
+					// 	}
+					// } else if(this.preItem.menuType == 2) { //上一个是章
+					// 	this.$api.reSectionList({chapterId: this.preItem.menuId || this.preItem.chapterId,gradeId:this.gradeId,courseId:this.courseId,moduleId:this.preItem.moduleId || 0}).then(res => {
+					// 		if(res.data.code==200){
+					// 			let lastItem = res.data.data[res.data.data.length -1];
+					// 			if(lastItem.learning == 1) {
+					// 				this.playVideo();
+					// 			} else {
+					// 				uni.showToast({
+					// 					icon:'none',
+					// 					title:'请按顺序学习视频课程'
+					// 				})
+					// 			}
+					// 		}
+					// 	});
+					// } else if(this.preItem.menuType == 1) { //上一个是模块
+					// 	this.$api.reChapterList({moduleId:this.preItem.menuId,gradeId:this.gradeId,courseId:this.courseId}).then(res => {
+					// 		if(res.data.code==200){
+					// 			let lastChapterItem = res.data.data[res.data.data.length -1];
+								
+					// 			this.$api.reSectionList({chapterId:lastChapterItem.chapterId,gradeId:this.gradeId,courseId:this.courseId,moduleId:this.menuItem.menuId || this.menuItem.moduleId}).then(res => {
+					// 				if(res.data.code==200){
+					// 					let lastSectionItem = res.data.data[res.data.data.length -1];
+					// 					if(lastSectionItem.learning == 1) {
+					// 						this.playVideo();
+					// 					} else {
+					// 						uni.showToast({
+					// 							icon:'none',
+					// 							title:'请按顺序学习视频课程'
+					// 						})
+					// 					}
+					// 				}
+					// 			});
+					// 		}
+					// 	});
+					// } 
+				} else { //第一章第一节
+					this.playVideo();
+				}
+			} else { 
+				this.playVideo();
+			}
+			
+			
+			setTimeout(() => {
+				this.clickLock = false;
+			},3000)
+			
+		},
+		async playVideo() {
+			if(this.menuItem.sectionType==1||this.menuItem.sectionType==3){
+				//录播
+				if(!this.isBuy){
+					//非购买
+					if(!this.menuItem.tryListen){
+						//不允许试听
+						this.clickLock = false;
+						return
+					} else {
+						this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
+						this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
+						this.menuItem.courseId = this.courseId;
+						uni.$emit('getSection', this.menuItem)
+						return;
+					}
+					
+				}
+				
+				let learnNum = await this.goodsTodayStudySectionNum()
+				let hasLearn = await this.gradeCheckGoodsStudy();
+				
+				console.log(this.sectionMaxNum,'this.sectionMaxNum')
+				console.log(learnNum,'learnNum')
+				if(this.sectionMaxNum > 0) {
+					if(learnNum >= this.sectionMaxNum && !hasLearn) {
+						uni.showToast({
+							icon:'none',
+							title:`每天最多学习${this.sectionMaxNum}节`
+						})
+						this.clickLock = false;
+						return;
+					}
+				}
+				if(!this.menuItem.recordingUrl){
+					uni.showToast({
+						title: '暂无播放地址数据',
+						icon: 'error'
+					});
+					this.clickLock = false;
+					return;
+				}
+				/* if(this.playSectionId==this.newId){
+					//切换为同一节
+					return
+				} */
+				
+				if(this.playSectionId>0){
+					//切换视频
+					let oldSectionId = this.playSectionId
+					uni.$emit('changeSection', oldSectionId)
+				}
+				//设置播放的节ID
+				this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
+				this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
+				this.$store.commit('updatePlayNextId',this.playId)
+				uni.$emit('levelId', this.levelId)
+				uni.$emit('getSection', this.menuItem)
+				uni.$emit('isRebuild',this.isRebuild)
+				console.log(this.menuItem,'menuItem')
+				// uni.$off('playend')
+				// uni.$on('playend',res => {
+				// 	console.log('playend2')
+				// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+				// })
+				console.log(999)
+			}
+			if(this.menuItem.sectionType==2){
+				//直播
+				if(!this.isBuy){
+					//非购买
+					this.clickLock = false;
+					return
+				}
+				
+				let learnNum = await this.goodsTodayStudySectionNum()
+				let hasLearn = await this.gradeCheckGoodsStudy();
+				
+				console.log(this.sectionMaxNum,'this.sectionMaxNum')
+				console.log(learnNum,'learnNum')
+				if(this.sectionMaxNum > 0) {
+					if(learnNum >= this.sectionMaxNum && !hasLearn) {
+						uni.showToast({
+							icon:'none',
+							title:`每天最多学习${this.sectionMaxNum}节`
+						})
+						this.clickLock = false;
+						return;
+					}
+				}
+				if(!this.menuItem.liveUrl){
+					uni.showToast({
+						title: '暂无直播地址数据',
+						icon: 'error'
+					});
+				}
+				if(this.playSectionId==this.newId){
+					//切换为同一频道
+					this.clickLock = false;
+					return
+				}
+				//设置播放的节ID
+				this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
+				this.$store.commit('setPlayChannelId', {playChannelId  :this.menuItem.liveUrl});
+				this.$store.commit('updatePlayNextId',this.playId)
+				uni.$emit('levelId', this.levelId)
+				uni.$emit('getChannel', this.menuItem)
+				uni.$emit('isRebuild',this.isRebuild)
+				console.log(this.menuItem,'menuItem')
+				// uni.$off('playend')
+				// uni.$on('playend',res => {
+				// 	console.log('playend1')
+				// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+				// })
+				console.log(888)
+			
+			}
+		}
+	},
+	computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId']) }
+	
+};
+</script>
+
+<style scoped lang="scss">
+	.tagGreen{
+		width: 80rpx;
+		height: 28rpx;
+		background: #34C759;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		text-align: center;
+	}
+	.tagWillPlay{
+		width: 80rpx;
+		height: 28rpx;
+		background: #EBF4FF;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #007AFF;
+		text-align: center;
+	}
+	.tagPlaying{
+		width: 80rpx;
+		height: 28rpx;
+		background: #FFF7EB;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #FF9500;
+		text-align: center;
+	}
+	.tagPlayed{
+		width: 80rpx;
+		height: 28rpx;
+		background: #EEEEEE;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #666666;
+		text-align: center;
+	}
+	.tagRe{
+		width: 80rpx;
+		height: 28rpx;
+		background: #FF3B30;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		text-align: center;
+	}
+	.tryBox{
+		width: 96rpx;
+		height: 48rpx;
+		background: #007AFF;
+		border-radius: 24rpx;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		line-height: 48rpx;
+		text-align: center;
+	}
+	.icon_up{
+		width: 24rpx;
+		height: 24rpx;
+	}
+	.t_content3{
+		color: #007AFF;
+	}
+	.t_content2{
+		color: #007AFF;
+	}
+	.t_content1{
+		color: #007AFF;
+	}
+	.t_content{
+		font-size: 30rpx;
+		margin-left: 10rpx;
+		color: #666666;
+		flex:1;
+	}
+	.tagColor3{
+		border: 2rpx solid #FF9500;
+		color: #FF9500;
+	}
+	.tagColor2{
+		border: 2rpx solid #FF3B30;
+		color: #FF3B30;
+	}
+	.tagColor1{
+		border: 2rpx solid #007AFF;
+		color: #007AFF;
+	}
+	.color3{
+		color: #FF9500;
+	}
+	.color2{
+		color: #FF3B30;
+	}
+	.color1{
+		color: #007AFF;
+	}
+	.tag{
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		padding: 5rpx;
+	}
+</style>

+ 56 - 0
components/mask1/mask1.vue

@@ -0,0 +1,56 @@
+<template>
+	<view class="dialog">
+		<view class="view-body">
+			<view class="title"> 六年免检业务须知 </view>
+			<view class="content" style="line-height: 20px;">
+				<view>(一) 公安部、质检总局印发《关于加强和改进机动车检验工作的意见》(公交管〔2014〕138 号)的要求,自2014年9月1日起,试行非营运轿车等车辆6年内免检。对于符合6年内免检的车辆,无需到检验机构进行安全技术检验,机动车所有人提供交通事故强制责任保险凭证、车船税纳税或者免征证明后,可以直接向公安机关交通管理部门申请领取检验标志。</view>
+				<view>(二) 注册登记起6年以内的非营运轿车(含大型轿车)、非营运小型和微型载客汽车,但其中面包车[平头或短头车身结构,单层地板,发动机中置(指发动机缸体整体位于汽车前后轴之间的布置形式),宽高比(指整车车宽与车高的比值)小于等于0.90,乘坐人数小于等于9人,安装座椅的载客汽车]、7座及7座以上车辆不属于免检车型。</view>
+				<view>(三) 对于存在以下几种情况的,不属于6年以内免检政策范围,仍按原规定上线检验:一是注册登记日期在2010年8月31日之前的;二是自车辆出厂之日起,超过4年未办理注册登记手续的;三是车辆发生过造成人员伤亡的交通事故的。</view>
+			</view>
+		</view>
+		<view class="bottom">
+			<navigator  hover-class="none" :url="'../chejianyy/middle'">马上预约</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style>
+	.dialog {
+	  background: #fff;
+	  position: absolute;
+	  left: 50%;
+	  top: 50%;
+	  width: 90%;
+	  transform: translate(-50%, -50%);
+	  text-align: center;
+	  border-radius: 10rpx;
+	  box-sizing: border-box;
+	}
+	.dialog .view-body{
+		padding: 10px;
+	}
+	.dialog .bottom{
+		line-height: 40px;
+		color: #439dff;
+		font-size: 15px;
+		border-top: 1px solid #d4d4d4;
+	}
+	.dialog .view-body .title{
+		padding: 10px;
+		font-size: 16px;
+		color: #439dff;
+	}
+	.dialog .view-body .content{
+		text-align: left;
+	}
+</style>

+ 69 - 0
components/nav-bar/nav-bar.vue

@@ -0,0 +1,69 @@
+<template>
+	<view>
+		<u-navbar :is-back="showBackBtn" :title="title" z-index="99999999999999">
+			<view class="slot-wrap">
+				<u-icon class="homeIcon" v-if="showHomeBtn" @click="goHome()" name="home"  size="40"></u-icon>
+			</view>
+		</u-navbar>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+export default {
+	name: 'navBar',
+	props: {
+		statusBar:{
+			type:Boolean,
+			default:true
+		},
+		title:{
+			type:String,
+			default:''
+		},
+		showBackBtn:{
+			type:Boolean,
+			default:true,
+		},
+		showHomeBtn:{
+			type:Boolean,
+			default:true
+		}
+	},
+	components: {
+	},
+	data() {
+		return {
+			
+		};
+	},
+	onLoad() {},
+	created() {
+	},
+	mounted() {
+		
+	},
+	onPageShow() {
+		
+	},
+	methods: {
+		goHome() {
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
+		}
+	},
+	computed: { ...mapGetters(['goodsAuditionConfigIdList']) },
+};
+</script>
+
+<style scoped lang="scss">
+	.homeIcon {
+		margin-left:20rpx;
+	}
+	
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+	}
+</style>

+ 137 - 0
components/pick-regions/pick-regions.vue

@@ -0,0 +1,137 @@
+<template>
+    <picker mode="multiSelector" 
+            :value="multiIndex" 
+            :range="multiArray" 
+            @change="handleValueChange"
+            @columnchange="handleColumnChange">
+        <slot></slot>
+    </picker>
+</template>
+
+<script>
+    const CHINA_REGIONS = require('./regions.json')
+	export default {
+        props:{
+            defaultRegions:{
+                type:Array,
+                default(){
+                    return []
+                }
+            },
+            defaultRegionCode:{
+                type:String
+            },
+            defaultRegion:[String,Array]
+        },
+		data() {
+			return {
+                cityArr:CHINA_REGIONS[0].childs,
+                districtArr:CHINA_REGIONS[0].childs[0].childs,
+                multiIndex: [0, 0, 0],
+                isInitMultiArray:true,
+			}
+		},
+        watch:{
+            defaultRegion:{
+                handler(region,oldRegion){
+                    if(Array.isArray(region)){
+                        // 避免传的是字面量的时候重复触发
+                        oldRegion = oldRegion || []
+                        if(region.join('')!==oldRegion.join('')){
+                            this.handleDefaultRegion(region)
+                        }
+                    }else if(region&&region.length == 6){
+                        this.handleDefaultRegion(region)
+                    }else{
+                        console.warn('defaultRegion非有效格式')
+                    }
+                },
+                immediate:true,
+            }
+        },
+        computed:{
+            multiArray(){
+                return this.pickedArr.map(arr=>arr.map(item=>item.name))
+            },
+            pickedArr(){
+                // 进行初始化
+                if(this.isInitMultiArray){
+                    return [
+                        CHINA_REGIONS,
+                        CHINA_REGIONS[0].childs,
+                        CHINA_REGIONS[0].childs[0].childs
+                    ]
+                }
+                return [CHINA_REGIONS,this.cityArr,this.districtArr];
+            }
+        },
+		methods: {
+            handleColumnChange(e){
+                // console.log(e);
+                this.isInitMultiArray = false;
+                const that = this;
+                let col = e.detail.column;
+                let row = e.detail.value;
+                that.multiIndex[col] = row;
+                try{
+                    switch(col){
+                        case 0:
+                            if(CHINA_REGIONS[that.multiIndex[0]].childs.length==0){
+                                that.cityArr = that.districtArr = [CHINA_REGIONS[that.multiIndex[0]]]
+                                break;
+                            }
+                            that.cityArr = CHINA_REGIONS[that.multiIndex[0]].childs
+                            that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
+                            break;
+                        case 1:
+                            that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
+                            break;
+                        case 2:
+                            break;
+                    }
+                }catch(e){
+                    // console.log(e);
+                    that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[0].childs
+                }
+                
+            },
+            handleValueChange(e){
+                // 结构赋值
+                let [index0,index1,index2] = e.detail.value;
+                let [arr0,arr1,arr2] = this.pickedArr;
+                let address = [arr0[index0],arr1[index1],arr2[index2]];
+                // console.log(address);
+                this.$emit('getRegion',address)
+            },
+            handleDefaultRegion(region){
+                const isCode = !Array.isArray(region)
+                this.isInitMultiArray = false;
+                let children = CHINA_REGIONS
+                for(let i=0;i<3;i++){
+                    for(let j=0;j<children.length;j++){
+                       let condition = isCode?children[j].code==region.slice(0,(i+1)*2):children[j].name.includes(region[i]);
+                       if(condition){
+                           // 匹配成功进行赋值
+                           // console.log(i,j,children.length-1);
+                           children = children[j].childs;
+                           if(i==0){
+                               this.cityArr = children
+                           }else if(i==1){
+                               this.districtArr = children
+                           }
+                           this.$set(this.multiIndex,i,j)
+                           // console.log(this.multiIndex);
+                           break;
+                       }else{
+                           // 首次匹配失败就用默认的初始化
+                           // console.log(i,j,children.length-1);
+                           if(i==0 && j==(children.length-1)){
+                               this.isInitMultiArray = true;
+                           }
+                       }
+                    }
+                }
+            }
+		},
+	}
+</script>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
components/pick-regions/regions.json


+ 180 - 0
components/tab-swiper-warp/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <div class="tabSwiperWarpAll">
+    <div class="tabwarp" ref="tabwarp">
+      <slot name="tab"></slot>
+    </div>
+    <div
+      class="tabSwiperWarp"
+      ref="swiper"
+      @touchstart="touchstart"
+      @touchmove="touchmove"
+      @touchend="touchend"
+    >
+      <div class="transwarp" :style="{left:loop?-pageWidth+'px':0}" ref="transwarp">
+        <slot name="content"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  name: "tabSwiperWarp",
+  props: {
+    loop: {
+      type: Boolean,
+      default() {
+        return false;
+      }
+    }
+  },
+  data() {
+    return {
+      originalPos: 0,
+      pageWidth: 100,
+      currentIndex :0,
+    };
+  },
+  created() {},
+  mounted() {
+    this.pageWidth = this.$refs.swiper.offsetWidth;
+    this.transwarpDom = this.$refs.transwarp;
+    if (this.loop) {
+      let firstNode = this.transwarpDom.firstChild.cloneNode(true);
+      let lastNode = this.transwarpDom.lastChild.cloneNode(true);
+      this.transwarpDom.appendChild(firstNode);
+      this.transwarpDom.insertBefore(lastNode, this.transwarpDom.childNodes[0]);
+    }
+    this.domlen = this.transwarpDom.querySelectorAll(".swiperItem").length;
+    this.activeTab();
+    this.addActiveTab(0)
+  },
+  methods: {
+    activeTab() {
+      this.$refs.tabwarp
+        .querySelectorAll(".swiperTab")
+        .forEach((item, index) => {
+          item.indexs = index;
+        });
+      this.$refs.tabwarp.querySelectorAll(".swiperTab").forEach((target,index)=>{
+        target.addEventListener(
+        "click",
+        e => {
+           let distance = 0;
+            this.addActiveTab(target.indexs)
+            if (this.loop) {
+              distance = target.indexs * this.pageWidth;
+            } else {
+              distance = (target.indexs - 1) * this.pageWidth;
+            }
+            this.transwarpDom.style.transform = `translate3d(${-distance}px,0px,0px)`;
+            this.transwarpDom.style.transition = "transform .3s";
+        },
+        false
+      );
+      })
+    },
+    touchstart(e) {
+      this.originalPos = e.touches[0].pageX;
+      const transform = this.transwarpDom.style.transform;
+      this.originalLeft = Number(
+        transform ? transform.split("(")[1].split("px")[0] : 0
+      );
+    },
+    touchmove(e) {
+      let moveDistance = e.touches[0].pageX - this.originalPos; // >0 右滑,<0 左滑
+      this.slideTo(moveDistance, false);
+    },
+    touchend(e) {
+      let moveDistance = e.changedTouches[0].pageX - this.originalPos; // >0 右滑,<0 左滑
+      const transform = this.transwarpDom.style.transform;
+      let currentLeft = Number(
+        transform ? transform.split("(")[1].split("px")[0] : 0
+      );
+      if (
+        Math.abs(moveDistance) > this.pageWidth / 3 &&
+        (this.loop ||
+          (moveDistance > 0 && currentLeft < 0) ||
+          (moveDistance < 0 &&
+            Math.abs(currentLeft) <
+              (this.transwarpDom.querySelectorAll(".tabItem").length - 1) *
+                this.pageWidth))
+      ) {
+        // 滑动距离大于阙值,且内容在边界内时,滑动一整页
+        let distance = moveDistance > 0 ? this.pageWidth : -this.pageWidth;
+        this.slideTo(distance, true);
+      } else {
+        this.slideTo(0, true); //回到远处
+      }
+    },
+    /**
+     * 滑动方法
+     * @param {Number} distance 滑动距离
+     * @param {Boolean} delay 轮播切换
+     */
+    slideTo(distance, delay = false) {
+      let alldistance = this.originalLeft + distance;
+      this.transwarpDom.style.transform = `translate3d(${alldistance}px,0px,0px)`;
+      this.transwarpDom.style.transition = delay ? "transform .3s" : "initial";
+      if (this.loop && delay) {
+      
+        if (Math.abs(alldistance) > (this.domlen - 3) * this.pageWidth) {
+          setTimeout(() => {
+            this.slideTo((this.domlen - 3) * this.pageWidth);
+             this.currentIndex = 0
+            this.addActiveTab(this.currentIndex)
+          }, 300);
+        } else if (alldistance > 0) {
+          setTimeout(() => {
+            this.slideTo(-(this.domlen - 3) * this.pageWidth);
+             this.currentIndex = this.domlen - 3
+             this.addActiveTab(this.currentIndex)
+          }, 300);
+        }else{
+          this.currentIndex = alldistance > 0 ?   (this.domlen - 3):-alldistance/this.pageWidth
+           this.addActiveTab(this.currentIndex)
+        }
+      }else if(delay){
+        this.currentIndex = -alldistance/this.pageWidth
+        this.addActiveTab(this.currentIndex)
+      }
+    },
+    addActiveTab(tabindex){
+      if(this.$refs.tabwarp.querySelectorAll(".swiperTab").length>0){
+        this.$refs.tabwarp.querySelectorAll(".swiperTab").forEach((item,index)=>{
+          item.classList.remove('active')
+        })
+        this.$refs.tabwarp.querySelectorAll(".swiperTab")[tabindex].classList.add('active')
+      }
+    }
+  }
+};
+</script>
+
+<style scoped>
+.tabSwiperWarp {
+  width: 100%;
+  overflow: hidden;
+}
+.transwarp {
+  font-size: 0;
+  transform: translate3d(0px, 0, 0);
+  white-space: nowrap;
+  display: inline-block;
+  /* padding: 40px 0px; */
+  box-sizing: border-box;
+  width: 100%;
+  position: relative;
+}
+.swiperTab {
+  /* position: relative; */
+  display: inline-block;
+  text-align: center;
+  font-size: 14px;
+  padding: 0 10px;
+}
+.tabwarp {
+  display: inline-block;
+  text-align: left;
+}
+</style>
+

+ 20 - 0
components/tab-swiper-warp/swiper-item/index.vue

@@ -0,0 +1,20 @@
+<template >
+  <div class="swiperItem" >
+    <slot></slot>
+  </div>
+</template>
+<script>
+export default {
+  name:'swiperItem'
+}
+</script>
+
+<style scoped>
+.swiperItem{
+  display: inline-block;
+  text-align: center;
+  font-size: 14px;
+  width: 100%;
+}
+</style>
+

+ 19 - 0
components/tab-swiper-warp/swiper-tab/index.vue

@@ -0,0 +1,19 @@
+<template >
+  <div class="swiperTab" >
+    <slot></slot>
+  </div>
+</template>
+<script>
+export default {
+  name:'swiperTab'
+}
+</script>
+
+<style scoped>
+.swiperTab{
+  display: inline-block;
+  text-align: center;
+  font-size: 14px;
+}
+</style>
+

+ 151 - 0
components/tki-tree/style.css

@@ -0,0 +1,151 @@
+.tki-tree-mask {
+  position: fixed;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  z-index: 9998;
+  background-color: rgba(0, 0, 0, 0.6);
+  opacity: 0;
+  transition: all 0.3s ease;
+  visibility: hidden;
+}
+.tki-tree-mask.show {
+  visibility: visible;
+  opacity: 1;
+}
+.tki-tree-cnt {
+  position: fixed;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  z-index: 9999;
+  top: 160rpx;
+  transition: all 0.3s ease;
+  transform: translateY(100%);
+}
+.tki-tree-cnt.show {
+  transform: translateY(0);
+}
+.tki-tree-bar {
+  background-color: #fff;
+  height: 72rpx;
+  padding-left: 20rpx;
+  padding-right: 20rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: border-box;
+  border-bottom-width: 1rpx !important;
+  border-bottom-style: solid;
+  border-bottom-color: #f5f5f5;
+  font-size: 32rpx;
+  color: #757575;
+  line-height: 1;
+}
+.tki-tree-bar-confirm {
+  color: #07bb07;
+}
+.tki-tree-view {
+  position: absolute;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  top: 72rpx;
+  background-color: #fff;
+  padding-top: 20rpx;
+  padding-right: 20rpx;
+  padding-bottom: 20rpx;
+  padding-left: 20rpx;
+}
+.tki-tree-view-sc {
+  height: 100%;
+  overflow: hidden;
+}
+.tki-tree-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 26rpx;
+  color: #757575;
+  line-height: 1;
+  height: 0;
+  opacity: 0;
+  transition: 0.2s;
+  position: relative;
+  overflow: hidden;
+}
+.tki-tree-item.show {
+  height: 80rpx;
+  opacity: 1;
+}
+.tki-tree-item.showchild:before {
+  transform: rotate(90deg);
+}
+.tki-tree-item.last:before {
+  opacity: 0;
+}
+.tki-tree-icon {
+  width: 26rpx;
+  height: 26rpx;
+  margin-right: 8rpx;
+}
+.tki-tree-label {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  height: 100%;
+  line-height: 1.2;
+}
+.tki-tree-check {
+  width: 40px;
+  height: 40px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.tki-tree-check-yes,
+.tki-tree-check-no {
+  width: 20px;
+  height: 20px;
+  border-top-left-radius: 20%;
+  border-top-right-radius: 20%;
+  border-bottom-right-radius: 20%;
+  border-bottom-left-radius: 20%;
+  border-top-width: 1rpx;
+  border-left-width: 1rpx;
+  border-bottom-width: 1rpx;
+  border-right-width: 1rpx;
+  border-style: solid;
+  border-color: #07bb07;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+}
+.tki-tree-check-yes-b {
+  width: 12px;
+  height: 12px;
+  border-top-left-radius: 20%;
+  border-top-right-radius: 20%;
+  border-bottom-right-radius: 20%;
+  border-bottom-left-radius: 20%;
+  background-color: #07bb07;
+}
+.tki-tree-check .radio {
+  border-top-left-radius: 50%;
+  border-top-right-radius: 50%;
+  border-bottom-right-radius: 50%;
+  border-bottom-left-radius: 50%;
+}
+.tki-tree-check .radio .tki-tree-check-yes-b {
+  border-top-left-radius: 50%;
+  border-top-right-radius: 50%;
+  border-bottom-right-radius: 50%;
+  border-bottom-left-radius: 50%;
+}
+.hover-c {
+  opacity: 0.6;
+}

Разница между файлами не показана из-за своего большого размера
+ 103 - 0
components/tki-tree/tki-tree.vue


+ 435 - 0
components/uni-data-picker/uni-data-picker.vue

@@ -0,0 +1,435 @@
+<template>
+  <view class="uni-data-tree">
+    <view class="uni-data-tree-input" @click="handleInput">
+      <slot :options="options" :data="inputSelected" :error="errorMessage">
+        <view class="input-value" :class="{'input-value-border': border}">
+          <text v-if="errorMessage" class="selected-area error-text">{{errorMessage}}</text>
+          <view v-else-if="loading && !isOpened" class="selected-area">
+            <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
+          </view>
+          <scroll-view v-else-if="inputSelected.length" class="selected-area" scroll-x="true">
+            <view class="selected-list">
+              <view class="selected-item" v-for="(item,index) in inputSelected" :key="index">
+                <text>{{item.text}}</text><text v-if="index<inputSelected.length-1" class="input-split-line">{{split}}</text>
+              </view>
+            </view>
+          </scroll-view>
+          <text v-else class="selected-area placeholder">{{placeholder}}</text>
+          <view class="arrow-area" v-if="!readonly">
+            <view class="input-arrow"></view>
+          </view>
+        </view>
+      </slot>
+    </view>
+    <view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
+    <view class="uni-data-tree-dialog" v-if="isOpened">
+      <view class="dialog-caption">
+        <view class="title-area">
+          <text class="dialog-title">{{popupTitle}}</text>
+        </view>
+        <view class="dialog-close" @click="handleClose">
+          <view class="dialog-close-plus" data-id="close"></view>
+          <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
+        </view>
+      </view>
+      <data-picker-view class="picker-view" ref="pickerView" v-model="value" :localdata="localdata" :preload="preload"
+        :collection="collection" :field="field" :orderby="orderby" :where="where" :step-searh="stepSearh" :self-field="selfField"
+        :parent-field="parentField" :managed-mode="true" @change="onchange" @datachange="ondatachange"></data-picker-view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import dataPicker from "../uni-data-pickerview/uni-data-picker.js"
+  import DataPickerView from "../uni-data-pickerview/uni-data-pickerview.vue"
+
+  /**
+   * uni-data-picker
+   * @description uni-data-picker
+   * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-data-picker
+   * @property {String} popup-title 弹出窗口标题
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} border = [true|false] 是否有边框
+   * @property {Boolean} readonly = [true|false] 是否仅读
+   * @property {Boolean} preload = [true|false] 是否预加载数据
+   * @value true 开启预加载数据,点击弹出窗口后显示已加载数据
+   * @value false 关闭预加载数据,点击弹出窗口后开始加载数据
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   * @event {Function} onpopupshow 弹出的选择窗口打开时触发此事件
+   * @event {Function} onpopuphide 弹出的选择窗口关闭时触发此事件
+   */
+  export default {
+    name: 'UniDataPicker',
+    mixins: [dataPicker],
+    components: {
+      DataPickerView
+    },
+    props: {
+      options: {
+        type: [Object, Array],
+        default () {
+          return {}
+        }
+      },
+      popupTitle: {
+        type: String,
+        default: '请选择'
+      },
+      placeholder: {
+        type: String,
+        default: '请选择'
+      },
+      heightMobile: {
+        type: String,
+        default: ''
+      },
+      readonly: {
+        type: Boolean,
+        default: false
+      },
+      border: {
+        type: Boolean,
+        default: true
+      },
+      split: {
+        type: String,
+        default: '/'
+      }
+    },
+    data() {
+      return {
+        isOpened: false,
+        inputSelected: []
+      }
+    },
+    created() {
+      this.form = this.getForm('uniForms')
+      this.formItem = this.getForm('uniFormsItem')
+      if (this.formItem) {
+        if (this.formItem.name) {
+          this.rename = this.formItem.name
+          this.form.inputChildrens.push(this)
+        }
+      }
+
+      this.$nextTick(() => {
+        this.load()
+      })
+    },
+    methods: {
+      onPropsChange() {
+        this._treeData = []
+        this.selectedIndex = 0
+        this.load()
+      },
+      load() {
+        if (this.readonly) {
+          this._processReadonly(this.localdata, this.value)
+          return
+        }
+
+        if (this.isLocaldata) {
+          this.loadData()
+          this.inputSelected = this.selected.slice(0)
+        } else if (this.value.length) {
+          this.getTreePath(() => {
+            this.inputSelected = this.selected.slice(0)
+          })
+        }
+      },
+      getForm(name = 'uniForms') {
+        let parent = this.$parent;
+        let parentName = parent.$options.name;
+        while (parentName !== name) {
+          parent = parent.$parent;
+          if (!parent) return false;
+          parentName = parent.$options.name;
+        }
+        return parent;
+      },
+      show() {
+        this.isOpened = true
+        this.$nextTick(() => {
+          this.$refs.pickerView.updateData({
+            treeData: this._treeData,
+            selected: this.selected,
+            selectedIndex: this.selectedIndex
+          })
+        })
+      },
+      hide() {
+        this.isOpened = false
+      },
+      handleInput() {
+        if (this.readonly) {
+          return
+        }
+        this.show()
+      },
+      handleClose(e) {
+        this.hide()
+      },
+      ondatachange(e) {
+        this._treeData = this.$refs.pickerView._treeData
+      },
+      onchange(e) {
+        this.hide()
+        this.inputSelected = e
+        this._dispatchEvent(e)
+      },
+      _processReadonly(dataList, valueArray) {
+        var isTree = dataList.findIndex((item) => {
+          return item.children
+        })
+        if (isTree > -1) {
+          if (Array.isArray(valueArray)) {
+            let inputValue = valueArray[valueArray.length - 1]
+            if (typeof inputValue === 'object' && inputValue.value) {
+              inputValue = inputValue.value
+            }
+          }
+          this.inputSelected = this._findNodePath(inputValue, this.localdata)
+          return
+        }
+
+        let result = []
+        for (let i = 0; i < valueArray.length; i++) {
+          var value = valueArray[i]
+          var item = dataList.find((v) => {
+            return v.value == value
+          })
+          if (item) {
+            result.push(item)
+          }
+        }
+        if (result.length) {
+          this.inputSelected = result
+        }
+      },
+      _filterForArray(data, valueArray) {
+        var result = []
+        for (let i = 0; i < valueArray.length; i++) {
+          var value = valueArray[i]
+          var found = data.find((item) => {
+            return item.value == value
+          })
+          if (found) {
+            result.push(found)
+          }
+        }
+        return result
+      },
+      _dispatchEvent(selected) {
+        var value = new Array(selected.length)
+        for (var i = 0; i < selected.length; i++) {
+          value[i] = selected[i].value
+        }
+
+        if (this.formItem) {
+          const item = selected[selected.length - 1]
+          this.formItem.setValue(item.value)
+        }
+
+        this.$emit('change', {
+          detail: {
+            value: selected
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .uni-data-tree {
+    position: relative;
+    font-size: 14px;
+  }
+
+  .error-text {
+    color: #DD524D;
+  }
+
+  .input-value {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    flex-wrap: nowrap;
+    font-size: 14px;
+    line-height: 38px;
+    padding: 0 5px;
+    overflow: hidden;
+    /* #ifdef APP-NVUE */
+    height: 40px;
+    /* #endif */
+  }
+
+  .input-value-border {
+    border: 1px solid #e5e5e5;
+    border-radius: 5px;
+  }
+
+  .selected-area {
+    flex: 1;
+    overflow: hidden;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+  }
+
+  .load-more {
+    margin-right: auto;
+    /* #ifdef APP-NVUE */
+    width: 40px;
+    /* #endif */
+  }
+
+  .selected-list {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    padding: 0 5px;
+  }
+
+  .selected-item {
+    flex-direction: row;
+    padding: 0 1px;
+    white-space: nowrap;
+  }
+
+  .placeholder {
+    color: grey;
+  }
+
+  .input-split-line {
+    opacity: .5;
+  }
+
+  .arrow-area {
+    position: relative;
+    margin-left: auto;
+    width: 20px;
+    display: flex;
+    justify-content: center;
+    transform: rotate(-45deg);
+    transform-origin: center;
+  }
+
+  .input-arrow {
+    width: 7px;
+    height: 7px;
+    border-left: 1px solid #999;
+    border-bottom: 1px solid #999;
+  }
+
+  .uni-data-tree-cover {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(0, 0, 0, .4);
+    display: flex;
+    flex-direction: column;
+    z-index: 100;
+  }
+
+  .uni-data-tree-dialog {
+    position: fixed;
+    left: 0;
+    top: 20%;
+    right: 0;
+    bottom: 0;
+    background-color: #FFFFFF;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+    display: flex;
+    flex-direction: column;
+    z-index: 102;
+    overflow: hidden;
+    /* #ifdef APP-NVUE */
+    width: 750rpx;
+    /* #endif */
+  }
+
+  .dialog-caption {
+    position: relative;
+    display: flex;
+    flex-direction: row;
+    border-bottom: 1px solid #f0f0f0;
+  }
+
+  .title-area {
+    display: flex;
+    align-items: center;
+    margin: auto;
+    padding: 0 10px;
+  }
+
+  .dialog-title {
+    font-weight: bold;
+    line-height: 44px;
+  }
+
+  .dialog-close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 0 15px;
+  }
+
+  .dialog-close-plus {
+    width: 16px;
+    height: 2px;
+    background-color: #666;
+    border-radius: 2px;
+    transform: rotate(45deg);
+  }
+
+  .dialog-close-rotate {
+    position: absolute;
+    transform: rotate(-45deg);
+  }
+
+  .picker-view {
+    flex: 1;
+    overflow: hidden;
+  }
+
+  /* #ifdef H5 */
+  @media all and (min-width: 768px) {
+    .uni-data-tree-cover {
+      background-color: transparent;
+    }
+
+    .uni-data-tree-dialog {
+      position: absolute;
+      top: 100%;
+      height: auto;
+      min-height: 400px;
+      max-height: 50vh;
+      background-color: #fff;
+      border-radius: 5px;
+      box-shadow: 0 0 20px 5px rgba(0, 0, 0, .3);
+    }
+
+    .dialog-caption {
+      display: none;
+    }
+  }
+
+  /* #endif */
+</style>

+ 468 - 0
components/uni-data-pickerview/uni-data-picker.js

@@ -0,0 +1,468 @@
+export default {
+  props: {
+    localdata: {
+      type: [Array, Object],
+      default () {
+        return []
+      }
+    },
+    collection: {
+      type: String,
+      default: ''
+    },
+    action: {
+      type: String,
+      default: ''
+    },
+    field: {
+      type: String,
+      default: ''
+    },
+    orderby: {
+      type: String,
+      default: ''
+    },
+    where: {
+      type: [String, Object],
+      default: ''
+    },
+    pageData: {
+      type: String,
+      default: 'add'
+    },
+    pageCurrent: {
+      type: Number,
+      default: 1
+    },
+    pageSize: {
+      type: Number,
+      default: 20
+    },
+    getcount: {
+      type: [Boolean, String],
+      default: false
+    },
+    getone: {
+      type: [Boolean, String],
+      default: false
+    },
+    gettree: {
+      type: [Boolean, String],
+      default: false
+    },
+    manual: {
+      type: Boolean,
+      default: false
+    },
+    value: {
+      type: [Array, String, Number],
+      default () {
+        return []
+      }
+    },
+    preload: {
+      type: Boolean,
+      default: false
+    },
+    stepSearh: {
+      type: Boolean,
+      default: true
+    },
+    selfField: {
+      type: String,
+      default: ''
+    },
+    parentField: {
+      type: String,
+      default: ''
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      errorMessage: '',
+      loadMore: {
+        contentdown: '',
+        contentrefresh: '',
+        contentnomore: ''
+      },
+      dataList: [],
+      selected: [],
+      selectedIndex: 0,
+      page: {
+        current: this.pageCurrent,
+        size: this.pageSize,
+        count: 0
+      }
+    }
+  },
+  computed: {
+    isLocaldata() {
+      return this.localdata.length > 0
+    },
+    postField() {
+      return `${this.field}, ${this.parentField} as parent_value`
+    },
+    postWhere() {
+      let result = []
+      let selected = this.selected
+      result.push(`${this.parentField} == null`)
+      if (selected.length) {
+        for (var i = 0; i < selected.length - 1; i++) {
+          result.push(`${this.parentField} == '${selected[i].value}'`)
+        }
+      }
+
+      if (this.where) {
+        return `(${this.where}) && (${result.join(' || ')})`
+      }
+
+      return result.join(' || ')
+    },
+    nodeWhere() {
+      let result = []
+      let selected = this.selected
+      if (selected.length) {
+        result.push(`${this.parentField} == '${selected[selected.length - 1].value}'`)
+      }
+
+      if (this.where) {
+        return `(${this.where}) && (${result.join(' || ')})`
+      }
+
+      return result.join(' || ')
+    }
+  },
+  created() {
+    this.$watch(() => {
+      var al = [];
+      ['pageCurrent',
+        'pageSize',
+        'value',
+        'localdata',
+        'collection',
+        'action',
+        'field',
+        'orderby',
+        'where',
+        'getont',
+        'getcount',
+        'gettree'
+      ].forEach(key => {
+        al.push(this[key])
+      });
+      return al
+    }, (newValue, oldValue) => {
+      let needReset = false
+      for (let i = 2; i < newValue.length; i++) {
+        if (newValue[i] != oldValue[i]) {
+          needReset = true
+          break
+        }
+      }
+      if (newValue[0] != oldValue[0]) {
+        this.page.current = this.pageCurrent
+      }
+      this.page.size = this.pageSize
+
+      this.onPropsChange()
+    })
+    this._treeData = []
+  },
+  methods: {
+    onPropsChange() {
+      this._treeData = []
+    },
+    getCommand(options = {}) {
+      /* eslint-disable no-undef */
+      let db = uniCloud.database()
+
+      const action = options.action || this.action
+      if (action) {
+        db = db.action(action)
+      }
+
+      const collection = options.collection || this.collection
+      db = db.collection(collection)
+
+      const where = options.where || this.where
+      if (!(!where || !Object.keys(where).length)) {
+        db = db.where(where)
+      }
+
+      const field = options.field || this.field
+      if (field) {
+        db = db.field(field)
+      }
+
+      const orderby = options.orderby || this.orderby
+      if (orderby) {
+        db = db.orderBy(orderby)
+      }
+
+      const current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current
+      const size = options.pageSize !== undefined ? options.pageSize : this.page.size
+      const getCount = options.getcount !== undefined ? options.getcount : this.getcount
+      const getTree = options.gettree !== undefined ? options.gettree : this.gettree
+
+      const getOptions = {
+        getCount,
+        getTree
+      }
+      if (options.getTreePath) {
+        getOptions.getTreePath = options.getTreePath
+      }
+
+      db = db.skip(size * (current - 1)).limit(size).get(getOptions)
+
+      return db
+    },
+    getTreePath(callback) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+
+      this.getCommand({
+        field: this.postField,
+        getTreePath: {
+          startWith: `${this.selfField}=='${this.value}'`
+        }
+      }).then((res) => {
+        this.loading = false
+        let treePath = []
+        this._extractTreePath(res.result.data, treePath)
+        this.selected = treePath
+        callback && callback()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    loadData() {
+      if (this.isLocaldata) {
+        this._processLocalData()
+        return
+      }
+
+      if (this.value.length) {
+        this._loadNodeData((data) => {
+          this._treeData = data
+          this._updateBindData()
+          this._updateSelected()
+        })
+        return
+      }
+
+      if (this.stepSearh) {
+        this._loadNodeData((data) => {
+          this._treeData = data
+          this._updateBindData()
+        })
+      } else {
+        this._loadAllData((data) => {
+          this._treeData = []
+          this._extractTree(data, this._treeData, null)
+          this._updateBindData()
+        })
+      }
+    },
+    _loadAllData(callback) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+
+      this.getCommand({
+        field: this.postField,
+        gettree: true,
+        startwith: `${this.selfField}=='${this.value}'`
+      }).then((res) => {
+        this.loading = false
+        callback(res.result.data)
+        this.onDataChange()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    _loadNodeData(callback, pw) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+
+      this.getCommand({
+        field: this.postField,
+        where: pw || this.postWhere,
+        pageSize: 500
+      }).then((res) => {
+        this.loading = false
+        callback(res.result.data)
+        this.onDataChange()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    _updateSelected() {
+      var dl = this.dataList
+      var sl = this.selected
+      for (var i = 0; i < sl.length; i++) {
+        var value = sl[i].value
+        var dl2 = dl[i]
+        for (var j = 0; j < dl2.length; j++) {
+          var item2 = dl2[j]
+          if (item2.value === value) {
+            sl[i].text = item2.text
+            break
+          }
+        }
+      }
+    },
+    _updateBindData(node) {
+      const {
+        dataList,
+        hasNodes
+      } = this._filterData(this._treeData, this.selected)
+
+      let isleaf = this._stepSearh === false && !hasNodes
+
+      if (node) {
+        node.isleaf = isleaf
+      }
+
+      this.dataList = dataList
+      this.selectedIndex = dataList.length - 1
+
+      if (!isleaf && this.selected.length < dataList.length) {
+        this.selected.push({
+          value: null,
+          text: "请选择"
+        })
+      }
+
+      return {
+        isleaf,
+        hasNodes
+      }
+    },
+    _filterData(data, paths) {
+      let dataList = []
+
+      let hasNodes = true
+
+      dataList.push(data.filter((item) => {
+        return item.parent_value === undefined
+      }))
+      for (let i = 0; i < paths.length; i++) {
+        var value = paths[i].value
+        var nodes = data.filter((item) => {
+          return item.parent_value === value
+        })
+
+        if (nodes.length) {
+          dataList.push(nodes)
+        } else {
+          hasNodes = false
+        }
+      }
+
+      return {
+        dataList,
+        hasNodes
+      }
+    },
+    _extractTree(nodes, result, parent_value) {
+      let list = result || []
+      for (let i = 0; i < nodes.length; i++) {
+        let node = nodes[i]
+
+        let child = {}
+        for (let key in node) {
+          if (key !== 'children') {
+            child[key] = node[key]
+          }
+        }
+        if (parent_value !== null) {
+          child.parent_value = parent_value
+        }
+        result.push(child)
+
+        let children = node.children
+        if (children) {
+          this._extractTree(children, result, node.value)
+        }
+      }
+    },
+    _extractTreePath(nodes, result) {
+      let list = result || []
+      for (let i = 0; i < nodes.length; i++) {
+        let node = nodes[i]
+
+        let child = {}
+        for (let key in node) {
+          if (key !== 'children') {
+            child[key] = node[key]
+          }
+        }
+        result.push(child)
+
+        let children = node.children
+        if (children) {
+          this._extractTreePath(children, result)
+        }
+      }
+    },
+    _findNodePath(key, nodes, path = []) {
+      for (let i = 0; i < nodes.length; i++) {
+        let {
+          value,
+          text,
+          children
+        } = nodes[i]
+
+        path.push({
+          value,
+          text
+        })
+
+        if (value === key) {
+          return path
+        }
+
+        if (children) {
+          const p = this._findNodePath(key, children, path)
+          if (p.length) {
+            return p
+          }
+        }
+
+        path.pop()
+      }
+      return []
+    },
+    _processLocalData() {
+      this._treeData = []
+      this._extractTree(this.localdata, this._treeData)
+
+      var inputValue = this.value
+      if (inputValue === undefined) {
+        return
+      }
+
+      if (Array.isArray(inputValue)) {
+        inputValue = inputValue[inputValue.length - 1]
+        if (typeof inputValue === 'object' && inputValue.value) {
+          inputValue = inputValue.value
+        }
+      }
+      
+      this.selected = this._findNodePath(inputValue, this.localdata)
+    }
+  }
+}

+ 271 - 0
components/uni-data-pickerview/uni-data-pickerview.vue

@@ -0,0 +1,271 @@
+<template>
+  <view class="uni-data-pickerview">
+    <scroll-view class="selected-area" scroll-x="true" scroll-y="false" :show-scrollbar="false">
+      <view class="selected-list">
+        <view class="selected-item" :class="{'selected-item-active':index==selectedIndex}" v-for="(item,index) in selected"
+          :key="index" v-if="item.text" @click="handleSelect(index)">
+          <text class="">{{item.text}}</text>
+        </view>
+      </view>
+    </scroll-view>
+    <view class="tab-c">
+      <scroll-view class="list" v-for="(child, i) in dataList" :key="i" v-if="i==selectedIndex" :scroll-y="true">
+        <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in child" :key="j" @click="handleNodeClick(item, i, j)">
+          <text class="item-text">{{item.text}}</text>
+          <view class="check" v-if="selected.length > i && item.value == selected[i].value"></view>
+        </view>
+      </scroll-view>
+      <view class="loading-cover" v-if="loading">
+        <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
+      </view>
+      <view class="error-message" v-if="errorMessage">
+        <text class="error-text">{{errorMessage}}</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import dataPicker from "./uni-data-picker.js"
+
+  /**
+   * uni-data-pickerview
+   * @description uni-data-pickerview
+   * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-data-picker
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   */
+  export default {
+    name: 'UniDataPickerView',
+    mixins: [dataPicker],
+    props: {
+      managedMode: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data() {
+      return {}
+    },
+    created() {
+      if (this.managedMode) {
+        return
+      }
+
+      this.$nextTick(() => {
+        this.load()
+      })
+    },
+    methods: {
+      onPropsChange() {
+        this._treeData = []
+        this.selectedIndex = 0
+        this.load()
+      },
+      load() {
+        if (this.isLocaldata) {
+          this.loadData()
+        } else if (this.value.length) {
+          this.getTreePath((res) => {
+            this.loadData()
+          })
+        }
+      },
+      handleSelect(index) {
+        this.selectedIndex = index
+      },
+      handleNodeClick(item, i, j) {
+        if (item.disable) {
+          return
+        }
+
+        const node = this.dataList[i][j]
+        const {
+          value,
+          text
+        } = node
+
+        if (i < this.selected.length - 1) {
+          this.selected.splice(i, this.selected.length - i)
+          this.selected.push(node)
+        } else if (i === this.selected.length - 1) {
+          this.selected[i] = node
+        }
+
+        if (node.isleaf) {
+          this.onSelectedChange(node, node.isleaf)
+          return
+        }
+
+        const {
+          isleaf,
+          hasNodes
+        } = this._updateBindData()
+
+        if (this.isLocaldata && (!hasNodes || isleaf)) {
+          this.onSelectedChange(node, true)
+          return
+        }
+
+        if (!isleaf && !hasNodes) {
+          this._loadNodeData((data) => {
+            if (!data.length) {
+              node.isleaf = true
+            } else {
+              this._treeData.push(...data)
+              this._updateBindData(node)
+            }
+            this.onSelectedChange(node, node.isleaf)
+          }, this.nodeWhere)
+          return
+        }
+
+        this.onSelectedChange(node, false)
+      },
+      updateData(data) {
+        this._treeData = data.treeData
+        this.selected = data.selected
+        if (!this._treeData.length) {
+          this.loadData()
+        } else {
+          //this.selected = data.selected
+          this._updateBindData()
+        }
+      },
+      onDataChange() {
+        this.$emit('datachange')
+      },
+      onSelectedChange(node, isleaf) {
+        if (isleaf) {
+          this._dispatchEvent()
+        } else if (node) {
+          this.$emit('nodeclick', node)
+        }
+      },
+      _dispatchEvent() {
+        this.$emit('change', this.selected.slice(0))
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .uni-data-pickerview {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    height: 100%;
+  }
+
+  .error-text {
+    color: #DD524D;
+  }
+
+  .loading-cover {
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(255, 255, 255, .5);
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    z-index: 1001;
+  }
+
+  .load-more {
+    margin: auto;
+  }
+
+  .error-message {
+    background-color: #fff;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    padding: 15px;
+    opacity: .9;
+    z-index: 102;
+  }
+
+  /* #ifdef APP-NVUE */
+  .selected-area {
+    width: 750rpx;
+  }
+
+  /* #endif */
+
+  .selected-list {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    padding: 0 5px;
+    border-bottom: 1px solid #f8f8f8;
+  }
+
+  .selected-item {
+    margin-left: 10px;
+    margin-right: 10px;
+    padding: 12px 0;
+    white-space: nowrap;
+  }
+
+  .selected-item-active {
+    border-bottom: 2px solid #007aff;
+  }
+
+  .selected-item-text {
+    color: #007aff;
+  }
+
+  .tab-c {
+    position: relative;
+    flex: 1;
+    display: flex;
+    flex-direction: row;
+    overflow: hidden;
+  }
+
+  .list {
+    flex: 1;
+  }
+
+  .item {
+    padding: 12px 15px;
+    border-bottom: 1px solid #f0f0f0;
+    display: flex;
+    flex-direction: row;
+  }
+  
+  .is-disabled {
+    opacity: .5;
+  }
+
+  .item-text {
+    flex: 1;
+    color: #333333;
+  }
+
+  .check {
+    margin-right: 5px;
+    border: 2px solid #007aff;
+    border-left: 0;
+    border-top: 0;
+    height: 12px;
+    width: 6px;
+    transform-origin: center;
+    transition: all 0.3s;
+    transform: rotate(45deg);
+  }
+</style>

+ 10 - 0
components/uni-load-more/config.json

@@ -0,0 +1,10 @@
+{
+	"id": "29",
+	"name": "LoadMore",
+	"desc": "加载更多",
+	"url": "load-more",
+	"type": "功能组件",
+	"edition": "1.1.5",
+	"path": "https://ext.dcloud.net.cn/plugin?id=29",
+	"update_log": "- 新增 颜色大小等配置项"
+}

Разница между файлами не показана из-за своего большого размера
+ 21 - 0
components/uni-load-more/uni-load-more.vue


+ 200 - 0
hello H5+/about.html

@@ -0,0 +1,200 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8" />
+		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+		<meta name="HandheldFriendly" content="true"/>
+		<meta name="MobileOptimized" content="320"/>
+		<title>HTML5+ Runtime</title>
+		<script type="text/javascript" src="js/common.js"></script>
+		<script type="text/javascript" charset="utf-8">
+// H5 plus事件处理
+function plusReady(){
+	var ev=document.getElementById('version');
+	ev&&(ev.innerText=plus.runtime.version);
+	plus.webview.currentWebview().show('zoom-fade-out');
+	// 更新分享按钮
+	plus.share.getServices(function(s){
+		for(var i in s){
+			shares[s[i].id]=s[i];
+		}
+	},function(e){
+		console.log('updateShare failed: '+JSON.stringify(e));
+	});
+	// 在流应用环境下显示“创建桌面图标”
+	if(navigator.userAgent.indexOf('StreamApp')>=0){
+		shortcut.style.display='block';
+	}
+	// 设置窗口优化隐藏
+	dragHide();
+	// 初始化分享按钮
+	shareBts.push({title:'微信朋友圈',id:'weixin',x:'WXSceneTimeline'});
+	shareBts.push({title:'微信好友',id:'weixin',x:'WXSceneSession'});
+	shareBts.push({title:'新浪微博',id:'sinaweibo'});
+	shareBts.push({title:'QQ',id:'qq'});
+	shareBts.push({title:'更多'});
+}
+document.addEventListener("plusready",plusReady,false);
+
+// 判断是否为流应用环境
+var bStream = navigator.userAgent.indexOf('StreamApp')>=0;
+
+// 分享应用
+var shares={},shareBts=[];
+function share(){
+	(shareBts.length>1)||('Android'!==plus.os.name&&shareBts.length>0)?plus.nativeUI.actionSheet({title:'分享"HelloH5"应用',cancel:'取消',buttons:shareBts},function(e){
+		(e.index>0)&&shareAction(shareBts[e.index-1]);
+	}):(shareBts.length>0?shareWithSystem():plus.nativeUI.alert('当前环境无法支持分享操作!'));
+}
+function shareAction(sb){
+	var msg = {};
+	switch(sb.id){
+		case 'weixin':
+			msg.type = 'web';
+			msg.title='"HelloH5" - 使用HTML5+技术开发原生APP';
+			msg.content='如果你有流应用引擎还能省流量秒装,快来体验吧';
+			sb.x&&(msg.extra={scene:sb.x});
+		break;
+		case 'sinaweibo':
+			msg.type = 'web';
+			msg.content='"HelloH5" - 使用HTML5+技术开发原生APP,如果你有流应用引擎还能省流量秒装,快来体验吧';
+		break;
+		case 'qq':
+			msg.type = 'txt';
+			msg.title='"HelloH5" - 使用HTML5+技术开发原生APP,如果你有流应用引擎还能省流量秒装,快来体验吧';
+		break;
+		default:
+		shareWithSystem();
+		return;
+		break;
+	}
+	if(!shares[sb.id]){
+		plus.nativeUI.alert('当前环境不支持此分享!');
+		return;
+	}
+	var s = shares[sb.id];
+	msg.href=bStream?'http://m3w.cn/s/HelloH5?url=about&__streamapp':'http://www.dcloud.io/helloh5/';
+	msg.thumbs=msg.pictures=['_www/icon.png'];
+	s.authenticated?shareMessage(s,msg):s.authorize(function(){
+		shareMessage(s,msg);
+	},function(e){
+		plus.nativeUI.toast('取消分享!');
+	});
+}
+function shareMessage(s,m){
+	s.send(m, function(){
+		plus.nativeUI.toast('完成分享!');
+	},function(e){
+		plus.nativeUI.toast('取消分享!');
+	});
+}
+function shareWithSystem(){
+	plus.share.sendWithSystem?plus.share.sendWithSystem({
+		content:'"HelloH5"使用HTML5+技术开发,如果你有流应用引擎还能省流量秒装,快来体验吧('+(bStream?'http://m3w.cn/s/HelloH5?__streamapp':'http://www.dcloud.io/streamapp/')+')',
+		title:'HelloH5',
+		href:bStream?'http://m3w.cn/s/HelloH5?__streamapp':'http://www.dcloud.io/streamapp/',
+		pictures:('Android'==plus.os.name)?null:['_www/icon.png']
+	}):shareWithSystemNativeJS();
+}
+function shareWithSystemNativeJS(){
+	var main = plus.android.runtimeMainActivity(),
+	Intent = plus.android.importClass('android.content.Intent'),
+	File = plus.android.importClass('java.io.File'),
+	Uri = plus.android.importClass('android.net.Uri');
+	var intent=new Intent(Intent.ACTION_SEND),
+	p=plus.io.convertLocalFileSystemURL('_www/icon.png'),
+	f=new File(p),
+	uri=Uri.fromFile(f);
+	if(f.exists()&&f.isFile()){
+		intent.setType('image/*');
+		intent.putExtra(Intent.EXTRA_STREAM,uri);
+	}else{
+		intent.setType('text/plain');
+	}
+	intent.putExtra(Intent.EXTRA_SUBJECT,'HelloH5');
+	intent.putExtra(Intent.EXTRA_TEXT,'"HelloH5"使用HTML5+技术开发,如果你有流应用引擎还能省流量秒装,快来体验吧('+(bStream?'http://m3w.cn/s/HelloH5?__streamapp':'http://www.dcloud.io/streamapp/')+')');
+	intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+	main.startActivity(Intent.createChooser(intent,'分享"HelloH5"应用'));
+}
+function createShortcut(){
+	plus.navigator.createShortcut({name:'HelloH5',icon:'icon.png'});
+}
+function dragHide(){
+	var ws = plus.webview.currentWebview();
+	// 窗口隐藏时调整到正确位置(drag操作会修改窗口位置),否则可能导致无法调用show方法显示
+	ws.addEventListener('hide',function(){
+		ws.setStyle({left:'0px'});
+	},false);
+	// 设置拖动关闭当前窗口
+	ws.drag({direction:'right',moveMode:'followFinger'}, {view:plus.runtime.appid,moveMode:'silent'}, function(e){
+		if(e.type=='end'&&e.result){
+			ws.close();
+		}
+		console.log('Drag Event: '+JSON.stringify(e));
+	});
+}
+		</script>
+		<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8"/>
+		<style type="text/css">
+li {
+	padding: 2em;
+	border-bottom: 1px solid #eaeaea;
+	background: #fafafa;
+	font-size: 12px;
+}
+li:active {
+	background: #f4f4f4;
+}
+footer {
+	width: 100%;
+	text-align: center;
+	color: #c6c6c6;
+	font-size: 12px;
+}
+		</style>
+	</head>
+	<body>
+		<div class="logo">
+			<br/>
+			<img style="width:64px" src="icon.png"/><br/>
+			<span style="font-size: 20px;">HTML5+ Runtime</span><br/>
+			(v<span id="version">-.-.-</span>)<br/>
+			<!--<img style="width:100%" src="img/qr.png"/>-->
+			<div id="shortcut" style="display:none;" class="button" onclick="createShortcut()">创建桌面图标</div>
+			<br/><br/>
+		</div>
+		<p class="des" style="font-size:16px;line-height:30px;margin: 0px .5em;">HTML5中国产业联盟,简称“HTML5+ 联盟”,是为了更好的推进HTML5的商用、更好的为HTML5开发者服务而由产业链主流厂商共同组成的一个联盟。<br/>
+   HTML5+规范的愿景:根据开发者需求,为其提供增强的功能、性能扩展规范。方便开发者开发跨平台的app,并接近原生的功能和性能。
+		</p>
+		<br/>
+		<ul style="list-style:none;margin:0;padding:0;text-align:left;">
+			<li onclick="plus.runtime.openURL('http://weibo.com/html5plus');">
+				<img style="width:40px;height:40px;vertical-align:middle;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xMy8xMySCRBYAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAAC/UlEQVRYhe2Y23HaQBSGP2fyDh1YqcDMnAKMK4g6iFwBpIKQCkIqMK4gdGBRwBmLDkQFgQqchz0aVmJXF5zBfvA/wxjt9dPZs/8uvnp5eeE969NbA3TpA/C1+gB8rT5fYhJVTYACGFnRFsiBpYiUbX0vFcExRziAG2AGFKq6aOt4dSkfVNUMSIAJMKUOvAFSEdk3+10MsClVnQMLvGUXkUmz3aUjCLCuIqWqE2CFW3KAnyKy+C+AqjoGUtxyJbhNEEx6A3n2in6LyNyryzlG8os/xlmbxBK7BB6Ab8AtLunzSJc9cPCeZ6paAIhIgVvqSpnfcRCgqk5UtQR+UE/yStcWkZosIgnw3QO9UdWl1S+98vQsQMuhZ+C6o+k4VCgiewOZejAz80iAdQXu9+tl1Pamsz5tcd6WcMzPCrgEFiJS2A5+sPIUWFr9iToBB8KBy8ObQPktkBr82qD8NAkCti6xLesQOCJwlUbAxGwmxeXkCkBEVsA9cOd3iNqMqk6Bp4FwfXQnInnfxkFA87iC7g2xsb85bpdWn1i/g4gEN1FMsRyct0zyiDsN1pH66vYyx3naqFG3wBn6ybkb0kkELXp/A203QNZ1PQqMtQK+NqoOwNzybjDgHPjVaPcoIlkAYAqUXdCqug5AAtx3QYYAC+o7sQZnUVnijrhKO1x08wjgGGcjzdPnACRtyx2yGR9uh8slf6K8AQcuX5+8U6EmAwjl7Ah3P4yq66hbN94uo93nspa6smOuoLoAm6EfZBENJZHysq1TCPAQKKvUZQ15qNC7Oza1PedH08r7ngXqtpGxHltOiOa5W2kRJTPFfLD0Bgzt4gXH5N7jjDcIp6orTjfVybi9AW3QFPjjD4Yz1l7ub2MkuIjfBqo3IjLtM07bZSGjvjQ7e161gdrLpYSjBj0j1wlok00MqhmFLW5pc3tO7BOKVqUdbhWiZ/hgQA90aqBtHtgG1hn5mAb97Gxc5SeEbzwH3FUtxxl9MRTqbMC30Lv/99sH4Gv17gH/ARiRUOpAHVd0AAAAAElFTkSuQmCC"/>
+				微博
+			</li>
+			<li onclick="plus.runtime.openURL('http://www.html5plus.org');">
+				<img style="width:40px;height:40px;vertical-align:middle;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xMy8xMySCRBYAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAAEbUlEQVRYhc2YT2hcRRzHPzNvE82/TTbWP5DaQy021SgqmYf1DxQRqidvxYOCF+vFiyDiHxDBSxEPih4EEcRL9SJ4KHiwoNUovAlisdKiKQWNf9qkyTZN0k3e2xkP87Zu3r59+3azjfnCg/eb4Tf7YX5/ZvYJay3bWfL/Bmilwlb+mJ6e3mWt/aBqzOMCTnlSvqyUOpblI7YqxIHWTwOvWtgrhRDWWiwsCHgfeNNXKkrz25IQB1ofAj4xxox7Uorb9+yhVCphjRkFXgdeaeZ7zQEDrQeB14y1RFGENYaBgX6kEIRh6MasfVFPTz+S5t+Qg4HWB4AqILrAdxnYb62dGOzvp9DTgwDCKGJ4ZAQhJdYYFhYWitVq9R3g7paAwOdAqQtwV2WMoVgcolgsEoYhxhhGSyVGSyUqlQrlcpkwiu5K800D/Bp4gi6G3/M85ubmOX/+AoWeAvv2jvPH7CwX5+cRQlA1Bs/zjqf5pkH8BITdgqsprFZZW18nCiMKBY8wDFleWaGytgYwK6V8Pi/gGWC924BSCAqFAkIKFsuXiKKI3t5ePM8DeENNTp5J80sL8W/AKjAU25buFAxSSoyxzJw9i5QSKeVp4D1fqY+a+aQBzgJLwM11Y28DX9JZXhrgEHC4NuB53j/AC8C3vlJ/ZjmnAa7FgDUJYMZXKjWJ8yjQejIxdM5X6tM8vmk7EgELibFdnYDVaSxhLwZaX5fHMW0H14GLibEdtZdA61HgWcCjdUM3uIgcSIzPkbMQ0wAjYD4xdmMC9kiexTM07yuV65bSEGJfKWgMcbHufQW40DGaU3L9pmp2H1xM2IOB1n2+UldwgN8A47gQZoU4AvqA3UB9znUdsAgMA1d8pcqB1k8BvTFgltaBO4FjbCyU3BFoBpgskiFgoGb4Sq2TM8kDrS0bUwSgvFnAhhADY4HWf9O6WUvcTtfO8xv471QCqODSZFOAq7j2UMubIvAx7n7XE8+tNvG9HngL+Cy2hxLzl4DlzQKu4MJQO+4krufVdnY3cE/GusN17zelAC6RU83CVQOs1xHgIPAY7n9EM1ngrzp7R2K+3A5gsx1cTgEc9pVaAwi0zqpCwcYQJm/nS7hU2TRgslBuqXs/BXwI3AtM4PJuGfgZ+B74BSDQWtC4g5d9pVq1p2xAX6lqoHXDDtbN/w4cDrQu4nJxDDgHnIybeU0erorrlbvFNAWMlcyTnYHWA75SV1uEr9QScCJjjREabzLnuwU4l7APAicCrb8CjgOngdn6Qz/QuicGmgAejZ99iXWSqdMxYPJG4wH3xc9LuJv3d4HWU8AMcAfwEPAgja3lmgC2ypWdwJPxk1cRjcdoprKOrdzdvg15tFkkWYAngS9w1blZVXFpcBT3tza3Wn5+C7S+Fbgf2A8oYBLX91ppCZgGfgSmgB98pdqq4FyACdgh4DZclT4MPBDbfbiU+BXXqKdwzXzGV6rSLlTHgAlYgetzzwHPAO8CR32l2sqxVtqyL6ydatt/RN/2gP8C7X98gH7rM5EAAAAASUVORK5CYII="/>
+				http://www.html5plus.org
+			</li>
+			<li onclick="window.open('mailto:admin@html5plus.org');">
+				<img style="width:40px;height:40px;vertical-align:middle;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xMy8xMySCRBYAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAABv0lEQVRYhe3X3XGCQBSG4ddM7k0HsQOdOQWEdGAHagWRDpIOYgViB3YgFnBmtIPYgVZgLhYCKK4sixMu+G4c2WV5Ztk/eufzmTbn6b8B99IBfdMBfdMBfdN64LOtUFUHQAAMHmjYAbGIHMsKe7d2ElUdAxHQfxgtywEIROTnssD2ij/JcKfmTYV2X4F5WQUbcJj8fmFe86ExlskeM3S2yf9RWaUqk2QOvCQN7JuQASsRGQFj4M1WsQqwD2ySxgL8kSsRmapqBCzvVbbO4oukjQVATDYEXJLHTarc4LoOLoFx8npWjveGrjiot1AvVTUSkSnVkTMgUtWdCw7q7yQTB+QMWFNzWPhsdXlkWFJ+At59cOA2ScoyUdURZuIcySbSKbkGZit7rfsA38PCFtMzMaanZhRxMQbnOqH+4gMMMQs45JAikl6LKe7jszoPqQsMgSnFcTUEvlU14PqQMcH0qjOyDrAMl4dsLGUBjkhXoA1XJc5IF6AvLo0TsiqwKVyaykgbMD1MLmgWlyZFWpcg20K9Thr5aM50lfy+HJVVsPXgnOy0++gsRCQqK7j50dSWtP67uAP6pgP6pgP6pvXAX+59ddMVCTyHAAAAAElFTkSuQmCC"/>
+				HTML5+规范不够用或有问题?请联系我们
+			</li>
+			<li style="border-bottom:0px;" onclick="plus.runtime.openWeb('https://ask.dcloud.net.cn/protocol.html');">
+				<img style="width:40px;height:40px;vertical-align:middle;" src="data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAO+SURBVGiB7ZlNaF1FFMd/Z27TJiH1qy0KmoqiLegiyb03iviBHwvBZf1aCG5EcNMuxYILqbSgi7qIG0XcCNkr7hREyULDe3OTrESCLREtFGmNC1uTe+d0cd/DIL6578297Uts//B4zJtzZv7/+ThzZp6oKjsZZtgE6uKGgGFjxwvY1VRDWZbdpaofAc95zHJVPQ6cTpLENdFvIzNgrRVVfQU/eYBdIvK2iDzTRL/Q5wwsLi5ORFH0kDFmEhhVVeeca6Vpmm1pZ2+ffU6IyIFuYWFhwYyPjz8uIg+q6iZw0Riz6pxbieO4cpak6hxot9uTInJaVZ80xuwH6Pj8CLwRx/G3ANbaQ8AJ4H7gEqCAdL4V2ANEwLxz7sM0TTdWVlZG8jx/EzgqIrd32i1EZFVVv1TVE0mS/BksoNVq7RGRj0Xk1R4mc3EcH+sWlpeXb1bVWzrFfzccAfn09PQv3R+WlpbucM59D9z9X42r6klVfSdN07wXR+8SMsYcBF72mDybZdkTMzMz3wFMTU2tA+u+NreiKIrnReS2XvUickxEPgV+7mVTtQfupZz6Xh0cAj7LsmwOWAXGKEe6FxxQAM45NwO8jn/v7KVckmECVHWfiPjqAQ6KyClgg3LN93bouAGIyCh9REFV3eerrxIgPgFb7EaAkUrDAKiql0DVCGyHVNXLoUpA9fBffXg51EklHHAGuCQiuwP8CwBVPQDsDyVRR8DnwLvGmHVVHQ3wLzqfe4DjwFMhJIIFqOo3SZJk1ZaVWLXWPs21FiAiL1lrJ4BNwvdKAdwKHAnlUWcJPQY8TLkXQgVoh4Pv8POi7n3gqsT+QXB938hUdQ24QJkDDewObIjInYA3XfChjoCvnHNv5Xl+PoqiYAFRFN0nIu8BaQiJOgJ+mJ2dtTX8u1iz1mYMQcCL1trfVfU8cBODRyMBLohIArwQSqKOgMPA+yJSEB4MHOV9IziY1A2jITlQo7iuw6ijfJn4Cxjln1eIfpFTphKHgYlQEqECcuAD4BPgMuU6HnQTd7PRFDhFKWRghAoogK/jOP4p0H8r1qy1r3GN
+BewGTrbb7UlV/YNyCYTMwN/GmEeARwN5BAsQIBWRORHZJCyp677YjTHEMDpGWB7UGP73rxLb4ZzwctgJM+B9YverM+a3ZrkMjk6y2BNVAs6IyK/NUhoIF0XkrM/AK8A5d05V5xulNABUdc4Yc9ZnU/kPTavVGgOOdN7qH6BG3tIPVPUcsAjMq+oXaZpe9tlXCtju2A5hshZuCBg2dryAK8/cRTPGl3SwAAAAAElFTkSuQmCC"/>
+				用户协议和隐私政策
+			</li>
+		</ul>
+		<br/>
+		<footer>
+			<span>Powered By DCloud</span>
+			<br/>
+			<span>HTML5+规范版权所有HTML5中国产业联盟</span>
+			<br/>
+			<!--<span>Copyright ©2012-2015</span>
+			<br/>
+			<span>数字天堂(北京)网络技术有限公司</span>-->
+		</footer>
+	</body>
+</html>

BIN
hello H5+/audio/alice.mp3


BIN
hello H5+/audio/shake.wav


+ 122 - 0
hello H5+/css/common.css

@@ -0,0 +1,122 @@
+* {
+	-webkit-user-select: none;
+	-ms-touch-select: none;
+}
+html {
+	width: 100%;
+	height: 100%;
+}
+body {
+	margin: 0;
+	padding: 0;
+	width: 100%;
+	height: 100%;
+	font-family: Arial;
+	font-size:16px;
+	color: #6c6c6c;
+	background-color: #FFF;
+	text-align: center;
+	-webkit-touch-callout:none;
+	-webkit-tap-highlight-color:rgba(0,0,0,0);
+	-webkit-text-size-adjust:none;
+}
+.heading {
+	margin:0 1em;
+	text-align:left;
+}
+.des {
+	padding: 0 1em;
+	text-align:left;
+	text-indent: 2em;
+	word-break: break-all;
+}
+.logo {
+	width: 100%;
+	text-align: center;
+}
+.button {
+	font-size: 18px;
+	font-weight: normal;
+	text-decoration: none;
+	display: block;
+	text-align: center;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	white-space:nowrap;
+	color: #FFF;
+	background-color: #FFCC33;
+	border: 1px solid #ECB100;
+	padding: .5em 0em;
+	margin: .5em .7em;
+	-webkit-border-radius: 5px;
+	border-radius: 5px;
+}
+.button:active {
+	outline: 0;
+  	-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+	box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.button-waring {
+	color: #666;
+	background-color: #ebebeb;
+	border-color: #e0e0e0;
+}
+.button-select {
+	font-size: 14px;
+	background-color: #CCCCCC;
+	border: 0;
+	-webkit-border-radius: 2px;
+	border-radius: 2px;
+}
+.dlist {
+	padding: 0px;
+	margin: 1em;
+	background: #fff;
+	border: 1px solid #ddd;
+	-webkit-border-radius: 3px;
+	border-radius: 3px;
+}
+.ditem {
+	overflow: hidden;
+	list-style-type: none;
+	font-size: 1em;
+	padding: 1em;
+	border-bottom: inset 1px #ebebeb;
+	vertical-align: middle;
+}
+.ditem:active {
+	background: #f4f4f4;
+}
+.ditem:last-child {
+	border-bottom: inset 0px #ebebeb;
+}
+.ditem-empty {
+	overflow: hidden;
+	list-style-type: none;
+	font-size: 1em;
+	padding: 1em;
+	vertical-align: middle;
+}
+#outpos {
+	height: 100px;
+	width: 100%;
+}
+#output {
+	height: 64px;
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	color: #f00;
+	background: #FFF;
+	font-size: 12px;
+	text-align: left;
+	line-height: 16px;
+	word-break: break-all;
+	z-index: 6666;
+	padding: 8px 16px;
+	overflow-x: hidden;
+	overflow-y: scroll;
+	border-top: 2px solid #AAA;
+	-webkit-overflow-scrolling: touch;
+}

+ 135 - 0
hello H5+/doc/accelerometer.html

@@ -0,0 +1,135 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Accelerometer Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.accelerometer">accelerometer</a></h1>
+<p>Accelerometer模块管理设备加速度传感器,用于获取设备加速度信息,包括x(屏幕水平方向)、y(垂直屏幕水平方向)、z(垂直屏幕平面方向)三个方向的加速度信息。通过plus.accelerometer获取设备加速度传感器管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.accelerometer.getCurrentAcceleration">getCurrentAcceleration</a>: 获取当前设备的加速度信息</li>
+<li>
+<a href="#plus.accelerometer.watchAcceleration">watchAcceleration</a>: 监听设备加速度变化信息</li>
+<li>
+<a href="#plus.accelerometer.clearWatch">clearWatch</a>: 关闭监听设备加速度信息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.accelerometer.Acceleration">Acceleration</a>: 设备加速度信息对象</li>
+<li>
+<a href="#plus.accelerometer.AccelerometerOption">AccelerometerOption</a>: 监听设备加速度感应器参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.accelerometer.AccelerometerSuccessCallback">AccelerometerSuccessCallback</a>: 获取设备加速度信息成功的回调函数</li>
+<li>
+<a href="#plus.accelerometer.AccelerometerErrorCallback">AccelerometerErrorCallback</a>: 获取设备加速度信息失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Accelerometer": {
+		"description": "加速度传感器"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.accelerometer.Acceleration">Acceleration</a></h1>
+<p>设备加速度信息对象</p>
+<pre class="prettyprint linenums">
+interface Acceleration {
+	readonly attribute Number xAxis;
+	readonly attribute Number yAxis;
+	readonly attribute Number zAxis;  
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	JSON对象,保存获取设备的加速度信息,包括x、y、z三个方向的加速度信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>xAxis: <em>(<font class="type">Number</font>
+	类型
+)</em>x轴方向的加速度<br><p>获取当前设备x轴方向的加速度,浮点型数据,与物理学中的加速度值一致。</p>
+</li>
+<li>yAxis: <em>(<font class="type">Number</font>
+	类型
+)</em>y轴方向的加速度<br><p>获取当前设备y轴方向的加速度,浮点型数据,与物理学中的加速度值一致。</p>
+</li>
+<li>zAxis: <em>(<font class="type">Number</font>
+	类型
+)</em>z轴方向的加速度<br><p>获取当前设备z轴方向的加速度,浮点型数据,与物理学中的加速度值一致。</p>
+</li>
+</ul>
+<h1><a name="plus.accelerometer.AccelerometerOption">AccelerometerOption</a></h1>
+<p>监听设备加速度感应器参数</p>
+<pre class="prettyprint linenums">
+interface Acceleration {
+	readonly attribute DOMString frequency;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	JSON对象,用于设置获取设备加速度信息的参数。
+				</p>
+<h2>属性:</h2>
+<ul><li>frequency: <em>(<font class="type">Number</font>
+	类型
+)</em>更新加速度信息间隔时间<br><p>监听器获取加速度信息的时间间隔,单位为ms,默认值为500ms</p>
+</li></ul>
+<h1><a name="plus.accelerometer.AccelerometerSuccessCallback">AccelerometerSuccessCallback</a></h1>
+<p>获取设备加速度信息成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( acceleration ) {
+	// Get acceleration code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>acceleration: 
+		<em>(
+			<a href="#plus.accelerometer.Acceleration">Acceleration</a>
+			)
+			必选 </em>设备的加速度信息<br>
+	Acceleration类型对象,用于获取各方向的详细加速度值。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.accelerometer.AccelerometerErrorCallback">AccelerometerErrorCallback</a></h1>
+<p>获取设备加速度信息失败的回调函数</p>
+<pre class="prettyprint linenums">
+function void onAccelerometerError(Exception error) {
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>获取加速度操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 290 - 0
hello H5+/doc/ad.html

@@ -0,0 +1,290 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Ad Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.ad">ad</a></h1>
+<p>AD模块实现uni-AD广告联盟功能,聚合目前国内流行的广告平台广点通(腾讯)、穿山甲(今日头条)、360广告等,支持信息流、Banner等广告。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.ad.createAdView">createAdView</a>: 创建广告控件</li>
+<li>
+<a href="#plus.ad.getAds">getAds</a>: 获取信息流广告数据</li>
+<li>
+<a href="#plus.ad.releaseAdData">releaseAdData</a>: 释放广告数据</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.ad.AdData">AdData</a>: 信息流广告数据对象</li>
+<li>
+<a href="#plus.ad.AdView">AdView</a>: 广告控件对象</li>
+<li>
+<a href="#plus.ad.AdViewStyles">AdViewStyles</a>: 广告原生控件样式</li>
+<li>
+<a href="#plus.ad.AdsOptions">AdsOptions</a>: 获取信息流广告的参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.ad.GetAdsSuccessCallback">GetAdsSuccessCallback</a>: 获取信息流广告成功回调函数</li>
+<li>
+<a href="#plus.ad.ADViewRenderingCallback">ADViewRenderingCallback</a>: 监听广告渲染完成事件回调函数</li>
+<li>
+<a href="#plus.ad.ADviewDislikedCallback">ADviewDislikedCallback</a>: 监听点击关闭广告事件回调函数</li>
+<li>
+<a href="#plus.ad.AdSuccessCallback">AdSuccessCallback</a>: 广告操作成功回调函数</li>
+<li>
+<a href="#plus.ad.AdErrorCallback">AdErrorCallback</a>: 广告操作错误回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Ad": {
+		"description": "UniAd广告"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.ad.AdData">AdData</a></h1>
+<p>信息流广告数据对象</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.ad.AdData.description">description</a>: 广告描述信息</li>
+<li>
+<a href="#plus.ad.AdData.showMode">showMode</a>: 广告显示类型</li>
+<li>
+<a href="#plus.ad.AdData.title">title</a>: 广告标题</li>
+</ul>
+<h1><a name="plus.ad.AdView">AdView</a></h1>
+<p>广告控件对象</p>
+<pre class="prettyprint linenums">
+interface plus.ad.AdView extends plus.nativeObj.View  {
+	// Methods
+	function void renderingBind(data);
+	function void setRenderingListener(ADViewRenderingCallback);
+	function void setDislikeListener(ADviewDislikedCallback);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	AdView从plus.nativeObj.View继承,
+	用于渲染显示广告的原生控件,目前仅支持“模板渲染”模式,暂不支持“自定义渲染”模式。
+	
+	使用广告控件步骤:
+	
+		创建广告控件AdView,添加到Webview中,高度设置为"0px",此时不显示
+		获取广告数据,将广告数据绑定到AdView上并开始渲染
+		监听广告渲染事件,广告渲染成功后更新AdView的高度,显示广告
+	
+	
+	注意:广告控件创建后需添加到Webview窗口中才能显示,关闭广告。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.ad.AdView.renderingBind">renderingBind</a>: 绑定广告数据并渲染</li>
+<li>
+<a href="#plus.ad.AdView.setRenderingListener">setRenderingListener</a>: 监听广告渲染完成事件</li>
+<li>
+<a href="#plus.ad.AdView.setDislikeListener">setDislikeListener</a>: 监听点击关闭广告事件</li>
+</ul>
+<h1><a name="plus.ad.AdViewStyles">AdViewStyles</a></h1>
+<p>广告原生控件样式</p>
+<h2>属性:</h2>
+<ul>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>AdView控件左上角的垂直偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度。
+	默认值为"0px"。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>AdView控件左上角的水平偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度。
+	默认值为"0px"。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>AdView控件的宽度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>AdView控件的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度。
+	默认值为"0px"。
+						</p>
+</li>
+<li>position: <em>(<font class="type">String</font>
+	类型
+)</em>AdView控件在Webview窗口的布局模式<br><p>
+	可取值:
+		"static" - 静态布局模式,如果页面存在滚动条则随窗口内容滚动;
+		"absolute" - 绝对布局模式,如果页面存在滚动条不随窗口内容滚动;
+	默认值为"static"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.ad.AdsOptions">AdsOptions</a></h1>
+<p>获取信息流广告的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>adpid: <em>(<font class="type">String</font>
+	类型
+)</em>信息流广告位标识<br><p>
+	在UniAD平台新建广告位后可得到。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>信息流广告将要显示的宽度<br><p>
+	支持像素值(如"100px")、百分比(如"50%")。默认值为"100%"。
+	注:此值用于向广告平台匹配合适的信息流广告,建议传入广告展现时真实的宽度。
+						</p>
+</li>
+<li>cound: <em>(<font class="type">Number</font>
+	类型
+)</em>获取信息流广告的数目<br><p>
+	默认值为3。
+	注:真实返回的广告数目可能小于此值,如填充率不够时会发生此情况。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.ad.GetAdsSuccessCallback">GetAdsSuccessCallback</a></h1>
+<p>获取信息流广告成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( Event event ){
+	// Code here
+	var ads = event.ads; // AdData数组对象,AdData为广告数据对象
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	获取信息流广告成功时触发,并返回信息流广告数据。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>获取信息流广告成功的信息<br>
+	可通过event.ads,Array(AdData类型)获取广告数据。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ad.ADViewRenderingCallback">ADViewRenderingCallback</a></h1>
+<p>监听广告渲染完成事件回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( Event event ){
+	// Code here
+	var result = event.result; // 广告渲染结果,0表示渲染成功
+	var width = event.wdith;  // 广告渲染需要的宽度,逻辑像素值
+	var height = event.height; // 广告渲染需要的高度,逻辑像素值
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	广告渲染完成时触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>广告渲染的信息<br>
+	event包含以下参数:
+	result - Number类型,0表示渲染成功,其它值表示渲染失败;
+	width - Number类型,控件的宽度,逻辑像素值;
+	height - Number类型,控件的高度,逻辑像素值。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ad.ADviewDislikedCallback">ADviewDislikedCallback</a></h1>
+<p>监听点击关闭广告事件回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( Event event ){
+	// Code here
+	var value = event.value; // 用户关闭广告的原因
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用户点击关闭广告时触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>关闭广告的信息<br>
+	event包含以下参数:
+	value - String类型,不喜欢的原因。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ad.AdSuccessCallback">AdSuccessCallback</a></h1>
+<p>广告操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(){
+	// Code here
+}
+				</pre>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ad.AdErrorCallback">AdErrorCallback</a></h1>
+<p>广告操作错误回调函数</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Handle the error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	获取信息流广告数据失败时触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			可选 </em>广告操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 152 - 0
hello H5+/doc/android.html

@@ -0,0 +1,152 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Native.JS Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.android">android</a></h1>
+<p>Native.js for Android封装一条通过JS语法直接调用Native Java接口通道,通过plus.android可调用几乎所有的系统API。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.android.currentWebview">currentWebview</a>: 获取当前Webview窗口对象的native层实例对象</li>
+<li>
+<a href="#plus.android.newObject">newObject</a>: 创建实例对象</li>
+<li>
+<a href="#plus.android.getAttribute">getAttribute</a>: 获取对象(类对象/实例对象)的属性值</li>
+<li>
+<a href="#plus.android.setAttribute">setAttribute</a>: 设置对象(类对象/实例对象)的属性值</li>
+<li>
+<a href="#plus.android.implements">implements</a>: 实现Interface的方法</li>
+<li>
+<a href="#plus.android.importClass">importClass</a>: 导入Java类对象</li>
+<li>
+<a href="#plus.android.invoke">invoke</a>: 调用对象(类对象/实例对象)的方法</li>
+<li>
+<a href="#plus.android.requestPermissions">requestPermissions</a>: 请求权限</li>
+<li>
+<a href="#plus.android.runtimeMainActivity">runtimeMainActivity</a>: 获取应用主Activity实例对象</li>
+<li>
+<a href="#plus.android.autoCollection">autoCollection</a>: 自动回收对象</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.android.ClassObject">ClassObject</a>: Java类对象</li>
+<li>
+<a href="#plus.android.InstanceObject">InstanceObject</a>: Java实例对象</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.android.AndroidSuccessCallback">AndroidSuccessCallback</a>: 成功回调函数</li>
+<li>
+<a href="#plus.android.AndroidErrorCallback">AndroidErrorCallback</a>: 错误回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Invocation": {
+		"description": "Native.js"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.android.ClassObject">ClassObject</a></h1>
+<p>Java类对象</p>
+<pre class="prettyprint linenums">
+interface ClassObject {
+	// ...
+	function Object plusGetAttribute( String name );
+	function Object plusSetAttribute( String name, Object value );
+	// ...
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	Java类对象,可通过其属性获取类的常量,可通过方法来操作类的静态变量和方法,也通过new方法来创建类的实例对象。
+	对于类的常量,则直接通过.后面跟随常量名称调用即可。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.android.ClassObject.plusGetAttribute">plusGetAttribute</a>: 获取Java类对象的静态属性</li>
+<li>
+<a href="#plus.android.ClassObject.plusSetAttribute">plusSetAttribute</a>: 设置Java类对象的静态属性</li>
+</ul>
+<h1><a name="plus.android.InstanceObject">InstanceObject</a></h1>
+<p>Java实例对象</p>
+<pre class="prettyprint linenums">
+interface InstanceObject {
+	// ...
+	function Object plusGetAttribute( String name );
+	function Object plusSetAttribute( String name, Object value );
+	// ...
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	Java实例对象,可通过其方法来操作实例的变量和方法。
+	注意:必须通过plusGetAttribute()方法读取实例对象的属性值,通过plusSetAttribute()方法设置实例对象的属性值。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.android.InstanceObject.plusGetAttribute">plusGetAttribute</a>: 获取Java实例对象的属性</li>
+<li>
+<a href="#plus.android.InstanceObject.plusSetAttribute">plusSetAttribute</a>: 设置Java实例对象的属性</li>
+</ul>
+<h1><a name="plus.android.AndroidSuccessCallback">AndroidSuccessCallback</a></h1>
+<p>成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			必选 </em>回调参数<br>
+	回调参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.android.AndroidErrorCallback">AndroidErrorCallback</a></h1>
+<p>错误回调函数</p>
+<pre class="prettyprint linenums">
+function void onError(Exception error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>获取加速度操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 352 - 0
hello H5+/doc/audio.html

@@ -0,0 +1,352 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Audio Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.audio">audio</a></h1>
+<p>Audio模块用于提供音频的录制和播放功能,可调用系统的麦克风设备进行录音操作,也可调用系统的扬声器设备播放音频文件。通过plus.audio获取音频管理对象。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.audio.ROUTE_SPEAKER">ROUTE_SPEAKER</a>: 设备的扬声器音频输出线路</li>
+<li>
+<a href="#plus.audio.ROUTE_EARPIECE">ROUTE_EARPIECE</a>: 设备听筒音频输出线路</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.audio.getRecorder">getRecorder</a>: 获取当前设备的录音对象</li>
+<li>
+<a href="#plus.audio.createPlayer">createPlayer</a>: 创建音频播放器对象</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.audio.AudioRecorder">AudioRecorder</a>: 录音对象</li>
+<li>
+<a href="#plus.audio.AudioPlayer">AudioPlayer</a>: 音频播放对象</li>
+<li>
+<a href="#plus.audio.AudioPlayerEvent">AudioPlayerEvent</a>: 音频播放控件事件类型</li>
+<li>
+<a href="#plus.audio.AudioPlayerStyles">AudioPlayerStyles</a>: 音频播放对象的参数</li>
+<li>
+<a href="#plus.audio.AudioRecorderStyles">AudioRecorderStyles</a>: 音频录制的参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.audio.RecordSuccessCallback">RecordSuccessCallback</a>: 录音操作成功回调</li>
+<li>
+<a href="#plus.audio.PlaySuccessCallback">PlaySuccessCallback</a>: 播放音频文件操作成功回调</li>
+<li>
+<a href="#plus.audio.AudioErrorCallback">AudioErrorCallback</a>: 音频操作失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Audio": {
+		"description": "音频"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.audio.AudioRecorder">AudioRecorder</a></h1>
+<p>录音对象</p>
+<pre class="prettyprint linenums">
+interface AudioRecorder {
+	readonly attribute String[] supportedSamplerates;
+	readonly attribute String[] supportedFormats;
+	function record( option, successCB, errorCB );
+	function stop();
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.audio.AudioRecorder.supportedSamplerates">supportedSamplerates</a>: 数组,设备录音支持的采用率</li>
+<li>
+<a href="#plus.audio.AudioRecorder.supportedFormats">supportedFormats</a>: 数组,设备录音支持的文件格式</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.audio.AudioRecorder.record">record</a>: 调用设备麦克风进行录音操作</li>
+<li>
+<a href="#plus.audio.AudioRecorder.stop">stop</a>: 结束录音操作</li>
+</ul>
+<h1><a name="plus.audio.AudioPlayer">AudioPlayer</a></h1>
+<p>音频播放对象</p>
+<pre class="prettyprint linenums">
+interface AudioPlayer {
+    function void close();
+    function Boolean isPaused();
+	function void play(successCB, errorCB);
+	function void pause();
+	function void resume();
+	function void stop();
+	function void seekTo(position);
+	function Number getBuffered();
+	function Number getDuration();
+	function Number getPosition();
+	function void setRoute(route);
+	function void setSessionCategory(category);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	音频播放对象,用于音频文件的播放。不能通过new方法直接创建,只能通过audio.createPlayer方法创建。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.audio.AudioPlayer.addEventListener">addEventListener</a>: 添加事件监听器</li>
+<li>
+<a href="#plus.audio.AudioPlayer.close">close</a>: 关闭音频播放对象</li>
+<li>
+<a href="#plus.audio.AudioPlayer.getBuffered">getBuffered</a>: 音频缓冲的时间点</li>
+<li>
+<a href="#plus.audio.AudioPlayer.getDuration">getDuration</a>: 获取音频的总长度</li>
+<li>
+<a href="#plus.audio.AudioPlayer.getPosition">getPosition</a>: 获取音频的当前播放位置</li>
+<li>
+<a href="#plus.audio.AudioPlayer.getStyles">getStyles</a>: 音频播放的参数</li>
+<li>
+<a href="#plus.audio.AudioPlayer.isPaused">isPaused</a>: 当前是否暂停或停止状态</li>
+<li>
+<a href="#plus.audio.AudioPlayer.play">play</a>: 播放音频</li>
+<li>
+<a href="#plus.audio.AudioPlayer.pause">pause</a>: 暂停播放</li>
+<li>
+<a href="#plus.audio.AudioPlayer.removeEventListener">removeEventListener</a>: 移除事件监听器</li>
+<li>
+<a href="#plus.audio.AudioPlayer.resume">resume</a>: 恢复播放</li>
+<li>
+<a href="#plus.audio.AudioPlayer.seekTo">seekTo</a>: 跳到指定位置</li>
+<li>
+<a href="#plus.audio.AudioPlayer.stop">stop</a>: 停止播放</li>
+<li>
+<a href="#plus.audio.AudioPlayer.setRoute">setRoute</a>: 音频输出线路</li>
+<li>
+<a href="#plus.audio.AudioPlayer.setSessionCategory">setSessionCategory</a>: 设置音频播放模式</li>
+<li>
+<a href="#plus.audio.AudioPlayer.setStyles">setStyles</a>: 设置音频播放的参数</li>
+</ul>
+<h1><a name="plus.audio.AudioPlayerEvent">AudioPlayerEvent</a></h1>
+<p>音频播放控件事件类型</p>
+<h2>常量:</h2>
+<ul>
+<li>"canplay": <em>(<font class="type">String</font>
+	类型
+)</em>音频可以播放事件<br>
+</li>
+<li>"play": <em>(<font class="type">String</font>
+	类型
+)</em>音频播放事件<br>
+</li>
+<li>"pause": <em>(<font class="type">String</font>
+	类型
+)</em>音频暂停事件<br>
+</li>
+<li>"stop": <em>(<font class="type">String</font>
+	类型
+)</em>音频停止事件<br>
+</li>
+<li>"ended": <em>(<font class="type">String</font>
+	类型
+)</em>音频自然播放结束事件<br>
+</li>
+<li>"error": <em>(<font class="type">String</font>
+	类型
+)</em>音频播放错误事件<br>
+</li>
+<li>"waiting": <em>(<font class="type">String</font>
+	类型
+)</em>音频加载中事件<br>
+</li>
+<li>"seeking": <em>(<font class="type">String</font>
+	类型
+)</em>音频进行seek操作事件<br>
+</li>
+<li>"seeked": <em>(<font class="type">String</font>
+	类型
+)</em>音频完成seek操作事件<br>
+</li>
+<li>"prev": <em>(<font class="type">String</font>
+	类型
+)</em>上一曲操作事件<br><p>
+	用户在后台播放控制器上点击上一曲按钮时触发,未开启后台控制器则不触发此事件。
+						</p>
+</li>
+<li>"next": <em>(<font class="type">String</font>
+	类型
+)</em>下一曲操作事件<br><p>
+	用户在后台播放控制器上点击下一曲按钮时触发,未开启后台控制器则不触发此事件。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.audio.AudioPlayerStyles">AudioPlayerStyles</a></h1>
+<p>音频播放对象的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>autoplay: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否自动开始播放<br><p>
+	true - 自动开始播放;
+	false - 不自动开始播放。
+	默认值为false。
+						</p>
+</li>
+<li>backgroundControl: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否开启后台控制器<br><p>
+	开启后应用切换到后台可继续播放音频。
+	iOS平台在系统锁屏界面显示播放控件;Android平台暂不支持。
+						</p>
+</li>
+<li>coverImgUrl: <em>(<font class="type">String</font>
+	类型
+)</em>封面图地址<br><p>
+	在后台播放控制器上显示,未开启后台控制器则不显示。
+						</p>
+</li>
+<li>epname: <em>(<font class="type">String</font>
+	类型
+)</em>专辑名<br><p>
+	在后台播放控制器上显示,未开启后台控制器则不显示。
+						</p>
+</li>
+<li>loop: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否循环播放<br><p>
+	true - 循环播放;
+	false - 不循环播放。
+	默认值为false。
+						</p>
+</li>
+<li>singer: <em>(<font class="type">String</font>
+	类型
+)</em>歌手名<br><p>
+	在后台播放控制器上显示,未开启后台控制器则不显示。
+						</p>
+</li>
+<li>src: <em>(<font class="type">String</font>
+	类型
+)</em>音频资源的地址<br><p>
+	支持本地路径和网络路径。
+						</p>
+</li>
+<li>startTime: <em>(<font class="type">Number</font>
+	类型
+)</em>开始播放的位置<br><p>
+	单位为秒(s),默认值为0。
+						</p>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>音频标题<br><p>
+	在后台播放控制器上显示,未开启后台控制器则不显示。
+						</p>
+</li>
+<li>volume: <em>(<font class="type">Number</font>
+	类型
+)</em>音量<br><p>
+	取值范围为0-1,默认值为1。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.audio.AudioRecorderStyles">AudioRecorderStyles</a></h1>
+<p>音频录制的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>channels: <em>(<font class="type">String</font>
+	类型
+)</em>录音声道<br><p>
+	可取值:
+		"mono" - 单声道录音;
+		"stereo" - 立体声道录音。
+	默认值为"mono"。
+						</p>
+</li>
+<li>filename: <em>(<font class="type">String</font>
+	类型
+)</em>保存录音文件的路径<br><p>
+	可设置具体文件名,也可只设置路径,如果以“/”结尾则表明是路径,文件名由录音程序自动生成。
+	如未设置则使用默认目录生成随机文件名称,默认目录为应用%APPID%下的documents目录。
+						</p>
+</li>
+<li>samplerate: <em>(<font class="type">String</font>
+	类型
+)</em>录音文件的采样率<br><p>
+	需通过supportedSamplerates属性获取设备支持的采样率,若设置无效的值,则使用系统默认的采样率。</p>
+</li>
+<li>format: <em>(<font class="type">String</font>
+	类型
+)</em>录音文件的格式<br><p>
+	需通过supportedFormats属性获取设备支持的录音格式,若设置无效的值,则使用系统默认的录音格式。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.audio.RecordSuccessCallback">RecordSuccessCallback</a></h1>
+<p>录音操作成功回调</p>
+<pre class="prettyprint linenums">
+void onSuccess( recordFile ) {
+	// Get record file code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">麦克风录音操作成功的回调函数,在录音操作完成调用stop()方法时调用。</p>
+<h2>参数:</h2>
+<ul><li>recordFile: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>录音操作保存的音频文件路径<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.audio.PlaySuccessCallback">PlaySuccessCallback</a></h1>
+<p>播放音频文件操作成功回调</p>
+<pre class="prettyprint linenums">
+void onCompleted() {
+	// Play audio file completed code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	音频播放操作成功的回调函数,在音频播放完成或调用stop()方法时触发。
+				</p>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.audio.AudioErrorCallback">AudioErrorCallback</a></h1>
+<p>音频操作失败回调</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Handle audio error
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>音频操作的错误信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 324 - 0
hello H5+/doc/barcode.html

@@ -0,0 +1,324 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Barcode Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.barcode">barcode</a></h1>
+<p>Barcode模块管理条码(一维码和二维码)扫描识别,支持常见的一维码(如EAN13码)及二维码(如QR码)。通过调用设备的摄像头对条码进行扫描识别,扫描到条码后进行解码并返回码数据内容及码类型。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.QR">QR</a>: QR二维码,数值为0</li>
+<li>
+<a href="#plus.barcode.EAN13">EAN13</a>: EAN条形码标准版,数值为1</li>
+<li>
+<a href="#plus.barcode.EAN8">EAN8</a>: ENA条形码简版,数值为2</li>
+<li>
+<a href="#plus.barcode.AZTEC">AZTEC</a>: Aztec二维码,数值为3</li>
+<li>
+<a href="#plus.barcode.DATAMATRIX">DATAMATRIX</a>: Data Matrix二维码,数值为4</li>
+<li>
+<a href="#plus.barcode.UPCA">UPCA</a>: UPC条形码标准版,数值为5</li>
+<li>
+<a href="#plus.barcode.UPCE">UPCE</a>: UPC条形码缩短版,数值为6</li>
+<li>
+<a href="#plus.barcode.CODABAR">CODABAR</a>: Codabar条形码,数值为7</li>
+<li>
+<a href="#plus.barcode.CODE39">CODE39</a>: Code39条形码,数值为8</li>
+<li>
+<a href="#plus.barcode.CODE93">CODE93</a>: Code93条形码,数值为9</li>
+<li>
+<a href="#plus.barcode.CODE128">CODE128</a>: Code128条形码,数值为10</li>
+<li>
+<a href="#plus.barcode.ITF">ITF</a>: ITF条形码,数值为11</li>
+<li>
+<a href="#plus.barcode.MAXICODE">MAXICODE</a>: MaxiCode二维码,数值为12</li>
+<li>
+<a href="#plus.barcode.PDF417">PDF417</a>: PDF 417二维条码,数值为13</li>
+<li>
+<a href="#plus.barcode.RSS14">RSS14</a>: RSS 14条形组合码,数值为14</li>
+<li>
+<a href="#plus.barcode.RSSEXPANDED">RSSEXPANDED</a>: 扩展式RSS条形组合码,数值为15</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.scan">scan</a>: 扫码识别图片中的条码</li>
+<li>
+<a href="#plus.barcode.create">create</a>: 创建扫码识别控件对象</li>
+<li>
+<a href="#plus.barcode.getBarcodeById">getBarcodeById</a>: 查找扫码识别控件对象</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.Barcode">Barcode</a>: 扫码识别控件对象</li>
+<li>
+<a href="#plus.barcode.BarcodeStyles">BarcodeStyles</a>: Barcode扫码控件样式</li>
+<li>
+<a href="#plus.barcode.BarcodeOptions">BarcodeOptions</a>: 条码识别控件扫描参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a>: 扫码识别成功回调函数</li>
+<li>
+<a href="#plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a>: 扫码识别错误回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Barcode": {
+		"description": "二维码"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.barcode.Barcode">Barcode</a></h1>
+<p>扫码识别控件对象</p>
+<pre class="prettyprint linenums">
+interface plus.barcode.Barcode {
+	// Methods
+	function void cancel();
+	function void close();
+	function void setFlash(open);
+	function void setStyle(styles);
+	function void start(options);
+
+	// Events
+	function void onerror();
+	function void onmarked();
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	可通过plus.barcode.create创建,也可通过new plus.barcode.Barcode构造(仅在5+APP中使用)创建。
+	扫码识别控件将使用设备的摄像头预览扫描内容,在控件中显示扫描基准框等用户交互元素。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.barcode.Barcode.Barcode.constructor(domId,%20filters,%20styles)">Barcode.constructor(domId, filters, styles)</a>: 构造扫码识别控件</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.Barcode.cancel">cancel</a>: 取消扫码识别</li>
+<li>
+<a href="#plus.barcode.Barcode.close">close</a>: 关闭条码识别控件</li>
+<li>
+<a href="#plus.barcode.Barcode.setFlash">setFlash</a>: 操作闪光灯</li>
+<li>
+<a href="#plus.barcode.Barcode.setStyle">setStyle</a>: 设置扫码识别控件的样式</li>
+<li>
+<a href="#plus.barcode.Barcode.start">start</a>: 开始扫码识别</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.barcode.Barcode.onmarked">onmarked</a>: 扫码识别成功事件</li>
+<li>
+<a href="#plus.barcode.Barcode.onerror">onerror</a>: 扫码识别错误事件</li>
+</ul>
+<h1><a name="plus.barcode.BarcodeStyles">BarcodeStyles</a></h1>
+<p>Barcode扫码控件样式</p>
+<pre class="prettyprint linenums">
+interface plus.barcode.BarcodeStyles {
+	attribute String background;
+	attribute String frameColor;
+	attribute String scanbarColor;
+	
+	attribute String top;
+	attribute String left;
+	attribute String width;
+	attribute String height;
+	attribute String position;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	设置Barcode扫码控件的样式,如扫码框、扫码条的颜色等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>background: <em>(<font class="type">String</font>
+	类型
+)</em>条码识别控件背景颜色<br><p>
+	颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
+						</p>
+</li>
+<li>frameColor: <em>(<font class="type">String</font>
+	类型
+)</em>扫码框颜色<br><p>
+	颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
+						</p>
+</li>
+<li>scanbarColor: <em>(<font class="type">String</font>
+	类型
+)</em>扫码条颜色<br><p>
+	颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
+						</p>
+</li>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>Barcode扫码控件左上角的垂直偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度;
+		自动计算,如"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>Barcode扫码控件左上角的水平偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度;
+		自动计算,如"auto",根据width值自动计算,相对于父Webview窗口水平居中。
+	默认值为"0px"。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>Barcode扫码控件的宽度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>Barcode扫码控件的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>position: <em>(<font class="type">String</font>
+	类型
+)</em>Barcode扫码控件在Webview窗口的布局模式<br><p>
+	可取值:
+		"static" - 静态布局模式,如果页面存在滚动条则随窗口内容滚动;
+		"absolute" - 绝对布局模式,如果页面存在滚动条不随窗口内容滚动;
+	默认值为"static"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.barcode.BarcodeOptions">BarcodeOptions</a></h1>
+<p>条码识别控件扫描参数</p>
+<pre class="prettyprint linenums">
+interface plus.barcode.BarcodeOptions {
+	attribute Boolean conserve;
+	attribute String filename;
+	attribute Boolean vibrate;
+	attribute String sound;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	设置Barcode扫码控件的扫码识别参数,如是否保存扫码功时的截图等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>conserve: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否保存扫码成功时的截图<br><p>
+	如果设置为true则在扫码成功时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。
+	默认值为false,不保存截图。
+						</p>
+</li>
+<li>filename: <em>(<font class="type">String</font>
+	类型
+)</em>保存扫码成功时图片保存路径<br><p>
+	可通过此参数设置保存截图的路径和名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
+						</p>
+</li>
+<li>vibrate: <em>(<font class="type">Boolean</font>
+	类型
+)</em>扫码成功时是否需要震动提醒<br><p>
+	如果设置为true则在扫码成功时震动设备,false则不震动。
+	默认值为true。
+						</p>
+</li>
+<li>sound: <em>(<font class="type">String</font>
+	类型
+)</em>扫码成功时播放的提示音<br><p>
+	可取值:
+	"none" - 不播放提示音;
+	"default" - 播放默认提示音(5+引擎内置)。
+	默认值为"default"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a></h1>
+<p>扫码识别成功回调函数</p>
+<pre class="prettyprint linenums">
+void BarcodeSuccessCallback(type, code, file){
+	// Barcode success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当Barcode控件扫码成功时的回调函数,返回识别成功的扫码数据。
+				</p>
+<h2>参数:</h2>
+<ul>
+<li>type: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>识别到的条码类型<br>
+	Number类型的值,与Barcode对象定义的条码类型常量一致。
+						</li>
+<li>code: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>识别到的条码数据<br>
+	扫码识别出的数据内容,字符串类型,采用UTF8编码格式。
+						</li>
+<li>file: 
+		<em>(
+			<font class="type">String</font>
+			)
+			可选 </em>扫码成功的截图文件路径<br>
+	扫码识别到的截图,png格式文件,如果设置为不保存截图,则返回undefined。
+						</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a></h1>
+<p>扫码识别错误回调函数</p>
+<pre class="prettyprint linenums">
+void BarcodeErrorCallback(error){
+	// Error 
+	var code = error.code; 			// 错误编码
+	var message = error.message;	// 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>扫码识别的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 373 - 0
hello H5+/doc/bluetooth.html

@@ -0,0 +1,373 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Bluetooth Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.bluetooth">bluetooth</a></h1>
+<p>
+Bluetooth模块用于管理蓝牙设备,搜索附近蓝牙设备、实现简单数据传输等。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.bluetooth.closeBluetoothAdapter">closeBluetoothAdapter</a>: 关闭蓝牙模块</li>
+<li>
+<a href="#plus.bluetooth.getBluetoothAdapterState">getBluetoothAdapterState</a>: 获取本机蓝牙适配器状态</li>
+<li>
+<a href="#plus.bluetooth.getBluetoothDevices">getBluetoothDevices</a>: 获取已搜索到的蓝牙设备</li>
+<li>
+<a href="#plus.bluetooth.getConnectedBluetoothDevices">getConnectedBluetoothDevices</a>: 根据uuid获取处于已连接的设备</li>
+<li>
+<a href="#plus.bluetooth.onBluetoothAdapterStateChange">onBluetoothAdapterStateChange</a>: 监听蓝牙适配器状态变化事件</li>
+<li>
+<a href="#plus.bluetooth.onBluetoothDeviceFound">onBluetoothDeviceFound</a>: 监听搜索到新设备的事件</li>
+<li>
+<a href="#plus.bluetooth.openBluetoothAdapter">openBluetoothAdapter</a>: 初始化蓝牙模块</li>
+<li>
+<a href="#plus.bluetooth.startBluetoothDevicesDiscovery">startBluetoothDevicesDiscovery</a>: 开始搜索附近的蓝牙设备</li>
+<li>
+<a href="#plus.bluetooth.stopBluetoothDevicesDiscovery">stopBluetoothDevicesDiscovery</a>: 停止搜寻附近的蓝牙外围设备</li>
+<li>
+<a href="#plus.bluetooth.closeBLEConnection">closeBLEConnection</a>: 断开与低功耗蓝牙设备的连接</li>
+<li>
+<a href="#plus.bluetooth.createBLEConnection">createBLEConnection</a>: 连接低功耗蓝牙设备</li>
+<li>
+<a href="#plus.bluetooth.getBLEDeviceCharacteristics">getBLEDeviceCharacteristics</a>: 获取蓝牙设备指定服务中所有特征值(characteristic)</li>
+<li>
+<a href="#plus.bluetooth.getBLEDeviceServices">getBLEDeviceServices</a>: 获取蓝牙设备的所有服务(service)</li>
+<li>
+<a href="#plus.bluetooth.notifyBLECharacteristicValueChange">notifyBLECharacteristicValueChange</a>: 启用低功耗蓝牙设备特征值变化时的notify功能,订阅特征值</li>
+<li>
+<a href="#plus.bluetooth.onBLECharacteristicValueChange">onBLECharacteristicValueChange</a>: 监听低功耗蓝牙设备的特征值变化事件</li>
+<li>
+<a href="#plus.bluetooth.onBLEConnectionStateChange">onBLEConnectionStateChange</a>: 监听低功耗蓝牙设备连接状态变化事件</li>
+<li>
+<a href="#plus.bluetooth.readBLECharacteristicValue">readBLECharacteristicValue</a>: 读取低功耗蓝牙设备指定特征值的二进制数据值</li>
+<li>
+<a href="#plus.bluetooth.writeBLECharacteristicValue">writeBLECharacteristicValue</a>: 向低功耗蓝牙设备指定特征值写入二进制数据</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.bluetooth.BluetoothDeviceInfo">BluetoothDeviceInfo</a>: 蓝牙设备信息</li>
+<li>
+<a href="#plus.bluetooth.BluetoothService">BluetoothService</a>: 蓝牙设备服务信息</li>
+<li>
+<a href="#plus.bluetooth.Bluetoothcharacteristic">Bluetoothcharacteristic</a>: 蓝牙设备特征值</li>
+<li>
+<a href="#plus.bluetooth.BluetoothcharacteristicProperties">BluetoothcharacteristicProperties</a>: 蓝牙设备特征值支持的操作类型</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.bluetooth.BluetoothSuccessCallback">BluetoothSuccessCallback</a>: 成功回调函数</li>
+<li>
+<a href="#plus.bluetooth.BluetoothFailCallback">BluetoothFailCallback</a>: 失败回调函数</li>
+<li>
+<a href="#plus.bluetooth.BluetoothCompleteCallback">BluetoothCompleteCallback</a>: 操作完成回调函数</li>
+<li>
+<a href="#plus.bluetooth.BluetoothAdapterStateChangeCallback">BluetoothAdapterStateChangeCallback</a>: 蓝牙适配器状态变化事件回调函数</li>
+<li>
+<a href="#plus.bluetooth.BluetoothDeviceFoundCallback">BluetoothDeviceFoundCallback</a>: 蓝牙适配器搜索到新设备事件回调函数</li>
+<li>
+<a href="#plus.bluetooth.BLEConnectionStateChangeCallback">BLEConnectionStateChangeCallback</a>: 低功耗蓝牙设备连接状态变化事件回调函数</li>
+<li>
+<a href="#plus.bluetooth.BLECharacteristicValueChangeCallback">BLECharacteristicValueChangeCallback</a>: 低功耗蓝牙设备的特征值变化事件回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Bluetooth": {
+		"description": "Bluetooth"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.bluetooth.BluetoothDeviceInfo">BluetoothDeviceInfo</a></h1>
+<p>蓝牙设备信息</p>
+<pre class="prettyprint linenums">
+interface BluetoothDeviceInfo {
+	readonly attribute String name;
+	readonly attribute String deviceId;
+	readonly attribute String RSSI;
+	readonly attribute ArrayBuffer advertisData;
+	readonly attribute Array&lt;String&gt; advertisServiceUUIDs;
+	readonly attribute String localName;
+	readonly attribute JSON serviceData;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>name: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备名称<br><p>
+	某些设备可能没有此字段值。
+						</p>
+</li>
+<li>deviceId: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备的id<br>
+</li>
+<li>RSSI: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备的信号强度<br>
+</li>
+<li>advertisData: <em>(<font class="type">ArrayBuffer</font>
+	类型
+)</em>蓝牙设备的广播数据段中的ManufacturerData数据段<br>
+</li>
+<li>advertisServiceUUIDs: <em>(<font class="type">Array</font>[
+				<font class="type">String</font>
+				]
+			
+	类型
+)</em>蓝牙设备的广播数据段中的ServiceUUIDs数据段<br>
+</li>
+<li>localName: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备的广播数据段中的LocalName数据段<br>
+</li>
+<li>serviceData: <em>(<font class="type">JSON</font>
+	类型
+)</em>蓝牙设备的广播数据段中的ServiceData数据段<br>
+</li>
+</ul>
+<h1><a name="plus.bluetooth.BluetoothService">BluetoothService</a></h1>
+<p>蓝牙设备服务信息</p>
+<pre class="prettyprint linenums">
+interface BluetoothService {
+	readonly attribute String uuid;
+	readonly attribute Boolean isPrimary;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>uuid: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备服务的uuid<br>
+</li>
+<li>isPrimary: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否为设备的主服务<br>
+</li>
+</ul>
+<h1><a name="plus.bluetooth.Bluetoothcharacteristic">Bluetoothcharacteristic</a></h1>
+<p>蓝牙设备特征值</p>
+<pre class="prettyprint linenums">
+interface Bluetoothcharacteristic {
+	readonly attribute String uuid;
+	readonly attribute BluetoothcharacteristicProperties properties;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>uuid: <em>(<font class="type">String</font>
+	类型
+)</em>蓝牙设备特征值的uuid<br>
+</li>
+<li>properties: <em>(<a href="#plus.bluetooth.BluetoothcharacteristicProperties">BluetoothcharacteristicProperties</a>
+	类型
+)</em>设备特征值支持的操作类型<br>
+</li>
+</ul>
+<h1><a name="plus.bluetooth.BluetoothcharacteristicProperties">BluetoothcharacteristicProperties</a></h1>
+<p>蓝牙设备特征值支持的操作类型</p>
+<pre class="prettyprint linenums">
+interface BluetoothcharacteristicProperties {
+	readonly attribute Boolean read;
+	readonly attribute Boolean write;
+	readonly attribute Boolean notify;
+	readonly attribute Boolean indicate;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>read: <em>(<font class="type">Boolean</font>
+	类型
+)</em>特征值是否支持read操作<br>
+</li>
+<li>write: <em>(<font class="type">Boolean</font>
+	类型
+)</em>特征值是否支持write操作<br>
+</li>
+<li>notify: <em>(<font class="type">Boolean</font>
+	类型
+)</em>特征值是否支持notify操作<br>
+</li>
+<li>indicate: <em>(<font class="type">Boolean</font>
+	类型
+)</em>特征值是否支持indicate操作<br>
+</li>
+</ul>
+<h1><a name="plus.bluetooth.BluetoothSuccessCallback">BluetoothSuccessCallback</a></h1>
+<p>成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(JSON event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>回调参数<br>
+	回调参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BluetoothFailCallback">BluetoothFailCallback</a></h1>
+<p>失败回调函数</p>
+<pre class="prettyprint linenums">
+function void onFail(Exception error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>回调参数,错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BluetoothCompleteCallback">BluetoothCompleteCallback</a></h1>
+<p>操作完成回调函数</p>
+<pre class="prettyprint linenums">
+function void onComplete(JSON event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用成功或失败都会触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>回调参数<br>
+	调用成功时回调参数与BluetoothSuccessCallback一致,调用失败时回调参数与BluetoothFailCallback一致。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BluetoothAdapterStateChangeCallback">BluetoothAdapterStateChangeCallback</a></h1>
+<p>蓝牙适配器状态变化事件回调函数</p>
+<pre class="prettyprint linenums">
+function void onStateChange(JSON event){
+	// event.available
+	// event.discovering
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	蓝牙适配器状态发生变化时触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>返回参数<br>
+	回调函数参数event对象包括以下属性:
+		available - Boolean,蓝牙适配器是否可用;
+		discovering - Boolean,蓝牙适配器是否处于搜索状态。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BluetoothDeviceFoundCallback">BluetoothDeviceFoundCallback</a></h1>
+<p>蓝牙适配器搜索到新设备事件回调函数</p>
+<pre class="prettyprint linenums">
+function void onDeviceFound(JSON event){
+	// event.devices
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	搜索到蓝牙设备时触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>返回参数<br>
+	回调函数参数event对象包括以下属性:
+		devices - Array&lt;BluetoothDeviceInfo&gt;,设备列表信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BLEConnectionStateChangeCallback">BLEConnectionStateChangeCallback</a></h1>
+<p>低功耗蓝牙设备连接状态变化事件回调函数</p>
+<pre class="prettyprint linenums">
+function void onStateChange(JSON event){
+	// event.deviceId
+	// event.connected
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	蓝牙设备连接状态发生变化时触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>返回参数<br>
+	回调函数参数event对象包括以下属性:
+		deviceId - String类型,蓝牙设备id;
+		connected - Boolean类型,是否处于已连接状态。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.bluetooth.BLECharacteristicValueChangeCallback">BLECharacteristicValueChangeCallback</a></h1>
+<p>低功耗蓝牙设备的特征值变化事件回调函数</p>
+<pre class="prettyprint linenums">
+function void onValueChange(JSON event){
+	// event.deviceId
+	// event.serviceId
+	// event.characteristicId
+	// event.value
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	蓝牙设备对应的特征值发生变化时触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>返回参数<br>
+	回调函数参数event对象包括以下属性:
+		deviceId - String类型,蓝牙设备id;
+		serviceId - String类型,蓝牙服务的uuid;
+		characteristicId - String类型,蓝牙特征值的uuid;
+		value - ArrayBuffer类型,特征值的最新值。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 78 - 0
hello H5+/doc/cache.html

@@ -0,0 +1,78 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Cache Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.cache">cache</a></h1>
+<p>Cache模块用于管理应用缓存,通过plus.cache获取缓存管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.cache.clear">clear</a>: 清除应用的缓存数据</li>
+<li>
+<a href="#plus.cache.calculate">calculate</a>: 计算应用已使用的缓存数据大小</li>
+<li>
+<a href="#plus.cache.setMaxSize">setMaxSize</a>: 设置应用的可使用的最大缓存大小</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.cache.CacheClearCallback">CacheClearCallback</a>: 清除应用缓存完成回调</li>
+<li>
+<a href="#plus.cache.CacheCalculateCallback">CacheCalculateCallback</a>: 计算应用使用缓存容量回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Cache": {
+		"description": "应用缓存"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.cache.CacheClearCallback">CacheClearCallback</a></h1>
+<p>清除应用缓存完成回调</p>
+<pre class="prettyprint linenums">
+void onCompleted() {
+	// Clear cache completed code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">清除应用缓存回调函数,调用plus.cache.clear清除缓存操作时作为参数传入,在清除缓存操作完成时触发回调。</p>
+<h2>参数:</h2>
+<ul></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.cache.CacheCalculateCallback">CacheCalculateCallback</a></h1>
+<p>计算应用使用缓存容量回调</p>
+<pre class="prettyprint linenums">
+void onCompleted( size ) {
+	// Calculate cache complete code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">计算应用当前使用缓存容量回调函数,调用plus.cache.calculate计算缓存容量操作时作为参数传入,在计算缓存容量大小完成时触发回调。</p>
+<h2>参数:</h2>
+<ul><li>size: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>应用当前使用缓存的大小,单位为byte<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 214 - 0
hello H5+/doc/camera.html

@@ -0,0 +1,214 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Camera Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.camera">camera</a></h1>
+<p>Camera模块管理设备的摄像头,可用于拍照、摄像操作,通过plus.camera获取摄像头管理对象。</p>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.camera.getCamera">getCamera</a>: 获取摄像头管理对象</li></ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.camera.Camera">Camera</a>: 摄像头对象</li>
+<li>
+<a href="#plus.camera.CameraOptions">CameraOptions</a>: JSON对象,调用摄像头的参数</li>
+<li>
+<a href="#plus.camera.PopPosition">PopPosition</a>: JSON对象,弹出拍照或摄像界面指示位置</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.camera.CameraSuccessCallback">CameraSuccessCallback</a>: 调用摄像头操作成功回调</li>
+<li>
+<a href="#plus.camera.CameraErrorCallback">CameraErrorCallback</a>: 摄像头操作失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Camera": {
+		"description": "摄像头"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.camera.Camera">Camera</a></h1>
+<p>摄像头对象</p>
+<pre class="prettyprint linenums">
+interface Camera {
+	readonly attribute String[] supportedImageResolutions;
+	readonly attribute String[] supportedVideoResolutions;
+	readonly attribute String[] supportedImageFormats;
+	readonly attribute String[] supportedVideoFormats;
+	function void captureImage(successCB, errorCB, option);
+	function void startVideoCapture(successCB, errorCB, option);
+	function void stopVideoCapture();
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.camera.Camera.supportedImageResolutions">supportedImageResolutions</a>: 字符串数组,摄像头支持的拍照分辨率</li>
+<li>
+<a href="#plus.camera.Camera.supportedVideoResolutions">supportedVideoResolutions</a>: 字符串数组,摄像头支持的摄像分辨率</li>
+<li>
+<a href="#plus.camera.Camera.supportedImageFormats">supportedImageFormats</a>: 字符串数组,摄像头支持的拍照文件格式</li>
+<li>
+<a href="#plus.camera.Camera.supportedVideoFormats">supportedVideoFormats</a>: 字符串数组,摄像头支持的摄像文件格式</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.camera.Camera.captureImage">captureImage</a>: 进行拍照操作</li>
+<li>
+<a href="#plus.camera.Camera.startVideoCapture">startVideoCapture</a>: 调用摄像头进行摄像操作</li>
+<li>
+<a href="#plus.camera.Camera.stopVideoCapture">stopVideoCapture</a>: 结束摄像操作</li>
+</ul>
+<h1><a name="plus.camera.CameraOptions">CameraOptions</a></h1>
+<p>JSON对象,调用摄像头的参数</p>
+<pre class="prettyprint linenums">
+interface CameraOptions {
+	attribute String filename;
+	attribute String format;
+	attribute String index;
+	attribute Number videoMaximumDuration;
+	attribute Boolean optimize;
+	attribute String resolution;
+	attribute PopPosition popover;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>filename: <em>(<font class="type">String</font>
+	类型
+)</em>拍照或摄像文件保存的路径<br><p>
+	可设置具体文件名(如"_doc/camera/a.jpg");也可只设置路径,以"/"结尾则表明是路径(如"_doc/camera/")。
+	如未设置文件名称或设置的文件名冲突则文件名由程序程序自动生成。
+						</p>
+</li>
+<li>format: <em>(<font class="type">String</font>
+	类型
+)</em>拍照或摄像的文件格式<br><p>
+	可通过Camera对象的supportedImageFormats或supportedVideoFormats获取,如果设置的参数无效则使用系统默认值。
+						</p>
+</li>
+<li>index: <em>(<font class="type">String</font>
+	类型
+)</em>拍照或摄像默认使用的摄像头<br><p>
+	拍照或摄像界面默认使用的摄像头编号,1表示主摄像头,2表示辅摄像头。
+						</p>
+</li>
+<li>videoMaximumDuration: <em>(<font class="type">Number</font>
+	类型
+)</em>视频长度<br><p>
+	单位为秒(s),小于等于0表示不限定视频长度。
+	默认值为0(不限定视频长度)。
+	注意:仅在调用拍摄视频(startVideoCapture)时有效。
+						</p>
+</li>
+<li>optimize: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否优化图片<br><p>
+	自动调整图片的方向,在部分设备上可能出现图片方向不正确的问题,此参数将配置是否自动调整图片方向。
+	可取值:
+		true - 自动调整图片方向;
+		false - 不调整。
+	默认值为true。
+	注意:自动调整图片方向将消耗部分系统资源,可能会导致拍照后回调触发时机延迟,将此值设置为false则可避免延迟问题。
+						</p>
+</li>
+<li>resolution: <em>(<font class="type">String</font>
+	类型
+)</em>拍照或摄像使用的分辨率<br><p>
+	可通过Camera对象的supportedImageResolutions或supportedVideoResolutions获取,如果设置的参数无效则使用系统默认值。
+						</p>
+</li>
+<li>popover: <em>(<a href="#plus.camera.PopPosition">PopPosition</a>
+	类型
+)</em>拍照或摄像界面弹出指示区域<br><p>
+	对于大屏幕设备如iPad,拍照或摄像界面为弹出窗口,此时可通过此参数设置弹出窗口位置,其为JSON对象,格式如{top:"10px",left:"10px",width:"200px",height:"200px"},默认弹出位置为屏幕居中。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.camera.PopPosition">PopPosition</a></h1>
+<p>JSON对象,弹出拍照或摄像界面指示位置</p>
+<h2>属性:</h2>
+<ul>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域距离容器顶部的距离<br><p>
+	弹出拍照或摄像窗口指示区域距离容器顶部的距离,支持像素值(如"100px")和百分比(如"50%")。</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域距离容器左侧的距离<br><p>
+	弹出拍照或摄像窗口指示区域距离容器左侧的距离,支持像素值(如"100px")和百分比(如"50%")。</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域的宽度<br><p>
+	弹出拍照或摄像窗口指示区域的宽度,支持像素值(如"100px")和百分比(如"50%")。</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域的高度<br><p>
+	弹出拍照或摄像窗口指示区域的高度,支持像素值(如"100px")和百分比(如"50%")。</p>
+</li>
+</ul>
+<h1><a name="plus.camera.CameraSuccessCallback">CameraSuccessCallback</a></h1>
+<p>调用摄像头操作成功回调</p>
+<pre class="prettyprint linenums">
+void onSuccess( capturedFile ) {
+	// Caputre image/video file code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用摄像头操作成功的回调函数,在拍照或摄像操作成功时调用,用于返回图片或视频文件的路径。
+				</p>
+<h2>参数:</h2>
+<ul><li>capturedFile: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>拍照或摄像操作保存的文件路径<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.camera.CameraErrorCallback">CameraErrorCallback</a></h1>
+<p>摄像头操作失败回调</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Handle camera error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>摄像头操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 44 - 0
hello H5+/doc/console.html

@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Console Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.console">console</a></h1>
+<p>Console模块用于跟踪调试的API,可根据调试需求输出日志,协助开发人员定位业务逻辑问题。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.console.log">log</a>: 记录用户日志</li>
+<li>
+<a href="#plus.console.info">info</a>: 记录用户提示信息</li>
+<li>
+<a href="#plus.console.warn">warn</a>: 记录用户警告信息</li>
+<li>
+<a href="#plus.console.error">error</a>: 记录用户错误信息</li>
+<li>
+<a href="#plus.console.assert">assert</a>: 断言操作</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Console": {
+		"description": "日志,跟踪调试输出日志信息"
+	}
+}
+}
+			</pre>
+<br><br>
+</div></body>
+</html>

+ 407 - 0
hello H5+/doc/contacts.html

@@ -0,0 +1,407 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Contacts Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.contacts">contacts</a></h1>
+<p>Contacts模块管理系统通讯录,用于可对系统通讯录进行增、删、改、查等操作。通过plus.contacts获取系统通讯录管理对象。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.ADDRESSBOOK_PHONE">ADDRESSBOOK_PHONE</a>: 手机通讯录</li>
+<li>
+<a href="#plus.contacts.ADDRESSBOOK_SIM">ADDRESSBOOK_SIM</a>: SIM卡通讯录</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.contacts.getAddressBook">getAddressBook</a>: 获取通讯录对象</li></ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.AddressBook">AddressBook</a>: 通讯录对象</li>
+<li>
+<a href="#plus.contacts.Contact">Contact</a>: 联系人对象</li>
+<li>
+<a href="#plus.contacts.ContactField">ContactField</a>: JSON对象,联系人域数据对象</li>
+<li>
+<a href="#plus.contacts.ContactName">ContactName</a>: JSON对象,联系人名称对象</li>
+<li>
+<a href="#plus.contacts.ContactAddress">ContactAddress</a>: JSON对象,联系人地址对象</li>
+<li>
+<a href="#plus.contacts.ContactOrganization">ContactOrganization</a>: JSON对象,联系人所属组织信息</li>
+<li>
+<a href="#plus.contacts.ContactFindOption">ContactFindOption</a>: JSON对象,查找联系人参数</li>
+<li>
+<a href="#plus.contacts.ContactFindFilter">ContactFindFilter</a>: JSON对象,联系人查找过滤器</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.AddressBookSuccessCallback">AddressBookSuccessCallback</a>: 获取通讯录操作成功回调函数</li>
+<li>
+<a href="#plus.contacts.FindSuccessCallback">FindSuccessCallback</a>: 查找联系人操作成功回调函数</li>
+<li>
+<a href="#plus.contacts.ContactsSuccessCallback">ContactsSuccessCallback</a>: 联系人操作成功回调函数</li>
+<li>
+<a href="#plus.contacts.ContactsErrorCallback">ContactsErrorCallback</a>: 联系人操作失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Contacts": {
+		"description": "通讯录,访问系统联系人"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.contacts.AddressBook">AddressBook</a></h1>
+<p>通讯录对象</p>
+<pre class="prettyprint linenums">
+interface AddressBook {
+	function Contact create();
+	function void find( contactFields, successCB, errorCB, findOptions );
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">通讯录管理对象,可对系统通讯录进行联系人的增、删、改、查操作。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.AddressBook.create">create</a>: 创建联系人</li>
+<li>
+<a href="#plus.contacts.AddressBook.find">find</a>: 在通讯录中查找联系人</li>
+</ul>
+<h1><a name="plus.contacts.Contact">Contact</a></h1>
+<p>联系人对象</p>
+<pre class="prettyprint linenums">
+interface Contact {
+	readonly attribute String id;
+	attribute String displayName;
+	attribute ContactName name;
+	attribute String nickname;
+	attribute ContackField[] phoneNumbers;
+	attribute ContactField[] emails;
+	attribute ContactAddress[] addresses;
+	attribute ContactField[] ims;
+	attribute ContactOriganization[] organizations;
+	attribute Date birthday;
+	attribute String note;
+	attribute ContactField[] photos;
+	attribute ContactField[] categories;
+	attribute ContactField[] urls;
+	function Contact clone();
+	function void remove( successCB, errorCB );
+	function void save( successCB, errorCB );
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">联系人对象,包括联系人的各种信息,如名称、电话号码、地址等。也包括新增、删除联系人的操作方法。</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.Contact.id">id</a>: 联系人的id</li>
+<li>
+<a href="#plus.contacts.Contact.displayName">displayName</a>: 联系人显示的名字</li>
+<li>
+<a href="#plus.contacts.Contact.name">name</a>: 联系人的名称</li>
+<li>
+<a href="#plus.contacts.Contact.nickname">nickname</a>: 联系人的昵称</li>
+<li>
+<a href="#plus.contacts.Contact.phoneNumbers">phoneNumbers</a>: 数组,联系人的电话</li>
+<li>
+<a href="#plus.contacts.Contact.emails">emails</a>: 数组,联系人的邮箱</li>
+<li>
+<a href="#plus.contacts.Contact.addresses">addresses</a>: 数组,联系人的地址</li>
+<li>
+<a href="#plus.contacts.Contact.ims">ims</a>: 数组,联系人的即时通讯地址</li>
+<li>
+<a href="#plus.contacts.Contact.organizations">organizations</a>: 数组,联系人所属组织信息</li>
+<li>
+<a href="#plus.contacts.Contact.birthday">birthday</a>: 联系人的生日</li>
+<li>
+<a href="#plus.contacts.Contact.note">note</a>: 联系人的备注</li>
+<li>
+<a href="#plus.contacts.Contact.photos">photos</a>: 数组,联系人的头像</li>
+<li>
+<a href="#plus.contacts.Contact.categories">categories</a>: 数组,联系人的组名</li>
+<li>
+<a href="#plus.contacts.Contact.urls">urls</a>: 数组,联系人的网址</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.contacts.Contact.clone">clone</a>: 克隆联系人</li>
+<li>
+<a href="#plus.contacts.Contact.remove">remove</a>: 删除联系人</li>
+<li>
+<a href="#plus.contacts.Contact.save">save</a>: 保存联系人</li>
+</ul>
+<h1><a name="plus.contacts.ContactField">ContactField</a></h1>
+<p>JSON对象,联系人域数据对象</p>
+<pre class="prettyprint linenums">
+interface ContactField {
+	attribute String type;
+	attribute String value;
+	attribute Boolean preferred;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">联系人域数据对象,保存联系人特定域信息。</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>联系人域类型,如电话号码中的“mobile”、“home”、“company”<br>
+</li>
+<li>value: <em>(<font class="type">String</font>
+	类型
+)</em>联系人域值<br>
+</li>
+<li>preferred: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否为首选项<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.ContactName">ContactName</a></h1>
+<p>JSON对象,联系人名称对象</p>
+<pre class="prettyprint linenums">
+interface ContactName {
+	attribute String formatted;
+	attribute String familyName;
+	attribute String givenName;
+	attribute String middleName;
+	attribute String honorificPrefix;
+	attribute String honorificSuffix;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">联系人名称对象,保存联系人名称信息,如姓、名等。</p>
+<h2>属性:</h2>
+<ul>
+<li>formatted: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的完整名称,由其它字段组合生成<br>
+</li>
+<li>familyName: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的姓<br>
+</li>
+<li>givenName: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的名<br>
+</li>
+<li>middleName: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的中间名<br>
+</li>
+<li>honorificPrefix: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的前缀(如Mr.或Dr.)<br>
+</li>
+<li>honorificSuffix: <em>(<font class="type">String</font>
+	类型
+)</em>联系人的后缀<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.ContactAddress">ContactAddress</a></h1>
+<p>JSON对象,联系人地址对象</p>
+<pre class="prettyprint linenums">
+interface ContactAddress {
+	attribute String type;
+	attribute String formatted;
+	attribute String streetAddress;
+	attribute String locality;
+	attribute String region;
+	attribute String country;
+	attribute String postalCode;
+	attribute Boolean preferred;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">联系人地址对象,保存联系人地址信息,如国家、省份、城市等。</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>联系人地址类型,如“home”表示家庭地址、“company”表示单位地址<br>
+</li>
+<li>formatted: <em>(<font class="type">String</font>
+	类型
+)</em>完整地址,由其它字段组合而成<br>
+</li>
+<li>streetAddress: <em>(<font class="type">String</font>
+	类型
+)</em>完整的街道地址<br>
+</li>
+<li>locality: <em>(<font class="type">String</font>
+	类型
+)</em>城市或地区<br>
+</li>
+<li>region: <em>(<font class="type">String</font>
+	类型
+)</em>省或地区<br>
+</li>
+<li>country: <em>(<font class="type">String</font>
+	类型
+)</em>国家<br>
+</li>
+<li>postalCode: <em>(<font class="type">String</font>
+	类型
+)</em>邮政编码<br>
+</li>
+<li>preferred: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否为首选项<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.ContactOrganization">ContactOrganization</a></h1>
+<p>JSON对象,联系人所属组织信息</p>
+<pre class="prettyprint linenums">
+interface ContactOrganization {
+	attribute String type;
+	attribute String name;
+	attribute String department;
+	attribute String title;
+	attribute Boolean preferred;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>联系人所属组织类型,如"company"<br>
+</li>
+<li>name: <em>(<font class="type">String</font>
+	类型
+)</em> 联系人所属组织名称<br>
+</li>
+<li>department: <em>(<font class="type">String</font>
+	类型
+)</em>联系人所属组织部门<br>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>联系人在组织中的职位<br>
+</li>
+<li>preferred: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否为首选项<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.ContactFindOption">ContactFindOption</a></h1>
+<p>JSON对象,查找联系人参数</p>
+<pre class="prettyprint linenums">
+interface ContactFindOption {
+	attribute ContactFindFilte[] filter;
+	attribute Boolean multiple;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>filter: <em>(<a href="#plus.contacts.ContactFindFilter">ContactFindFilter</a>
+	类型
+)</em>数组,查找时的过滤器<br><p>可设置为空,表示不过滤。</p>
+</li>
+<li>multiple: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否查找多个联系人,默认值为true<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.ContactFindFilter">ContactFindFilter</a></h1>
+<p>JSON对象,联系人查找过滤器</p>
+<pre class="prettyprint linenums">
+interface ContactFindFilter {
+	attribute String logic;
+	attribute String field;
+	attribute String value;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>logic: <em>(<font class="type">String</font>
+	类型
+)</em>区配的逻辑<br><p>可取“and”、“or”、“not”,默认值为“and”。</p>
+</li>
+<li>field: <em>(<font class="type">String</font>
+	类型
+)</em>区配的联系人域,可取联系人的属性名称<br>
+</li>
+<li>value: <em>(<font class="type">String</font>
+	类型
+)</em>区配的联系人值,可使用区配符号“?”和“*”<br>
+</li>
+</ul>
+<h1><a name="plus.contacts.AddressBookSuccessCallback">AddressBookSuccessCallback</a></h1>
+<p>获取通讯录操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( addressbook ){
+	// Code AddressBook here
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>addressbook: 
+		<em>(
+			<a href="#plus.contacts.AddressBook">AddressBook</a>
+			)
+			必选 </em>获取到的通讯录对象<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.contacts.FindSuccessCallback">FindSuccessCallback</a></h1>
+<p>查找联系人操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( contacts ){
+	// Find contact success.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>contacts: 
+		<em>(
+			<a href="#plus.contacts.Contact">Contact</a>
+			)
+			必选 </em>数组,查找到的联系人对象<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.contacts.ContactsSuccessCallback">ContactsSuccessCallback</a></h1>
+<p>联系人操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(){
+	// Operate success
+}
+				</pre>
+<h2>参数:</h2>
+<ul></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.contacts.ContactsErrorCallback">ContactsErrorCallback</a></h1>
+<p>联系人操作失败回调</p>
+<pre class="prettyprint linenums">
+void onError( error ){
+	// Handle the error
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>联系人操作的错误信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 304 - 0
hello H5+/doc/device.html

@@ -0,0 +1,304 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Device Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.device">device</a></h1>
+<p>Device模块管理设备信息,用于获取手机设备的相关信息,如IMEI、IMSI、型号、厂商等。通过plus.device获取设备信息管理对象。</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.device.imei">imei</a>: 设备的国际移动设备身份码</li>
+<li>
+<a href="#plus.device.imsi">imsi</a>: 设备的国际移动用户识别码</li>
+<li>
+<a href="#plus.device.model">model</a>: 设备的型号</li>
+<li>
+<a href="#plus.device.vendor">vendor</a>: 设备的生产厂商</li>
+<li>
+<a href="#plus.device.uuid">uuid</a>: 设备的唯一标识</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.device.beep">beep</a>: 发出蜂鸣声</li>
+<li>
+<a href="#plus.device.dial">dial</a>: 拨打电话</li>
+<li>
+<a href="#plus.device.getInfo">getInfo</a>: 获取设备信息</li>
+<li>
+<a href="#plus.device.getOAID">getOAID</a>: 获取匿名设备标识符</li>
+<li>
+<a href="#plus.device.getVAID">getVAID</a>: 获取开发者匿名设备标识符</li>
+<li>
+<a href="#plus.device.getAAID">getAAID</a>: 获取应用匿名设备标识符</li>
+<li>
+<a href="#plus.device.getVolume">getVolume</a>: 获取设备的系统音量</li>
+<li>
+<a href="#plus.device.isWakelock">isWakelock</a>: 获取程序是否一直保持唤醒(屏幕常亮)状态</li>
+<li>
+<a href="#plus.device.setWakelock">setWakelock</a>: 设置应用是否保持唤醒(屏幕常亮)状态</li>
+<li>
+<a href="#plus.device.setVolume">setVolume</a>: 设置设备的系统音量</li>
+<li>
+<a href="#plus.device.vibrate">vibrate</a>: 设备振动</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.device.DeviceInfo">DeviceInfo</a>: 设备信息对象</li>
+<li>
+<a href="#plus.screen">screen</a>: Screen模块管理设备屏幕信息</li>
+<li>
+<a href="#plus.display">display</a>: Display模块管理应用可使用的显示区域信息</li>
+<li>
+<a href="#plus.networkinfo">networkinfo</a>: networkinfo模块用于获取网络信息</li>
+<li>
+<a href="#plus.os">os</a>: OS模块管理操作系统信息</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.device.DeviceSuccessCallback">DeviceSuccessCallback</a>: 成功回调函数</li>
+<li>
+<a href="#plus.device.DeviceFailCallback">DeviceFailCallback</a>: 失败回调函数</li>
+<li>
+<a href="#plus.device.DeviceCompleteCallback">DeviceCompleteCallback</a>: 操作完成回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Device": {
+		"description": "设备信息"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.device.DeviceInfo">DeviceInfo</a></h1>
+<p>设备信息对象</p>
+<pre class="prettyprint linenums">
+interface plus.device.DeviceInfo {
+	attribute String imei;
+	attribute String imsi;
+	attribute String uuid;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>imei: <em>(<font class="type">String</font>
+	类型
+)</em>设备的国际移动设备身份码<br><p>
+	如果设备不支持或无法获取(如用户未授权)则返回空字符串。
+	如果设备存在多个身份码,则以“,”字符分割拼接,如“862470039452950,862470039452943”。
+						</p>
+</li>
+<li>imsi: <em>(<font class="type">Array</font>[
+				<font class="type">String</font>
+				]
+			
+	类型
+)</em>设备的国际移动用户识别码<br><p>
+	字符串数组类型,获取设备上插入SIM的国际移动设备身份码。
+	如果设备支持多卡模式则返回所有SIM身份码。
+	如果设备不支持或没有插入SIM卡则返回空数组。
+						</p>
+</li>
+<li>uuid: <em>(<font class="type">String</font>
+	类型
+)</em>设备标识<br><p>
+	设备的唯一标识号。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.screen">screen</a></h1>
+<p>Screen模块管理设备屏幕信息</p>
+<pre class="prettyprint linenums">
+interface plus.screen {
+	attribute String dpiX;
+	attribute String dpiY;
+	attribute Number height;
+	attribute Number width;
+	attribute Number resolutionHeight;
+	attribute Number resolutionWidth;
+	attribute Number scale;
+	
+	function void setBrightness(brightness);
+	function Number getBrightness();
+	function void lockOrientation(orientation);
+	function void unlockOrientation();
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.screen.dpiX">dpiX</a>: 设备屏幕水平方向的密度</li>
+<li>
+<a href="#plus.screen.dpiY">dpiY</a>: 设备屏幕垂直方向的密度</li>
+<li>
+<a href="#plus.screen.height">height</a>: 屏幕高度物理分辨率</li>
+<li>
+<a href="#plus.screen.width">width</a>: 屏幕宽度物理分辨率</li>
+<li>
+<a href="#plus.screen.resolutionHeight">resolutionHeight</a>: 屏幕高度逻辑分辨率</li>
+<li>
+<a href="#plus.screen.resolutionWidth">resolutionWidth</a>: 屏幕宽度逻辑分辨率</li>
+<li>
+<a href="#plus.screen.scale">scale</a>: 逻辑分辨率与物理分辨率的缩放比例</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.screen.setBrightness">setBrightness</a>: 设置屏幕亮度</li>
+<li>
+<a href="#plus.screen.getBrightness">getBrightness</a>: 获取屏幕亮度值</li>
+<li>
+<a href="#plus.screen.lockOrientation">lockOrientation</a>: 锁定屏幕方向</li>
+<li>
+<a href="#plus.screen.unlockOrientation">unlockOrientation</a>: 解除锁定屏幕方向</li>
+</ul>
+<h1><a name="plus.display">display</a></h1>
+<p>Display模块管理应用可使用的显示区域信息</p>
+<pre class="prettyprint linenums">
+interface plus.display {
+	attribute Number resolutionHeight;
+	attribute Number resolutionWidth;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.display.resolutionHeight">resolutionHeight</a>: 应用可使用的屏幕高度逻辑分辨率</li>
+<li>
+<a href="#plus.display.resolutionWidth">resolutionWidth</a>: 应用可使用的屏幕宽度逻辑分辨率</li>
+</ul>
+<h1><a name="plus.networkinfo">networkinfo</a></h1>
+<p>networkinfo模块用于获取网络信息</p>
+<pre class="prettyprint linenums">
+interface plus.networkinfo {
+	const attribute Number CONNECTION_UNKNOW = 0;
+	const attribute Number CONNECTION_NONE = 1;
+	const attribute Number CONNECTION_ETHERNET = 2;
+	const attribute Number CONNECTION_WIFI = 3;
+	const attribute Number CONNECTION_CELL2G = 4;
+	const attribute Number CONNECTION_CELL3G = 5;
+	const attribute Number CONNECTION_CELL4G = 6;
+	
+	function Number getCurrentType();
+}
+				</pre>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.networkinfo.CONNECTION_UNKNOW">CONNECTION_UNKNOW</a>: 网络连接状态未知</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_NONE">CONNECTION_NONE</a>: 未连接网络</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_ETHERNET">CONNECTION_ETHERNET</a>: 有线网络</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_WIFI">CONNECTION_WIFI</a>: 无线WIFI网络</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_CELL2G">CONNECTION_CELL2G</a>: 蜂窝移动2G网络</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_CELL3G">CONNECTION_CELL3G</a>: 蜂窝移动3G网络</li>
+<li>
+<a href="#plus.networkinfo.CONNECTION_CELL4G">CONNECTION_CELL4G</a>: 蜂窝移动4G网络</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.networkinfo.getCurrentType">getCurrentType</a>: 获取设备当前连接的网络类型</li></ul>
+<h1><a name="plus.os">os</a></h1>
+<p>OS模块管理操作系统信息</p>
+<pre class="prettyprint linenums">
+interface plus.os {
+	attribute String language;
+	attribute String name;
+	attribute String vendor;
+	attribute String version;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.os.language">language</a>: 系统语言信息</li>
+<li>
+<a href="#plus.os.name">name</a>: 系统的名称</li>
+<li>
+<a href="#plus.os.vendor">vendor</a>: 系统的供应商信息</li>
+<li>
+<a href="#plus.os.version">version</a>: 系统版本信息</li>
+</ul>
+<h1><a name="plus.device.DeviceSuccessCallback">DeviceSuccessCallback</a></h1>
+<p>成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(JSON event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>回调参数<br>
+	回调参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.device.DeviceFailCallback">DeviceFailCallback</a></h1>
+<p>失败回调函数</p>
+<pre class="prettyprint linenums">
+function void onFail(Exception error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>回调参数,错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.device.DeviceCompleteCallback">DeviceCompleteCallback</a></h1>
+<p>操作完成回调函数</p>
+<pre class="prettyprint linenums">
+function void onComplete(JSON event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用成功或失败都会触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em>回调参数<br>
+	调用成功时回调参数与DeviceSuccessCallback一致,调用失败时回调参数与DeviceFailCallback一致。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 321 - 0
hello H5+/doc/downloader.html

@@ -0,0 +1,321 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Downloader Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.downloader">downloader</a></h1>
+<p>Downloader模块管理网络文件下载任务,用于从服务器下载各种文件,并支持跨域访问操作。通过plus.downloader获取下载管理对象。Downloader下载使用HTTP的GET/POST方式请求下载文件,符合标准HTTP/HTTPS传输协议。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.downloader.createDownload">createDownload</a>: 新建下载任务</li>
+<li>
+<a href="#plus.downloader.enumerate">enumerate</a>: 枚举下载任务</li>
+<li>
+<a href="#plus.downloader.clear">clear</a>: 清除下载任务</li>
+<li>
+<a href="#plus.downloader.startAll">startAll</a>: 开始所有下载任务</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.downloader.Download">Download</a>: Download对象管理一个下载任务</li>
+<li>
+<a href="#plus.downloader.DownloadEvent">DownloadEvent</a>: 下载任务事件类型</li>
+<li>
+<a href="#plus.downloader.DownloadState">DownloadState</a>: 下载任务状态</li>
+<li>
+<a href="#plus.downloader.DownloadOptions">DownloadOptions</a>: 下载任务参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.downloader.DownloadCompletedCallback">DownloadCompletedCallback</a>: 下载任务完成时的回调</li>
+<li>
+<a href="#plus.downloader.DownloadStateChangedCallback">DownloadStateChangedCallback</a>: 下载任务状态变化回调</li>
+<li>
+<a href="#plus.downloader.DownloadEnumerateCallback">DownloadEnumerateCallback</a>: 枚举下载任务回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Downloader": {
+		"description": "文件下载,管理文件下载任务"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.downloader.Download">Download</a></h1>
+<p>Download对象管理一个下载任务</p>
+<pre class="prettyprint linenums">
+interface plus.downloader.Download {
+	readonly attribute String id;
+	readonly attribute String url;
+	readonly attribute Number state;
+	readonly attribute DownloadOptions options;
+	readonly attribute String filename;
+	readonly attribute Number downloadedSize;
+	readonly attribute Number totalSize;
+	function void abort();
+	function void addEventListener(String event, function Callback listener, Boolean capture);
+	function String getAllResponseHeaders();
+	function String getResponseHeader(String headerName);
+	function void pause();
+	function void resume();
+	function void setRequestHeader(String headerName, String headerValue);
+	function void start();
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.downloader.Download.id">id</a>: 下载任务的标识</li>
+<li>
+<a href="#plus.downloader.Download.url">url</a>: 下载文件的地址</li>
+<li>
+<a href="#plus.downloader.Download.state">state</a>: 任务的状态</li>
+<li>
+<a href="#plus.downloader.Download.options">options</a>: 下载任务的参数</li>
+<li>
+<a href="#plus.downloader.Download.filename">filename</a>: 下载的文件名称</li>
+<li>
+<a href="#plus.downloader.Download.downloadedSize">downloadedSize</a>: 已完成下载文件的大小</li>
+<li>
+<a href="#plus.downloader.Download.totalSize">totalSize</a>: 下载任务文件的总大小</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.downloader.Download.abort">abort</a>: 取消下载任务</li>
+<li>
+<a href="#plus.downloader.Download.addEventListener">addEventListener</a>: 添加下载任务事件监听器</li>
+<li>
+<a href="#plus.downloader.Download.getAllResponseHeaders">getAllResponseHeaders</a>: 获取下载请求HTTP响应头部信息</li>
+<li>
+<a href="#plus.downloader.Download.getResponseHeader">getResponseHeader</a>: 获取下载请求指定的HTTP响应头部的值</li>
+<li>
+<a href="#plus.downloader.Download.pause">pause</a>: 暂停下载任务</li>
+<li>
+<a href="#plus.downloader.Download.resume">resume</a>: 恢复暂停的下载任务</li>
+<li>
+<a href="#plus.downloader.Download.setRequestHeader">setRequestHeader</a>: 设置下载请求的HTTP头数据</li>
+<li>
+<a href="#plus.downloader.Download.start">start</a>: 开始下载任务</li>
+</ul>
+<h1><a name="plus.downloader.DownloadEvent">DownloadEvent</a></h1>
+<p>下载任务事件类型</p>
+<h2>常量:</h2>
+<ul><li>"statechanged": <em>(<font class="type">String</font>
+	类型
+)</em>下载任务状态变化事件<br><p>
+	当下载任务状态发生变化时触发此事件,事件原型参考DownloadStateChangedCallback。
+						</p>
+</li></ul>
+<h1><a name="plus.downloader.DownloadState">DownloadState</a></h1>
+<p>下载任务状态</p>
+<h2>常量:</h2>
+<ul>
+<li>undefined: <em>(<font class="type">undefined</font>
+	类型
+)</em>下载任务未开始<br><p>
+	通过plus.downloader.createDownload()方法创建下载任务后的初始状态,此时可调用其start()方法开始下载。
+						</p>
+</li>
+<li>0: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务开始调度<br><p>
+	调用下载任务的start()方法之后处于此状态,此时下载任务处于可调度下载状态。
+						</p>
+</li>
+<li>1: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务开始请求<br><p>
+	下载任务建立网络连接,发送请求到服务器并等待服务器的响应。
+						</p>
+</li>
+<li>2: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务请求已经接收<br><p>
+	下载任务网络连接已建立,服务器返回响应,准备传输数据内容。
+						</p>
+</li>
+<li>3: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务接收数据<br><p>
+	下载任务接收数据,监听statechanged事件时可多次触发此状态。
+						</p>
+</li>
+<li>4: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务已完成<br><p>
+	下载任务完成数据传输并断开连接,下载成功或失败都会设置为此状态。
+						</p>
+</li>
+<li>5: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务已暂停<br><p>
+	调用下载任务的pause()方法将任务暂停,此时可调用其resume()方法重新开始下载。
+						</p>
+</li>
+<li>-1: <em>(<font class="type">Number</font>
+	类型
+)</em>枚举任务状态<br><p>
+	非下载任务状态,泛指所有下载任务的状态,用于enumerate()和clear()操作时指定作用于所有下载任务。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.downloader.DownloadOptions">DownloadOptions</a></h1>
+<p>下载任务参数</p>
+<pre class="prettyprint linenums">
+interface plus.downloader.DownloadOptions {
+	readonly attribute String method;
+	readonly attribute String data;
+	readonly attribute String filename;
+	readonly attribute Number priority;
+	readonly attribute Number timeout;
+	readonly attribute Number retry;
+	readonly attribute Number retryInterval;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在创建下载任务时设置的参数,如设置下载任务使用的HTTP协议类型、优先级等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>method: <em>(<font class="type">String</font>
+	类型
+)</em>网络请求类型<br><p>
+	支持http协议的“GET”、“POST”,默认为“GET”请求。
+						</p>
+</li>
+<li>data: <em>(<font class="type">String</font>
+	类型
+)</em>POST请求时提交的数据<br><p>
+	仅在网络请求类型method设置为"POST"时有效,"GET"请求时忽略此数据。
+						</p>
+</li>
+<li>filename: <em>(<font class="type">String</font>
+	类型
+)</em>下载文件保存的路径<br><p>
+	保存文件路径仅支持以"_downloads/"、"_doc/"、"_documents/"开头的字符串。
+	文件路径以文件后缀名结尾(如"_doc/download/a.doc")表明指定保存文件目录及名称,以“/”结尾则认为指定保存文件的目录(此时程序自动生成文件名)。
+	如果指定的文件已经存在,则自动在文件名后面加"(i)",其中i为数字,如果文件名称后面已经是此格式,则数字i递增,如"download(1).doc"。
+	默认保存目录为("_downloads"),并自动生成文件名称。
+						</p>
+</li>
+<li>priority: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务的优先级<br><p>
+	数值类型,数值越大优先级越高,默认优先级值为0。
+						</p>
+</li>
+<li>timeout: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务超时时间<br><p>
+	数值类型,单位为s(秒),默认值为120s。
+	超时时间为服务器响应请求的时间(不是下载任务完成的总时间),如果设置为0则表示永远不超时。
+						</p>
+</li>
+<li>retry: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务重试次数<br><p>
+	数值类型,默认为重试3次。
+						</p>
+</li>
+<li>retryInterval: <em>(<font class="type">Number</font>
+	类型
+)</em>下载任务重试间隔时间<br><p>
+	数值类型,单位为s(秒),默认值为30s。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.downloader.DownloadCompletedCallback">DownloadCompletedCallback</a></h1>
+<p>下载任务完成时的回调</p>
+<pre class="prettyprint linenums">
+vaoid onCompleted(Download download, Number status) {
+	// Download file complete code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	下载任务完成时的回调函数,在下载任务完成时调用。
+	下载任务失败也将触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul>
+<li>download : 
+		<em>(
+			<a href="#plus.downloader.Download">Download</a>
+			)
+			必选 </em>下载任务对象<br>
+</li>
+<li>status: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>下载结果状态码<br>
+	HTTP传输协议状态码,如果未获取传输状态则其值则为0,如下载成功其值通常为200。
+						</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.downloader.DownloadStateChangedCallback">DownloadStateChangedCallback</a></h1>
+<p>下载任务状态变化回调</p>
+<pre class="prettyprint linenums">
+void onStateChanged( Download download, status ) {
+	// Download state changed code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul>
+<li>download : 
+		<em>(
+			<a href="#plus.downloader.Download">Download</a>
+			)
+			必选 </em>下载任务对象<br>
+</li>
+<li>status: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>下载结果状态码<br>
+	HTTP传输协议状态码,如果未获取传输状态则其值则为0,如下载成功其值通常为200。
+						</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.downloader.DownloadEnumerateCallback">DownloadEnumerateCallback</a></h1>
+<p>枚举下载任务回调</p>
+<pre class="prettyprint linenums">
+void onEnumerated( Download[] downloads ) {
+	// Enumerate success code
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>downloads: 
+		<em>(
+			<font class="type">Array</font>[
+						<font class="type">Download</font>
+						]
+					
+			)
+			必选 </em>枚举到的下载任务对象数组<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 96 - 0
hello H5+/doc/events.html

@@ -0,0 +1,96 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Events Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.Events">Events</a></h1>
+<p>Events模块管理客户端事件,包括系统事件,如扩展API加载完毕、程序前后台切换等。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.Events.%22plusready%22">"plusready"</a>: 扩展API加载完成事件</li>
+<li>
+<a href="#plus.Events.%22pause%22">"pause"</a>: 运行环境从前台切换到后台事件</li>
+<li>
+<a href="#plus.Events.%22resume%22">"resume"</a>: 运行环境从后台切换到前台事件</li>
+<li>
+<a href="#plus.Events.%22netchange%22">"netchange"</a>: 设备网络状态变化事件</li>
+<li>
+<a href="#plus.Events.%22newintent%22">"newintent"</a>: 新意图事件</li>
+<li>
+<a href="#plus.Events.%22plusscrollbottom%22">"plusscrollbottom"</a>: 页面滚动到底部事件</li>
+<li>
+<a href="#plus.Events.%22error%22">"error"</a>: 页面加载错误事件</li>
+<li>
+<a href="#plus.Events.%22background%22">"background"</a>: 应用切换到后台运行事件</li>
+<li>
+<a href="#plus.Events.%22foreground%22">"foreground"</a>: 应用切换到前台运行事件</li>
+<li>
+<a href="#plus.Events.%22trimmemory%22">"trimmemory"</a>: 应用需要清理内存事件</li>
+<li>
+<a href="#plus.Events.%22splashclosed%22">"splashclosed"</a>: 应用启动界面已关闭事件</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.Events.addEventListener">addEventListener</a>: 添加事件监听函数</li></ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.Events.EventTrigCallback">EventTrigCallback</a>: 事件触发回调函数</li>
+<li>
+<a href="#plus.Events.ErrorEventTrigCallback">ErrorEventTrigCallback</a>: 页面加载错误事件回调函数</li>
+</ul>
+<h1><a name="plus.Events.EventTrigCallback">EventTrigCallback</a></h1>
+<p>事件触发回调函数</p>
+<pre class="prettyprint linenums">
+				
+void onTrig(){
+	// Event trig code
+}
+				
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	指定事件触发时的回调函数,在指定的事件已经发生时调用。
+				</p>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.Events.ErrorEventTrigCallback">ErrorEventTrigCallback</a></h1>
+<p>页面加载错误事件回调函数</p>
+<pre class="prettyprint linenums">
+				
+void onErrorTrig(Event event){
+	// Event trig code
+	var url = event.url;  // 加载错误的页面路径,API中传入的url值
+	var href = event.href;  // 加载错误的页面完整路径,通常以“file://”开头的路径
+}
+				
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当Webview窗口加载页面失败后打开错误页面时触发此事件。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>加载页面失败信息<br>
+	可通过event.url(String类型)获取加载页面的url值,如“./test/html”;
+	可通过event.href(String类型)加载错误的页面完整路径,包括完整的协议头,如Android平台“file:///storage/sdcard0/Android/data/io.dcloud.HBuilder/.HBuilder/apps/HBuilder/www/test.html”,iOS平台“file:///var/mobile/Containers/Data/Application/757966CF-345C-4348-B07F-EEF83CF9A369/Library/Pandora/apps/HBuilder/www/test.html”。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 137 - 0
hello H5+/doc/fingerprint.html

@@ -0,0 +1,137 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Fingerprint Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.fingerprint">fingerprint</a></h1>
+<p>Fingerprint模块管理指纹识别。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.fingerprint.isSupport">isSupport</a>: 当前设备环境是否支持指纹识别</li>
+<li>
+<a href="#plus.fingerprint.isKeyguardSecure">isKeyguardSecure</a>: 当前设备是否设置密码锁屏</li>
+<li>
+<a href="#plus.fingerprint.isEnrolledFingerprints">isEnrolledFingerprints</a>: 当前设备是否已经录入指纹</li>
+<li>
+<a href="#plus.fingerprint.authenticate">authenticate</a>: 指纹识别认证</li>
+<li>
+<a href="#plus.fingerprint.cancel">cancel</a>: 取消指纹识别认证</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.fingerprint.AuthenticateOptions">AuthenticateOptions</a>: JSON对象,指纹识别认证参数</li>
+<li>
+<a href="#plus.fingerprint.FingerprintError">FingerprintError</a>: JSON对象,指纹识别错误信息</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.fingerprint.FingerprintSuccessCallback">FingerprintSuccessCallback</a>: 指纹识别认证成功回调函数</li>
+<li>
+<a href="#plus.fingerprint.FingerprintErrorCallback">FingerprintErrorCallback</a>: 指纹识别认证失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Fingerprint": {
+		"description": "指纹识别"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.fingerprint.AuthenticateOptions">AuthenticateOptions</a></h1>
+<p>JSON对象,指纹识别认证参数</p>
+<pre class="prettyprint linenums">
+interface AuthenticateOptions {
+	readonly attribute String message;
+}			
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于设置指纹识别认证界面显示的提示信息等。
+				</p>
+<h2>属性:</h2>
+<ul><li>message: <em>(<font class="type">String</font>
+	类型
+)</em>在指纹识别过程中显示在界面上的提示信息<br><p>
+	如果指纹识别认证过程中不显示提示框,则不显示此信息。
+						</p>
+</li></ul>
+<h1><a name="plus.fingerprint.FingerprintError">FingerprintError</a></h1>
+<p>JSON对象,指纹识别错误信息</p>
+<pre class="prettyprint linenums">
+interface FingerprintError {
+	const Number UNSUPPORT = 1;
+	const Number KEYGUARD_INSECURE = 2;
+	const Number FINGERPRINT_UNENROLLED = 3;
+	const Number AUTHENTICATE_MISMATCH = 4;
+	const Number AUTHENTICATE_OVERLIMIT = 5;
+	const Number CANCEL = 6;
+	const Number UNKNOWN_ERROR = 7;
+	readonly attribute Number code;
+	readonly attribute String message;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>code: <em>(<font class="type">Number</font>
+	类型
+)</em>错误代码<br><p>
+	取值范围为FingerprintError对象的错误常量值。
+						</p>
+</li>
+<li>message: <em>(<font class="type">String</font>
+	类型
+)</em>错误描述信息<br><p>
+	详细错误描述信息。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.fingerprint.FingerprintSuccessCallback">FingerprintSuccessCallback</a></h1>
+<p>指纹识别认证成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess() {
+	// Authenticate success code.
+}
+				</pre>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.fingerprint.FingerprintErrorCallback">FingerprintErrorCallback</a></h1>
+<p>指纹识别认证失败的回调函数</p>
+<pre class="prettyprint linenums">
+function void onError(FingerprintError error) {
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<a href="#plus.fingerprint.FingerprintError">FingerprintError</a>
+			)
+			必选 </em>获取加速度操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 277 - 0
hello H5+/doc/gallery.html

@@ -0,0 +1,277 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Gallery Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.gallery">gallery</a></h1>
+<p>Gallery模块管理系统相册,支持从相册中选择图片或视频文件、保存图片或视频文件到相册等功能。通过plus.gallery获取相册管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.gallery.pick">pick</a>: 从系统相册选择文件(图片或视频)</li>
+<li>
+<a href="#plus.gallery.save">save</a>: 保存文件到系统相册中</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.gallery.GalleryOptions">GalleryOptions</a>: JSON对象,从相册中选择文件的参数</li>
+<li>
+<a href="#plus.gallery.GalleryFilter">GalleryFilter</a>: 相册选择文件过滤类型</li>
+<li>
+<a href="#plus.gallery.GallerySaveEvent">GallerySaveEvent</a>: 保存图片到相册成功事件</li>
+<li>
+<a href="#plus.gallery.PopPosition">PopPosition</a>: JSON对象,弹出拍照或摄像界面指示位置</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.gallery.GalleryPickSuccessCallback">GalleryPickSuccessCallback</a>: 单选系统相册图片成功的回调</li>
+<li>
+<a href="#plus.gallery.GalleryMultiplePickSuccessCallback">GalleryMultiplePickSuccessCallback</a>: 多选系统相册图片成功的回调</li>
+<li>
+<a href="#plus.gallery.GallerySuccessCallback">GallerySuccessCallback</a>: 操作系统相册成功的回调</li>
+<li>
+<a href="#plus.gallery.GalleryErrorCallback">GalleryErrorCallback</a>: 系统相册操作失败的回调</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Gallery": {
+		"description": "系统相册"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.gallery.GalleryOptions">GalleryOptions</a></h1>
+<p>JSON对象,从相册中选择文件的参数</p>
+<pre class="prettyprint linenums">
+interface plus.gallery.GalleryOptions {
+	readonly attribute Boolean animation;
+	readonly attribute String filename;
+	readonly attribute GalleryFilter filter;
+	readonly attribute Number maximum;
+	readonly attribute Boolean multiple;
+	readonly attribute PopPosition popover;
+	readonly attribute Array&lt;String&gt; selected;
+	readonly attribute Boolean system;
+	attribute Function onmaxed;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>animation: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否显示系统相册文件选择界面的动画<br><p>
+	可取值true、false,默认值为true。
+						</p>
+</li>
+<li>filename: <em>(<font class="type">String</font>
+	类型
+)</em>选择文件保存的路径<br><p>
+	某些系统不能直接使用系统相册的路径,这时需要将选择的文件保存到应用可访问的目录中,可通过此参数设置保存文件的路径。
+	如果路径中包括文件后缀名称,则表明指定文件路径及名称,否则仅指定文件保存目录,文件名称自动生成。
+						</p>
+</li>
+<li>filter: <em>(<a href="#plus.gallery.GalleryFilter">GalleryFilter</a>
+	类型
+)</em>相册中选择文件类型过滤器<br><p>
+	系统相册选择器中可选择的文件类型,可设置为仅选择图片文件(“image”)、视频文件(“video”)或所有文件(“none”),默认值为“image”。
+						</p>
+</li>
+<li>maximum: <em>(<font class="type">Number</font>
+	类型
+)</em>最多选择的图片数量<br><p>
+	仅在支持多选时有效,取值范围为1到Infinity,默认值为Infinity,即不限制选择的图片数。
+	如果设置的值非法则使用默认值Infinity。
+						</p>
+</li>
+<li>multiple: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否支持多选图片<br><p>
+	可从系统相册中选择多张图片,选择图片后通过GalleryMultiplePickSuccessCallback回调返回选择的图片。
+						</p>
+</li>
+<li>onmaxed: <em>(<font class="type">Function</font>
+	类型
+)</em>超过最多选择图片数量事件<br><p>
+	使用相册多选图片时,可通过maximum属性设置最多选择的图片数量,当用户操作选择的数量大于此时触发此事件。
+						</p>
+</li>
+<li>popover: <em>(<a href="#plus.gallery.PopPosition">PopPosition</a>
+	类型
+)</em>相册选择界面弹出指示区域<br><p>
+	对于大屏幕设备如iPad,相册选择界面为弹出窗口,此时可通过此参数设置弹出窗口位置。
+	其为JSON对象,格式如{top:"10px",left:"10px",width:"200px",height:"200px"},所有值为像素值,左上坐标相对于容器的位置,默认弹出位置为屏幕居中。
+						</p>
+</li>
+<li>selected: <em>(<font class="type">Array</font>[
+				<font class="type">String</font>
+				]
+			
+	类型
+)</em>已选择的图片路径列表<br><p>
+	仅在多图片选择时生效,相册选择界面将选中指定的图片路径列表。
+	如果指定的路径无效,则忽略此项;如果指定的路径数超过maximum属性指定的最大选择数目则超出的图片不选中。
+						</p>
+</li>
+<li>system: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否使用系统相册文件选择界面<br><p>
+	multiple属性设置为true时,如果系统自带相册选择控件时则优先使用,否则使用5+统一相册选择控件;设置为false则不使用系统自带相册选择控件,直接使用5+统一相册选择界面。
+	默认值为true。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.gallery.GalleryFilter">GalleryFilter</a></h1>
+<p>相册选择文件过滤类型</p>
+<h2>属性:</h2>
+<ul>
+<li>"image": <em>(<font class="type">String</font>
+	类型
+)</em>仅可选择图片文件<br>
+</li>
+<li>"video": <em>(<font class="type">String</font>
+	类型
+)</em>仅可选择视频文件<br>
+</li>
+<li>"none": <em>(<font class="type">String</font>
+	类型
+)</em>不过滤,可选择图片或视频文件<br>
+</li>
+</ul>
+<h1><a name="plus.gallery.GallerySaveEvent">GallerySaveEvent</a></h1>
+<p>保存图片到相册成功事件</p>
+<h2>属性:</h2>
+<ul><li>path: <em>(<font class="type">String</font>
+	类型
+)</em>保存到相册的图片路径<br>
+</li></ul>
+<h1><a name="plus.gallery.PopPosition">PopPosition</a></h1>
+<p>JSON对象,弹出拍照或摄像界面指示位置</p>
+<h2>属性:</h2>
+<ul>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域距离容器顶部的距离<br><p>
+	弹出拍照或摄像窗口指示区域距离容器顶部的距离,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值值。</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域距离容器左侧的距离<br><p>
+	弹出拍照或摄像窗口指示区域距离容器左侧的距离,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域的宽度<br><p>
+	弹出拍照或摄像窗口指示区域的宽度,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>指示区域的高度<br><p>
+	弹出拍照或摄像窗口指示区域的高度,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。</p>
+</li>
+</ul>
+<h1><a name="plus.gallery.GalleryPickSuccessCallback">GalleryPickSuccessCallback</a></h1>
+<p>单选系统相册图片成功的回调</p>
+<pre class="prettyprint linenums">
+void onSuccess( file ) {
+	// Success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	系统相册中单选图片或视频文件成功的回调函数,在选择文件操作成功时调用。
+				</p>
+<h2>参数:</h2>
+<ul><li>file: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>选择的图片或视频文件路径<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.gallery.GalleryMultiplePickSuccessCallback">GalleryMultiplePickSuccessCallback</a></h1>
+<p>多选系统相册图片成功的回调</p>
+<pre class="prettyprint linenums">
+void onSuccess( event ) {
+	// Pick success
+	var files = event.files; // 保存多选的图片或视频文件路径
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	系统相册中多选图片或视频文件成功的回调函数,在多选择文件操作成功时调用。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>多选系统相册返回数据<br>
+	Event对象包含以下属性:
+	files - 字符串数组,保存多选的图片或视频文件路径。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.gallery.GallerySuccessCallback">GallerySuccessCallback</a></h1>
+<p>操作系统相册成功的回调</p>
+<pre class="prettyprint linenums">
+void onSuccess(GallerySaveEvent event) {
+	// Success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	系统相册操作成功的回调函数,在保存文件到系统相册操作成功时调用。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<a href="#plus.gallery.GallerySaveEvent">GallerySaveEvent</a>
+			)
+			必选 </em>保存文件到系统相册成功事件对象<br>
+	可通过其path属性获取保存文件的路径。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.gallery.GalleryErrorCallback">GalleryErrorCallback</a></h1>
+<p>系统相册操作失败的回调</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	系统相册操作失败的回调函数,在选择或保存图片操作失败时调用。
+				</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>相册操作失败的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 342 - 0
hello H5+/doc/geolocation.html

@@ -0,0 +1,342 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Geolocation Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.geolocation">geolocation</a></h1>
+<p>Geolocation模块管理设备位置信息,用于获取地理位置信息,如经度、纬度等。通过plus.geolocation可获取设备位置管理对象。虽然W3C已经提供标准API获取位置信息,但在某些平台存在差异或未实现,为了保持各平台的统一性,定义此规范接口获取位置信息。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.geolocation.getCurrentPosition">getCurrentPosition</a>: 获取当前设备位置信息</li>
+<li>
+<a href="#plus.geolocation.watchPosition">watchPosition</a>: 监听设备位置变化信息</li>
+<li>
+<a href="#plus.geolocation.clearWatch">clearWatch</a>: 关闭监听设备位置信息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.geolocation.Position">Position</a>: JSON对象,设备位置信息数据</li>
+<li>
+<a href="#plus.geolocation.Address">Address</a>: JSON对象,地址信息</li>
+<li>
+<a href="#plus.geolocation.Coordinates">Coordinates</a>: JSON对象,地理坐标信息</li>
+<li>
+<a href="#plus.geolocation.PositionOptions">PositionOptions</a>: JSON对象,监听设备位置信息参数</li>
+<li>
+<a href="#plus.geolocation.GeolocationError">GeolocationError</a>: JSON对象,定位错误信息</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.geolocation.GeolocationSuccessCallback">GeolocationSuccessCallback</a>: 获取设备位置信息成功的回调函数</li>
+<li>
+<a href="#plus.geolocation.GeolocationErrorCallback">GeolocationErrorCallback</a>: 获取设备位置信息失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Geolocation": {
+		"description": "位置信息"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.geolocation.Position">Position</a></h1>
+<p>JSON对象,设备位置信息数据</p>
+<pre class="prettyprint linenums">
+interface Position {
+	readonly attribute Coordinates coords;
+	readonly attribute String coordsType;
+	readonly attribute Number timestamp;
+	readonly attribute Address address;
+	readonly attribute String addresses;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>coords: <em>(<a href="#plus.geolocation.Coordinates">Coordinates</a>
+	类型
+)</em>地理坐标信息,包括经纬度、海拔、速度等信息<br>
+</li>
+<li>coordsType: <em>(<font class="type">String</font>
+	类型
+)</em>获取到地理坐标信息的坐标系类型<br><p>
+	可取以下坐标系类型:
+	"wgs84":表示WGS-84坐标系;
+	"gcj02":表示国测局经纬度坐标系;
+	"bd09":表示百度墨卡托坐标系,仅百度定位支持;
+	"bd09ll":表示百度经纬度坐标系,仅百度定位支持。	
+						</p>
+</li>
+<li>timestamp: <em>(<font class="type">Number</font>
+	类型
+)</em>获取到地理坐标的时间戳信息<br><p>
+	时间戳值为从1970年1月1日至今的毫秒数。
+						</p>
+</li>
+<li>address: <em>(<a href="#plus.geolocation.Address">Address</a>
+	类型
+)</em>获取到地理位置对应的地址信息<br><p>
+	获取地址信息需要连接到服务器进行解析,所以会消耗更多的资源,如果不需要获取地址信息可通过设置PositionOptions参数的geocode属性值为false避免获取地址信息。
+	如果没有获取到地址信息则返回undefined。
+						</p>
+</li>
+<li>addresses: <em>(<font class="type">String</font>
+	类型
+)</em>获取完整地址描述信息<br><p>
+	如果没有获取到地址信息则返回undefined。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.geolocation.Address">Address</a></h1>
+<p>JSON对象,地址信息</p>
+<pre class="prettyprint linenums">
+interface Address {
+	readonly attribute String country;
+	readonly attribute String province;
+	readonly attribute String city;
+	readonly attribute String district;
+	readonly attribute String street;
+	readonly attribute String streetNum;
+	readonly attribute String poiName;
+	readonly attribute String postalCode;
+	readonly attribute String cityCode;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>country: <em>(<font class="type">String</font>
+	类型
+)</em>国家<br><p>
+	如“中国”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>province: <em>(<font class="type">String</font>
+	类型
+)</em>省份名称<br><p>
+	如“北京市”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>city: <em>(<font class="type">String</font>
+	类型
+)</em>城市名称<br><p>
+	如“北京市”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>district: <em>(<font class="type">String</font>
+	类型
+)</em>区(县)名称<br><p>
+	如“朝阳区”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>street: <em>(<font class="type">String</font>
+	类型
+)</em>街道信息<br><p>
+	如“酒仙桥路”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>streetNum: <em>(<font class="type">String</font>
+	类型
+)</em>获取街道门牌号信息<br><p>
+	如“3号”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>poiName: <em>(<font class="type">String</font>
+	类型
+)</em>POI信息<br><p>
+	如“电子城.国际电子总部”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>postalCode: <em>(<font class="type">String</font>
+	类型
+)</em>邮政编码<br><p>
+	如“100016”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+<li>cityCode: <em>(<font class="type">String</font>
+	类型
+)</em>城市代码<br><p>
+	如“010”,如果无法获取此信息则返回undefined。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.geolocation.Coordinates">Coordinates</a></h1>
+<p>JSON对象,地理坐标信息</p>
+<pre class="prettyprint linenums">
+interface Coordinates {
+	readonly attribute double latitude;
+	readonly attribute double longitude;
+	readonly attribute double altitude;
+	readonly attribute double accuracy;
+	readonly attribute double altitudeAccuracy;
+	readonly attribute double heading;
+	readonly attribute double speed;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>latitude: <em>(<font class="type">Number</font>
+	类型
+)</em>坐标纬度值<br><p>数据类型对象,地理坐标中的纬度值。</p>
+</li>
+<li>longitude: <em>(<font class="type">Number</font>
+	类型
+)</em>坐标经度值<br><p>数据类型对象,地理坐标中的经度值。</p>
+</li>
+<li>altitude: <em>(<font class="type">Number</font>
+	类型
+)</em>海拔信息<br><p>数据类型对象,如果无法获取此信息,则此值为空(null)。</p>
+</li>
+<li>accuracy: <em>(<font class="type">Number</font>
+	类型
+)</em>地理坐标信息的精确度信息<br><p>数据类型对象,单位为米,其有效值必须大于0。</p>
+</li>
+<li>altitudeAccuracy: <em>(<font class="type">Number</font>
+	类型
+)</em>海拔的精确度信息<br><p>数据类型对象,单位为米,其有效值必须大于0。如果无法获取海拔信息,则此值为空(null)。</p>
+</li>
+<li>heading: <em>(<font class="type">Number</font>
+	类型
+)</em>表示设备移动的方向<br><p>
+	数据类型对象,范围为0到360,表示相对于正北方向的角度。如果无法获取此信息,则此值为空(null)。如果设备没有移动则此值为NaN。
+						</p>
+</li>
+<li>speed: <em>(<font class="type">Number</font>
+	类型
+)</em>表示设备移动的速度<br><p>
+	数据类型对象,单位为米每秒(m/s),其有效值必须大于0。如果无法获取速度信息,则此值为空(null)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.geolocation.PositionOptions">PositionOptions</a></h1>
+<p>JSON对象,监听设备位置信息参数</p>
+<h2>属性:</h2>
+<ul>
+<li>enableHighAccuracy: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否高精确度获取位置信息<br><p>高精度获取表示需要使用更多的系统资源,默认值为false。</p>
+</li>
+<li>timeout: <em>(<font class="type">Number</font>
+	类型
+)</em>获取位置信息的超时时间<br><p>单位为毫秒(ms),默认值为不超时。如果在指定的时间内没有获取到位置信息则触发错误回调函数。</p>
+</li>
+<li>maximumAge: <em>(<font class="type">Number</font>
+	类型
+)</em>获取位置信息的间隔时间<br><p>
+	单位为毫秒(ms),默认值为5000(即5秒)。调用plus.geolocation.watchPosition时为更新位置信息的间隔时间。
+	注意:在不同定位模块下支持范围值可能不同,如百度定位模块的间隔范围为大于等于1秒,如果设置的值小于最小值则使用最小值。
+						</p>
+</li>
+<li>provider: <em>(<font class="type">String</font>
+	类型
+)</em>优先使用的定位模块<br><p>
+	可取以下供应者:
+	"system":表示系统定位模块,支持wgs84坐标系;
+	"baidu":表示百度定位模块,支持gcj02/bd09/bd09ll坐标系;
+	"amap":表示高德定位模块,支持gcj02坐标系。
+	默认值按以下优先顺序获取(amap&gt;baidu&gt;system),若指定的provider不存在或无效则返回错误回调。
+	注意:百度/高德定位模块需要配置百度/高德地图相关参数才能正常使用。
+						</p>
+</li>
+<li>coordsType: <em>(<font class="type">String</font>
+	类型
+)</em>指定获取的定位数据坐标系类型<br><p>
+	可取以下坐标系类型:
+	"wgs84":表示WGS-84坐标系;
+	"gcj02":表示国测局经纬度坐标系;
+	"bd09":表示百度墨卡托坐标系;
+	"bd09ll":表示百度经纬度坐标系;
+	provider为"system"时,支持wgs84坐标系,默认使用"wgs84"坐标系;
+	provider为"baidu"时,支持gcj02/bd09/bd09ll坐标系,默认使用"gcj02"坐标系;
+	provider为"amap"时,支持gcj02坐标系,默认使用"gcj02"坐标系。
+	如果设置的坐标系类型provider不支持,则返回错误。
+						</p>
+</li>
+<li>geocode: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否解析地址信息<br><p>
+	解析的地址信息保存到Position对象的address、addresses属性中,true表示解析地址信息,false表示不解析地址信息,返回的Position对象的address、addresses属性值为undefined,默认值为true。
+	如果解析地址信息失败则返回的Position对象的address、addresses属性值为null。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.geolocation.GeolocationError">GeolocationError</a></h1>
+<p>JSON对象,定位错误信息</p>
+<pre class="prettyprint linenums">
+interface GeolocationError {
+	const Number PERMISSION_DENIED = 1;
+	const Number POSITION_UNAVAILABLE = 2;
+	const Number TIMEOUT = 3;
+	const Number UNKNOWN_ERROR = 4;
+	readonly attribute Number code;
+	readonly attribute String message;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>code: <em>(<font class="type">Number</font>
+	类型
+)</em>错误代码<br><p>
+	取值范围为GeolocationError对象的常量值。
+						</p>
+</li>
+<li>message: <em>(<font class="type">String</font>
+	类型
+)</em>错误描述信息<br><p>
+	详细错误描述信息。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.geolocation.GeolocationSuccessCallback">GeolocationSuccessCallback</a></h1>
+<p>获取设备位置信息成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( position ) {
+	// Get Position code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>position: 
+		<em>(
+			<a href="#plus.geolocation.Position">Position</a>
+			)
+			必选 </em>设备的地理位置信息,参考Position<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.geolocation.GeolocationErrorCallback">GeolocationErrorCallback</a></h1>
+<p>获取设备位置信息失败的回调函数</p>
+<pre class="prettyprint linenums">
+function void onGeolocationError( GeolocationError error ) {
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<a href="#plus.geolocation.GeolocationError">GeolocationError</a>
+			)
+			必选 </em>获取位置操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 198 - 0
hello H5+/doc/ibeacon.html

@@ -0,0 +1,198 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>iBeacon Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.ibeacon">ibeacon</a></h1>
+<p>
+iBeacon模块用于搜索附件的iBeacon设备。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.ibeacon.startBeaconDiscovery">startBeaconDiscovery</a>: 开始搜索附近的iBeacon设备</li>
+<li>
+<a href="#plus.ibeacon.stopBeaconDiscovery">stopBeaconDiscovery</a>: 停止搜索附近的iBeacon设备</li>
+<li>
+<a href="#plus.ibeacon.getBeacons">getBeacons</a>: 获取已搜索到的iBeacon设备</li>
+<li>
+<a href="#plus.ibeacon.onBeaconUpdate">onBeaconUpdate</a>: 监听iBeacon设备更新</li>
+<li>
+<a href="#plus.ibeacon.onBeaconServiceChange">onBeaconServiceChange</a>: 监听iBeacon服务状态变化</li>
+</ul>
+<h2>对象:</h2>
+<ul><li>
+<a href="#plus.ibeacon.IBeaconInfo">IBeaconInfo</a>: iBeacon设备信息</li></ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.ibeacon.IBeaconSuccessCallback">IBeaconSuccessCallback</a>: 成功回调函数</li>
+<li>
+<a href="#plus.ibeacon.IBeaconFailCallback">IBeaconFailCallback</a>: 失败回调函数</li>
+<li>
+<a href="#plus.ibeacon.IBeaconCompleteCallback">IBeaconCompleteCallback</a>: 操作完成回调函数</li>
+<li>
+<a href="#plus.ibeacon.IBeaconUpdateCallback">IBeaconUpdateCallback</a>: 获取iBeacon设备信息回调函数</li>
+<li>
+<a href="#plus.ibeacon.IBeaconServiceChangeCallback">IBeaconServiceChangeCallback</a>: iBeacon服务状态变化回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"iBeacon": {
+		"description": "iBeacon"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.ibeacon.IBeaconInfo">IBeaconInfo</a></h1>
+<p>iBeacon设备信息</p>
+<pre class="prettyprint linenums">
+interface IBeaconInfo {
+	readonly attribute String uuid;
+	readonly attribute String major;
+	readonly attribute String minor;
+	readonly attribute Number proximity;
+	readonly attribute Number accuracy;
+	readonly attribute Number rssi;
+}			
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>uuid: <em>(<font class="type">String</font>
+	类型
+)</em>iBeacon设备广播的uuid<br>
+</li>
+<li>major: <em>(<font class="type">String</font>
+	类型
+)</em>iBeacon设备的主id<br>
+</li>
+<li>minor: <em>(<font class="type">String</font>
+	类型
+)</em>iBeacon设备的次id<br>
+</li>
+<li>proximity: <em>(<font class="type">Number</font>
+	类型
+)</em>iBeacon设备的距离<br>
+</li>
+<li>accuracy: <em>(<font class="type">Number</font>
+	类型
+)</em>iBeacon设备的距离精度信息<br>
+</li>
+<li>rssi: <em>(<font class="type">String</font>
+	类型
+)</em>iBeacon设备的信号强度<br>
+</li>
+</ul>
+<h1><a name="plus.ibeacon.IBeaconSuccessCallback">IBeaconSuccessCallback</a></h1>
+<p>成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			必选 </em>回调参数<br>
+	回调参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ibeacon.IBeaconFailCallback">IBeaconFailCallback</a></h1>
+<p>失败回调函数</p>
+<pre class="prettyprint linenums">
+function void onFail(DOMException error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>回调参数,错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ibeacon.IBeaconCompleteCallback">IBeaconCompleteCallback</a></h1>
+<p>操作完成回调函数</p>
+<pre class="prettyprint linenums">
+function void onComplete(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用成功或失败都会触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			可选 </em>回调参数<br>
+	调用成功时回调参数与IBeaconSuccessCallback一致,调用失败时回调参数与IBeaconFailCallback一致。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ibeacon.IBeaconUpdateCallback">IBeaconUpdateCallback</a></h1>
+<p>获取iBeacon设备信息回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+	// 通过beacons获取iBeacon设备列表信息
+	var beacons = event.beacons;
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>设备信息<br>
+	可通过event.beacons(Array&lt;IBeaconInfo&gt;类型)获取iBeacon设备列表信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.ibeacon.IBeaconServiceChangeCallback">IBeaconServiceChangeCallback</a></h1>
+<p>iBeacon服务状态变化回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+	// 通过available、discovering获取iBeacon服务状态
+	var available = event.available;
+	var discovering = event.discovering;
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>iBeacon服务状态信息<br>
+	可通过event.available(Boolean类型)获取iBeacon服务目前是否可用;
+	可通过event.discovering(Boolean类型)获取是否处于搜索iBeacon设备状态。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 24 - 0
hello H5+/doc/interface-orientation.html

@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Orientation Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.InterfaceOrientation">InterfaceOrientation</a></h1>
+<p>获取应用的横竖屏信息</p>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.InterfaceOrientation.window.orientation">window.orientation</a>: 获取当前设备横竖屏状态</li></ul>
+<h2>事件:</h2>
+<ul><li>
+<a href="#plus.InterfaceOrientation.orientationchange">orientationchange</a>: 当屏幕旋转时的通知事件</li></ul>
+<br><br>
+</div></body>
+</html>

+ 759 - 0
hello H5+/doc/io.html

@@ -0,0 +1,759 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>IO Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.io">io</a></h1>
+<p>IO模块管理本地文件系统,用于对文件系统的目录浏览、文件的读取、文件的写入等操作。通过plus.io可获取文件系统管理对象。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.io.PRIVATE_WWW">PRIVATE_WWW</a>: 应用运行资源目录常量</li>
+<li>
+<a href="#plus.io.PRIVATE_DOC">PRIVATE_DOC</a>: 应用私有文档目录常量</li>
+<li>
+<a href="#plus.io.PUBLIC_DOCUMENTS">PUBLIC_DOCUMENTS</a>: 程序公用文档目录常量</li>
+<li>
+<a href="#plus.io.PUBLIC_DOWNLOADS">PUBLIC_DOWNLOADS</a>: 程序公用下载目录常量</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.requestFileSystem">requestFileSystem</a>: 请求本地文件系统对象</li>
+<li>
+<a href="#plus.io.resolveLocalFileSystemURL">resolveLocalFileSystemURL</a>: 通过URL参数获取目录对象或文件对象</li>
+<li>
+<a href="#plus.io.convertLocalFileSystemURL">convertLocalFileSystemURL</a>: 将本地URL路径转换成平台绝对路径</li>
+<li>
+<a href="#plus.io.convertAbsoluteFileSystem">convertAbsoluteFileSystem</a>: 将平台绝对路径转换成本地URL路径</li>
+<li>
+<a href="#plus.io.getAudioInfo">getAudioInfo</a>: 获取音频文件信息</li>
+<li>
+<a href="#plus.io.getFileInfo">getFileInfo</a>: 获取文件信息</li>
+<li>
+<a href="#plus.io.getImageInfo">getImageInfo</a>: 获取图片信息</li>
+<li>
+<a href="#plus.io.getVideoInfo">getVideoInfo</a>: 获取视频文件信息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.io.DirectoryEntry">DirectoryEntry</a>: 文件系统中的目录对象,用于管理特定的本地目录</li>
+<li>
+<a href="#plus.io.DirectoryReader">DirectoryReader</a>: 读取目录信息对象,用于获取目录中包含的文件及子目录</li>
+<li>
+<a href="#plus.io.File">File</a>: 文件系统中的文件数据对象,用于获取文件的数据</li>
+<li>
+<a href="#plus.io.FileEntry">FileEntry</a>: 文件系统中的文件对象,用于管理特定的本地文件</li>
+<li>
+<a href="#plus.io.FileReader">FileReader</a>: 文件系统中的读取文件对象,用于获取文件的内容</li>
+<li>
+<a href="#plus.io.FileWriter">FileWriter</a>: 文件系统中的写文件对象,用于写入文件内容</li>
+<li>
+<a href="#plus.io.FileSystem">FileSystem</a>: 文件系统对象,用于管理特定本地文件目录</li>
+<li>
+<a href="#plus.io.Flags">Flags</a>: JSON对象,获取文件操作的参数</li>
+<li>
+<a href="#plus.io.Metadata">Metadata</a>: JSON对象,保存文件或目录的状态信息对象</li>
+<li>
+<a href="#plus.io.FileEvent">FileEvent</a>: 文件或目录操作事件对象</li>
+<li>
+<a href="#plus.io.URLType">URLType</a>: 文件路径类型</li>
+<li>
+<a href="#plus.io.RelativeURL">RelativeURL</a>: 相对路径URL</li>
+<li>
+<a href="#plus.io.LocalURL">LocalURL</a>: 本地路径URL</li>
+<li>
+<a href="#plus.io.RemoteURL">RemoteURL</a>: 网络路径URL</li>
+<li>
+<a href="#plus.io.AudioInfo">AudioInfo</a>: JSON对象,音频文件信息对象</li>
+<li>
+<a href="#plus.io.FileInfo">FileInfo</a>: JSON对象,文件信息对象</li>
+<li>
+<a href="#plus.io.ImageInfo">ImageInfo</a>: JSON对象,图片信息对象</li>
+<li>
+<a href="#plus.io.VideoInfo">VideoInfo</a>: JSON对象,视频文件信息对象</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileEventCallback">FileEventCallback</a>: 文件事件回调</li>
+<li>
+<a href="#plus.io.FileSystemSuccessCallback">FileSystemSuccessCallback</a>: 请求文件系统成功的回调函数</li>
+<li>
+<a href="#plus.io.FileResolveSuccessCallback">FileResolveSuccessCallback</a>: 通过URL参数获取目录或文件对象成功的回调函数</li>
+<li>
+<a href="#plus.io.MetadataSuccessCallback">MetadataSuccessCallback</a>: 获取文件或目录状态信息成功的回调函数</li>
+<li>
+<a href="#plus.io.EntrySuccessCallback">EntrySuccessCallback</a>: 操作文件或目录对象成功的回调函数</li>
+<li>
+<a href="#plus.io.EntrysSuccessCallback">EntrysSuccessCallback</a>: 操作文件或目录对象数组成功的回调函数</li>
+<li>
+<a href="#plus.io.FileWriterSuccessCallback">FileWriterSuccessCallback</a>: 写文件操作成功的回调函数</li>
+<li>
+<a href="#plus.io.FileSuccessCallback">FileSuccessCallback</a>: 文件操作成功的回调函数</li>
+<li>
+<a href="#plus.io.FileErrorCallback">FileErrorCallback</a>: 文件操作失败的回调函数</li>
+<li>
+<a href="#plus.io.IOSuccessCallback">IOSuccessCallback</a>: 成功回调函数</li>
+<li>
+<a href="#plus.io.IOFailCallback">IOFailCallback</a>: 失败回调函数</li>
+<li>
+<a href="#plus.io.IOCompleteCallback">IOCompleteCallback</a>: 操作完成回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"File": {
+		"description": "文件系统"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.io.DirectoryEntry">DirectoryEntry</a></h1>
+<p>文件系统中的目录对象,用于管理特定的本地目录</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.DirectoryEntry.isFile">isFile</a>: 操作对象的是否为文件,DirectoryEntry对象固定其值为false</li>
+<li>
+<a href="#plus.io.DirectoryEntry.isDirectory">isDirectory</a>: 操作对象是否为目录,DirectoryEntry对象固定其值为true</li>
+<li>
+<a href="#plus.io.DirectoryEntry.name">name</a>: 目录操作对象的名称,不包括路径</li>
+<li>
+<a href="#plus.io.DirectoryEntry.fullPath">fullPath</a>: 目录操作对象的完整路径,文件系统的绝对路径</li>
+<li>
+<a href="#plus.io.DirectoryEntry.fileSystem">fileSystem</a>: 文件操作对象所属的文件系统对象,参考FileSystem</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.DirectoryEntry.getMetadata">getMetadata</a>: 获取目录的属性</li>
+<li>
+<a href="#plus.io.DirectoryEntry.moveTo">moveTo</a>: 移动目录</li>
+<li>
+<a href="#plus.io.DirectoryEntry.copyTo">copyTo</a>: 拷贝目录</li>
+<li>
+<a href="#plus.io.DirectoryEntry.toURL">toURL</a>: 获取目录路径转换为URL地址</li>
+<li>
+<a href="#plus.io.DirectoryEntry.toLocalURL">toLocalURL</a>: 获取目录路径转换为本地路径URL地址</li>
+<li>
+<a href="#plus.io.DirectoryEntry.toRemoteURL">toRemoteURL</a>: 获取目录路径转换为网络路径URL地址</li>
+<li>
+<a href="#plus.io.DirectoryEntry.remove">remove</a>: 删除目录</li>
+<li>
+<a href="#plus.io.DirectoryEntry.getParent">getParent</a>: 获取目录所属的父目录</li>
+<li>
+<a href="#plus.io.DirectoryEntry.createReader">createReader</a>: 创建目录读取对象</li>
+<li>
+<a href="#plus.io.DirectoryEntry.getDirectory">getDirectory</a>: 创建或打开子目录</li>
+<li>
+<a href="#plus.io.DirectoryEntry.getFile">getFile</a>: 创建或打开文件</li>
+<li>
+<a href="#plus.io.DirectoryEntry.removeRecursively">removeRecursively</a>: 递归删除目录</li>
+</ul>
+<h1><a name="plus.io.DirectoryReader">DirectoryReader</a></h1>
+<p>读取目录信息对象,用于获取目录中包含的文件及子目录</p>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.io.DirectoryReader.readEntries">readEntries</a>: 获取当前目录中的所有文件和子目录</li></ul>
+<h1><a name="plus.io.File">File</a></h1>
+<p>文件系统中的文件数据对象,用于获取文件的数据</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.File.size">size</a>: 文件数据对象的数据大小,单位为字节</li>
+<li>
+<a href="#plus.io.File.type">type</a>: 文件数据对象MIME类型</li>
+<li>
+<a href="#plus.io.File.name">name</a>: 文件数据对象的名称,不包括路径</li>
+<li>
+<a href="#plus.io.File.lastModifiedDate">lastModifiedDate</a>: 文件对象的最后修改时间</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.File.slice">slice</a>: 获取文件指定的数据内容</li>
+<li>
+<a href="#plus.io.File.close">close</a>: 关闭文件数据对象</li>
+</ul>
+<h1><a name="plus.io.FileEntry">FileEntry</a></h1>
+<p>文件系统中的文件对象,用于管理特定的本地文件</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileEntry.isFile">isFile</a>: 文件操作对象的是否为文件,FileEntry对象固定其值为true</li>
+<li>
+<a href="#plus.io.FileEntry.isDirectory">isDirectory</a>: 文件操作对象是否为目录,FileEntry对象固定其值为false</li>
+<li>
+<a href="#plus.io.FileEntry.name">name</a>: 文件操作对象的名称,不包括路径</li>
+<li>
+<a href="#plus.io.FileEntry.fullPath">fullPath</a>: 文件操作对象的完整路径,文件系统的绝对路径</li>
+<li>
+<a href="#plus.io.FileEntry.fileSystem">fileSystem</a>: 文件操作对象所属的文件系统对象,参考FileSystem</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileEntry.getMetadata">getMetadata</a>: 获取文件的属性信息</li>
+<li>
+<a href="#plus.io.FileEntry.moveTo">moveTo</a>: 移动文件</li>
+<li>
+<a href="#plus.io.FileEntry.copyTo">copyTo</a>: 拷贝文件</li>
+<li>
+<a href="#plus.io.FileEntry.toURL">toURL</a>: 获取文件路径转换为URL地址</li>
+<li>
+<a href="#plus.io.FileEntry.toLocalURL">toLocalURL</a>: 获取文件路径转换为本地路径URL地址</li>
+<li>
+<a href="#plus.io.FileEntry.toRemoteURL">toRemoteURL</a>: 获取文件路径转换为网络路径URL地址</li>
+<li>
+<a href="#plus.io.FileEntry.remove">remove</a>: 删除文件</li>
+<li>
+<a href="#plus.io.FileEntry.getParent">getParent</a>: 获取文件所属的父目录</li>
+<li>
+<a href="#plus.io.FileEntry.createWriter">createWriter</a>: 获取文件关联的写文件操作对象FileWriter</li>
+<li>
+<a href="#plus.io.FileEntry.file">file</a>: 获取文件数据对象</li>
+</ul>
+<h1><a name="plus.io.FileReader">FileReader</a></h1>
+<p>文件系统中的读取文件对象,用于获取文件的内容</p>
+<h2>说明:</h2>
+<p class="des">
+	FileReader对象是从设备文件系统读取文件FileReader对象是从设备文件系统读取文件的一种方式,文件以文本或者Base64编码的字符串形式读出来。
+	用户注册自己的事件监听器来接收loadstart、progress、load、loadend、error和abort事件。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.io.FileReader.FileReader">FileReader</a>: 创建读取文件对象</li></ul>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileReader.EMPTY">EMPTY</a>: 值为0,开始读取文件状态</li>
+<li>
+<a href="#plus.io.FileReader.LOADING">LOADING</a>: 值为1,正在读取文件状态</li>
+<li>
+<a href="#plus.io.FileReader.DONE">DONE</a>: 值为2,读文件操作完成状态</li>
+</ul>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileReader.readyState">readyState</a>: 当前读取文件所处的状态</li>
+<li>
+<a href="#plus.io.FileReader.result">result</a>: 已读取文件的内容</li>
+<li>
+<a href="#plus.io.FileReader.error">error</a>: 文件操作错误代码</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileReader.abort">abort</a>: 终止文件读取操作</li>
+<li>
+<a href="#plus.io.FileReader.readAsDataURL">readAsDataURL</a>: 以URL编码格式读取文件数据内容</li>
+<li>
+<a href="#plus.io.FileReader.readAsText">readAsText</a>: 以文本格式读取文件数据内容</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileReader.onloadstart">onloadstart</a>: 读取文件开始时的回调函数</li>
+<li>
+<a href="#plus.io.FileReader.onprogress">onprogress</a>: 读取文件过程中的回调函数</li>
+<li>
+<a href="#plus.io.FileReader.onload">onload</a>: 读取文件成功完成的回调函数</li>
+<li>
+<a href="#plus.io.FileReader.onabort">onabort</a>: 取消读取文件时的回调函数</li>
+<li>
+<a href="#plus.io.FileReader.onerror">onerror</a>: 文件读取操作失败时调用的回调函数</li>
+<li>
+<a href="#plus.io.FileReader.onloadend">onloadend</a>: 文件读取操作完成时的回调函数</li>
+</ul>
+<h1><a name="plus.io.FileWriter">FileWriter</a></h1>
+<p>文件系统中的写文件对象,用于写入文件内容</p>
+<h2>说明:</h2>
+<p class="des">
+	FileWriter对象是向设备文件系统写入文件的一种方式,用户注册自己的事件监听器来接收writestart、progress、write、writeend、error和abort事件。
+	一个FileWriter对象是为单个文件的操作而创建,可以使用该对象多次对相应文件进行写入操作。
+	FileWriter维护该文件的指针位置及长度属性,这样就可以寻找和写入文件的任何地方。
+	默认情况下,FileWriter从文件的开头开始写入(将覆盖现有数据),seek方法可设置文件操作指定位置,如fw.seek(fw.length-1)写入操作就会从文件的末尾开始。
+				</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileWriter.INIT">INIT</a>: 值为0,写文件初始化状态</li>
+<li>
+<a href="#plus.io.FileWriter.WRITING">WRITING</a>: 值为1,正在写入文件状态</li>
+<li>
+<a href="#plus.io.FileWriter.DONE">DONE</a>: 值为2,写文件操作完成状态</li>
+</ul>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileWriter.readyState">readyState</a>: 当前写入文件所处的状态</li>
+<li>
+<a href="#plus.io.FileWriter.length">length</a>: 文件当前的长度,单位为字节</li>
+<li>
+<a href="#plus.io.FileWriter.position">position</a>: 文件当前操作的指针位置</li>
+<li>
+<a href="#plus.io.FileWriter.error">error</a>: 文件写入操作错误代码</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileWriter.abort">abort</a>: 终止文件写入操作</li>
+<li>
+<a href="#plus.io.FileWriter.seek">seek</a>: 定位文件操作位置</li>
+<li>
+<a href="#plus.io.FileWriter.truncate">truncate</a>: 按照指定长度截断文件</li>
+<li>
+<a href="#plus.io.FileWriter.write">write</a>: 向文件中写入数据</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileWriter.onwritestart">onwritestart</a>: 写入文件开始时的回调函数</li>
+<li>
+<a href="#plus.io.FileWriter.onprogress">onprogress</a>: 写入文件过程中的回调函数</li>
+<li>
+<a href="#plus.io.FileWriter.onwrite">onwrite</a>: 写入文件成功完成的回调函数</li>
+<li>
+<a href="#plus.io.FileWriter.onabort">onabort</a>: 取消写入文件时的回调函数</li>
+<li>
+<a href="#plus.io.FileWriter.onerror">onerror</a>: 文件写入操作失败时调用的回调函数</li>
+<li>
+<a href="#plus.io.FileWriter.onwriteend">onwriteend</a>: 文件写入操作完成时的回调函数</li>
+</ul>
+<h1><a name="plus.io.FileSystem">FileSystem</a></h1>
+<p>文件系统对象,用于管理特定本地文件目录</p>
+<h2>说明:</h2>
+<p class="des">
+	文件系统对象表示一个应用可访问的根目录。name属性用于标识此根目录的名称,与LocalFileSystem中的文件系统类型一一对应。root属性为文件目录对象,用于实际操作文件系统,参考DirectoryEntry。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.io.FileSystem.name">name</a>: 文件系统的名称</li>
+<li>
+<a href="#plus.io.FileSystem.root">root</a>: 文件系统的根目录</li>
+</ul>
+<h1><a name="plus.io.Flags">Flags</a></h1>
+<p>JSON对象,获取文件操作的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>create: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否创建对象标记<br><p>指示如果文件或目录不存在时是否进行创建,默认值为false。</p>
+</li>
+<li>exclusive: <em>(<font class="type">Boolean</font>
+	类型
+)</em>反向操作标记<br><p>其本身没有任何效果,需与create属性值设置为true时一起使用,如果目标文件或目录已经存在则会导致文件或目录打开失败,默认值为false。</p>
+</li>
+</ul>
+<h1><a name="plus.io.Metadata">Metadata</a></h1>
+<p>JSON对象,保存文件或目录的状态信息对象</p>
+<h2>说明:</h2>
+<p class="des">可通过DirectoryEntry或FileEntry对象的getMetaData方法获取</p>
+<h2>属性:</h2>
+<ul>
+<li>modificationTime: <em>(<font class="type">Date</font>
+	类型
+)</em>文件或目录的最后修改时间<br>
+</li>
+<li>size: <em>(<font class="type">Number</font>
+	类型
+)</em>文件的大小<br><p>若获取的是目录对象的属性则值为0。</p>
+</li>
+<li>directoryCount: <em>(<font class="type">Number</font>
+	类型
+)</em>包含的子目录数<br><p>若自身是文件则其值为0。</p>
+</li>
+<li>fileCount: <em>(<font class="type">Number</font>
+	类型
+)</em>目录的文件数<br><p>若自身是文件则其值为0。</p>
+</li>
+</ul>
+<h1><a name="plus.io.FileEvent">FileEvent</a></h1>
+<p>文件或目录操作事件对象</p>
+<h2>说明:</h2>
+<p class="des">
+	所有文件或目录操作事件回调函数中都创建该对象的实例。
+	该对象从DOMEvent继承而来,可通过该其target属性获取事件触发的文件或目录操作对象。
+				</p>
+<h2>属性:</h2>
+<ul><li>target: <em>(<a href="#plus.io.DirectoryEntry">DirectoryEntry</a>
+	类型
+)</em>文件或目录操作对象<br><p>在不同的回调中指向的对象不同,可指向的对象包括:FileEntry、DirectoryEntry、FileReader、FileWriter。</p>
+</li></ul>
+<h1><a name="plus.io.URLType">URLType</a></h1>
+<p>文件路径类型</p>
+<h2>说明:</h2>
+<p class="des">在文件系统中的文件路径需转换成URL格式,已方便runtime快速加载。</p>
+<h1><a name="plus.io.RelativeURL">RelativeURL</a></h1>
+<p>相对路径URL</p>
+<h2>说明:</h2>
+<p class="des">只能在扩展API中使用,相对于基座提供的特定目录,以“_”开头。</p>
+<h2>常量:</h2>
+<ul>
+<li>"_www": <em>(<font class="type">DOMString</font>
+	类型
+)</em>应用资源目录<br><p>
+	保存应用的所有html、css、js等资源文件,与文件系统中根目录PRIVATE_WWW一致,后面加相对路径如“_www/res/icon.png”。
+	注意:应用资源目录是只读目录,只能读取次目录下的文件,不能修改或新建。
+						</p>
+</li>
+<li>"_doc": <em>(<font class="type">DOMString</font>
+	类型
+)</em>应用私有文档目录<br><p>用于保存应用运行期业务逻辑数据,与文件系统中根目录PRIVATE_DOCUMENTS,如“_doc/userdata.xml”。</p>
+</li>
+<li>"_documents": <em>(<font class="type">DOMString</font>
+	类型
+)</em>程序公用文档目录<br><p>用于保存程序中各应用间可共享文件的目录,与文件系统中根目录PUBLIC_DOCUMENTS,如“_document/share.doc”。</p>
+</li>
+<li>"_downloads": <em>(<font class="type">DOMString</font>
+	类型
+)</em>程序公用下载目录 <br><p>用于保存程序下载文件的目录,与文件系统中根目录PUBLIC_DOWNLOADS,如“_download/mydoc.doc”。</p>
+</li>
+</ul>
+<h1><a name="plus.io.LocalURL">LocalURL</a></h1>
+<p>本地路径URL</p>
+<h2>说明:</h2>
+<p class="des">
+	可在html页面中直接访问本地资源,以“file:///”开头,后面跟随系统的绝对路径。
+	如示例:“file:///D:/res/hello.html”。
+				</p>
+<h1><a name="plus.io.RemoteURL">RemoteURL</a></h1>
+<p>网络路径URL</p>
+<h2>说明:</h2>
+<p class="des">
+	可在html页面中以网络资源模式访问本地资源,以“http://”开头,后面跟随相对路径。
+	如示例:“http://localhost:13131/_www/res/icon.png”,其中“_www”字段可支持类型与相对路径URL一致。
+				</p>
+<h1><a name="plus.io.AudioInfo">AudioInfo</a></h1>
+<p>JSON对象,音频文件信息对象</p>
+<h2>说明:</h2>
+<p class="des">通过getAudioInfo方法的成功回调函数返回</p>
+<h2>属性:</h2>
+<ul><li>duration: <em>(<font class="type">Number</font>
+	类型
+)</em>音频长度<br><p>
+	单位为秒(s)。
+						</p>
+</li></ul>
+<h1><a name="plus.io.FileInfo">FileInfo</a></h1>
+<p>JSON对象,文件信息对象</p>
+<h2>说明:</h2>
+<p class="des">通过getFileInfo方法的成功回调函数返回</p>
+<h2>属性:</h2>
+<ul>
+<li>digest: <em>(<font class="type">String</font>
+	类型
+)</em>文件摘要<br><p>
+	按照传入的 digestAlgorithm 计算得出的文件摘要信息。
+						</p>
+</li>
+<li>size: <em>(<font class="type">Number</font>
+	类型
+)</em>文件大小<br><p>
+	单位为字节。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.io.ImageInfo">ImageInfo</a></h1>
+<p>JSON对象,图片信息对象</p>
+<h2>说明:</h2>
+<p class="des">通过getImageInfo方法的成功回调函数返回</p>
+<h2>属性:</h2>
+<ul>
+<li>height: <em>(<font class="type">Number</font>
+	类型
+)</em>图片的原始高度<br><p>若获取的是目录对象的属性则值为0。</p>
+</li>
+<li>orientation: <em>(<font class="type">String</font>
+	类型
+)</em>拍照时设备方向信息<br><p>
+	可取值:
+		"up" - 默认方向(手机横持拍照),对应 Exif 中的 1,或无 orientation 信息;
+		"up-mirrored" - 同 up,但镜像翻转,对应 Exif 中的 2;
+		"down" - 旋转180度,对应 Exif 中的 3;
+		"down-mirrored" - 同 down,但镜像翻转,对应 Exif 中的 4;
+		"left-mirrored" - 同 left,但镜像翻转,对应 Exif 中的 5;
+		"right" - 顺时针旋转90度,对应 Exif 中的 6;
+		"right-mirrored" - 同 right,但镜像翻转,对应 Exif 中的 7;
+		"left" - 逆时针旋转90度,对应 Exif 中的 8。
+	更多详情参考图片扩展中的方向信息:http://sylvana.net/jpegcrop/exif_orientation.html。
+						</p>
+</li>
+<li>path: <em>(<font class="type">String</font>
+	类型
+)</em>图片的本地路径<br><p>
+	绝对路径,以"file://"开头。
+						</p>
+</li>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>图片格式<br>
+</li>
+<li>width: <em>(<font class="type">Number</font>
+	类型
+)</em>图片的原始宽度<br><p>
+	单位为像素(px),不考虑旋转。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.io.VideoInfo">VideoInfo</a></h1>
+<p>JSON对象,视频文件信息对象</p>
+<h2>说明:</h2>
+<p class="des">通过getVideoInfo方法的成功回调函数返回</p>
+<h2>属性:</h2>
+<ul>
+<li>duration: <em>(<font class="type">Number</font>
+	类型
+)</em>视频长度<br><p>
+	单位为秒(s)。
+						</p>
+</li>
+<li>height: <em>(<font class="type">Number</font>
+	类型
+)</em>视频高度<br><p>
+	视频的真实像素值高度。
+						</p>
+</li>
+<li>resolution: <em>(<font class="type">String</font>
+	类型
+)</em>视频分辨率<br><p>
+	格式为“宽*高”,如“1280*720”。
+						</p>
+</li>
+<li>size: <em>(<font class="type">Number</font>
+	类型
+)</em>文件大小<br><p>
+	单位为字节。
+						</p>
+</li>
+<li>width: <em>(<font class="type">Number</font>
+	类型
+)</em>视频宽度<br><p>
+	视频的真实像素值宽度。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.io.FileEventCallback">FileEventCallback</a></h1>
+<p>文件事件回调</p>
+<pre class="prettyprint linenums">
+void onEvent( event ) {
+	// Event code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	文件或目录操作回调事件。
+	通常在FileReader和FileWriter对象的事件函数中触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<a href="#plus.io.FileEvent">FileEvent</a>
+			)
+			必选 </em>文件事件对象<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.FileSystemSuccessCallback">FileSystemSuccessCallback</a></h1>
+<p>请求文件系统成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( fs ) {
+	// File System operate code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>fs: 
+		<em>(
+			<a href="#plus.io.FileSystem">FileSystem</a>
+			)
+			必选 </em>请求到的文件系统对象<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.FileResolveSuccessCallback">FileResolveSuccessCallback</a></h1>
+<p>通过URL参数获取目录或文件对象成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( entry ) {
+	// File or Direcory entry operate code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>entry: 
+		<em>(
+			<a href="#plus.io.DirectoryEntry">DirectoryEntry</a>
+			)
+			必选 </em>请求到的目录或文件对象<br>可指向文件或目录对象(DirectoryEntry|FileEntry)。</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.MetadataSuccessCallback">MetadataSuccessCallback</a></h1>
+<p>获取文件或目录状态信息成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( metadata ) {
+	// Metadata code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>metadata: 
+		<em>(
+			<a href="#plus.io.Metadata">Metadata</a>
+			)
+			必选 </em>文件或目录的状态信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.EntrySuccessCallback">EntrySuccessCallback</a></h1>
+<p>操作文件或目录对象成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( entry ) {
+	// Entry code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>entry: 
+		<em>(
+			<a href="#plus.io.DirectoryEntry">DirectoryEntry</a>
+			)
+			必选 </em>文件或目录对象的引用<br>可指向文件或目录对象(DirectoryEntry|FileEntry)。</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.EntrysSuccessCallback">EntrysSuccessCallback</a></h1>
+<p>操作文件或目录对象数组成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( entrys ) {
+	// Entrys code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>entrys: 
+		<em>(
+			<a href="#plus.io.DirectoryEntry">DirectoryEntry</a>
+			)
+			必选 </em>文件或目录对象数组<br>可指向文件或目录对象数组(DirectoryEntry[]|FileEntry[])。</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.FileWriterSuccessCallback">FileWriterSuccessCallback</a></h1>
+<p>写文件操作成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( writer ) {
+	// FileWriter code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>writer: 
+		<em>(
+			<a href="#plus.io.FileWriter">FileWriter</a>
+			)
+			必选 </em>写文件对象的引用<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.FileSuccessCallback">FileSuccessCallback</a></h1>
+<p>文件操作成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( file ) {
+	// file code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>file: 
+		<em>(
+			<font class="type">File</font>
+			)
+			必选 </em>文件数据对象的引用<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.FileErrorCallback">FileErrorCallback</a></h1>
+<p>文件操作失败的回调函数</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Error code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>文件操作失败的信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.IOSuccessCallback">IOSuccessCallback</a></h1>
+<p>成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			必选 </em>回调参数<br>
+	回调参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.IOFailCallback">IOFailCallback</a></h1>
+<p>失败回调函数</p>
+<pre class="prettyprint linenums">
+function void onFail(DOMException error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>回调参数,错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.io.IOCompleteCallback">IOCompleteCallback</a></h1>
+<p>操作完成回调函数</p>
+<pre class="prettyprint linenums">
+function void onComplete(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用成功或失败都会触发此回调。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			可选 </em>回调参数<br>
+	调用成功时回调参数与IOSuccessCallback一致,调用失败时回调参数与IOFailCallback一致。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 87 - 0
hello H5+/doc/ios.html

@@ -0,0 +1,87 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Native.JS Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.ios">ios</a></h1>
+<p>Native.js for iOS封装一条通过JS语法直接调用Native Objective-C接口通道,通过plus.ios可调用几乎所有的系统API。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.ios.importClass">importClass</a>: 导入Objective-C类对象</li>
+<li>
+<a href="#plus.ios.newObject">newObject</a>: 创建实例对象</li>
+<li>
+<a href="#plus.ios.deleteObject">deleteObject</a>: 销毁实例对象</li>
+<li>
+<a href="#plus.ios.invoke">invoke</a>: 调用对象(类对象/示例对象)的方法</li>
+<li>
+<a href="#plus.ios.implements">implements</a>: 实现代理的方法</li>
+<li>
+<a href="#plus.ios.currentWebview">currentWebview</a>: 获取当前Webview窗口对象的native层UIWebview实例对象</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.ios.ClassObject">ClassObject</a>: Objective-C类对象</li>
+<li>
+<a href="#plus.ios.InstanceObject">InstanceObject</a>: Objective-C实例对象</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Invocation": {
+		"description": "Native.js"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.ios.ClassObject">ClassObject</a></h1>
+<p>Objective-C类对象</p>
+<pre class="prettyprint linenums">
+interface ClassObject {
+	// ...
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	Objective-C类对象,可通过其属性获取类的常量,可通过方法来操作类的静态方法,也通过new方法来创建类的实例对象。
+	对于类的静态方法,则直接通过.后面跟随方法名称调用。
+				</p>
+<h1><a name="plus.ios.InstanceObject">InstanceObject</a></h1>
+<p>Objective-C实例对象</p>
+<pre class="prettyprint linenums">
+interface InstanceObject {
+	// ...
+	function Object plusGetAttribute( String name );
+	function Object plusSetAttribute( String name, Object value );
+	// ...
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	Objective-C实例对象,可通过其方法来操作示例的变量和方法。
+	注意:必须通过plusGetAttribute()方法读取示例对象的属性值,通过plusSetAttribute()方法设置示例对象的属性值。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.ios.InstanceObject.plusGetAttribute">plusGetAttribute</a>: 获取Objective-C实例对象的属性</li>
+<li>
+<a href="#plus.ios.InstanceObject.plusSetAttribute">plusSetAttribute</a>: 设置Objective-C示例对象的属性</li>
+</ul>
+<br><br>
+</div></body>
+</html>

+ 145 - 0
hello H5+/doc/key.html

@@ -0,0 +1,145 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Events Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.key">key</a></h1>
+<p>Key管理设备按键事件</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.key.addEventListener">addEventListener</a>: 添加按键事件监听器</li>
+<li>
+<a href="#plus.key.hideSoftKeybord">hideSoftKeybord</a>: 隐藏软键盘</li>
+<li>
+<a href="#plus.key.setAssistantType">setAssistantType</a>: 设置辅助输入类型</li>
+<li>
+<a href="#plus.key.showSoftKeybord">showSoftKeybord</a>: 显示软键盘</li>
+<li>
+<a href="#plus.key.removeEventListener">removeEventListener</a>: 移除按键事件监听器</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.key.KeyType">KeyType</a>: 按键类型</li>
+<li>
+<a href="#plus.key.KeyEvent">KeyEvent</a>: 按键事件</li>
+</ul>
+<h2>回调方法:</h2>
+<ul><li>
+<a href="#plus.key.KeyEventCallback">KeyEventCallback</a>: 按键事件的回调函数</li></ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Webview": {
+		"description": "窗口管理"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.key.KeyType">KeyType</a></h1>
+<p>按键类型</p>
+<h2>常量:</h2>
+<ul>
+<li>"backbutton": <em>(<font class="type">String</font>
+	类型
+)</em>设备“返回”按钮按键事件<br><p>	
+	如果需要改变默认“返回”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"backbutton"事件。
+						</p>
+</li>
+<li>"keydown": <em>(<font class="type">String</font>
+	类型
+)</em>键按下事件<br><p>
+	如果需要改变默认键按下的处理逻辑,则可通过plus.key.addEventListener来注册监听"keydown"事件。
+	可通过回调函数中KeyEvent对象的keyCode来获取按下的键值。
+						</p>
+</li>
+<li>"keyup": <em>(<font class="type">String</font>
+	类型
+)</em>键松开事件<br><p>
+	如果需要改变默认键松开的处理逻辑,则可通过plus.key.addEventListener来注册监听"keyup"事件。
+	可通过回调函数中KeyEvent对象的keyCode来获取松开的键值。
+						</p>
+</li>
+<li>"longpressed": <em>(<font class="type">String</font>
+	类型
+)</em>长按键事件<br><p>
+	如果需要改变默认长按键的处理逻辑,则可通过plus.key.addEventListener来注册监听"longpressed"事件。
+	长按键时会多次触发回调函数,通过回调函数中KeyEvent对象的keyCode来获取长按的键值。
+						</p>
+</li>
+<li>"menubutton": <em>(<font class="type">String</font>
+	类型
+)</em>设备“菜单”按钮按键事件<br><p>
+	如果需要改变默认“菜单”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"menubutton"事件。
+						</p>
+</li>
+<li>"searchbutton": <em>(<font class="type">String</font>
+	类型
+)</em>设备“搜索”按钮按键事件<br><p>
+	如果需要改变默认“搜索”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"searchbutton"事件。
+						</p>
+</li>
+<li>"volumeupbutton": <em>(<font class="type">String</font>
+	类型
+)</em>设备“音量+”按钮按键事件<br><p>
+	如果需要改变默认“音量+”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"volumeupbutton"事件。
+						</p>
+</li>
+<li>"volumedownbutton": <em>(<font class="type">String</font>
+	类型
+)</em>设备“音量-”按钮按键事件<br><p>
+	如果需要改变默认“音量-”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"volumedownbutton"事件。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.key.KeyEvent">KeyEvent</a></h1>
+<p>按键事件</p>
+<h2>属性:</h2>
+<ul>
+<li>keyCode: <em>(<font class="type">Number</font>
+	类型
+)</em>触发按键事件的键值<br><p>
+	键值由各系统平台定义,一些特殊按键在不同的设备上可能存在差异。
+						</p>
+</li>
+<li>keyType: <em>(<font class="type">KeyType</font>
+	类型
+)</em>按键事件类型<br><p>
+	用于表明触发此按键事件的类型,值为KeyType中定义的值。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.key.KeyEventCallback">KeyEventCallback</a></h1>
+<p>按键事件的回调函数</p>
+<pre class="prettyprint linenums">
+void onKeyEvent( KeyEvent event ){
+	// Event handled code.
+	var key=event.keyCode; // 用户按键的键值
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<a href="#plus.key.KeyEvent">KeyEvent</a>
+			)
+			必选 </em>监听用户按键操作返回的数据<br>
+	可通过event的keyCode属性(String类型)获取用户按键的类型,参考KeyType类型。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 1000 - 0
hello H5+/doc/maps.html

@@ -0,0 +1,1000 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Maps Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.maps">maps</a></h1>
+<p>Maps模块管理地图控件,用于在web页面中显示地图控件,提供各种接口操作地图控件,如添加标点、路线等。通过plus.maps可获取地图管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.openSysMap">openSysMap</a>: 调用系统第三方程序进行导航</li>
+<li>
+<a href="#plus.maps.create">create</a>: 创建Map对象</li>
+<li>
+<a href="#plus.maps.getMapById">getMapById</a>: 查找已经创建的Map对象</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Map">Map</a>: 地图控件对象</li>
+<li>
+<a href="#plus.maps.MapStyles">MapStyles</a>: 地图控件对象的参数</li>
+<li>
+<a href="#plus.maps.GeocodeOptions">GeocodeOptions</a>: 地理编码转换的参数</li>
+<li>
+<a href="#plus.maps.CoordinateConvertOptions">CoordinateConvertOptions</a>: 地图坐标转换的参数</li>
+<li>
+<a href="#plus.maps.Point">Point</a>: Point对象用于表示地图元素的坐标</li>
+<li>
+<a href="#plus.maps.Bounds">Bounds</a>: 地理区域</li>
+<li>
+<a href="#plus.maps.MapType">MapType</a>: 地图视图类型</li>
+<li>
+<a href="#plus.maps.Overlay">Overlay</a>: 地图覆盖物基类对象</li>
+<li>
+<a href="#plus.maps.Marker">Marker</a>: 地图上显示的标点对象</li>
+<li>
+<a href="#plus.maps.Bubble">Bubble</a>: 地图上显示的气泡对象</li>
+<li>
+<a href="#plus.maps.Circle">Circle</a>: 地图上显示的圆圈对象</li>
+<li>
+<a href="#plus.maps.Polyline">Polyline</a>: 地图上显示的折线对象</li>
+<li>
+<a href="#plus.maps.Polygon">Polygon</a>: 地图上显示的多边形对象</li>
+<li>
+<a href="#plus.maps.Search">Search</a>: 地图检索对象</li>
+<li>
+<a href="#plus.maps.SearchPolicy">SearchPolicy</a>: 检索策略类型</li>
+<li>
+<a href="#plus.maps.SearchPoiResult">SearchPoiResult</a>: 保存位置检索、周边检索和范围检索返回的结果</li>
+<li>
+<a href="#plus.maps.SearchRouteResult">SearchRouteResult</a>: 保存位置检索、周边检索和范围检索返回的结果</li>
+<li>
+<a href="#plus.maps.Position">Position</a>: 检索结果的位置点</li>
+<li>
+<a href="#plus.maps.Route">Route</a>: 地图中的路线对象</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.GeocodeCallback">GeocodeCallback</a>: 地理编码转换成功的回调函数</li>
+<li>
+<a href="#plus.maps.CoordinateConvertCallback">CoordinateConvertCallback</a>: 坐标转换成功的回调函数</li>
+<li>
+<a href="#plus.maps.DistanceCalculateCallback">DistanceCalculateCallback</a>: 距离计算成功的回调函数</li>
+<li>
+<a href="#plus.maps.AreaCalculateCallback">AreaCalculateCallback</a>: 地理区域面积计算成功的回调函数</li>
+<li>
+<a href="#plus.maps.UserLocationCallback">UserLocationCallback</a>: 获取用户当前位置信息成功回调</li>
+<li>
+<a href="#plus.maps.ClickEventHandler">ClickEventHandler</a>: 用户点击地图回调事件</li>
+<li>
+<a href="#plus.maps.StatusChangedEventHandler">StatusChangedEventHandler</a>: 地图状态变化回调事件</li>
+<li>
+<a href="#plus.maps.OverlayClickEventHandler">OverlayClickEventHandler</a>: 用户点击地图覆盖物回调事件</li>
+<li>
+<a href="#plus.maps.OverlayDragEventHandler">OverlayDragEventHandler</a>: 用户拖拽覆盖物回调事件</li>
+<li>
+<a href="#plus.maps.PoiSearchCallback">PoiSearchCallback</a>: 兴趣点检索完成事件</li>
+<li>
+<a href="#plus.maps.RouteSearchCallback">RouteSearchCallback</a>: 线路检索完成事件</li>
+<li>
+<a href="#plus.maps.SuccessCallback">SuccessCallback</a>: 地图操作成功回调函数</li>
+<li>
+<a href="#plus.maps.ErrorCallback">ErrorCallback</a>: 地图操作失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Maps": {
+		"description": "地图"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.maps.Map">Map</a></h1>
+<p>地图控件对象</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Map.Map(domId,%20styles)">Map(domId, styles)</a>: 创建Map对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Map.calculateArea">calculateArea</a>: 静态方法,计算面积</li>
+<li>
+<a href="#plus.maps.Map.calculateDistance">calculateDistance</a>: 静态方法,计算距离</li>
+<li>
+<a href="#plus.maps.Map.convertCoordinates">convertCoordinates</a>: 静态方法,坐标转换</li>
+<li>
+<a href="#plus.maps.Map.geocode">geocode</a>: 静态方法,地理编码</li>
+<li>
+<a href="#plus.maps.Map.reverseGeocode">reverseGeocode</a>: 静态方法,反向地理编码</li>
+<li>
+<a href="#plus.maps.Map.addOverlay">addOverlay</a>: 向地图中添加覆盖物</li>
+<li>
+<a href="#plus.maps.Map.centerAndZoom">centerAndZoom</a>: 设置地图初始中心点和缩放级别</li>
+<li>
+<a href="#plus.maps.Map.clearOverlays">clearOverlays</a>: 清除地图中所有覆盖物对象</li>
+<li>
+<a href="#plus.maps.Map.close">close</a>: 关闭地图控件</li>
+<li>
+<a href="#plus.maps.Map.getBounds">getBounds</a>: 获取当前地图可视范围的地理区域</li>
+<li>
+<a href="#plus.maps.Map.getCenter">getCenter</a>: 获取地图中心点位置</li>
+<li>
+<a href="#plus.maps.Map.getCurrentCenter">getCurrentCenter</a>: 获取当前地图显示的地图中心点位置</li>
+<li>
+<a href="#plus.maps.Map.getMapType">getMapType</a>: 获取地图的显示类型</li>
+<li>
+<a href="#plus.maps.Map.getUserLocation">getUserLocation</a>: 获取用户的当前位置信息</li>
+<li>
+<a href="#plus.maps.Map.getZoom">getZoom</a>: 获取地图的缩放级别</li>
+<li>
+<a href="#plus.maps.Map.hide">hide</a>: 隐藏地图控件</li>
+<li>
+<a href="#plus.maps.Map.isShowUserLocation">isShowUserLocation</a>: 获取是否显示用户位置</li>
+<li>
+<a href="#plus.maps.Map.isShowZoomControls">isShowZoomControls</a>: 获取是否显示地图内置缩放控件</li>
+<li>
+<a href="#plus.maps.Map.isTraffic">isTraffic</a>: 获取是否打开地图交通信息图层</li>
+<li>
+<a href="#plus.maps.Map.removeOverlay">removeOverlay</a>: 从地图中删除覆盖物对象</li>
+<li>
+<a href="#plus.maps.Map.reset">reset</a>: 重置地图</li>
+<li>
+<a href="#plus.maps.Map.resize">resize</a>: 重设地图控件大小</li>
+<li>
+<a href="#plus.maps.Map.setCenter">setCenter</a>: 设置地图的中心点</li>
+<li>
+<a href="#plus.maps.Map.setMapType">setMapType</a>: 设置地图的视图类型</li>
+<li>
+<a href="#plus.maps.Map.setStyles">setStyles</a>: 设置地图控件的配置参数</li>
+<li>
+<a href="#plus.maps.Map.setTraffic">setTraffic</a>: 是否打开地图交通信息图层</li>
+<li>
+<a href="#plus.maps.Map.setZoom">setZoom</a>: 设置地图的缩放级别</li>
+<li>
+<a href="#plus.maps.Map.show">show</a>: 显示地图控件</li>
+<li>
+<a href="#plus.maps.Map.showUserLocation">showUserLocation</a>: 显示用户位置</li>
+<li>
+<a href="#plus.maps.Map.showZoomControls">showZoomControls</a>: 设置是否显示地图内置缩放控件</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Map.onclick">onclick</a>: 用户点击地图事件</li>
+<li>
+<a href="#plus.maps.Map.onstatuschanged">onstatuschanged</a>: 地图状态改变事件</li>
+</ul>
+<h1><a name="plus.maps.MapStyles">MapStyles</a></h1>
+<p>地图控件对象的参数</p>
+<pre class="prettyprint linenums">
+interface plus.maps.MapStyles {
+	attribute Point center;
+	attribute Number zoom;
+	attribute MapType type;
+	attribute Boolean traffic;
+	attribute Boolean zoomControls;
+	
+	attribute String top;
+	attribute String left;
+	attribute String width;
+	attribute String height;
+	attribute String position;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	设置地图对象显示时使用的参数,如地图的中心位置、缩放级别等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>center: <em>(<a href="#plus.maps.Point">Point</a>
+	类型
+)</em>地图的中心位置<br><p>
+	未设置则使用地图的默认中心点(由地图供应商确定)。
+						</p>
+</li>
+<li>zoom: <em>(<font class="type">Number</font>
+	类型
+)</em>地图的缩放级别<br><p>
+	有效范围为有效范围为3-21(高德地图为3-20,百度地图为4-21),默认值为12,设置无效的值则使用默认值。
+						</p>
+</li>
+<li>type: <em>(<a href="#plus.maps.MapType">MapType</a>
+	类型
+)</em>地图的视图类型<br><p>
+	可设置普通街道视图、卫星视图,默认值为普通街道视图。
+						</p>
+</li>
+<li>traffic: <em>(<font class="type">Boolean</font>
+	类型
+)</em>地图的是否显示交通信息<br><p>
+	true表示显示地图的交通信息图层,false则不显示,默认值为false。
+						</p>
+</li>
+<li>zoomControls: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否显示地图的内置缩放控件<br><p>
+	true表示显示地图的内置缩放控件,false则不显示,默认值为false。
+						</p>
+</li>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>地图控件左上角的垂直偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度;
+		自动计算,如"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>地图控件左上角的水平偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度;
+		自动计算,如"auto",根据width值自动计算,相对于父Webview窗口水平居中。
+	默认值为"0px"。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>地图控件的宽度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的宽度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>地图控件的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父Webview窗口的高度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>position: <em>(<font class="type">String</font>
+	类型
+)</em>地图控件在Webview窗口的布局模式<br><p>
+	可取值:
+		"static" - 静态布局模式,如果页面存在滚动条则随窗口内容滚动;
+		"absolute" - 绝对布局模式,如果页面存在滚动条不随窗口内容滚动;
+	默认值为"static"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.maps.GeocodeOptions">GeocodeOptions</a></h1>
+<p>地理编码转换的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>coordType: <em>(<font class="type">String</font>
+	类型
+)</em>源数据的坐标系类型<br><p>
+	仅在反向地理编码转换时生效。
+	“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系;
+	默认使用wgs84坐标系。
+						</p>
+</li>
+<li>city: <em>(<font class="type">String</font>
+	类型
+)</em>源地址所属的城市<br><p>
+	仅在地理编码转换时生效,如果不指定则在全国范围内区配转换。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.maps.CoordinateConvertOptions">CoordinateConvertOptions</a></h1>
+<p>地图坐标转换的参数</p>
+<h2>属性:</h2>
+<ul><li>coordType: <em>(<font class="type">String</font>
+	类型
+)</em>源数据的坐标系类型<br><p>
+	“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系;
+	默认使用wgs84坐标系。
+						</p>
+</li></ul>
+<h1><a name="plus.maps.Point">Point</a></h1>
+<p>Point对象用于表示地图元素的坐标</p>
+<h2>说明:</h2>
+<p class="des">常用语对地图上元素进行定位时使用。</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Point.Point(lng,lat)">Point(lng,lat)</a>: 创建Point对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Point.setLng">setLng</a>: 设置坐标点的经度</li>
+<li>
+<a href="#plus.maps.Point.getLng">getLng</a>: 获取坐标的经度</li>
+<li>
+<a href="#plus.maps.Point.setLat">setLat</a>: 设置坐标的纬度</li>
+<li>
+<a href="#plus.maps.Point.getLat">getLat</a>: 获取坐标的纬度</li>
+<li>
+<a href="#plus.maps.Point.equals">equals</a>: 判断两个坐标点是否相等</li>
+</ul>
+<h1><a name="plus.maps.Bounds">Bounds</a></h1>
+<p>地理区域</p>
+<h2>说明:</h2>
+<p class="des">
+	有西南及东北坐标点数据组成的矩形区域。
+				</p>
+<h2>构造:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Bounds.Bounds(northease,southwest)">Bounds(northease,southwest)</a>: 创建Bounds对象</li>
+<li>
+<a href="#plus.maps.Bounds.Bounds(nelng,nelat,swlng,swlat)">Bounds(nelng,nelat,swlng,swlat)</a>: 创建Bounds对象</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Bounds.setNorthEase">setNorthEase</a>: 设置地理区域的东北坐标点</li>
+<li>
+<a href="#plus.maps.Bounds.getNorthEase">getNorthEase</a>: 地理区域的东北坐标点</li>
+<li>
+<a href="#plus.maps.Bounds.setSouthWest">setSouthWest</a>: 设置地理区域的西南坐标点</li>
+<li>
+<a href="#plus.maps.Bounds.getSouthWest">getSouthWest</a>: 地理区域的西南坐标点</li>
+<li>
+<a href="#plus.maps.Bounds.contains">contains</a>: 判断制定的坐标是否在地理区域中</li>
+<li>
+<a href="#plus.maps.Bounds.equals">equals</a>: 判断两个地理区域是否相等</li>
+<li>
+<a href="#plus.maps.Bounds.getCenter">getCenter</a>: 获取地理区域的中心点坐标</li>
+</ul>
+<h1><a name="plus.maps.MapType">MapType</a></h1>
+<p>地图视图类型</p>
+<h2>常量:</h2>
+<ul>
+<li>MAPTYPE_NORMAL: <em>(<font class="type">Number</font>
+	类型
+)</em>普通街道视图类型<br><p>地图视图类型常量,普通街道视图。</p>
+</li>
+<li>MAPTYPE_SATELLITE: <em>(<font class="type">Number</font>
+	类型
+)</em>卫星视图<br><p>地图视图类型常量,卫星视图。</p>
+</li>
+</ul>
+<h1><a name="plus.maps.Overlay">Overlay</a></h1>
+<p>地图覆盖物基类对象</p>
+<pre class="prettyprint linenums">
+interface Overlay {
+	function Boolean isVisible();
+	function void show();
+	function void hide();
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+Overlay是地图上显示元素的基类,用于抽象地图元素,不用于实例化。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Overlay.isVisible">isVisible</a>: 判断地图覆盖物是否可见</li>
+<li>
+<a href="#plus.maps.Overlay.show">show</a>: 显示地图上的覆盖物</li>
+<li>
+<a href="#plus.maps.Overlay.hide">hide</a>: 隐藏地图上的覆盖物</li>
+</ul>
+<h1><a name="plus.maps.Marker">Marker</a></h1>
+<p>地图上显示的标点对象</p>
+<h2>说明:</h2>
+<p class="des">从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Marker.Marker(%20point%20)">Marker( point )</a>: 创建地图标点Marker对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Marker.bringToTop">bringToTop</a>: 覆盖物显示到最上层</li>
+<li>
+<a href="#plus.maps.Marker.setPoint">setPoint</a>: 设置标点对象的坐标</li>
+<li>
+<a href="#plus.maps.Marker.getPoint">getPoint</a>: 获取标点的坐标</li>
+<li>
+<a href="#plus.maps.Marker.setIcon">setIcon</a>: 设置标点上显示的图标</li>
+<li>
+<a href="#plus.maps.Marker.setIcons">setIcons</a>: 设置标点上显示的图标数组</li>
+<li>
+<a href="#plus.maps.Marker.setLabel">setLabel</a>: 设置标点上显示的文本标注</li>
+<li>
+<a href="#plus.maps.Marker.getLabel">getLabel</a>: 获取标点上显示的文本标注</li>
+<li>
+<a href="#plus.maps.Marker.setBubble">setBubble</a>: 设置标点的气泡内容</li>
+<li>
+<a href="#plus.maps.Marker.getBubble">getBubble</a>: 获取标点上显示的文本标注</li>
+<li>
+<a href="#plus.maps.Marker.hideBubble">hideBubble</a>: 隐藏标点上显示的气泡</li>
+<li>
+<a href="#plus.maps.Marker.setDraggable">setDraggable</a>: 设置标点的是否允许拖拽</li>
+<li>
+<a href="#plus.maps.Marker.isDraggable">isDraggable</a>: 获取标点是否允许拖拽</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Marker.onclick">onclick</a>: 用户点击地图标点事件</li>
+<li>
+<a href="#plus.maps.Marker.onDrag">onDrag</a>: 用户拖拽标点事件</li>
+</ul>
+<h1><a name="plus.maps.Bubble">Bubble</a></h1>
+<p>地图上显示的气泡对象</p>
+<h2>说明:</h2>
+<p class="des">
+	此对象不能直接添加到地图上显示,只可关联到地图标点覆盖物上,用户点击标点时弹出显示。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Bubble.Bubble(%20label%20)">Bubble( label )</a>: 创建气泡对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Bubble.setIcon">setIcon</a>: 设置气泡上显示的图标</li>
+<li>
+<a href="#plus.maps.Bubble.setLabel">setLabel</a>: 设置气泡上显示的文字内容</li>
+<li>
+<a href="#plus.maps.Bubble.getLabel">getLabel</a>: 获取气泡上显示的文字内容</li>
+<li>
+<a href="#plus.maps.Bubble.belongMarker">belongMarker</a>: 获取气泡所属的标点对象</li>
+<li>
+<a href="#plus.maps.Bubble.loadImage">loadImage</a>: 从图片加载气泡显示的内容</li>
+<li>
+<a href="#plus.maps.Bubble.loadImageDataURL">loadImageDataURL</a>: 从图片数据加载气泡显示的内容</li>
+</ul>
+<h2>事件:</h2>
+<ul><li>
+<a href="#plus.maps.Bubble.onclick">onclick</a>: 用户点击气泡事件</li></ul>
+<h1><a name="plus.maps.Circle">Circle</a></h1>
+<p>地图上显示的圆圈对象</p>
+<h2>说明:</h2>
+<p class="des">从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Circle.Circle(%20center,%20radius%20)">Circle( center, radius )</a>: 创建Circle对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Circle.setCenter">setCenter</a>: 设置圆圈中心点的经纬度坐标</li>
+<li>
+<a href="#plus.maps.Circle.getCenter">getCenter</a>: 获取圆圈中心点的坐标</li>
+<li>
+<a href="#plus.maps.Circle.setRadius">setRadius</a>: 设置圆圈的半径,单位为米</li>
+<li>
+<a href="#plus.maps.Circle.getRadius">getRadius</a>: 获取圆圈的半径</li>
+<li>
+<a href="#plus.maps.Circle.setStrokeColor">setStrokeColor</a>: 设置圆圈的边框颜色</li>
+<li>
+<a href="#plus.maps.Circle.getStrokeColor">getStrokeColor</a>: 获取圆圈的边框颜色</li>
+<li>
+<a href="#plus.maps.Circle.setStrokeOpacity">setStrokeOpacity</a>: 设置圆圈的边框颜色</li>
+<li>
+<a href="#plus.maps.Circle.getStrokeOpacity">getStrokeOpacity</a>: 获取圆圈边框的透明度</li>
+<li>
+<a href="#plus.maps.Circle.setFillColor">setFillColor</a>: 设置圆圈的填充颜色</li>
+<li>
+<a href="#plus.maps.Circle.getFillColor">getFillColor</a>: 获取圆圈的填充颜色</li>
+<li>
+<a href="#plus.maps.Circle.setFillOpacity">setFillOpacity</a>: 设置圆圈填充颜色的透明度</li>
+<li>
+<a href="#plus.maps.Circle.getFillOpacity">getFillOpacity</a>: 获取圆圈填充色的透明度</li>
+<li>
+<a href="#plus.maps.Circle.setLineWidth">setLineWidth</a>: 设置圆圈边框的线条宽度</li>
+<li>
+<a href="#plus.maps.Circle.getLineWidth">getLineWidth</a>: 获取圆圈边框的线条宽度</li>
+</ul>
+<h1><a name="plus.maps.Polyline">Polyline</a></h1>
+<p>地图上显示的折线对象</p>
+<h2>说明:</h2>
+<p class="des">从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Polyline.Polyline(%20points%20)">Polyline( points )</a>: 创建Polyline对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Polyline.setPath">setPath</a>: 设置折线的顶点坐标</li>
+<li>
+<a href="#plus.maps.Polyline.getPath">getPath</a>: 获取折线的顶点坐标</li>
+<li>
+<a href="#plus.maps.Polyline.setStrokeColor">setStrokeColor</a>: 设置折线的颜色</li>
+<li>
+<a href="#plus.maps.Polyline.getStrokeColor">getStrokeColor</a>: 获取折线的颜色</li>
+<li>
+<a href="#plus.maps.Polyline.setStrokeOpacity">setStrokeOpacity</a>: 设设置折线的透明度</li>
+<li>
+<a href="#plus.maps.Polyline.getStrokeOpacity">getStrokeOpacity</a>: 获取折线的透明度</li>
+<li>
+<a href="#plus.maps.Polyline.setLineWidth">setLineWidth</a>: 设置折线的线条宽度</li>
+<li>
+<a href="#plus.maps.Polyline.getLineWidth">getLineWidth</a>: 获取折线的线条宽度</li>
+</ul>
+<h1><a name="plus.maps.Polygon">Polygon</a></h1>
+<p>地图上显示的多边形对象</p>
+<h2>说明:</h2>
+<p class="des">从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Polygon.Polygon(%20points%20)">Polygon( points )</a>: 创建Polygon对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Polygon.setPath">setPath</a>: 设置多边形的顶点坐标</li>
+<li>
+<a href="#plus.maps.Polygon.getPath">getPath</a>: 获取多边形的顶点坐标</li>
+<li>
+<a href="#plus.maps.Polygon.setStrokeColor">setStrokeColor</a>: 设置多边形的颜色</li>
+<li>
+<a href="#plus.maps.Polygon.getStrokeColor">getStrokeColor</a>: 获取多边形边框的颜色</li>
+<li>
+<a href="#plus.maps.Polygon.setStrokeOpacity">setStrokeOpacity</a>: 设置多边形的透明度</li>
+<li>
+<a href="#plus.maps.Polygon.getStrokeOpacity">getStrokeOpacity</a>: 获取多边形边框的透明度</li>
+<li>
+<a href="#plus.maps.Polygon.setFillColor">setFillColor</a>: 设置多边形的填充颜色</li>
+<li>
+<a href="#plus.maps.Polygon.getFillColor">getFillColor</a>: 获取多边形的填充色</li>
+<li>
+<a href="#plus.maps.Polygon.setFillOpacity">setFillOpacity</a>: 设置多边形填充色的透明度</li>
+<li>
+<a href="#plus.maps.Polygon.getFillOpacity">getFillOpacity</a>: 获取多边形填充色的透明度</li>
+<li>
+<a href="#plus.maps.Polygon.setLineWidth">setLineWidth</a>: 设置多边形的边框宽度</li>
+<li>
+<a href="#plus.maps.Polygon.getLineWidth">getLineWidth</a>: 获取多边形边框的宽度</li>
+</ul>
+<h1><a name="plus.maps.Search">Search</a></h1>
+<p>地图检索对象</p>
+<h2>说明:</h2>
+<p class="des">
+	Search对象用于管理地图上的检索功能,包括位置检索、周边检索和范围检索。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Search.Search(%20map%20)">Search( map )</a>: 创建Search对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Search.setPageCapacity">setPageCapacity</a>: 设置检索返回结果每页的信息数目</li>
+<li>
+<a href="#plus.maps.Search.getPageCapacity">getPageCapacity</a>: 获取检索返回结果每页的信息数目</li>
+<li>
+<a href="#plus.maps.Search.poiSearchInCity">poiSearchInCity</a>: 城市兴趣点检索</li>
+<li>
+<a href="#plus.maps.Search.poiSearchNearBy">poiSearchNearBy</a>: 周边检索</li>
+<li>
+<a href="#plus.maps.Search.poiSearchInbounds">poiSearchInbounds</a>: 指定范围检索</li>
+<li>
+<a href="#plus.maps.Search.setTransitPolicy">setTransitPolicy</a>: 设置公交路线检索策略</li>
+<li>
+<a href="#plus.maps.Search.transitSearch">transitSearch</a>: 公交路线检索</li>
+<li>
+<a href="#plus.maps.Search.setDrivingPolicy">setDrivingPolicy</a>: 设置驾车路线检索策略</li>
+<li>
+<a href="#plus.maps.Search.drivingSearch">drivingSearch</a>: 驾车路线检索</li>
+<li>
+<a href="#plus.maps.Search.walkingSearch">walkingSearch</a>: 步行路线检索</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Search.onPoiSearchComplete">onPoiSearchComplete</a>: 兴趣点检索完成事件</li>
+<li>
+<a href="#plus.maps.Search.onRouteSearchComplete">onRouteSearchComplete</a>: 线路检索完成事件</li>
+</ul>
+<h1><a name="plus.maps.SearchPolicy">SearchPolicy</a></h1>
+<p>检索策略类型</p>
+<h2>说明:</h2>
+<p class="des">在线路检索时设置检索策略时使用。</p>
+<h2>常量:</h2>
+<ul>
+<li>TRANSIT_TIME_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>时间优先<br><p>检索策略类型常量,用于公交检索策略</p>
+</li>
+<li>TRANSIT_TRANSFER_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>最少换乘优先<br><p>检索策略类型常量,用于公交检索策略</p>
+</li>
+<li>TRANSIT_WALK_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>最少步行距离优先<br><p>检索策略类型常量,用于公交检索策略</p>
+</li>
+<li>TRANSIT_FEE_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>选择车票花销最少优先<br><p>检索策略类型常量,用于公交检索策略</p>
+</li>
+<li>DRIVING_DIS_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>最短距离优先<br><p>检索策略类型常量,用于驾车检索策略</p>
+</li>
+<li>DRIVING_NO_EXPRESSWAY: <em>(<font class="type">Number</font>
+	类型
+)</em>无高速公路线路<br><p>检索策略类型常量,用于驾车检索策略</p>
+</li>
+<li>DRIVING_FEE_FIRST: <em>(<font class="type">Number</font>
+	类型
+)</em>最少费用优先<br><p>检索策略类型常量,用于驾车检索策略</p>
+</li>
+</ul>
+<h1><a name="plus.maps.SearchPoiResult">SearchPoiResult</a></h1>
+<p>保存位置检索、周边检索和范围检索返回的结果</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.maps.SearchPoiResult.totalNumber">totalNumber</a>: POI检索总结果数</li>
+<li>
+<a href="#plus.maps.SearchPoiResult.currentNumber">currentNumber</a>: 当前页的POI检索结果数</li>
+<li>
+<a href="#plus.maps.SearchPoiResult.pageNumber">pageNumber</a>: 本次POI检索的总页数</li>
+<li>
+<a href="#plus.maps.SearchPoiResult.pageIndex">pageIndex</a>: 获取当前页的索引</li>
+<li>
+<a href="#plus.maps.SearchPoiResult.poiList">poiList</a>: 本次POI检索结果数组</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.maps.SearchPoiResult.getPosition">getPosition</a>: 获取指定索引的检索结果</li></ul>
+<h1><a name="plus.maps.SearchRouteResult">SearchRouteResult</a></h1>
+<p>保存位置检索、周边检索和范围检索返回的结果</p>
+<h2>说明:</h2>
+<p class="des">
+	不可通过new操作符创建SearchRouteResult对象,在触发onRouteSearchComplete()时自动创建。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.maps.SearchRouteResult.startPosition">startPosition</a>: 线路的起点位置</li>
+<li>
+<a href="#plus.maps.SearchRouteResult.endPosition">endPosition</a>: 线路的终点位置</li>
+<li>
+<a href="#plus.maps.SearchRouteResult.routeNumber">routeNumber</a>: 本次线路检索的总方案数</li>
+<li>
+<a href="#plus.maps.SearchRouteResult.routeList">routeList</a>: 线路检索结果数组</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.maps.SearchRouteResult.getRoute">getRoute</a>: 获取指定索引的线路方案</li></ul>
+<h1><a name="plus.maps.Position">Position</a></h1>
+<p>检索结果的位置点</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Position.Position(%20point%20)">Position( point )</a>: 创建Position对象</li></ul>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Position.point">point</a>: 位置点的经纬度坐标</li>
+<li>
+<a href="#plus.maps.Position.address">address</a>: 位置点的地址信息</li>
+<li>
+<a href="#plus.maps.Position.city">city</a>: 位置点的所属城市信息</li>
+<li>
+<a href="#plus.maps.Position.name">name</a>: 位置点的名称</li>
+<li>
+<a href="#plus.maps.Position.phone">phone</a>: 位置点的电话信息</li>
+<li>
+<a href="#plus.maps.Position.postcode">postcode</a>: 位置点的邮编信息</li>
+</ul>
+<h1><a name="plus.maps.Route">Route</a></h1>
+<p>地图中的路线对象</p>
+<h2>说明:</h2>
+<p class="des">
+	从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.maps.Route.Route(%20ptStart,%20ptEnd%20)">Route( ptStart, ptEnd )</a>: 创建Route对象</li></ul>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.maps.Route.startPoint">startPoint</a>: 路线起点地理坐标点</li>
+<li>
+<a href="#plus.maps.Route.endPoint">endPoint</a>: 路线终点地理坐标点</li>
+<li>
+<a href="#plus.maps.Route.pointCount">pointCount</a>: 路线坐标点段数</li>
+<li>
+<a href="#plus.maps.Route.pointList">pointList</a>: 路线的地理坐标点数组</li>
+<li>
+<a href="#plus.maps.Route.distance">distance</a>: 路线总距离</li>
+<li>
+<a href="#plus.maps.Route.routeTip">routeTip</a>: 线路的提示信息</li>
+</ul>
+<h1><a name="plus.maps.GeocodeCallback">GeocodeCallback</a></h1>
+<p>地理编码转换成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onGeocodeSuccess( Event event ) {
+	// JS code.
+	var address = event.address;  // 转换后的地理位置
+	var point = event.coord;  // 转换后的坐标信息
+	var coordType = event.coordType;	// 转换后的坐标系类型
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在地理编码转换成功触发,并返回转换结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>转换后的坐标信息<br>
+	可通过event.coord(Point类型)获取转换后的坐标值。
+	可通过event.coordType(String类型)获取转换后的坐标系类型,“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.CoordinateConvertCallback">CoordinateConvertCallback</a></h1>
+<p>坐标转换成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onConvertSuccess( Event event ) {
+	// JS code.
+	var point = event.coord;  // 转换后的坐标值
+	var coordType = event.coordType;	// 转换后的坐标系类型
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在坐标转换成功触发,并返回转换结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>转换后的坐标信息<br>
+	可通过event.coord(Point类型)获取转换后的坐标值。
+	可通过event.coordType(String类型)获取转换后的坐标系类型,“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.DistanceCalculateCallback">DistanceCalculateCallback</a></h1>
+<p>距离计算成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onCalculateSuccess( Event event ) {
+	// JS code.
+	var distance = event.distance;  // 转换后的距离值
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在距离计算成功触发,并返回计算结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>距离计算后的信息<br>
+	可通过event.distance(Number类型)获取计算后的距离值,单位为米(m)。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.AreaCalculateCallback">AreaCalculateCallback</a></h1>
+<p>地理区域面积计算成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onCalculateSuccess( Event event ) {
+	// JS code.
+	var area = event.area;  // 计算后的面积值
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在地理区域面积计算成功触发,并返回计算结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>地理区域面积计算后的信息<br>
+	可通过event.area(Number类型)获取计算后的面积值,单位为平方米。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.UserLocationCallback">UserLocationCallback</a></h1>
+<p>获取用户当前位置信息成功回调</p>
+<pre class="prettyprint linenums">
+void onSuccess( state, point ) {
+	// Get location code
+}
+				</pre>
+<h2>参数:</h2>
+<ul>
+<li>state: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>获取用户位置操作状态码,0表示成功,其它为错误码<br>
+</li>
+<li>point: 
+		<em>(
+			<a href="#plus.maps.Point">Point</a>
+			)
+			必选 </em>位置经纬度坐标,如果获取操作失败则为null对象<br>
+</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.ClickEventHandler">ClickEventHandler</a></h1>
+<p>用户点击地图回调事件</p>
+<pre class="prettyprint linenums">
+void onClick( point ) {
+	// Click code
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>point: 
+		<em>(
+			<a href="#plus.maps.Point">Point</a>
+			)
+			必选 </em>用户在地图上点击的坐标点<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.StatusChangedEventHandler">StatusChangedEventHandler</a></h1>
+<p>地图状态变化回调事件</p>
+<pre class="prettyprint linenums">
+void onStatusChanged( event ) {
+	// Click code
+	var target = event.target;		// 状态变化的地图对象(plus.maps.Map)
+	var bounds = event.bounds;		// 地图的可视地理区域(plus.maps.Bounds)
+	var center = event.center;		// 地图的中心点坐标(plus.maps.Point)
+	var zoom = event.zoom;			// 地图的缩放级别(Number)
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>地图状态变化对象<br>
+	可通过event.target(plus.maps.Map类型)获取状态变化的地图对象;
+	可通过event.bounds(plus.maps.Bounds类型)获取地图当前的可视区域;
+	可通过event.center(plus.maps.Point类型)获取地图当前的中心点坐标;
+	可通过event.zoom(Number类型)获取地图当前的缩放级别。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.OverlayClickEventHandler">OverlayClickEventHandler</a></h1>
+<p>用户点击地图覆盖物回调事件</p>
+<pre class="prettyprint linenums">
+void onClick( overlay ) {
+	// Click code
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>overlay: 
+		<em>(
+			<a href="#plus.maps.Overlay">Overlay</a>
+			)
+			必选 </em>用户在地图上点击的覆盖物对象<br>
+	overlay可以是Marker、Bubble、Circle、Polyline、Polygon对象的引用。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.OverlayDragEventHandler">OverlayDragEventHandler</a></h1>
+<p>用户拖拽覆盖物回调事件</p>
+<pre class="prettyprint linenums">
+void onDrag( target ) {
+	// Click code
+	var marker = target;    // 拖拽的覆盖物对象
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>target: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>拖拽事件对象<br>
+	可通过target(Overlay类型)获取拖拽的覆盖物对象,target可以是Marker、Bubble、Circle、Polyline、Polygon对象的引用。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.PoiSearchCallback">PoiSearchCallback</a></h1>
+<p>兴趣点检索完成事件</p>
+<pre class="prettyprint linenums">
+void onPoiSearchComplete( state, result ) {
+	// JS code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在兴趣点检索完成时触发,并返回检索结果。
+				</p>
+<h2>参数:</h2>
+<ul>
+<li>state: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>检索结果状态号<br>0表示检索正确并返回结果,其它表示检索错误。</li>
+<li>result: 
+		<em>(
+			<a href="#plus.maps.SearchPoiResult">SearchPoiResult</a>
+			)
+			必选 </em>POI检索结果<br>若检索错误,则为null对象。</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.RouteSearchCallback">RouteSearchCallback</a></h1>
+<p>线路检索完成事件</p>
+<pre class="prettyprint linenums">
+void onRouteSearchComplete( state, result ) {
+	// JS code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在线路检索完成时触发,并返回检索结果。
+				</p>
+<h2>参数:</h2>
+<ul>
+<li>state: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>检索结果状态号<br>0表示检索正确并返回结果,其它表示检索错误。</li>
+<li>result: 
+		<em>(
+			<a href="#plus.maps.SearchRouteResult">SearchRouteResult</a>
+			)
+			必选 </em>线路检索结果<br>若检索错误,则为null对象。</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.SuccessCallback">SuccessCallback</a></h1>
+<p>地图操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(){
+	// Success code.
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	地图操作成功后触发回调函数。
+				</p>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.maps.ErrorCallback">ErrorCallback</a></h1>
+<p>地图操作失败的回调函数</p>
+<pre class="prettyprint linenums">
+function void onError( error ) {
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>地图操作的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 116 - 0
hello H5+/doc/messaging.html

@@ -0,0 +1,116 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Messaging Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.messaging">messaging</a></h1>
+<p>Messaging模块管理设备通讯功能,可用于短信、彩信、邮件发送等。通过plus.messaging可获取设备通讯管理对象。另外也可以直接通过html中的href直接快速发送短信、拨打电话、发送邮件等。</p>
+<h2>常量:</h2>
+<ul>
+<li>
+<a href="#plus.messaging.TYPE_SMS">TYPE_SMS</a>: 简单短信类型常量</li>
+<li>
+<a href="#plus.messaging.TYPE_MMS">TYPE_MMS</a>: 彩信类型常量</li>
+<li>
+<a href="#plus.messaging.TYPE_EMAIL">TYPE_EMAIL</a>: 邮件类型常量</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.messaging.createMessage">createMessage</a>: 创建消息对象</li>
+<li>
+<a href="#plus.messaging.sendMessage">sendMessage</a>: 发送消息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.messaging.Message">Message</a>: 消息对象</li>
+<li>
+<a href="#plus.messaging.BodyType">BodyType</a>: 消息体内容类型</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.messaging.MessageSendSuccessCallback">MessageSendSuccessCallback</a>: 消息发送成功的回调函数</li>
+<li>
+<a href="#plus.messaging.MessageErrorCallback">MessageErrorCallback</a>: 消息发送失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Messaging": {
+		"description": "短信彩信邮件消息"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.messaging.Message">Message</a></h1>
+<p>消息对象</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.messaging.Message.to">to</a>: 收件人信息</li>
+<li>
+<a href="#plus.messaging.Message.cc">cc</a>: 抄送人信息</li>
+<li>
+<a href="#plus.messaging.Message.bcc">bcc</a>: 暗送人信息</li>
+<li>
+<a href="#plus.messaging.Message.from">from</a>: 发件人信息</li>
+<li>
+<a href="#plus.messaging.Message.subject">subject</a>: 发送消息主题</li>
+<li>
+<a href="#plus.messaging.Message.body">body</a>: 发送消息内容</li>
+<li>
+<a href="#plus.messaging.Message.bodyType">bodyType</a>: 发送消息内容类型</li>
+<li>
+<a href="#plus.messaging.Message.silent">silent</a>: 是否采用静默方式发送消息</li>
+</ul>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.messaging.Message.addAttachment">addAttachment</a>: 添加附件</li></ul>
+<h1><a name="plus.messaging.BodyType">BodyType</a></h1>
+<p>消息体内容类型</p>
+<h2>说明:</h2>
+<p class="des">用于设定消息的消息体内容。</p>
+<h1><a name="plus.messaging.MessageSendSuccessCallback">MessageSendSuccessCallback</a></h1>
+<p>消息发送成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess() {
+	// Send message success code.
+}
+				</pre>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.messaging.MessageErrorCallback">MessageErrorCallback</a></h1>
+<p>消息发送失败的回调函数</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Error code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>失败信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 30 - 0
hello H5+/doc/native.js.html

@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+	<meta charset="utf-8">
+	<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+	<meta name="HandheldFriendly" content="true">
+	<meta name="MobileOptimized" content="320">
+	<title>Native.JS</title>
+	<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+	<script type="text/javascript" src="res/doc.js" charset="utf-8"></script>
+	<script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body>
+	<div id="content" class="content">
+		<h1><a>Native.js</a></h1>
+		<p>Native.JS一种把操作系统的原生对象转义,映射为JS对象,在JS里编写原生代码的技术。可通过plus.android.*和plus.ios.*提供的API分别调用Android和iOS平台的Native API。</p>
+		<ul style="list-style:none;font-size:1.5em;margin:0;padding:0;text-align:center;">
+			<li style="padding:0.5em 0;">
+				<a href="ios.html">iOS</a>
+			</li>
+			<li style="padding:0.5em 0;">
+				<a href="android.html">Android</a>
+			</li>
+			<li style="padding:0.5em 0;">
+				<a onclick="plus.runtime.openURL('http://ask.dcloud.net.cn/article/88')">入门教程</a>
+			</li>
+		</ul>
+	</div>
+</body>
+</html>

+ 675 - 0
hello H5+/doc/nativeUI.html

@@ -0,0 +1,675 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>NativeUI Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.nativeUI">nativeUI</a></h1>
+<p>nativeUI管理系统原生界面,可用于弹出系统原生提示对话框窗口、时间日期选择对话框、等待对话框等。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeUI.actionSheet">actionSheet</a>: 弹出系统选择按钮框</li>
+<li>
+<a href="#plus.nativeUI.alert">alert</a>: 弹出系统提示对话框</li>
+<li>
+<a href="#plus.nativeUI.confirm">confirm</a>: 弹出系统确认对话框</li>
+<li>
+<a href="#plus.nativeUI.closeWaiting">closeWaiting</a>: 关闭系统等待对话框</li>
+<li>
+<a href="#plus.nativeUI.closeToast">closeToast</a>: 关闭自动消失的提示消息</li>
+<li>
+<a href="#plus.nativeUI.previewImage">previewImage</a>: 预览图片</li>
+<li>
+<a href="#plus.nativeUI.showWaiting">showWaiting</a>: 显示系统等待对话框</li>
+<li>
+<a href="#plus.nativeUI.pickDate">pickDate</a>: 弹出系统日期选择对话框</li>
+<li>
+<a href="#plus.nativeUI.pickTime">pickTime</a>: 弹出系统时间选择对话框</li>
+<li>
+<a href="#plus.nativeUI.prompt">prompt</a>: 弹出系统输入对话框</li>
+<li>
+<a href="#plus.nativeUI.toast">toast</a>: 显示自动消失的提示消息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.nativeUI.ActionButtonStyles">ActionButtonStyles</a>: JSON对象,原生选择按钮框上按钮的样式参数</li>
+<li>
+<a href="#plus.nativeUI.ActionSheetStyles">ActionSheetStyles</a>: JSON对象,原生选择按钮框的样式参数</li>
+<li>
+<a href="#plus.nativeUI.ConfirmStyles">ConfirmStyles</a>: 确认对话框的参数</li>
+<li>
+<a href="#plus.nativeUI.PreviewImageStyles">PreviewImageStyles</a>: JSON对象,图片预览的参数</li>
+<li>
+<a href="#plus.nativeUI.PickDateStyles">PickDateStyles</a>: 日期选择对话框的参数</li>
+<li>
+<a href="#plus.nativeUI.PickTimeStyles">PickTimeStyles</a>: JSON对象,时间选择对话框的参数</li>
+<li>
+<a href="#plus.nativeUI.NativeUIObj">NativeUIObj</a>: 系统原生界面基类对象</li>
+<li>
+<a href="#plus.nativeUI.WaitingObj">WaitingObj</a>: 系统等待对话框对象</li>
+<li>
+<a href="#plus.nativeUI.WaitingStyles">WaitingStyles</a>: JSON对象,原生等待对话框的参数</li>
+<li>
+<a href="#plus.nativeUI.WaitingLoadingStyles">WaitingLoadingStyles</a>: JSON对象,原生等待对话框上loading图标自定义样式</li>
+<li>
+<a href="#plus.nativeUI.ToastStyles">ToastStyles</a>: JSON对象,系统提示消息框要设置的参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeUI.ActionSheetCallback">ActionSheetCallback</a>: 系统选择按钮框的回调函数</li>
+<li>
+<a href="#plus.nativeUI.AlertCallback">AlertCallback</a>: 系统提示框确认的回调函数</li>
+<li>
+<a href="#plus.nativeUI.ConfirmCallback">ConfirmCallback</a>: 关闭确认对话框的回调函数</li>
+<li>
+<a href="#plus.nativeUI.PromptCallback">PromptCallback</a>: 系统输入对话框关闭后的回调函数</li>
+<li>
+<a href="#plus.nativeUI.PickDatetimeSuccessCallback">PickDatetimeSuccessCallback</a>: 选择日期或时间操作成功的回调函数</li>
+<li>
+<a href="#plus.nativeUI.PickDatetimeErrorCallback">PickDatetimeErrorCallback</a>: 选择日期或时间操作取消或失败的回调函数</li>
+<li>
+<a href="#plus.nativeUI.PreviewImageLongPressCallback">PreviewImageLongPressCallback</a>: 图片预览长按事件</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"NativeUI": {
+		"description": "原生UI控件"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.nativeUI.ActionButtonStyles">ActionButtonStyles</a></h1>
+<p>JSON对象,原生选择按钮框上按钮的样式参数</p>
+<h2>属性:</h2>
+<ul>
+<li>color: <em>(<font class="type">String</font>
+	类型
+)</em>按钮上显示的文字颜色<br><p>
+	可取值:
+	"#RRGGBB"格式字符串,如"#FF0000"表示文字颜色为红色;
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
+						</p>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>按钮上显示的文字内容<br>
+</li>
+<li>style: <em>(<font class="type">String</font>
+	类型
+)</em>按钮的样式<br><p>
+	可取值:
+	"destructive" - 表示警示按钮样式,默认文字颜色为红色;
+	"default" - 表示默认按钮样式。
+	默认值为"default"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.ActionSheetStyles">ActionSheetStyles</a></h1>
+<p>JSON对象,原生选择按钮框的样式参数</p>
+<h2>属性:</h2>
+<ul>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>选择按钮框的标题<br>
+</li>
+<li>cancel: <em>(<font class="type">String</font>
+	类型
+)</em>取消按钮上显示的文字内容<br><p>
+	不设置此属性,则不显示取消按钮。
+						</p>
+</li>
+<li>buttons: <em>(<font class="type">Array</font>[
+				<a href="#plus.nativeUI.ActionButtonStyles">ActionButtonStyles</a>
+				]
+			
+	类型
+)</em>选择框上的按钮,ActionButtonStyles对象数组<br>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.ConfirmStyles">ConfirmStyles</a></h1>
+<p>确认对话框的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>确认对话框显示的标题<br><p>
+	如果不设置此属性值,则不显示标题。
+						</p>
+</li>
+<li>buttons: <em>(<font class="type">Array</font>[
+				<font class="type">String</font>
+				]
+			
+	类型
+)</em>确认对话框上显示的按钮<br><p>
+	字符串数组,每项对应在确认对话框上显示一个按钮,用户点击后通过confirmCB返回用户点击按钮的在数组中的索引值。
+						</p>
+</li>
+<li>verticalAlign: <em>(<font class="type">String</font>
+	类型
+)</em>对话框在屏幕中的垂直分享对齐方式<br><p>
+	可取值:
+		"top" - 表示垂直居顶对齐;
+		"center" - 表示垂直居中对齐;
+		"bottom" - 表示垂直居底对齐。
+	默认值为"center"(垂直居中对齐)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.PreviewImageStyles">PreviewImageStyles</a></h1>
+<p>JSON对象,图片预览的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>background: <em>(<font class="type">String</font>
+	类型
+)</em>图片预览的背景颜色<br><p>
+	颜色值格式为"#RRGGBB",如"#FF0000"表示为红色背景。
+	默认值为黑色("#000000")。
+						</p>
+</li>
+<li>current: <em>(<font class="type">Number</font>
+	类型
+)</em>默认显示图片的索引值<br><p>
+	索引值从0开始,默认值为0。
+						</p>
+</li>
+<li>indicator: <em>(<font class="type">String</font>
+	类型
+)</em>图片指示器样式<br><p>
+	可取值:
+		"default" - 默认指示器(底部圆点样式);
+		"number" - 顶部数字指示器(顶部居中显示,文字为%当前图片索引值(从1开始)%/%图片总数%);
+		"none" - 不显示指示器。
+	默认值为"default"。
+						</p>
+</li>
+<li>loop: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否可循环预览<br><p>
+	可取值:
+		"true" - 支持循环预览;
+		"false" - 不支持循环预览。
+	默认值为"false"。
+						</p>
+</li>
+<li>onLongPress: <em>(<a href="#plus.nativeUI.PreviewImageLongPressCallback">PreviewImageLongPressCallback</a>
+	类型
+)</em>长按事件<br><p>
+	用户在图片预览界面长按时触发。
+	在回调中返回长按图片的信息(索引值、地址等)。
+	由于图片预览界面是层级非常高的窗口,此时只能调用plus.nativeUI.*显示的窗口覆盖在图片预览界面上(原生控件plus.nativeObj.View也无法显示)。
+	注意:HBuilderX1.9.5及以上版本支持。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.PickDateStyles">PickDateStyles</a></h1>
+<p>日期选择对话框的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>日期选择对话框显示的标题<br><p>
+	如果未设置,则不显示标题。
+						</p>
+</li>
+<li>date: <em>(<font class="type">Date</font>
+	类型
+)</em>日期选择对话框默认显示的日期<br><p>
+	如果未设置,则显示当前的日期。
+						</p>
+</li>
+<li>minDate: <em>(<font class="type">Date</font>
+	类型
+)</em>日期选择对话框可选择的最小日期<br><p>
+	Date类型对象,如果未设置可选择的最小日期,则使用系统默认可选择的最小日期值。
+						</p>
+</li>
+<li>maxDate: <em>(<font class="type">Date</font>
+	类型
+)</em>日期选择对话框可选择的最大日期<br><p>
+	Date类型对象,如果未设置可选择的最大日期,则使用系统默认可选择的最大日期值。
+	其值必须大于minDate设置的值,否则使用系统默认可选择的最大日期值。
+						</p>
+</li>
+<li>popover: <em>(<font class="type">JSON</font>
+	类型
+)</em>时间选择对话框弹出指示区域<br><p>
+	JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值为相对于容器Webview的位置。
+	如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.PickTimeStyles">PickTimeStyles</a></h1>
+<p>JSON对象,时间选择对话框的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>time: <em>(<font class="type">Date</font>
+	类型
+)</em>时间选择对话框默认显示的时间<br><p>
+	如果未设置,则默认当前的时间。
+						</p>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>时间选择对话框显示的标题<br><p>
+	如果未设置,则不显示标题。
+						</p>
+</li>
+<li>is24Hour: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否24小时制模式<br><p>
+	true表示使用24小时制模式显示,fale表示使用12小时制模式显示,默认值为true。
+						</p>
+</li>
+<li>popover: <em>(<font class="type">JSON</font>
+	类型
+)</em>日期选择对话框弹出指示区域<br><p>
+	JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值相对于容器webview的位置。
+	如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.NativeUIObj">NativeUIObj</a></h1>
+<p>系统原生界面基类对象</p>
+<pre class="prettyprint linenums">
+interface NativeUIObj{
+	function void close();
+}
+				</pre>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.nativeUI.NativeUIObj.close">close</a>: 关闭显示的系统原生界面</li></ul>
+<h1><a name="plus.nativeUI.WaitingObj">WaitingObj</a></h1>
+<p>系统等待对话框对象</p>
+<h2>说明:</h2>
+<p class="des">
+	从NativeUIObj对象继承而来,通过plus.nativeUI.showWaiting方法创建时返回。
+	用于控制系统样式等待对话框的操作,如关闭、设置标题内容等。
+				</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeUI.WaitingObj.setTitle">setTitle</a>: 设置等待对话框上显示的文字内容</li>
+<li>
+<a href="#plus.nativeUI.WaitingObj.close">close</a>: 关闭显示的系统等待对话框</li>
+</ul>
+<h2>事件:</h2>
+<ul><li>
+<a href="#plus.nativeUI.WaitingObj.onclose">onclose</a>: 等待对话框关闭事件</li></ul>
+<h1><a name="plus.nativeUI.WaitingStyles">WaitingStyles</a></h1>
+<p>JSON对象,原生等待对话框的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>等待框背景区域的宽度<br><p>
+	值支持像素值("500px")或百分比("50%"),百分比相对于屏幕的宽计算,如果不设置则根据内容自动计算合适的宽度。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>等待框背景区域的高度<br><p>
+	值支持像素绝对值("500px")或百分比("50%"),如果不设置则根据内容自动计算合适的高度。
+						</p>
+</li>
+<li>color: <em>(<font class="type">String</font>
+	类型
+)</em>等待框中文字的颜色<br><p>
+	颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为白色。
+						</p>
+</li>
+<li>size: <em>(<font class="type">String</font>
+	类型
+)</em>等待框中文字的字体大小<br><p>
+	如"14px"表示使用14像素高的文字,未设置则使用系统默认字体大小。
+						</p>
+</li>
+<li>textalign: <em>(<font class="type">String</font>
+	类型
+)</em>等待对话框中标题文字的水平对齐方式<br><p>
+	对齐方式可选值包括:"left":水平居左对齐显示,"center":水平居中对齐显示,"right":水平居右对齐显示。默认值为水平居中对齐显示,即"center"。
+						</p>
+</li>
+<li>padding: <em>(<font class="type">String</font>
+	类型
+)</em>等待对话框的内边距<br><p>
+	值支持像素值("10px")和百分比("5%"),百分比相对于屏幕的宽计算,默认值为"3%"。
+						</p>
+</li>
+<li>background: <em>(<font class="type">String</font>
+	类型
+)</em>等待对话框显示区域的背景色<br><p>
+	背景色的值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为rgba(0,0,0,0.7)。
+						</p>
+</li>
+<li>style: <em>(<font class="type">String</font>
+	类型
+)</em>等待对话框样式<br><p>
+	可取值"black"、"white",black表示等待框为黑色雪花样式,通常在背景主色为浅色时使用;white表示等待框为白色雪花样式,通常在背景主色为深色时使用。
+	仅在iOS平台有效,其它平台忽略此值,未设置时默认值为white。
+						</p>
+</li>
+<li>modal: <em>(<font class="type">Boolen</font>
+	类型
+)</em>等待框是否模态显示<br><p>
+	模态显示时用户不可操作直到等待对话框关闭,否则用户在等待对话框显示时也可操作下面的内容,未设置时默认为true。
+						</p>
+</li>
+<li>round: <em>(<font class="type">Number</font>
+	类型
+)</em>等待框显示区域的圆角<br><p>
+	值支持像素值("10px"),未设置时使用默认值"10px"。
+						</p>
+</li>
+<li>padlock: <em>(<font class="type">Boolen</font>
+	类型
+)</em>点击等待显示区域是否自动关闭<br><p>
+	true表示点击等待对话框显示区域时自动关闭,false则不关闭,未设置时默认值为false。
+						</p>
+</li>
+<li>back: <em>(<font class="type">String</font>
+	类型
+)</em>返回键处理方式<br><p>
+	可取值"none"表示截获处理返回键,但不做任何响应;"close"表示截获处理返回键并关闭等待框;"transmit"表示不截获返回键,向后传递给Webview窗口继续处理(与未显示等待框的情况一致)。
+						</p>
+</li>
+<li>loading: <em>(<a href="#plus.nativeUI.WaitingLoadingStyles">WaitingLoadingStyles</a>
+	类型
+)</em>自定义等待框上loading图标样式<br>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.WaitingLoadingStyles">WaitingLoadingStyles</a></h1>
+<p>JSON对象,原生等待对话框上loading图标自定义样式</p>
+<h2>属性:</h2>
+<ul>
+<li>display: <em>(<font class="type">String</font>
+	类型
+)</em>loading图标显示样式<br><p>
+	可取值:
+	"block"表示图标与文字分开两行显示,上面显示loading图标,下面显示文字;
+	"inline"表示loading图标与文字在同一行显示,左边显示loading图标,右边显示文字;
+	"none"表示不显示loading图标;
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>loading图标高度<br><p>
+	设置loading图标的高度(宽度等比率缩放),取值类型:像素值,如"14px"表示14像素高。
+						</p>
+</li>
+<li>icon: <em>(<font class="type">String</font>
+	类型
+)</em>loading图标路径<br><p>
+	自定义loading图标的路径,png格式,并且必须是本地资源地址;
+	loading图要求宽是高的整数倍,显示等待框时按照图片的高横向截取每帧刷新。
+						</p>
+</li>
+<li>interval: <em>(<font class="type">Number</font>
+	类型
+)</em>loading图每帧刷新间隔<br><p>
+	单位为ms(毫秒),默认值为100ms。
+						</p>
+</li>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>loading图标类型<br><p>
+	如果设置了icon属性,则优先使用icon自定义图标。
+	可取值:
+		"circle" - 圆圈类型loading图标;
+		"snow" - 雪花类型loading图标。
+	默认值为"circle"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.ToastStyles">ToastStyles</a></h1>
+<p>JSON对象,系统提示消息框要设置的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>align: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框在屏幕中的水平位置<br><p>
+	可选值为"left"、"center"、"right",分别为水平居左、居中、居右,未设置时默认值为"center"。
+						</p>
+</li>
+<li>background: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框的背景色<br><p>
+	背景色的值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值。
+						</p>
+</li>
+<li>duration: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框显示的时间<br><p>
+	可选值为"long"、"short",值为"long"时显示时间约为3.5s,值为"short"时显示时间约为2s,未设置时默认值为"short"。
+						</p>
+</li>
+<li>icon: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框上显示的图标<br><p>
+	仅支持本地图片路径。
+						</p>
+</li>
+<li>iconWidth: <em>(<font class="type">String</font>
+	类型
+)</em>图标的宽度<br><p>
+	单位为px(逻辑像素值),默认值为图片的宽度。
+						</p>
+</li>
+<li>iconHeight: <em>(<font class="type">String</font>
+	类型
+)</em>图标的高度<br><p>
+	单位为px(逻辑像素值),默认值为图片的高度。
+						</p>
+</li>
+<li>style: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框上显示的样式<br><p>
+	可取值:
+	"block"表示图标与文字分两行显示,上面显示图标,下面显示文字;
+	"inline"表示图标与文字在同一行显示,左边显示图标,右边显示文字。
+	默认值为"block"。
+						</p>
+</li>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息框上显示的文本类型<br><p>
+	可取值:
+		"text" - 显示的消息内容为文本字符串;
+		"richtext" - 显示的消息内容为富文本内容。
+	默认值为"text"。
+	当type为"text"时,富文本使用html的部分标签,具体标签如下:
+	图片标签&lt;img src="图片资源url地址" width="图片显示的宽度" height="图片显示的高度" onclick="console.log('clicked img')"&gt;&lt;/img&gt;;
+	字体标签&lt;font color="字体颜色"&gt;&lt;/font&gt;,内容在一行显示不下时自动换行,行高默认为字体的1.2倍;
+	换行标签&lt;br/&gt;;
+	链接标签&lt;a onclick="console.log('clicked a')"&gt;链接地址&lt;/a&gt;。
+	如示例“&lt;img onclick="console.log('clicked img')" src="http://img-cdn-qiniu.dcloud.net.cn/icon2.png"/&gt;&lt;a onclick="console.log(clicked a)"&gt;链接地址&lt;/a&gt;”。
+
+						</p>
+</li>
+<li>richTextStyle: <em>(<a href="#href.RichTextStyles">RichTextStyles</a>
+	类型
+)</em>富文本样式<br><p>
+	当type属性值为"richtext"时有效,用于定义富文本的样式,如其文本对齐方式、使用的字体等。
+						</p>
+</li>
+<li>verticalAlign: <em>(<font class="type">String</font>
+	类型
+)</em>提示消息在屏幕中的垂直位置<br><p>
+	可选值为"top"、"center"、"bottom",分别为垂直居顶、居中、居底,未设置时默认值为"bottom"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeUI.ActionSheetCallback">ActionSheetCallback</a></h1>
+<p>系统选择按钮框的回调函数</p>
+<pre class="prettyprint linenums">
+void onActioned( Event event ){
+	// actionsheet handled code.
+	var index=event.index; // 用户关闭时点击按钮的索引值
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>用户操作选择按钮框关闭后返回的数据<br>
+	可通过event.index(Number类型)获取用户关闭时点击按钮的索引值,索引值从0开始;
+	0表示用户点击取消按钮,大于0值表示用户点击ActionSheetStyles中buttons属性定义的按钮,索引值从1开始(即1表示点击buttons中定义的第一个按钮)。
+	通过API(close()方法)关闭,则回调函数中event的index属性值为-1。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.AlertCallback">AlertCallback</a></h1>
+<p>系统提示框确认的回调函数</p>
+<pre class="prettyprint linenums">
+void onAlerted( Event event ){
+	// Alert handled code.
+	var index=event.index; // 用户关闭提示对话框点击按钮的索引值
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>用户操作确认对话框关闭后返回的数据<br>
+	可通过event.index(Number类型)获取用户关闭确认对话框点击按钮的索引值,点击确认键的索引值为0。
+	Android平台上通过返回按钮关闭时索引值为-1。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.ConfirmCallback">ConfirmCallback</a></h1>
+<p>关闭确认对话框的回调函数</p>
+<pre class="prettyprint linenums">
+void onConfirmed( Event event ) {
+	// Confirm handled code.
+	var index=event.index; // 用户关闭确认对话框点击按钮的索引值
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>用户操作确认对话框关闭后返回的数据<br>
+	可通过event.index(Number类型)获取用户关闭确认对话框点击按钮的索引值,索引值从0开始;
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.PromptCallback">PromptCallback</a></h1>
+<p>系统输入对话框关闭后的回调函数</p>
+<pre class="prettyprint linenums">
+function void onPrompted( Event event ) {
+	// Prompt handled code.
+	var index=event.index; // 用户关闭输入对话框点击按钮的索引值
+	var value=event.value; // 用户输入的内容
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>用户操作输入对话框关闭后返回的数据<br>
+	可通过event.index(Number类型)获取用户关闭输入对话框点击按钮的索引值,索引值从0开始;
+	通过event.value(String类型)获取用户输入的内容,如果没有输入则返回空字符串。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.PickDatetimeSuccessCallback">PickDatetimeSuccessCallback</a></h1>
+<p>选择日期或时间操作成功的回调函数</p>
+<pre class="prettyprint linenums">
+function void onPickSuccess( Event event ) {
+	// Date picked code.
+	var date = event.date;// 用户选择的日期或时间
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>用户完成选择日期或时间后返回的数据<br>
+	可通过event.date(Date类型)获取选择的日期或时间值。
+	若调用的是日期选择操作则仅年、月、日信息有效,若调用的是时间选择操作则仅时、分信息有效。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.PickDatetimeErrorCallback">PickDatetimeErrorCallback</a></h1>
+<p>选择日期或时间操作取消或失败的回调函数</p>
+<pre class="prettyprint linenums">
+function void onPickError( Exception error ) {
+	// Date picked error.
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>用户选择操作失败信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeUI.PreviewImageLongPressCallback">PreviewImageLongPressCallback</a></h1>
+<p>图片预览长按事件</p>
+<pre class="prettyprint linenums">
+function void onlongPress(event) {
+	// longpress event
+	var index = event.index; 			// 长按图片的索引
+	var url = event.url;					// 长按图片的url地址
+	var path = event.path;				// 长按图片的本地图片路径(系统绝对路径)
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	在图片预览界面长按时触发。
+				</p>
+<h2>参数:</h2>
+<ul>
+<li>index: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>长按图片的索引值<br>
+	索引值从0开始。
+						</li>
+<li>url: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>长按图片的url地址<br>
+	与调用plus.nativeUI.previewImage传入的urls值一致。
+						</li>
+<li>path: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>长按图片的本地地址<br>
+	系统绝对路径。
+						</li>
+</ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 1357 - 0
hello H5+/doc/nativeobj.html

@@ -0,0 +1,1357 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>NativeUI Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.nativeObj">nativeObj</a></h1>
+<p>nativeObj管理系统原生对象。</p>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.nativeObj.AnimationOptions">AnimationOptions</a>: 原生动画参数</li>
+<li>
+<a href="#plus.nativeObj.AnimationViewStyles">AnimationViewStyles</a>: 原生动画窗口样式</li>
+<li>
+<a href="#plus.nativeObj.Bitmap">Bitmap</a>: 原生图片对象</li>
+<li>
+<a href="#plus.nativeObj.BitmapSaveOptions">BitmapSaveOptions</a>: JSON对象,保存图片的参数</li>
+<li>
+<a href="#plus.nativeObj.ImageSlider">ImageSlider</a>: 原生图片轮播控件对象</li>
+<li>
+<a href="#plus.nativeObj.ImageSliderStyles">ImageSliderStyles</a>: 图片轮播控件样式</li>
+<li>
+<a href="#plus.nativeObj.ImageSliderImageStyles">ImageSliderImageStyles</a>: 图片轮播控件中图片项配置参数</li>
+<li>
+<a href="#plus.nativeObj.InputStyles">InputStyles</a>: 输入框样式</li>
+<li>
+<a href="#plus.nativeObj.Rect">Rect</a>: 区域信息对象</li>
+<li>
+<a href="#plus.nativeObj.RectStyles">RectStyles</a>: 绘制区域样式对象</li>
+<li>
+<a href="#plus.nativeObj.RichTextStyles">RichTextStyles</a>: 富文本样式</li>
+<li>
+<a href="#plus.nativeObj.Position">Position</a>: 区域信息对象</li>
+<li>
+<a href="#plus.nativeObj.TextStyles">TextStyles</a>: 绘制文本样式对象</li>
+<li>
+<a href="#plus.nativeObj.View">View</a>: 原生控件对象</li>
+<li>
+<a href="#plus.nativeObj.ViewAnimationOptions">ViewAnimationOptions</a>: View控件动画参数</li>
+<li>
+<a href="#plus.nativeObj.ViewDrawTagStyles">ViewDrawTagStyles</a>: View控件绘制元素参数</li>
+<li>
+<a href="#plus.nativeObj.ViewEvents">ViewEvents</a>: View控件事件</li>
+<li>
+<a href="#plus.nativeObj.ViewStatusbarStyles">ViewStatusbarStyles</a>: JSON对象,View控件的系统状态栏区域样式</li>
+<li>
+<a href="#plus.nativeObj.ViewStyles">ViewStyles</a>: View控件样式</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeObj.BitmapSaveSuccessCallback">BitmapSaveSuccessCallback</a>: 图片保存操作成功回调接口</li>
+<li>
+<a href="#plus.nativeObj.InputCompleteCallback">InputCompleteCallback</a>: 输入框完成输入回调函数</li>
+<li>
+<a href="#plus.nativeObj.InputEventCallback">InputEventCallback</a>: 输入框事件回调函数</li>
+<li>
+<a href="#plus.nativeObj.RichTextClickedCallback">RichTextClickedCallback</a>: 富文本区域点击事件回调函数</li>
+<li>
+<a href="#plus.nativeObj.TouchEventCallback">TouchEventCallback</a>: 触屏事件的回调函数</li>
+<li>
+<a href="#plus.nativeObj.NativeObjSuccessCallback">NativeObjSuccessCallback</a>: 操作成功回调函数接口</li>
+<li>
+<a href="#plus.nativeObj.NativeObjErrorCallback">NativeObjErrorCallback</a>: 操作错误回调函数接口</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"NativeObj": {
+		"description": "原生对象"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.nativeObj.AnimationOptions">AnimationOptions</a></h1>
+<p>原生动画参数</p>
+<pre class="prettyprint linenums">
+interface AnimationOptions {
+	attribute String type;
+	attribute Number duration;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	指定动画的类型、持续时间等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>动画类型<br><p>
+	可取值:
+	"pop-in" - 从右侧平移入栈动画效果(副窗口从右侧向左平移滑出显示,主窗口从当前屏幕区域向左侧平移滑出被遮盖),如果仅传入一个View控件对象则自动降级为slide-in-right动画;
+	"pop-out" - 从右侧平移出栈动画效果(副窗口从当前屏幕区域向右侧平移出可视区域,主窗口从左侧向右平移滑出显示),如果仅出入一个View控件对象则自动降级为slide-out-right动画;
+	"slide-in-right" - 从右侧横向滑动效果(主窗口从当前屏幕右侧外向内横向滑动显示);
+	"slide-out-right - 横向向右侧滑出屏幕动画(主窗口从屏幕中横向向右侧滑动到屏幕外)。
+						</p>
+</li>
+<li>duration: <em>(<font class="type">Number</font>
+	类型
+)</em>动画持续时间<br><p>
+	单位为毫秒,默认值为200ms。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.AnimationViewStyles">AnimationViewStyles</a></h1>
+<p>原生动画窗口样式</p>
+<pre class="prettyprint linenums">
+interface AnimationViewStyles {
+	attribute Bitmap bitmap;
+	attribute String text;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	指定动画窗口的样式,如背景图片,绘制的文字等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>bitmap: <em>(<a href="#plus.nativeObj.Bitmap">Bitmap</a>
+	类型
+)</em>动画窗口上绘制的背景图片<br><p>
+	图片可以通过Webview对象的draw方法截图,也可以通过Bitmap的API从本地文件中加载。
+						</p>
+</li>
+<li>text: <em>(<font class="type">String</font>
+	类型
+)</em>动画窗口上绘制的文本内容<br>
+</li>
+<li>textStyles: <em>(<a href="#plus.nativeObj.TextStyles">TextStyles</a>
+	类型
+)</em>动画窗口上绘制的文本样式<br>
+</li>
+<li>textRect: <em>(<a href="#plus.nativeObj.Rect">Rect</a>
+	类型
+)</em>动画窗口上绘制的文本区域<br><p>
+	默认值为{top:'0px',left:'0px',width:'100%',height:'44px'}。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.Bitmap">Bitmap</a></h1>
+<p>原生图片对象</p>
+<pre class="prettyprint linenums">
+interface Bitmap {
+	readonly attribute String id;
+
+	static function Array[Bitmap] getItems();
+	static function Bitmap getBitmapById( id );
+	
+	function void clear();
+	function void load( path, successCallback, errorCallback );
+	function void loadBase64Data( data, successCallback, errorCallback );
+	function void save( path, options, successCallback, errorCallback );
+	function String toBase64Data();
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	原生图片对象会占用较大的内存资源,在使用时需谨慎管理,当图片不再使用时应该及时调用clear方法进行销毁。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.nativeObj.Bitmap.Bitmap(id,%20path)">Bitmap(id, path)</a>: 创建Bitmap对象</li></ul>
+<h2>属性:</h2>
+<ul><li>
+<a href="#plus.nativeObj.Bitmap.id">id</a>: Bitmap对象的标识</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeObj.Bitmap.getItems">getItems</a>: 静态方法,获取所有Bitmap图片对象</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.getBitmapById">getBitmapById</a>: 静态方法,获取指定标识的Bitmap图片对象</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.clear">clear</a>: 销毁Bitmap图片</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.load">load</a>: 加载Bitmap图片</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.loadBase64Data">loadBase64Data</a>: 加载Base64编码格式图片到Bitmap对象</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.recycle">recycle</a>: 回收Bitmap图片内存</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.save">save</a>: 保存图片</li>
+<li>
+<a href="#plus.nativeObj.Bitmap.toBase64Data">toBase64Data</a>: 获取图片的Base64编码数据</li>
+</ul>
+<h1><a name="plus.nativeObj.BitmapSaveOptions">BitmapSaveOptions</a></h1>
+<p>JSON对象,保存图片的参数</p>
+<pre class="prettyprint linenums">
+interface BitmapSaveOptions {
+	attribute Boolean overwrite;
+	attribute String format;
+	attribute Number quality;
+	attribute Rect clip;
+}				</pre>
+<h2>属性:</h2>
+<ul>
+<li>overwrite: <em>(<font class="type">Boolean</font>
+	类型
+)</em>覆盖保存图片文件<br><p>
+	仅在保存的图片路径文件存在时有效:
+	true表示覆盖存在的文件;
+	false表示不覆盖,如果文件存在,则返回失败。
+	默认值为false。
+						</p>
+</li>
+<li>format: <em>(<font class="type">String</font>
+	类型
+)</em>保存图片的格式<br><p>
+	支持"jpg"、"png",如果未指定则默认使用指定的保存路径后缀对应的文件格式,如果后缀文件格式无效则使用jpg格式。
+						</p>
+</li>
+<li>quality: <em>(<font class="type">Number</font>
+	类型
+)</em>保存图片的质量<br><p>
+	取值范围为1-100,1表示使用最低的图片质量(保存后的图片文件最小)、100表示使用最高的图片质量(保存后的图片文件最大);
+	默认值为50。
+						</p>
+</li>
+<li>clip: <em>(<a href="#plus.nativeObj.Rect">Rect</a>
+	类型
+)</em>指定裁剪区域保存图片<br><p>
+	相对于图片的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.ImageSlider">ImageSlider</a></h1>
+<p>原生图片轮播控件对象</p>
+<pre class="prettyprint linenums">
+interface ImageSlider extends View {
+	function void addImages(images);
+	function Number currentImageIndex();
+	function void setImages(images);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	原生图片轮播控件对象从原生View控件(plus.nativeObj.View)继承而来,用于绘制图片轮播内容。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.nativeObj.ImageSlider.ImageSlider(id,%20styles,%20tags)">ImageSlider(id, styles, tags)</a>: 创建图片轮播控件对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeObj.ImageSlider.addImages">addImages</a>: 添加图片轮播控件的图片</li>
+<li>
+<a href="#plus.nativeObj.ImageSlider.currentImageIndex">currentImageIndex</a>: 获取当前图片轮播控件显示的图片索引值</li>
+<li>
+<a href="#plus.nativeObj.ImageSlider.setImages">setImages</a>: 设置图片轮播控件的图片</li>
+</ul>
+<h1><a name="plus.nativeObj.ImageSliderStyles">ImageSliderStyles</a></h1>
+<p>图片轮播控件样式</p>
+<pre class="prettyprint linenums">
+interface ImageSliderStyles extends ViewStyles {
+	attribute Boolean autoplay;
+	attribute Array&lt;ImageSliderImageStyles&gt; images;
+	attribute Boolean loop;
+	attribute Boolean fullscreen;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	从ViewStyles继承而来,扩展支持轮播图片等配置。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>autoplay: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否自动播放<br><p>
+	可取值:
+		"true" - 自动播放;
+		"false" - 不自动播放。
+	默认值为"false"。
+						</p>
+</li>
+<li>fullscreen: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否可全屏显示<br><p>
+	可取值:
+		"true" - 表示可全屏显示,用户点击轮播图片时全屏显示;
+		"false" - 表示不可全屏显示,用户点击轮播图片时无响应。
+	默认值为"true"。
+						</p>
+</li>
+<li>loop: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否可循环轮播<br><p>
+	可取值:
+		"true" - 支持循环轮播;
+		"false" - 不支持循环轮播。
+	默认值为"false"。
+						</p>
+</li>
+<li>images: <em>(<font class="type">Array</font>[
+				<a href="#plus.nativeObj.ImageSliderImageStyles">ImageSliderImageStyles</a>
+				]
+			
+	类型
+)</em>轮播的图片<br><p>
+	至少必须设置一张图片的地址信息,否则可能导致图片轮播控件显示不正常。
+						</p>
+</li>
+<li>interval: <em>(<font class="type">Number</font>
+	类型
+)</em>自动播放切换时间<br><p>
+	当autoplay属性值为true时生效,单位为毫秒。默认值为3000(3秒)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.ImageSliderImageStyles">ImageSliderImageStyles</a></h1>
+<p>图片轮播控件中图片项配置参数</p>
+<h2>说明:</h2>
+<p class="des">
+	用于指定图片地址等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>src: <em>(<font class="type">String</font>
+	类型
+)</em>图片地址<br><p>
+	支持本地地址(相对地址、绝对路径、RelativeURL、本地路径URL);
+	也支持网络地址(http://或https://)。
+						</p>
+</li>
+<li>align: <em>(<font class="type">String</font>
+	类型
+)</em>图片水平对齐方式<br><p>
+	仅在图片显示的宽度与图片轮播控件宽度不一致时有效,可取值:
+		"left" - 图片在轮播控件中水平居左对齐;
+		"center" - 图片在轮播控件中水平居中对齐;
+		"right" - 图片在轮播控件中水平居右对齐。
+	默认值为"center"。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>图片显示的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",现对于图片轮播控件的高度;
+		自动计算"auto",如果指定图片宽度(width),则按图片实际大小等比缩放图片高度值,如果没有指定宽度(width值为"auto")则自动缩放图片至可完整显示。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>图片显示的宽度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于图片轮播控件的宽度;
+		自动计算"auto",如果指定图片高度(height),则按图片实际大小等比缩放图片宽度值,如果没有指定高度(height值为"auto")则自动缩放图片至可完整显示。
+	默认值为"auto"。
+						</p>
+</li>
+<li>verticalAlign: <em>(<font class="type">String</font>
+	类型
+)</em>图片垂直对齐方式<br><p>
+	仅在图片显示的高度与图片轮播控件宽度不一致时有效,可取值:
+		"top" - 图片在轮播控件中垂直居顶对齐;
+		"middle" - 图片在轮播控件中垂直居中对齐;
+		"bottom" - 图片在轮播控件中垂直居底对齐。
+	默认值为"middle"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.InputStyles">InputStyles</a></h1>
+<p>输入框样式</p>
+<pre class="prettyprint linenums">
+interface InputStyles{
+	attribute String type;
+	attribute String placeholder;
+	attribute String fontSize;
+	attribute String borderWidth;
+	attribute String borderColor;
+	attribute String borderRadius;
+	attribute function onComplete;
+	attribute function onFocus;
+	attribute function onBlur;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于定义输入框的显示样式,如字体大小,提示内容等信息。
+	输入文本内容在指定区域水平居左,垂直居中显示。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>输入框类型<br><p>
+	可取值:
+		"email" - 邮箱地址输入框;
+		"number" - 数字输入框;
+		"search" - 搜索文本输入框;
+		"tel" - 电话号码输入框;
+		"text" - 普通文本输入框;
+		"url" - URL地址输入框。
+	默认为text(即普通文本输入框)。
+						</p>
+</li>
+<li>placeholder: <em>(<font class="type">String</font>
+	类型
+)</em>输入框的提示文本<br><p>
+	当用户未输入内容时显示在编辑框中(灰色文字)。
+						</p>
+</li>
+<li>fontSize: <em>(<font class="type">String</font>
+	类型
+)</em>输入框的字体大小<br><p>
+	可取值:字体高度像素值,数字加"px"格式字符串,如"12px"。 
+	默认值为"16px"。
+						</p>
+</li>
+<li>borderColor: <em>(<font class="type">String</font>
+	类型
+)</em>输入框的边框颜色<br><p>
+	可取值: "#RRGGBB"格式字符串,如"#FF0000"表示红色边框。默认值为"#000000"(黑色)。
+						</p>
+</li>
+<li>borderRadius: <em>(<font class="type">String</font>
+	类型
+)</em>输入框边框圆角半径<br><p>
+	可取值:圆角半径像素值,数字加"px"格式字符串,如"6px"。
+	默认值为"0px"(边框无圆角)。
+						</p>
+</li>
+<li>borderWidth: <em>(<font class="type">String</font>
+	类型
+)</em>输入框的边框宽度<br><p>
+	可取值:像素值,数字加"px"格式字符串,如"2px"。 默认值为"1px"。
+						</p>
+</li>
+<li>onComplete: <em>(<a href="#plus.nativeObj.InputCompleteCallback">InputCompleteCallback</a>
+	类型
+)</em>输入框完成输入事件<br><p>
+	弹出软键盘完成输入后,点击软键盘上的“完成”、“前往”按钮时触发。
+						</p>
+</li>
+<li>onFocus: <em>(<a href="#plus.nativeObj.InputEventCallback">InputEventCallback</a>
+	类型
+)</em>输入框获取焦点事件<br><p>
+	当编辑框获取焦点时触发。
+						</p>
+</li>
+<li>onBlur: <em>(<a href="#plus.nativeObj.InputEventCallback">InputEventCallback</a>
+	类型
+)</em>输入框失去焦点事件<br><p>
+	当编辑框失去焦点时触发。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.Rect">Rect</a></h1>
+<p>区域信息对象</p>
+<pre class="prettyprint linenums">
+interface Rect {
+	attribute String top;
+	attribute String left;
+	attribute String width;
+	attribute String height;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	包括位置、大小等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>区域左上角的垂直偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于作用对象的高度;
+		自动计算,如"auto",根据height值自动计算,相对于作用对象垂直居中。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>区域左上角的水平偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于作用对象的宽度;
+		自动计算,如"auto",根据width值自动计算,相对于作用对象水平居中。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>区域的宽度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于作用对象的宽度。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>区域的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于作用对象的高度。
+		内容自适应,如"wrap_content",根据内容计算高度(如调用drawText绘制文本时支持)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.RectStyles">RectStyles</a></h1>
+<p>绘制区域样式对象</p>
+<pre class="prettyprint linenums">
+interface RectStyles {
+	attribute String color;
+	attribute String radius;
+	attribute String borderColor;
+	attribute String borderWidth;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于定义矩形区域的显示样式,如空心/实心样式、圆角等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>color: <em>(<font class="type">String</font>
+	类型
+)</em>绘制颜色<br><p>
+	矩形填充区域的颜色,可取值:
+	"#RRGGBB"格式字符串,如"#FF0000"表示绘制红色区域;
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
+	默认值为"#FFFFFF"(白色)。
+						</p>
+</li>
+<li>radius: <em>(<font class="type">String</font>
+	类型
+)</em>矩形区域的圆角半径<br><p>
+	可取值:圆角半径像素值,数字加"px"格式字符串,如"6px"。
+	默认值为"0px"(矩形无圆角)。
+						</p>
+</li>
+<li>borderColor: <em>(<font class="type">String</font>
+	类型
+)</em>矩形边框颜色<br><p>
+	绘制矩形边框的颜色,可取值:
+	"#RRGGBB"格式字符串,如"#FF0000"表示绘制红色区域;
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
+	默认值为矩形填充区域颜色(color属性值)。
+						</p>
+</li>
+<li>borderWidth: <em>(<font class="type">String</font>
+	类型
+)</em>矩形边框宽度<br><p>
+	可取值:像素值,数字加"px"格式字符串,如"2px"。
+	默认值为"0px"(无边框)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.RichTextStyles">RichTextStyles</a></h1>
+<p>富文本样式</p>
+<pre class="prettyprint linenums">
+interface RichTextStyles{
+	attribute String align;
+	attribute String family;
+	attribute String fontSrc;
+	attribute Function onClick;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于定义富文本使用的默认使用的字体名称、字体文件路径等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>align: <em>(<font class="type">String</font>
+	类型
+)</em>富文本内容的水平对齐方式<br><p>
+	对整体内容有效,无法单独控制每行的内容。
+	可取值:
+	"left"-字体在指定的区域中水平居左对齐;
+	"center"-字体在指定的区域中水平居中对齐;
+	"right"-字体在指定的区域中水平居右对齐。
+	默认值为"left"。
+						</p>
+</li>
+<li>family: <em>(<font class="type">String</font>
+	类型
+)</em>富文本默认使用的字体名称<br><p>
+	例如"Times New Roman",	如果指定名称的字体不存在,则使用系统默认字体。
+						</p>
+</li>
+<li>fontSrc: <em>(<font class="type">String</font>
+	类型
+)</em>富文本默认使用的字体文件路径<br><p>
+	加载字体文件路径,必须为本地路径,如果指定的文件路径无效,则使用系统默认字体。
+						</p>
+</li>
+<li>onClick: <em>(<a href="#plus.nativeObj.RichTextClickedCallback">RichTextClickedCallback</a>
+	类型
+)</em>点击事件回调函数<br><p>
+	如果设置此属性,则表示拦截所有RichText上的点击事件(不透传事件)。
+	如果没有设置此属性,则仅拦截操作包含onclick属性的a/img标签的点击事件。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.Position">Position</a></h1>
+<p>区域信息对象</p>
+<pre class="prettyprint linenums">
+interface Position {
+	attribute String top;
+	attribute String left;
+	attribute String width;
+	attribute String height;
+	attribute String bottom;
+	attribute String right;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	包括位置、大小等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>区域顶部相对于作用对象(或容器)向下的偏移量<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度;
+	自动计算,如"auto",根据height值自动计算,相对于作用对象(或容器)垂直居中。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>区域左侧相对于作用对象(或容器)向右的偏移量<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度;
+	自动计算,如"auto",根据width值自动计算,相对于作用对象(或容器)水平居中。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>区域的宽度<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>区域的高度<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度。
+						</p>
+</li>
+<li>bottom: <em>(<font class="type">String</font>
+	类型
+)</em>区域底部相对于作用对象(或容器)向上的偏移量<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度。
+	当设置了top和height值时,忽略此属性值;
+	当未设置top值时,可通过bottom属性值来确定区域的垂直位置;
+	当未设置height值时,可通过top和bottom属性值来确定区域的高度。
+						</p>
+</li>
+<li>right: <em>(<font class="type">String</font>
+	类型
+)</em>区域右侧相对于作用对象(或容器)向左的偏移量<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度。
+	当设置了left和width值时,忽略此属性值;
+	当未设置left值时,可通过right属性值来确定区域的水平位置;
+	当未设置width值时,可通过left和right属性值来确定区域的宽度。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.TextStyles">TextStyles</a></h1>
+<p>绘制文本样式对象</p>
+<pre class="prettyprint linenums">
+interface TextStyles {
+	attribute String align;
+	attribute String color;
+	attribute String family;
+	attribute String size;
+	attribute String style;
+	attribute String weight;
+	attribute String fontSrc;
+	attribute String overflow;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于定义文本的显示样式,如字体大小、字体颜色、字体粗细、字体样式、字体名称等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>align: <em>(<font class="type">String</font>
+	类型
+)</em>水平对齐方式<br><p>
+	可取值:
+	"left"-字体在指定的区域中水平居左对齐;
+	"center"-字体在指定的区域中水平居中对齐;
+	"right"-字体在指定的区域中水平居右对齐。
+	默认值为"center"。
+						</p>
+</li>
+<li>color: <em>(<font class="type">String</font>
+	类型
+)</em>字体颜色<br><p>
+	可取值:
+	"#RRGGBB"格式字符串,如"#FF0000"表示绘制红色区域;
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
+	默认值为"#000000"(黑色)。
+						</p>
+</li>
+<li>decoration: <em>(<font class="type">Boolean</font>
+	类型
+)</em>文本装饰<br><p>
+	可取值:
+		"none" - 无装饰效果;
+		"underline" - 文本带下划线效果;
+		"line-through" - 文本带贯穿线(删除线)效果。
+	默认值为"none"。
+						</p>
+</li>
+<li>family: <em>(<font class="type">String</font>
+	类型
+)</em>字体名称<br><p>
+	例如"Times New Roman",	如果指定名称的字体不存在,则使用默认字体。
+						</p>
+</li>
+<li>fontSrc: <em>(<font class="type">String</font>
+	类型
+)</em>字体文件路径<br><p>
+	加载字体文件路径。
+						</p>
+</li>
+<li>lineSpacing: <em>(<font class="type">String</font>
+	类型
+)</em>文本的行间距<br><p>
+	可取值:
+	像素值,如"100px";百分比,如"10%",相对于字体的高度(size属性);
+	默认值为"20%"。
+						</p>
+</li>
+<li>margin: <em>(<font class="type">String</font>
+	类型
+)</em>字体的边距<br><p>
+	用于设置字体在绘制目标区域四个方向(top/right/bottom/left)的边距,可取值:像素值,如"10px";百分比,相对于绘制目标区域,如"5%";
+	默认值为"0px"。
+						</p>
+</li>
+<li>overflow: <em>(<font class="type">String</font>
+	类型
+)</em>文本内容超出显示区域时处理方式<br><p>
+	可取值:
+		"clip" - 超出显示区域时内容裁剪;
+		"ellipsis" - 超出显示区域时尾部显示省略标记(...)。
+	默认值为"clip"。
+						</p>
+</li>
+<li>size: <em>(<font class="type">String</font>
+	类型
+)</em>字体大小<br><p>
+	可取值:字体高度像素值,数字加"px"格式字符串,如"12px"。
+	默认值为"16px"。
+						</p>
+</li>
+<li>style: <em>(<font class="type">String</font>
+	类型
+)</em>字体样式<br><p>
+	可取值:"normal" - 正常字体样式;"italic" - 斜体样式。默认值为"normal"。
+						</p>
+</li>
+<li>verticalAlign: <em>(<font class="type">String</font>
+	类型
+)</em>垂直对齐方式<br><p>
+	文本内容在指定绘制区域中的垂直对齐方式,可取值:
+		"top" - 垂直居顶对齐;
+		"middle" - 垂直居中对齐;
+		"bottom" - 垂直居底对齐。
+	默认值为"middle"。
+						</p>
+</li>
+<li>weight: <em>(<font class="type">String</font>
+	类型
+)</em>字体粗细<br><p>
+	可取值:"normal" - 普通字体;"bold" - 粗字体。默认值为"normal"。
+						</p>
+</li>
+<li>whiteSpace: <em>(<font class="type">String</font>
+	类型
+)</em>文本换行模式<br><p>
+	可取值:
+		"nowrap" - 不换行,将所有文本在一行中绘制,忽略换行符("\n");
+		"normal" - 自动换行,当指定的宽度无法绘制所有文本时自动换行绘制,碰到'\n'字符时强制换行。
+	默认值为"nowrap"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.View">View</a></h1>
+<p>原生控件对象</p>
+<pre class="prettyprint linenums">
+interface View {
+	readonly attribute String id;
+
+	static function void startAnimation(options, view, otherview, callback);
+	static function void clearAnimation(type);
+	static function View getViewById(id);
+
+	function void addEventListener(event, listener, capture);
+	function void animate(options, callback);
+	function void close();
+	function void clearRect(position, id);
+	function void draw(tags);
+	function void drawBitmap(src, sprite, position, id);
+	function void drawRect(color, position, id);
+	function void drawText(text, position, styles, id);
+	function void drawRichText(text, position, styles, id);
+	function void drawInput(position, styles, id);
+	function Boolean getInputFocusById(id);
+	function String getInputValueById(id);
+	function void reset();
+	function void restore();
+	function void show();
+	function void setInputFocusById(id, focusable);
+	function void setStyle(styles);
+	function void setTouchEventRect(rect);
+	function void hide();
+	function void interceptTouchEvent(intercept);
+	function Boolean isVisible();
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	原生控件对象可用于在屏幕上绘制图片或文本内容,当控件不再使用时需要调用close方法销毁控件。
+	NView不支持zindex,后显示的覆盖先显示的;
+	调用Webview窗口对象的append方法添加到Webview中,显示在父窗口所有子Webview的上面;不添加到Webview窗口对象,显示在所有Webview的上面。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.nativeObj.View.View(id,%20styles,%20tags)">View(id, styles, tags)</a>: 创建View对象</li></ul>
+<h2>属性:</h2>
+<ul><li>
+<a href="#plus.nativeObj.View.id">id</a>: View对象的标识</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.nativeObj.View.startAnimation">startAnimation</a>: 静态方法,开始原生动画</li>
+<li>
+<a href="#plus.nativeObj.View.clearAnimation">clearAnimation</a>: 静态方法,关闭原生动画窗口</li>
+<li>
+<a href="#plus.nativeObj.View.getViewById">getViewById</a>: 静态方法,获取指定标识的View控件对象</li>
+<li>
+<a href="#plus.nativeObj.View.addEventListener">addEventListener</a>: 添加事件监听器</li>
+<li>
+<a href="#plus.nativeObj.View.animate">animate</a>: View控件内容动画</li>
+<li>
+<a href="#plus.nativeObj.View.close">close</a>: 关闭View控件</li>
+<li>
+<a href="#plus.nativeObj.View.clearRect">clearRect</a>: 清空矩形区域</li>
+<li>
+<a href="#plus.nativeObj.View.draw">draw</a>: 绘制内容</li>
+<li>
+<a href="#plus.nativeObj.View.drawBitmap">drawBitmap</a>: 绘制图片</li>
+<li>
+<a href="#plus.nativeObj.View.drawRect">drawRect</a>: 绘制矩形区域</li>
+<li>
+<a href="#plus.nativeObj.View.drawText">drawText</a>: 绘制文本</li>
+<li>
+<a href="#plus.nativeObj.View.drawRichText">drawRichText</a>: 绘制富文本</li>
+<li>
+<a href="#plus.nativeObj.View.drawInput">drawInput</a>: 绘制输入框</li>
+<li>
+<a href="#plus.nativeObj.View.getInputFocusById">getInputFocusById</a>: 获取编辑框的焦点状态</li>
+<li>
+<a href="#plus.nativeObj.View.getInputValueById">getInputValueById</a>: 获取编辑框的内容</li>
+<li>
+<a href="#plus.nativeObj.View.reset">reset</a>: 重置view控件显示内容</li>
+<li>
+<a href="#plus.nativeObj.View.restore">restore</a>: 恢复View控件显示内容</li>
+<li>
+<a href="#plus.nativeObj.View.show">show</a>: 显示View控件</li>
+<li>
+<a href="#plus.nativeObj.View.setInputFocusById">setInputFocusById</a>: 设置编辑框的焦点状态</li>
+<li>
+<a href="#plus.nativeObj.View.setStyle">setStyle</a>: 设置View控件的样式</li>
+<li>
+<a href="#plus.nativeObj.View.setTouchEventRect">setTouchEventRect</a>: 指定监听触屏事件区域</li>
+<li>
+<a href="#plus.nativeObj.View.hide">hide</a>: 隐藏View控件</li>
+<li>
+<a href="#plus.nativeObj.View.interceptTouchEvent">interceptTouchEvent</a>: 是否拦截View控件的触屏事件</li>
+<li>
+<a href="#plus.nativeObj.View.isVisible">isVisible</a>: 获取View控件的显示状态</li>
+</ul>
+<h1><a name="plus.nativeObj.ViewAnimationOptions">ViewAnimationOptions</a></h1>
+<p>View控件动画参数</p>
+<pre class="prettyprint linenums">
+interface ViewAnimationOptions {
+	attribute String type;
+	attribute Number duration;
+	attribute Number frames;
+	attribute Rect region;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	指定动画的类型、持续时间等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>动画类型<br><p>
+	可取值:"shrink" - 从上到下分块收缩清除窗口动画。
+						</p>
+</li>
+<li>duration: <em>(<font class="type">Number</font>
+	类型
+)</em>动画持续时间<br><p>
+	单位为毫秒,默认值为200ms。
+						</p>
+</li>
+<li>frames: <em>(<font class="type">Number</font>
+	类型
+)</em>动画帧数<br><p>
+	必须为大于0的整数,默认值为12。
+						</p>
+</li>
+<li>region: <em>(<a href="#plus.nativeObj.Rect">Rect</a>
+	类型
+)</em>动画作用区域<br><p>
+	支持以下属性:
+	top - 区域距离控件顶部的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的高度),默认值为'0px';
+	bottom - 区域距离控件底部的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的高度),默认值为'0px';
+	left - 区域距离控件左侧的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的宽度),默认值为'0px';
+	right - 区域距离控件右侧的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的宽度),默认值为'0px'。
+	如“{top:'44px',bottom:'48px'}”。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.ViewDrawTagStyles">ViewDrawTagStyles</a></h1>
+<p>View控件绘制元素参数</p>
+<pre class="prettyprint linenums">
+interface ViewDrawTagStyles {
+	attribute String id;
+	attribute String tag;
+	attribute String color;
+	attribute InputStyles inputStyles;
+	attribute Position position;
+	attribute RectStyles rectStyles;
+	attribute String src;
+	attribute Position sprite;
+	attribute String text;
+	attribute TextStyles textStyles;
+	attribute RichTextStyles richTextStyles;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	指定绘制图片、矩形区域、文本内容等信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>id: <em>(<font class="type">String</font>
+	类型
+)</em>绘制操作标识<br><p>
+	可通过view对象的drawBitmap/drawRect/drawText/clearRect方法进行更新。
+						</p>
+</li>
+<li>tag: <em>(<font class="type">String</font>
+	类型
+)</em>绘制操作类型<br><p>
+	可取值:
+	"img" - 绘制图片,与drawBitmap操作一致,此时id、src、position、sprite属性值有效;
+	"rect" - 绘制矩形区域,与drawRect操作一致,此时id、color、position、rectStyles属性值有效;
+	"font" - 绘制文本内容,与drawText操作一致,此时id、position、text、textStyles属性值有效;
+	"richtext" - 绘制富文本内容,与drawRichText操作一致,此时id、position、text、richTextStyles属性值有效;
+	"input" - 绘制输入框内容,此时id、position、inputStyles属性值有效。
+						</p>
+</li>
+<li>color: <em>(<font class="type">String</font>
+	类型
+)</em>矩形区域颜色<br><p>
+	不推荐使用(推荐使用rectStyles),可取值:
+	"#RRGGBB"格式字符串,如红色为"#FF0000"。
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
+	当tag属性值为"rect"时有效,用于指定矩形区域颜色,默认值为"#FFFFFF"(白色)。
+						</p>
+</li>
+<li>inputStyles: <em>(<a href="#plus.nativeObj.InputStyles">InputStyles</a>
+	类型
+)</em>绘制输入框的样式<br><p>
+	当tag属性值为"input"时有效,用于指定绘制输入框的样式、大小位置等信息。,
+						</p>
+</li>
+<li>position: <em>(<a href="#plus.nativeObj.Position">Position</a>
+	类型
+)</em>绘制内容区域<br><p>
+	当tag属性值为"img"时,用于指定绘制图片的目标区域;
+	当tag属性值为"rect"时,用于指定绘制的矩形区域;
+	当tag属性值为"font"时,用于指定绘制文本的目标区域,此时height属性值支持设置为"wrap_content",表示文本高度根据内容自动计算,此时通过top来定位文本绘制的起始位置。
+	相对于View控件的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
+						</p>
+</li>
+<li>rectStyles: <em>(<a href="#plus.nativeObj.RectStyles">RectStyles</a>
+	类型
+)</em>绘制区域的样式<br><p>
+	当tag属性值为"rect"时有效,用于指定绘制区域的样式、填充颜色、圆角大小等信息。
+						</p>
+</li>
+<li>src: <em>(<font class="type">String</font>
+	类型
+)</em>绘制的图片资源<br><p>
+	当tag属性值为"img"时有效,可以是图片资源路径(字符串类型)或者图片对象(plus.nativeObj.Bitmap对象)。
+	src路径支持gif图片,但设置的图片路径文件使用".gif"后缀时则认为是gif图片,如"_www/loading.gif"。
+						</p>
+</li>
+<li>sprite: <em>(<a href="#plus.nativeObj.Position">Position</a>
+	类型
+)</em>图片源的绘制区域<br><p>
+	当tag属性值为"img"时有效,用于指定图片源的绘制区域,相对于图片的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
+						</p>
+</li>
+<li>text: <em>(<font class="type">String</font>
+	类型
+)</em>绘制的文本内容<br><p>
+	当tag属性值为"font"时有效,用于保存绘制的文本内容。
+						</p>
+</li>
+<li>textStyles: <em>(<a href="#plus.nativeObj.TextStyles">TextStyles</a>
+	类型
+)</em>绘制文本的样式<br><p>
+	当tag属性值为"font"时有效,用于指定绘制文本内容的字体大小、字体颜色、字体类型等信息。
+						</p>
+</li>
+<li>richTextStyles: <em>(<a href="#plus.nativeObj.RichTextStyles">RichTextStyles</a>
+	类型
+)</em>绘制富文本的样式<br><p>
+	当tag属性值为"richtext"时有效,用于指定绘制富文本内容的默认字体颜色、字体类型等信息。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.ViewEvents">ViewEvents</a></h1>
+<p>View控件事件</p>
+<h2>常量:</h2>
+<ul>
+<li>"doubleclick": <em>(<font class="type">String</font>
+	类型
+)</em>双击事件<br><p>
+	双击屏幕时触发。
+	注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
+	
+						</p>
+</li>
+<li>"click": <em>(<font class="type">String</font>
+	类型
+)</em>点击事件<br><p>
+	当手指点击屏幕时触发。
+	注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
+	
+						</p>
+</li>
+<li>"touchstart": <em>(<font class="type">String</font>
+	类型
+)</em>开始触屏事件<br><p>
+	当手指触摸屏幕时候触发。
+	注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
+						</p>
+</li>
+<li>"touchmove": <em>(<font class="type">String</font>
+	类型
+)</em>触摸滑屏事件<br><p>
+	当手指在屏幕上滑动的时候连续地触发。
+	注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
+						</p>
+</li>
+<li>"touchend": <em>(<font class="type">String</font>
+	类型
+)</em>结束触屏事件<br><p>
+	当手指从屏幕上离开的时候触发。
+	注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.ViewStatusbarStyles">ViewStatusbarStyles</a></h1>
+<p>JSON对象,View控件的系统状态栏区域样式</p>
+<h2>说明:</h2>
+<p class="des">
+	仅在应用设置为沉浸式状态栏样式下有效,非沉浸式状态栏样式下忽略此属性。
+				</p>
+<h2>属性:</h2>
+<ul><li>background: <em>(<font class="type">String</font>
+	类型
+)</em>系统状态栏区域背景颜色<br><p>
+	颜色值格式为"#RRGGBB",如"#FF0000"表示为红色背景,默认值为应用manifest.json中plus-&gt;statusbar-&gt;background属性配置的值。
+						</p>
+</li></ul>
+<h1><a name="plus.nativeObj.ViewStyles">ViewStyles</a></h1>
+<p>View控件样式</p>
+<pre class="prettyprint linenums">
+interface ViewStyles {
+	attribute String backgroundColor;
+	attribute String left;
+	attribute String top;
+	attribute String bottom;
+	attribute String height;
+	attribute String width;
+	attribute String dock;
+	attribute Number opacity;
+	attribute String position;
+	attribute ViewStatusbarStyles statusbar;
+}				</pre>
+<h2>说明:</h2>
+<p class="des">
+	包括位置、大小等信息等,其中位置信息相对于父容器控件进行计算。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>backgroundColor: <em>(<font class="type">String</font>
+	类型
+)</em>区域背景颜色<br><p>
+	可取值:
+	#RRGGBB"格式字符串,如"#FF0000"表示绘制红色区域;
+	"rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。 默认值为"#FFFFFF"(白色)。 "rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。 默认值为"#FFFFFF"(白色)。
+						</p>
+</li>
+<li>bottom: <em>(<font class="type">String</font>
+	类型
+)</em>View控件垂直向上的偏移量<br><p>
+	现对于父容器底部的距离,可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父容器的高度,如果没有父容器则相对于屏幕高度。
+	当设置了top和height值时,忽略此属性值;
+	未设置height值时,可通过top和bottom属性值来确定View控件的高度。
+						</p>
+</li>
+<li>dock: <em>(<font class="type">String</font>
+	类型
+)</em>View控件的停靠方式<br><p>
+	仅当View控件添加到Webview窗口对象中并且position属性值设置为"dock"时才生效,此时View控件挤压Webview窗口的大小。
+	可取值:
+		"top",控件停靠则页面顶部;
+		"bottom",控件停靠在页面底部;
+		"right",控件停靠在页面右侧;
+		"left",控件停靠在页面左侧。
+	默认值为"top"。
+						</p>
+</li>
+<li>height: <em>(<font class="type">String</font>
+	类型
+)</em>区域的高度<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父容器的高度,如果没有父容器则相对于屏幕高度;
+		内容自适应,如"wrap_content",根据内容计算控件的高度。
+	默认值为"100%"。
+						</p>
+</li>
+<li>left: <em>(<font class="type">String</font>
+	类型
+)</em>区域左上角的水平偏移量<br><p>
+	可取值:
+		像素值,如"100px";
+		百分比,如"10%",相对于父控件的宽度;
+		自动计算,如"auto",根据width值自动计算,相对于父控件水平居中。
+	默认值为"0px"。
+						</p>
+</li>
+<li>opacity: <em>(<font class="type">Number</font>
+	类型
+)</em>View控件的不透明度<br><p>
+	取值范围为0-1,0为全透明,1为不透明,默认值为1,即不透明。
+						</p>
+</li>
+<li>position: <em>(<font class="type">String</font>
+	类型
+)</em>View控件的排版方式<br><p>
+	仅当View控件添加到Webview窗口对象中时才生效。
+	可取值:
+	"static",View控件在页面中正常定位,如果页面存在滚动条则随窗口内容滚动;
+	"absolute",Veiw控件在页面中绝对定位,如果页面存在滚动条不随窗口内容滚动;
+	"dock",View控件在页面中停靠,停靠的位置由dock属性值决定。
+	默认值为"absolute"。
+						</p>
+</li>
+<li>statusbar: <em>(<a href="#plus.nativeObj.ViewStatusbarStyles">ViewStatusbarStyles</a>
+	类型
+)</em>View控件的状态栏样式<br><p>
+	仅在应用设置为沉浸式状态栏样式下有效,设置此属性后将自动保留系统状态栏区域不被View控件占用(即View控件非沉浸式样式显示)。
+						</p>
+</li>
+<li>top: <em>(<font class="type">String</font>
+	类型
+)</em>View控件左上角的垂直偏移量<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于父控件的高度;自动计算,如"auto",根据height值自动计算,相对于父控件垂直居中。
+						</p>
+</li>
+<li>width: <em>(<font class="type">String</font>
+	类型
+)</em>区域的宽度<br><p>
+	可取值:像素值,如"100px";百分比,如"10%",相对于父控件的宽度。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.nativeObj.BitmapSaveSuccessCallback">BitmapSaveSuccessCallback</a></h1>
+<p>图片保存操作成功回调接口</p>
+<pre class="prettyprint linenums">
+void onSuccess( Event event ){
+	// Code here
+	var target = event.target; // 保存后的图片url路径,以"file://"开头
+	var size = event.size; // 保存后图片的大小,单位为字节(Byte)
+	var width = event.width; // 保存后图片的实际宽度,单位为px
+	var height = event.height; // 保存后图片的实际高度,单位为px
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>保存后的图片信息<br>
+	可通过event.target(String类型)获取保存后的图片url路径,以"file://"开头,可直接在html页面中通过src属性引用,如Android平台"file:///storage/sdcard0/Android/data/io.dcloud.HBuilder/.HBuilder/apps/HBuilder/doc/a.jpg",iOS平台"file:///var/mobile/Containers/Data/Application/757966CF-345C-4348-B07F-EEF83CF9A369/Library/Pandora/apps/HBuilder/doc/a.png";
+	可通过event.size(Number类型)获取保存后图片的大小,单位为字节(Byte);
+	可通过event.width(Number类型)获取保存后的图片的实际宽度,单位为px;
+	可通过event.height(Number类型)获取保存后的图片的实际高度,单位为px。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.InputCompleteCallback">InputCompleteCallback</a></h1>
+<p>输入框完成输入回调函数</p>
+<pre class="prettyprint linenums">
+void onComplete(Event event){
+	// Code here
+	var text = event.text; // 保存用户输入的内容
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	弹出软键盘完成输入后,点击软键盘上的“完成”、“前往”按钮时触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>保存编辑框输入信息<br>
+	可通过event.text(String类型)获取用户输入的文本。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.InputEventCallback">InputEventCallback</a></h1>
+<p>输入框事件回调函数</p>
+<pre class="prettyprint linenums">
+void onEvent(Event event){
+	// Code here
+	var id = event.id; // 编辑框的标识
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	输入框获取/失去焦点时触发。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			可选 </em>输入框信息<br>
+	可通过event.id(String类型)获取输入框的标识。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.RichTextClickedCallback">RichTextClickedCallback</a></h1>
+<p>富文本区域点击事件回调函数</p>
+<pre class="prettyprint linenums">
+void onEvent(Event event){
+	// Event handled code.
+	var tagName = event.tagName;
+	var href = event.href;
+	var src = event.src;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用户点击RichText区域时触发,如果点击RichText的a标签则回调函数event参数中包含tagName(值为"a")和href属性;
+	如果点击RichText的img标签则回调函数event参数中包含tagName(值为"img")和src属性;
+	如果点击其它区域则回调函数event参数中包含tagName(值为"")。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>点击事件参数<br>
+	包含以下属性:
+		"tagName" - 如果点击RichText上的a/img标签则为"a"/"img",否则未空字符串"";
+		"href" - 点击RichText上的a标签时有效;
+		"src" - 点击RichText上的img标签时有效。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.TouchEventCallback">TouchEventCallback</a></h1>
+<p>触屏事件的回调函数</p>
+<pre class="prettyprint linenums">
+void onEvent(Event e){
+	// Event handled code.
+	var clientX = e.clientX;
+	var clientY = e.clientY;
+	var pageX = e.pageX;
+	var pageY = e.pageY;
+	var screenX = e.screenX;
+	var screenY = e.screenY;
+	var target = e.target;
+	var imageIndex = e.currentImageIndex;
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>触屏数据<br>
+	Event对象包含以下属性:
+		target:保存触发此事件的对象;
+		clientX:Number类型,保存触摸目标在View控件中的X坐标;
+		clientY:Number类型,保存触摸目标在View控件中的Y坐标;
+		pageX:Number类型,保存触摸目标在当前页面(运行此脚本的窗口)中的X坐标;
+		pageY:Number类型,保存触摸目标在当前页面(运行此脚本的窗口)中的Y坐标;
+		screenX:Number类型,保存触摸目标在屏幕中的X坐标;
+		screenY:Number类型,保存触摸目标在屏幕中的Y坐标;
+		currentImageIndex:Number类型,保存当前图片轮播控件显示的图片索引值(从0开始),仅监听图片轮播控件(ImageSlider)的click事件时包含此属性。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.NativeObjSuccessCallback">NativeObjSuccessCallback</a></h1>
+<p>操作成功回调函数接口</p>
+<pre class="prettyprint linenums">
+void onSuccess(){
+	// Code here
+}
+				</pre>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.nativeObj.NativeObjErrorCallback">NativeObjErrorCallback</a></h1>
+<p>操作错误回调函数接口</p>
+<pre class="prettyprint linenums">
+function void onError( Exception error ) {
+	// Error.
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>用户选择操作失败信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 337 - 0
hello H5+/doc/navigator.html

@@ -0,0 +1,337 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Navigator Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.navigator">navigator</a></h1>
+<p>navigator用于管理浏览器运行环境信息</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.navigator.checkPermission">checkPermission</a>: 检查运行环境的权限</li>
+<li>
+<a href="#plus.navigator.closeSplashscreen">closeSplashscreen</a>: 关闭应用启动界面</li>
+<li>
+<a href="#plus.navigator.hasNotchInScreen">hasNotchInScreen</a>: 查询设备是否为刘海屏</li>
+<li>
+<a href="#plus.navigator.hasSplashscreen">hasSplashscreen</a>: 查询应用启动界面是否已关闭</li>
+<li>
+<a href="#plus.navigator.updateSplashscreen">updateSplashscreen</a>: 更新程序启动界面</li>
+<li>
+<a href="#plus.navigator.createShortcut">createShortcut</a>: 创建应用快捷方式</li>
+<li>
+<a href="#plus.navigator.hasShortcut">hasShortcut</a>: 查询是否存在应用快捷方式</li>
+<li>
+<a href="#plus.navigator.isBackground">isBackground</a>: 判断当前应用是否切换到后台</li>
+<li>
+<a href="#plus.navigator.isFullscreen">isFullscreen</a>: 判断应用当前是否全屏模式显示</li>
+<li>
+<a href="#plus.navigator.isLogs">isLogs</a>: 判断应用当前是否输出日志</li>
+<li>
+<a href="#plus.navigator.setFullscreen">setFullscreen</a>: 设置应用是否全屏显示</li>
+<li>
+<a href="#plus.navigator.setLogs">setLogs</a>: 设置应用是否输出日志</li>
+<li>
+<a href="#plus.navigator.setStatusBarBackground">setStatusBarBackground</a>: 设置系统状态栏背景颜色</li>
+<li>
+<a href="#plus.navigator.getStatusBarBackground">getStatusBarBackground</a>: 获取系统状态栏背景颜色</li>
+<li>
+<a href="#plus.navigator.setStatusBarStyle">setStatusBarStyle</a>: 设置系统状态栏样式</li>
+<li>
+<a href="#plus.navigator.getStatusBarStyle">getStatusBarStyle</a>: 获取系统状态栏样式</li>
+<li>
+<a href="#plus.navigator.getStatusbarHeight">getStatusbarHeight</a>: 获取系统状态栏高度</li>
+<li>
+<a href="#plus.navigator.isImmersedStatusbar">isImmersedStatusbar</a>: 判断当前是否为沉浸式状态栏模式</li>
+<li>
+<a href="#plus.navigator.setUserAgent">setUserAgent</a>: 设置userAgent值</li>
+<li>
+<a href="#plus.navigator.getUserAgent">getUserAgent</a>: 获取userAgent值</li>
+<li>
+<a href="#plus.navigator.setCookie">setCookie</a>: 设置Cookie值</li>
+<li>
+<a href="#plus.navigator.getCookie">getCookie</a>: 获取Cookie值</li>
+<li>
+<a href="#plus.navigator.removeAllCookie">removeAllCookie</a>: 删除应用所有Cookie值</li>
+<li>
+<a href="#plus.navigator.removeCookie">removeCookie</a>: 删除应用Cookie</li>
+<li>
+<a href="#plus.navigator.removeSessionCookie">removeSessionCookie</a>: 删除应用所有会话期Cookie值</li>
+<li>
+<a href="#plus.navigator.getSafeAreaInsets">getSafeAreaInsets</a>: 获取应用的安全区域</li>
+<li>
+<a href="#plus.navigator.getOrientation">getOrientation</a>: 获取应用的横竖屏状态</li>
+<li>
+<a href="#plus.navigator.hideSystemNavigation">hideSystemNavigation</a>: 隐藏系统虚拟按键(导航栏)</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.navigator.ShortcutOptions">ShortcutOptions</a>: 创建应用快捷方式要设置的参数</li>
+<li>
+<a href="#plus.navigator.SplashscreenOptions">SplashscreenOptions</a>: 更新应用启动界面要设置的参数</li>
+<li>
+<a href="#plus.navigator.PermissionNames">PermissionNames</a>: 运行环境权限类型</li>
+<li>
+<a href="#plus.navigator.SafeAreaInsets">SafeAreaInsets</a>: JSON对象,安全区域信息对象</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.navigator.ShortcutSuccessCallback">ShortcutSuccessCallback</a>: 创建桌面快捷方式成功的回调函数</li>
+<li>
+<a href="#plus.navigator.NavigatorErrorCallback">NavigatorErrorCallback</a>: 操作错误回调函数接口</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Navigator": {
+		"description": "浏览器信息"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.navigator.ShortcutOptions">ShortcutOptions</a></h1>
+<p>创建应用快捷方式要设置的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>name: <em>(<font class="type">String</font>
+	类型
+)</em>快捷方式名称<br><p>
+	如果未设置则使用应用的名称,manifest.json中name属性值。
+						</p>
+</li>
+<li>icon: <em>(<font class="type">String</font>
+	类型
+)</em>快捷方式的图标<br><p>
+	如果未设置则优先使用应用中指定的图标(manifest.json中icon节点下对应分辨率的图标),如未区配则使用应用的图标(仅在独立打包时),否则使用runtime提供的默认图标。
+						</p>
+</li>
+<li>toast: <em>(<font class="type">String</font>
+	类型
+)</em>创建快捷方式后的提示信息<br><p>
+	快捷方式创建成功后显示,默认提示内容为“"XXXX"已创建桌面快捷方式”,其中"XXXX"为程序的名称,如果不需要提示则设置此值为空字符串。
+						</p>
+</li>
+<li>extra: <em>(<font class="type">JSON</font>
+	类型
+)</em>快捷方式的扩展参数<br><p>
+	其中key和value值都必须是字符串类型。
+						</p>
+</li>
+<li>classname: <em>(<font class="type">String</font>
+	类型
+)</em>要启动Activity类名<br><p>
+	通常情况下不需要指定此值,仅在5+SDK集成时自定义Activity才用到。
+						</p>
+</li>
+<li>force: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否需要强制创建快捷方式<br><p>
+	true表示强制创建,false表示不强制创建,默认值为true。
+	强制创建可能会导致在无法判断快捷方式是否存在的设备上重复创建,如果需要尽可能避免出现重复创建桌面快捷方式则应该设置force属性值为false。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.navigator.SplashscreenOptions">SplashscreenOptions</a></h1>
+<p>更新应用启动界面要设置的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>image: <em>(<font class="type">String</font>
+	类型
+)</em>启动界面的图片路径<br><p>
+	仅支持本地文件路径,图片必须为png格式。
+					</p>
+</li>
+<li>autoclose: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否自动关闭启动界面<br><p>
+	true表示应用启动后自动关闭启动界面,false表示应用启动后不自动关闭启动界面,需要在应用调用plus.navigator.closeSplashscreen()方法关闭。
+					</p>
+</li>
+<li>autoclose_w2a: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否自动关闭启动界面(WAP2APP应用)<br><p>
+	与autoclose属性值作用一致,仅在WAP2APP应用中有效。
+	不推荐设置此值,如果未设置会自动使用autoclose属性值。
+					</p>
+</li>
+<li>delay: <em>(<font class="type">Number</font>
+	类型
+)</em>启动界面延时关闭时间<br><p>
+	仅在设置为自动关闭启动界面时有效。
+					</p>
+</li>
+<li>delay_w2a: <em>(<font class="type">Number</font>
+	类型
+)</em>启动界面延时关闭时间(WAP2APP应用)<br><p>
+	与delay属性值作用一致,仅在WAP2APP应用中有效。
+	不推荐设置此值,如果未设置会自动使用delay属性值。
+					</p>
+</li>
+</ul>
+<h1><a name="plus.navigator.PermissionNames">PermissionNames</a></h1>
+<p>运行环境权限类型</p>
+<h2>常量:</h2>
+<ul>
+<li>CAMERA: <em>(<font class="type">String</font>
+	类型
+)</em>访问摄像头权限<br><p>
+	用于调用摄像头(plus.camera.*/plus.barcode.*)。
+						</p>
+</li>
+<li>CONTACTS: <em>(<font class="type">String</font>
+	类型
+)</em>访问系统联系人权限<br><p>
+	用于访问(读、写)系统通讯录(plus.gallery.*)。
+						</p>
+</li>
+<li>GALLERY: <em>(<font class="type">String</font>
+	类型
+)</em>访问系统相册权限<br><p>
+	用于访问(读、写)系统相册(plus.gallery.*)。
+						</p>
+</li>
+<li>LOCATION: <em>(<font class="type">String</font>
+	类型
+)</em>定位权限<br><p>
+	用于获取当前用户位置信息(plus.geolocation.*)。 
+						</p>
+</li>
+<li>NOTIFITION: <em>(<font class="type">String</font>
+	类型
+)</em>消息通知权限<br><p>
+	用于接收系统消息通知(plus.push.*)。 
+						</p>
+</li>
+<li>RECORD: <em>(<font class="type">String</font>
+	类型
+)</em>录音权限<br><p>
+	用于进行本地录音操作(plus.audio.AudioRecorder)。 
+						</p>
+</li>
+<li>SHORTCUT: <em>(<font class="type">String</font>
+	类型
+)</em>创建桌面快捷方式权限<br><p>
+	用于在系统桌面创建快捷方式图标(plus.navigator.createShortcut)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.navigator.SafeAreaInsets">SafeAreaInsets</a></h1>
+<p>JSON对象,安全区域信息对象</p>
+<h2>说明:</h2>
+<p class="des">
+	通过getSafeAreaInsets方法返回的信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>bottom: <em>(<font class="type">Number</font>
+	类型
+)</em>应用底部安全区域偏移量<br><p>
+	单位为逻辑像素(px), 如果应用已经配置底部安全区域则返回0。
+						</p>
+</li>
+<li>left: <em>(<font class="type">Number</font>
+	类型
+)</em>应用左侧安全区域偏移量<br><p>
+	单位为逻辑像素(px), 如果应用已经配置左侧安全区域则返回0。
+						</p>
+</li>
+<li>right: <em>(<font class="type">Number</font>
+	类型
+)</em>应用右侧安全区域偏移量<br><p>
+	单位为逻辑像素(px), 如果应用已经配置右侧安全区域则返回0。
+						</p>
+</li>
+<li>top: <em>(<font class="type">Number</font>
+	类型
+)</em>应用顶部安全区域偏移量<br><p>
+	单位为逻辑像素(px), 如果应用已经配置顶部安全区域则返回0。
+						</p>
+</li>
+<li>deviceBottom: <em>(<font class="type">Number</font>
+	类型
+)</em>设备底部安全区域偏移量<br><p>
+	单位为逻辑像素(px)。
+						</p>
+</li>
+<li>deviceLeft: <em>(<font class="type">Number</font>
+	类型
+)</em>设备左侧安全区域偏移量<br><p>
+	单位为逻辑像素(px)。
+						</p>
+</li>
+<li>deviceRight: <em>(<font class="type">Number</font>
+	类型
+)</em>设备右侧安全区域偏移量<br><p>
+	单位为逻辑像素(px)。
+						</p>
+</li>
+<li>deviceTop: <em>(<font class="type">Number</font>
+	类型
+)</em>设备顶部安全区域偏移量<br><p>
+	单位为逻辑像素(px)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.navigator.ShortcutSuccessCallback">ShortcutSuccessCallback</a></h1>
+<p>创建桌面快捷方式成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(Event event){
+	var result=event.result; // 快捷方式是否已经存在,调用plus.navigator.hasShortcut方法时有效
+	var sure=event.sure; // 是否确定创建桌面快捷方式成功,调用plus.navigator.createShortcut方法时有效
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">Event</font>
+			)
+			必选 </em>创建桌面快捷方式返回的数据<br>
+	此对象包含以下属性值:
+	event.result - 查询快捷方式是否存在的结果(plus.navigator.hasShortcut),可取值:
+		existing",快捷方式已存在;
+		"none",快捷方式不存在(支持创建);
+		"unsupported",不支持创建桌面快捷方式;
+		"unknown":不确定快捷方式是否存在。
+	event.sure - 创建快捷方式的结果(plus.navigator.createShortcut),Boolean类型,可取值:
+		true,表示在当前环境下确定快捷方式创建成功;
+		false,表示不确定快捷方式是否已创建。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.navigator.NavigatorErrorCallback">NavigatorErrorCallback</a></h1>
+<p>操作错误回调函数接口</p>
+<pre class="prettyprint linenums">
+function void onError(Exception error){
+	// Error.
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>操作失败信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 483 - 0
hello H5+/doc/oauth.html

@@ -0,0 +1,483 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>OAuth Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.oauth">oauth</a></h1>
+<p>OAuth模块管理客户端的用户登录授权验证功能,允许应用访问第三方平台的资源。</p>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.oauth.getServices">getServices</a>: 获取登录授权认证服务列表</li></ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.oauth.AuthService">AuthService</a>: 登录授权认证服务对象</li>
+<li>
+<a href="#plus.oauth.AppleInfo">AppleInfo</a>: 苹果登录认证信息</li>
+<li>
+<a href="#plus.oauth.AuthOptions">AuthOptions</a>: JSON对象,授权认证参数选项</li>
+<li>
+<a href="#plus.oauth.AuthInfo">AuthInfo</a>: 登录授权认证信息</li>
+<li>
+<a href="#plus.oauth.UserInfo">UserInfo</a>: 登录授权用户信息</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.oauth.ServicesSuccessCallback">ServicesSuccessCallback</a>: 获取登录授权认证服务成功回调</li>
+<li>
+<a href="#plus.oauth.AuthorizeSuccessCallback">AuthorizeSuccessCallback</a>: 授权认证成功回调函数</li>
+<li>
+<a href="#plus.oauth.LogoutSuccessCallback">LogoutSuccessCallback</a>: 注销登录授权认证操作成功回调函数</li>
+<li>
+<a href="#plus.oauth.SuccessCallback">SuccessCallback</a>: 登录授权认证服务操作成功回调函数</li>
+<li>
+<a href="#plus.oauth.ErrorCallback">ErrorCallback</a>: 登录授权认证服务操作失败回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"OAuth": {
+		"description": "登录鉴权"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.oauth.AuthService">AuthService</a></h1>
+<p>登录授权认证服务对象</p>
+<pre class="prettyprint linenums">
+interface plus.oauth.AuthService {
+	// Attributes
+	attribute String id;
+	attribute String description;
+	attribute AppleInfo appleInfo;
+	attribute AuthInfo authResult;
+	attribute UserInfo userInfo;
+	attribute JSON extra;
+	
+	// Methods 
+	function void author(successCallback, errorCallback, options);
+	function void login(successCallback, errorCallback, options);
+	function void logout(successCallback, errorCallback);
+	function void getUserInfo(successCallback, errorCallback);
+	function void addPhoneNumber(successCallback, errorCallback);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	AuthService对象用于表示登录授权认证服务,在JS中为对象,用于向系统进行登录授权认证操作。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.oauth.AuthService.id">id</a>: 登录授权认证服务标识</li>
+<li>
+<a href="#plus.oauth.AuthService.description">description</a>: 登录授权认证服务描述</li>
+<li>
+<a href="#plus.oauth.AuthService.appleInfo">appleInfo</a>: 苹果登录认证数据</li>
+<li>
+<a href="#plus.oauth.AuthService.authResult">authResult</a>: 登录认证数据</li>
+<li>
+<a href="#plus.oauth.AuthService.userInfo">userInfo</a>: 登录用户信息</li>
+<li>
+<a href="#plus.oauth.AuthService.extra">extra</a>: 登录授权认证扩展信息</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.oauth.AuthService.authorize">authorize</a>: 请求授权认证</li>
+<li>
+<a href="#plus.oauth.AuthService.login">login</a>: 请求登录认证</li>
+<li>
+<a href="#plus.oauth.AuthService.logout">logout</a>: 注销登录认证</li>
+<li>
+<a href="#plus.oauth.AuthService.getUserInfo">getUserInfo</a>: 获取用户信息</li>
+</ul>
+<h1><a name="plus.oauth.AppleInfo">AppleInfo</a></h1>
+<p>苹果登录认证信息</p>
+<pre class="prettyprint linenums">
+interface plus.oauth.AppleInfo {
+	attribute String user;
+	attribute String state;
+	attribute String email:
+	attribute JSON fullName;
+	attribute String authorizationCode;
+	attribute String identityToken;
+	attribute Number realUserStatus;
+	attribute String scope;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	此对象仅在使用苹果登录时有效,用于保存苹果登录返回的数据。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>user: <em>(<font class="type">String</font>
+	类型
+)</em>苹果用户唯一标识符<br>
+</li>
+<li>state: <em>(<font class="type">String</font>
+	类型
+)</em>验证信息状态<br>
+</li>
+<li>email: <em>(<font class="type">String</font>
+	类型
+)</em>用户共享的可选电子邮件<br>
+</li>
+<li>fullName: <em>(<font class="type">JSON</font>
+	类型
+)</em>用户共享的可选全名<br><p>
+	可能包括以下属性:
+	namePrefix - String类型,名字前缀,头衔、敬称;
+	givenName - String类型,名字;
+	middleName - String类型,中间名;
+	familyName - String类型,姓;
+	nameSuffix - String类型,名字后缀,学位、荣誉;
+	nickName - String类型,昵称。
+						</p>
+</li>
+<li>authorizationCode: <em>(<font class="type">String</font>
+	类型
+)</em>验证数据<br>
+</li>
+<li>identityToken: <em>(<font class="type">String</font>
+	类型
+)</em>Web令牌(JWT)<br>
+</li>
+<li>realUserStatus: <em>(<font class="type">Number</font>
+	类型
+)</em>标识用户是否为真实的人<br><p>
+	0 - 当前平台不支持,忽略该值;
+	1 - 无法确认;
+	2 - 用户真实性非常高。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.oauth.AuthOptions">AuthOptions</a></h1>
+<p>JSON对象,授权认证参数选项</p>
+<pre class="prettyprint linenums">
+interface plus.oauth.AuthOptions {
+	attribute String scope;
+	attribute String state;
+	attribute String appid;
+	attribute String appkey;
+	attribute String appsecret;
+	attribute String redirect_uri;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	此对象支持的属性值由登录授权认证服务定义。
+	例如“微信”,则可配置以下参数:
+	scope - 应用授权作用域;
+	state - 用于保持请求和回调的状态参数。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>scope: <em>(<font class="type">String</font>
+	类型
+)</em>申请的权限作用范围<br><p>
+	如果存在多个权限,则以","符号分割。
+						</p>
+</li>
+<li>state: <em>(<font class="type">String</font>
+	类型
+)</em>客户端的当前状态,可以指定任意值,登录认证后原封不动的返回保存到AuthService对象的extra中<br>
+</li>
+<li>appid: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权认证服务平台申请的appid<br><p>
+	动态设置登录授权服务中需要使用的appid,仅需要此参数的登录授权服务(如“微信登录”、“QQ登录”)支持。
+	如果未设置则使用运行环境中内置的appid值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
+						</p>
+</li>
+<li>appkey: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权认证服务平台申请的appkey<br><p>
+	动态设置登录授权服务中需要使用的appkey,仅需要此参数的登录授权服务(如“新浪微博登录”、“360登录”)支持。
+	如果未设置则使用运行环境中内置的appkey值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
+						</p>
+</li>
+<li>appsecret: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权认证服务平台申请的appsecret<br><p>
+	动态设置登录授权服务中需要使用的appsecret,仅需要此参数的登录授权服务(如“微信登录”、“新浪微博登录”)支持。
+	如果未设置则使用运行环境中内置的appkey值(如在HBuilder中可在manifest.json的SDK配置项中进行设置);
+	当开放平台申请的appsecret值涉及到安全问题时,可在应用运行时从服务器获取,然后通过此api动态设置。
+						</p>
+</li>
+<li>redirect_url: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权认证服务平台申请的redirect_url<br><p>
+	动态设置登录授权服务中需要使用的redirect_url,仅需要此参数的登录授权服务(如“新浪微博登录”)支持。
+	如果未设置则使用运行环境中内置的redirect_url值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.oauth.AuthInfo">AuthInfo</a></h1>
+<p>登录授权认证信息</p>
+<pre class="prettyprint linenums">
+interface plus.oauth.AuthInfo {
+	attribute String openid;
+	attribute String access_token;
+	attribute String expires_in:
+	attribute String refresh_token;
+	attribute String scope;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	此对象仅定义标准属性,登录授权认证服务可扩展自定义数据。
+	例如“微信”登录授权服务,则包括以下数据:
+	unionid - 用户统一标识,针对一个微信开放平台帐号下的应用,同一用户的unionid是唯一的。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>access_token: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权的访问令牌<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>openid: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的唯一标识<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>expires_in: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权访问令牌过期时间<br><p>
+	单位为秒,如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>refresh_token: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权的更新令牌<br><p>
+	用来获取下一次的访问令牌,如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>scope: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权的权限范围<br><p>
+	如果存在多个权限,则以","符号分割。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.oauth.UserInfo">UserInfo</a></h1>
+<p>登录授权用户信息</p>
+<pre class="prettyprint linenums">
+interface plus.oauth.UserInfo {
+	attribute String openid;
+	attribute String headimgurl:
+	attribute String nickname;
+	attribute String email;
+	attribute String phonenumber;
+	attribute String sex;
+	attribute String province;
+	attribute String city;
+	attribute String country;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于保存登录授权用户的信息。
+	此对象仅定义标准属性,登录授权认证服务可扩展自定义数据。
+	例如“微信”登录授权服务,可能包括以下自定义数据:
+	privilege - 用户特权信息,json数组,如微信沃卡用户为(chinaunicom);
+	unionid - 用户统一标识,针对一个微信开放平台帐号下的应用,同一用户的unionid是唯一的。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>openid: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的唯一标识<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>headimgurl: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的头像图片地址<br><p>
+	要求为"http://"或"https://"开头的地址,如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>nickname: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的昵称<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>email: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的邮箱地址<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>phonenumber: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的电话号码<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>sex: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户的性别<br><p>
+	1为男性,2为女性。
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>province: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户注册的省份信息<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>city: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户注册的城市信息<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+<li>country: <em>(<font class="type">String</font>
+	类型
+)</em>登录授权用户注册的国家信息<br><p>
+	如果登录授权服务不支持此属性,则返回"undefined"。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.oauth.ServicesSuccessCallback">ServicesSuccessCallback</a></h1>
+<p>获取登录授权认证服务成功回调</p>
+<pre class="prettyprint linenums">
+void ServicesSuccessCallback( services ) {
+	// Get oauth services success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当获取登录授权认证服务列表成功时触发,并通过services参数返回运行环境支持的登录授权认证服务列表。
+				</p>
+<h2>参数:</h2>
+<ul><li>services: 
+		<em>(
+			<font class="type">Array</font>[
+						<a href="#plus.oauth.AuthService">AuthService</a>
+						]
+					
+			)
+			必选 </em>运行环境支持的登录授权认证服务列表<br>
+	运行环境支持的登录授权认证服务列表数组,可通过services.length获取服务列表的数目。
+	如果当前运行环境没有支持的登录授权认证服务,则返回空数组。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.oauth.AuthorizeSuccessCallback">AuthorizeSuccessCallback</a></h1>
+<p>授权认证成功回调函数</p>
+<pre class="prettyprint linenums">
+void onAuthorizeSuccess(event){
+	  // authorize code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	授权认证成功时触发,并返回操作结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>授权认证回调参数<br>
+	包括以下字段:
+		event.target - 授权认证服务对象;
+		event.scope - 申请的权限作用范围,调用authorize方法传入的scope值;
+		event.state - 自定义参数,调用authorize方法传入的state值;
+		event.code - 用户换取access_token的code;
+		event.lang - 微信客户端当前语言;
+		event.country - 微信用户当前国家信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.oauth.LogoutSuccessCallback">LogoutSuccessCallback</a></h1>
+<p>注销登录授权认证操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onLogoutSuccess(event){
+	  // logout code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	注销登录授权认证成功时触发,并返回操作结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>注销登录授权认证操作回调事件参数<br>
+	包括以下参数:
+	event.target - 表示登录授权认证服务对象;
+	其它属性可保存注销登录授权的扩展数据。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.oauth.SuccessCallback">SuccessCallback</a></h1>
+<p>登录授权认证服务操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+	  // auth code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	登录授权认证服务操作如请求登录授权认证、获取登录授权用户信息成功时触发,并返回操作结果。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			必选 </em>登录授权认证服务操作回调事件参数<br>
+	包括以下参数:
+	event.target - 表示登录授权认证服务对象,可以通过此对象的authResult、userInfo属性来获取操作结果信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.oauth.ErrorCallback">ErrorCallback</a></h1>
+<p>登录授权认证服务操作失败回调函数</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Error code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	登录授权认证服务操作如请求登录授权认证、注销登录授权认证、获取登录授权用户信息失败时触发,并返回错误信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>操作失败错误信息<br>
+	包括以下参数:
+	error.code - 表示错误代码;
+	error.message - 错误描述信息;
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 132 - 0
hello H5+/doc/orientation.html

@@ -0,0 +1,132 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Orientation Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.orientation">orientation</a></h1>
+<p>Orientation模块管理设备的方向信息,包括alpha、beta、gamma三个方向信息,通过plus.orientation可获取设备方向管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.orientation.getCurrentOrientation">getCurrentOrientation</a>: 获取当前设备的方向信息,包括alpha、beta、gamma三个方向信息</li>
+<li>
+<a href="#plus.orientation.watchOrientation">watchOrientation</a>: 监听设备方向信息的变化</li>
+<li>
+<a href="#plus.orientation.clearWatch">clearWatch</a>: 关闭监听设备方向信息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.orientation.OrientationOption">OrientationOption</a>: JSON对象,监听设备方向感应器参数</li>
+<li>
+<a href="#plus.orientation.Rotation">Rotation</a>: JSON对象,设备方向信息数据</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.orientation.OrientationSuccessCallback">OrientationSuccessCallback</a>: 获取设备方向信息成功的回调函数</li>
+<li>
+<a href="#plus.orientation.OrientationErrorCallback">OrientationErrorCallback</a>: 获取设备方向信息失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Orientation": {
+		"description": "方向传感器"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.orientation.OrientationOption">OrientationOption</a></h1>
+<p>JSON对象,监听设备方向感应器参数</p>
+<h2>属性:</h2>
+<ul><li>frequency: <em>(<font class="type">Number</font>
+	类型
+)</em>更新方向信息的时间间隔<br><p>数值类型,单位为ms,默认值为500ms。</p>
+</li></ul>
+<h1><a name="plus.orientation.Rotation">Rotation</a></h1>
+<p>JSON对象,设备方向信息数据</p>
+<pre class="prettyprint linenums">
+interface Rotation {
+	readonly attribute float alpha;
+	readonly attribute float beta;
+	readonly attribute float gamma;
+	readonly attribute float magneticHeading;
+	readonly attribute float trueHeading;
+	readonly attribute float headingAccuracy;
+}
+				</pre>
+<h2>属性:</h2>
+<ul>
+<li>alpha: <em>(<font class="type">float</font>
+	类型
+)</em>以z方向为轴心的旋转角度<br><p>浮点数类型,只读属性,取值范围为0到360(不等于360)。</p>
+</li>
+<li>beta: <em>(<font class="type">float</font>
+	类型
+)</em>以x方向为轴心的旋转角度<br><p>浮点数类型,只读属性,取值范围为-180到180(不等于180)。</p>
+</li>
+<li>gamma: <em>(<font class="type">float</font>
+	类型
+)</em>以y方向为轴心的旋转角度<br><p>浮点数类型,只读属性,取值范围为-180到180(不等于180)。</p>
+</li>
+<li>magneticHeading: <em>(<font class="type">float</font>
+	类型
+)</em>设备方向与地球磁场北极方向的角度<br><p>浮点数类型,只读属性,取值范围为0到360(不等于360)。</p>
+</li>
+<li>trueHeading: <em>(<font class="type">float</font>
+	类型
+)</em>设备方向与地球真实北极方向的角度<br><p>浮点数类型,只读属性,取值范围为0到360(不等于360)。</p>
+</li>
+<li>headingAccuracy: <em>(<font class="type">float</font>
+	类型
+)</em>设备方向值的误差值<br><p>浮点数类型,只读属性,取值范围为0到360(不等于360)。</p>
+</li>
+</ul>
+<h1><a name="plus.orientation.OrientationSuccessCallback">OrientationSuccessCallback</a></h1>
+<p>获取设备方向信息成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( rotation ){
+	// Get orientation success code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>rotation: 
+		<em>(
+			<font class="type">DOMString</font>
+			)
+			必选 </em>设备的方向信息Rotation<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.orientation.OrientationErrorCallback">OrientationErrorCallback</a></h1>
+<p>获取设备方向信息失败的回调函数</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Get orientation error code. 
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>失败信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 407 - 0
hello H5+/doc/payment.html

@@ -0,0 +1,407 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Payment Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.payment">payment</a></h1>
+<p>Payment模块管理支付功能,用于提供网页安全支付能力,支持通过Web接口进行支付操作。通过plus.payment可获取支付管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.payment.getChannels">getChannels</a>: 获取支付通道</li>
+<li>
+<a href="#plus.payment.request">request</a>: 请求支付操作</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.payment.PaymentChannel">PaymentChannel</a>: 支付通道对象</li>
+<li>
+<a href="#plus.payment.OrderStatementIAP">OrderStatementIAP</a>: IAP订单数据对象</li>
+<li>
+<a href="#plus.payment.PaymentResult">PaymentResult</a>: 支付操作结果对象</li>
+<li>
+<a href="#plus.payment.IAPProduct">IAPProduct</a>: IAP商品对象</li>
+<li>
+<a href="#plus.payment.IAPProductInfo">IAPProductInfo</a>: 购买IAP商品对象</li>
+<li>
+<a href="#plus.payment.IAPTransaction">IAPTransaction</a>: 购买IAP商品交易信息对象</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.payment.ChannelsSuccessCallback">ChannelsSuccessCallback</a>: 获取支付通道成功回调</li>
+<li>
+<a href="#plus.payment.IapRequestOrderSuccessCallback">IapRequestOrderSuccessCallback</a>: 请求支付商品列表回调方法</li>
+<li>
+<a href="#plus.payment.IapRestoreComplateRequestCallback">IapRestoreComplateRequestCallback</a>: 请求已经购买的非消耗性商品和订阅商品回调方法</li>
+<li>
+<a href="#plus.payment.PaymentSuccessCallback">PaymentSuccessCallback</a>: 支付操作成功回调</li>
+<li>
+<a href="#plus.payment.PaymentErrorCallback">PaymentErrorCallback</a>: 支付操作失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Payment": {
+		"description": "支付"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.payment.PaymentChannel">PaymentChannel</a></h1>
+<p>支付通道对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.PaymentChannel{
+	attribute String id;
+	attribute String description;
+	attribute Boolean serviceReady;
+	function void installService();
+	
+	// iOS iAP
+	function void requestOrder(ids, successCB, errorCB);
+	function void restoreComplateRequest(options, successCB);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+PaymentChannel对象表示特定的支付通道,用于向系统请求支付操作。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.payment.PaymentChannel.id">id</a>: 支付通道标识</li>
+<li>
+<a href="#plus.payment.PaymentChannel.description">description</a>: 支付通道描述</li>
+<li>
+<a href="#plus.payment.PaymentChannel.serviceReady">serviceReady</a>: 支付通道服务是否安装</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.payment.PaymentChannel.installService">installService</a>: 安装支付通道依赖的服务</li>
+<li>
+<a href="#plus.payment.PaymentChannel.requestOrder">requestOrder</a>: 向IAP服务器请求支付订单</li>
+<li>
+<a href="#plus.payment.PaymentChannel.restoreComplateRequest">restoreComplateRequest</a>: 向IAP服务器请求已经购买的非消耗性商品和订阅商品</li>
+</ul>
+<h1><a name="plus.payment.OrderStatementIAP">OrderStatementIAP</a></h1>
+<p>IAP订单数据对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.OrderStatementIAP {
+	attribute String productid;
+	attribute String username;
+	attribute String quantity;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	描述IAP商品订单信息,如标识、数量等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>productid: <em>(<font class="type">String</font>
+	类型
+)</em>商品的标识<br>
+</li>
+<li>username: <em>(<font class="type">String</font>
+	类型
+)</em>购买用户名称<br>
+</li>
+<li>quantity: <em>(<font class="type">String</font>
+	类型
+)</em>商品数量<br>
+</li>
+</ul>
+<h1><a name="plus.payment.PaymentResult">PaymentResult</a></h1>
+<p>支付操作结果对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.PaymentResult {
+	attribute PaymentChannel channel;
+	attribute String tradeno;
+	attribute String description;
+	attribute String url;
+	attribute String signature;
+	attribute String rawdata;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+PaymentResult对象表示支付操作返回结果,用于确认支付操作成功。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>channel: <em>(<a href="#plus.payment.PaymentChannel">PaymentChannel</a>
+	类型
+)</em>支付通道对象<br><p>
+		用于发起支付操作的支付通道对象。
+						</p>
+</li>
+<li>tradeno: <em>(<font class="type">String</font>
+	类型
+)</em>交易编号信息<br><p>
+	如果支付平台不支持此数据则返回undefined。
+						</p>
+</li>
+<li>description: <em>(<font class="type">Boolean</font>
+	类型
+)</em>交易描述信息<br><p>
+	如果支付平台不支持此数据则返回undefined。
+						</p>
+</li>
+<li>url: <em>(<font class="type">Boolean</font>
+	类型
+)</em>查找支付交易信息地址<br><p>
+	用于向支付平台查询交易信息,如果支付平台不支持此数据则返回undefined。
+						</p>
+</li>
+<li>signature: <em>(<font class="type">String</font>
+	类型
+)</em>支付操作指纹信息<br><p>
+	用于向支付平台查询支付订单信息,如果支付平台不支持此数据则返回undefined。
+						</p>
+</li>
+<li>rawdata: <em>(<font class="type">String</font>
+	类型
+)</em>支付平台返回的原始数据<br><p>
+	如果支付平台返回key-value类型字符串,则组合成符合JSON格式的字符串。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.payment.IAPProduct">IAPProduct</a></h1>
+<p>IAP商品对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.IAPProduct {
+	attribute String productid;
+	attribute String price;
+	attribute String title;
+	attribute String description;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	描述IAP商品详细信息,如标识、价格、标题、描述信息等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>productid: <em>(<font class="type">String</font>
+	类型
+)</em>商品的标识<br>
+</li>
+<li>price: <em>(<font class="type">String</font>
+	类型
+)</em>商品的价格<br>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>商品标题<br>
+</li>
+<li>description: <em>(<font class="type">String</font>
+	类型
+)</em>商品的描述信息<br>
+</li>
+</ul>
+<h1><a name="plus.payment.IAPProductInfo">IAPProductInfo</a></h1>
+<p>购买IAP商品对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.IAPProductInfo {
+	attribute String productIdentifier;
+	attribute String quantity;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	描述购买的IAP商品详细信息,如标识、数量等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>productIdentifier: <em>(<font class="type">String</font>
+	类型
+)</em>商品的标识<br>
+</li>
+<li>quantity: <em>(<font class="type">String</font>
+	类型
+)</em>商品的数量<br>
+</li>
+</ul>
+<h1><a name="plus.payment.IAPTransaction">IAPTransaction</a></h1>
+<p>购买IAP商品交易信息对象</p>
+<pre class="prettyprint linenums">
+interface plus.payment.IAPTransaction {
+    attribute IAPProductInfo payment;
+    attribute String transactionDate;
+    attribute String transactionIdentifier;
+    attribute String transactionReceipt;
+    attribute String transactionState;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	描述购买的IAP商品交易详细信息,如购买商品信息、交易日期、订单标识等。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>payment: <em>(<font class="type">String</font>
+	类型
+)</em>购买商品的信息<br>
+</li>
+<li>transactionDate: <em>(<font class="type">String</font>
+	类型
+)</em>购买商品的交易日期<br>
+</li>
+<li>transactionIdentifier: <em>(<font class="type">String</font>
+	类型
+)</em>购买商品的交易订单标识<br>
+</li>
+<li>transactionReceipt: <em>(<font class="type">String</font>
+	类型
+)</em>购买商品的交易收据<br><p>
+	base64编码格式字符串数据。
+						</p>
+</li>
+<li>transactionState: <em>(<font class="type">String</font>
+	类型
+)</em>购买商品的交易状态<br><p>
+	可取值:"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.payment.ChannelsSuccessCallback">ChannelsSuccessCallback</a></h1>
+<p>获取支付通道成功回调</p>
+<pre class="prettyprint linenums">
+void ChannelsSuccessCallback( channels ) {
+	// Get payment channels success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当获取支付通道列表成功时的回调函数,用于返回终端支持的支付通道列表。
+				</p>
+<h2>参数:</h2>
+<ul><li>channels: 
+		<em>(
+			<font class="type">Array</font>
+			)
+			必选 </em>数组,系统支持的支付通道PaymentChannel列表<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.payment.IapRequestOrderSuccessCallback">IapRequestOrderSuccessCallback</a></h1>
+<p>请求支付商品列表回调方法</p>
+<pre class="prettyprint linenums">
+void onsuccess( results ) {
+	// Payment success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	获取IAP商品列表信息成功时的回调函数,返回商品详细信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>results: 
+		<em>(
+			<font class="type">Array</font>[
+						<a href="#plus.payment.IAPProduct">IAPProduct</a>
+						]
+					
+			)
+			必选 </em>商品信息数据<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.payment.IapRestoreComplateRequestCallback">IapRestoreComplateRequestCallback</a></h1>
+<p>请求已经购买的非消耗性商品和订阅商品回调方法</p>
+<pre class="prettyprint linenums">
+void onsuccess( results ) {
+	// Payment success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	获取IAP商品列表信息成功时的回调函数,返回商品详细信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>results: 
+		<em>(
+			<font class="type">Array</font>[
+						<a href="#plus.payment.IAPTransaction">IAPTransaction</a>
+						]
+					
+			)
+			必选 </em>已购买的非消耗性商品和订阅商品交易信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.payment.PaymentSuccessCallback">PaymentSuccessCallback</a></h1>
+<p>支付操作成功回调</p>
+<pre class="prettyprint linenums">
+void PaymentSuccessCallback ( result ) {
+	// Payment success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当支付操作成功时的回调函数,用于返回支付操作的成功信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>result : 
+		<em>(
+			<a href="#plus.payment.PaymentResult">PaymentResult</a>
+	|
+	<a href="#plus.payment.IAPTransaction">IAPTransaction</a>
+			)
+			必选 </em>支付操作成功的信息<br>
+	iOS平台使用IAP支付返回的数据类型为IAPTransaction。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.payment.PaymentErrorCallback">PaymentErrorCallback</a></h1>
+<p>支付操作失败回调</p>
+<pre class="prettyprint linenums">
+void PaymentErrorCallback(error){
+	// Payment error code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">当支付操作失败时的回调函数,用于返回支付操作失败的错误信息。</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>支付操作失败错误信息,可通过error.code获取错误代码,具体错误码有各支付通道定义<br>
+	支付宝支付错误代码如下:
+	62000,客户端未安装支付通道依赖的服务;
+	62001,用户取消支付操作;
+	62002,此设备不支持支付;
+	62003,数据格式错误;
+	62004,支付账号状态错误;
+	62005,订单信息错误;
+	62006,支付操作内部错误;
+	62007,支付服务器错误;
+	62008,网络问题引起的错误;
+	62009,其它未定义的错误。
+	微信支付错误代码如下:
+	-1,一般错误;
+	-2,用户取消;
+	-3,发送失败;
+	-4,认证被否决;
+	-5,不支持错误。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 78 - 0
hello H5+/doc/proximity.html

@@ -0,0 +1,78 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Proximity Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.proximity">proximity</a></h1>
+<p>Proximity模块管理设备距离传感器,可获取当前设备的接近距离信息,通过plus.proximity可获取设备距离传感管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.proximity.getCurrentProximity">getCurrentProximity</a>: 获取当前设备的接近距离信息</li>
+<li>
+<a href="#plus.proximity.watchProximity">watchProximity</a>: 监听设备接近距离的变化</li>
+<li>
+<a href="#plus.proximity.clearWatch">clearWatch</a>: 关闭监听设备接近距离变化</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.proximity.ProximitySuccessCallback">ProximitySuccessCallback</a>: 获取设备接近距离信息成功的回调函数</li>
+<li>
+<a href="#plus.proximity.ProximityErrorCallback">ProximityErrorCallback</a>: 获取设备接近距离信息失败的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Proximity": {
+		"description": "距离感应器"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.proximity.ProximitySuccessCallback">ProximitySuccessCallback</a></h1>
+<p>获取设备接近距离信息成功的回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess( distance ) {
+	// Get distance success code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>distance: 
+		<em>(
+			<font class="type">Number</font>
+			)
+			必选 </em>设备接近距离<br>设备接近距离传感器获取的距离值,单位为厘米。如果感应器无法获取准确的距离值,则在接近设备时返回0,否则返回Infinity。</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.proximity.ProximityErrorCallback">ProximityErrorCallback</a></h1>
+<p>获取设备接近距离信息失败的回调函数</p>
+<pre class="prettyprint linenums">
+void onError( error ) {
+	// Get distance error code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>失败信息<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 218 - 0
hello H5+/doc/push.html

@@ -0,0 +1,218 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Push Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.push">push</a></h1>
+<p>Push模块管理推送消息功能,可以实现在线、离线的消息推送,通过plus.push可获取推送消息管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.push.addEventListener">addEventListener</a>: 添加推送消息事件监听器</li>
+<li>
+<a href="#plus.push.clear">clear</a>: 清空所有推送消息</li>
+<li>
+<a href="#plus.push.createMessage">createMessage</a>: 创建本地消息</li>
+<li>
+<a href="#plus.push.getAllMessage">getAllMessage</a>: 获取所有推送消息</li>
+<li>
+<a href="#plus.push.getClientInfo">getClientInfo</a>: 获取客户端推送标识信息</li>
+<li>
+<a href="#plus.push.setAutoNotification">setAutoNotification</a>: 设置程序是否将消息显示在系统消息中心</li>
+<li>
+<a href="#plus.push.remove">remove</a>: 删除推送消息</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.push.ClientInfo">ClientInfo</a>: JSON对象,获取的客户端标识信息</li>
+<li>
+<a href="#plus.push.PushMessage">PushMessage</a>: JSON对象,推送消息对象</li>
+<li>
+<a href="#plus.push.MessageOptions">MessageOptions</a>: JSON对象,获客户端创建本地消息的参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.push.PushReceiveCallback">PushReceiveCallback</a>: 客户端接收到推动消息的回调函数</li>
+<li>
+<a href="#plus.push.PushClickCallback">PushClickCallback</a>: 用户点击推送消息事件的回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Push": {
+		"description": "消息推送"
+	}
+}
+}
+			</pre>
+			属性:
+			<ul><li>cover: 设定显示推送消息的模式<br><p>
+	可取值true或false,true表示推送消息覆盖模式显示,即仅显示最后接收到的推送消息;false表示在系统消息中心显示多条消息。
+	默认值为ture。
+					</p>
+<h3>平台支持</h3>
+<ul>
+<li>Android - 2.2+ (支持)</li>
+<li>iOS - 4.3+ (不支持): 
+	不支持覆盖消息,每条信息都在系统消息中心,忽略cover属性值。
+							</li>
+</ul>
+</li></ul>
+<h1><a name="plus.push.ClientInfo">ClientInfo</a></h1>
+<p>JSON对象,获取的客户端标识信息</p>
+<h2>属性:</h2>
+<ul>
+<li>id: <em>(<font class="type">String</font>
+	类型
+)</em>推送通道标识<br><p>
+	目前支持以下推送通道:
+		"igexin" - 表示个推推送;
+		"mipush" - 表示小米推送;
+		"unipush" - 表示DCloud UniPush。
+						</p>
+</li>
+<li>token: <em>(<font class="type">String</font>
+	类型
+)</em>设备令牌(iOS设备唯一标识),用于APNS服务推送中标识设备的身份<br>
+</li>
+<li>clientid: <em>(<font class="type">String</font>
+	类型
+)</em>推送服务令牌(设备唯一标识),用于标识推送信息接收者身份<br><p>
+	第三方推送服务器管理的设备唯一标识,在iOS平台此值通常与token不同;在其它平台此值通常与token值一致。
+	此值与设备及应用都相关,即不同的apk/ipa安装到同一台设备上的值都不相同。
+						</p>
+</li>
+<li>appid: <em>(<font class="type">String</font>
+	类型
+)</em>第三方推送服务的应用标识<br><p>第三方推送服务器管理的应用标识,通常需要在第三方推送服务器平台进行注册获取。</p>
+</li>
+<li>appkey: <em>(<font class="type">String</font>
+	类型
+)</em>第三方推送服务器的应用键值<br><p>第三方推送服务器管理的应用键值,通常需要在第三方推送服务器平台进行注册获取。</p>
+</li>
+</ul>
+<h1><a name="plus.push.PushMessage">PushMessage</a></h1>
+<p>JSON对象,推送消息对象</p>
+<h2>属性:</h2>
+<ul>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息显示的标题<br>
+</li>
+<li>content: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息显示的内容<br>
+</li>
+<li>payload: <em>(<font class="type">JSON</font>
+	类型
+)</em>推送消息承载的数据<br><p>如果推送消息中传输的数据不符合JSON格式,则作为String类型数据保存。</p>
+</li>
+<li>aps: <em>(<font class="type">JSON</font>
+	类型
+)</em>Apple APNS推送协议数据<br>
+</li>
+</ul>
+<h1><a name="plus.push.MessageOptions">MessageOptions</a></h1>
+<p>JSON对象,获客户端创建本地消息的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>appid: <em>(<font class="type">String</font>
+	类型
+)</em>要启动流应用的appid<br><p>
+	仅在流应用环境中有效,默认值为当前流应用的appid。
+						</p>
+</li>
+<li>cover: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否覆盖上一次提示的消息<br><p>
+	可取值true或false,true为覆盖,false不覆盖。
+	默认为false。
+						</p>
+</li>
+<li>delay: <em>(<font class="type">Number</font>
+	类型
+)</em>提示消息延迟显示的时间<br><p>
+	当设备接收到推送消息后,可不立即显示,而是延迟一段时间显示,延迟时间单位为s,默认为0s,立即显示。
+						</p>
+</li>
+<li>icon: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息的图标<br><p>
+	本地图片地址,相对路径 - 相对于当前页面的host位置,如"a.jpg",注意当前页面为网络地址则不支持; 绝对路径 - 系统绝对路径,如Android平台"/sdcard/logo.png",此类路径通常通过其它5+ API获取的; 扩展相对路径URL(RelativeURL) - 以"_"开头的相对路径,如"_www/a.jpg"; 本地路径URL - 以“file://”开头,后面跟随系统绝对路径。
+						</p>
+</li>
+<li>sound: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息的提示音<br><p>
+	显示消息时的播放的提示音,可取值:
+	“system”-表示使用系统通知提示音;
+	“none”-表示不使用提示音;
+	默认值为“system”。
+						</p>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息的标题<br><p>
+	在系统消息中心显示的通知消息标题,默认值为程序的名称。
+						</p>
+</li>
+<li>subtitle: <em>(<font class="type">String</font>
+	类型
+)</em>推送消息的副标题<br>
+</li>
+<li>when: <em>(<font class="type">Date</font>
+	类型
+)</em>消息上显示的提示时间<br><p>
+	默认为当前时间,如果延迟显示则使用延时后显示消息的时间。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.push.PushReceiveCallback">PushReceiveCallback</a></h1>
+<p>客户端接收到推动消息的回调函数</p>
+<pre class="prettyprint linenums">
+void onReceive( msg ) {
+	// Recieved push message code.
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>msg: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>接收到的推送信息msg<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.push.PushClickCallback">PushClickCallback</a></h1>
+<p>用户点击推送消息事件的回调函数</p>
+<pre class="prettyprint linenums">
+void onClick( msg ) {
+	// Clicked push message code. 
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>msg: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>用户点击的推送信息msg<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 61 - 0
hello H5+/doc/res/doc.css

@@ -0,0 +1,61 @@
+* {
+	-webkit-user-select: none;
+	-ms-touch-select: none;
+/*
+	-ms-touch-action: none;
+*/
+}
+html {
+	width: 100%;
+	height: 100%;
+}
+body {
+    color:#333;
+    font-family: Verdana, Arial, Helvetica , "Microsoft YaHei" , sans-serif;
+    font-size:14px;
+    word-break: break-all;
+	-webkit-touch-callout:none;
+	-webkit-tap-highlight-color:rgba(0,0,0,0);
+	-webkit-text-size-adjust:none;
+}
+.content {
+	padding: 0 0.5em;
+}
+h1 {
+    border-bottom:2px solid;
+    font-size:1.6em;
+    font-weight:bold;
+	margin:2em 0px 0.5em 0px;
+
+}
+h2 {
+    font-size:1.2em;
+    font-weight:bold;
+    margin:1em 0px 0.5em 0px;
+    text-shadow:#FFFFFF 0px 1px 1px;
+}
+h3 {
+    font-size:1.1em;
+    font-weight:bold;
+    margin:0.8em 0px 0.5em 0px;
+    text-shadow:#FFFFFF 0px 1px 1px;
+}
+em {
+    font-size: 0.8em;
+    color: #999;
+}
+ul {
+	margin: 0;
+	padding: 0 0 0 2em;
+}
+a {
+	color:#D84C29;
+	text-decoration:none;
+}
+.des {
+	text-indent: 2em;
+	margin: 0;
+}
+.type{
+    color:#0A0;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);
+}

+ 14 - 0
hello H5+/doc/res/doc.js

@@ -0,0 +1,14 @@
+(function(w){
+// 空函数
+function shield(){
+	return false;
+}
+//取消浏览器的所有事件,使得active的样式在手机上正常生效
+document.addEventListener('touchstart',shield,false);
+document.oncontextmenu=shield;
+// DOMContentLoaded事件处理
+document.addEventListener('DOMContentLoaded',function(){
+	document.body.onselectstart=shield;
+	prettyPrint();
+},false);
+})(window);

+ 1658 - 0
hello H5+/doc/res/prettify.js

@@ -0,0 +1,1658 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ *
+ * <p>
+ * For a fairly comprehensive set of languages see the
+ * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
+ * file that came with this source.  At a minimum, the lexer should work on a
+ * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
+ * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
+ * and a subset of Perl, but, because of commenting conventions, doesn't work on
+ * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
+ * <p>
+ * Usage: <ol>
+ * <li> include this source file in an html page via
+ *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
+ * <li> define style rules.  See the example page for examples.
+ * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
+ *    {@code class=prettyprint.}
+ *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
+ *    printer needs to do more substantial DOM manipulations to support that, so
+ *    some css styles may not be preserved.
+ * </ol>
+ * That's it.  I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in, but if you wish, you can add
+ * another class to the {@code <pre>} or {@code <code>} element to specify the
+ * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
+ * starts with "lang-" followed by a file extension, specifies the file type.
+ * See the "lang-*.js" files in this directory for code that implements
+ * per-language file handlers.
+ * <p>
+ * Change log:<br>
+ * cbeust, 2006/08/22
+ * <blockquote>
+ *   Java annotations (start with "@") are now captured as literals ("lit")
+ * </blockquote>
+ * @requires console
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window, define */
+
+/** @define {boolean} */
+var IN_GLOBAL_SCOPE = true;
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events.
+ * If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+/**
+ * Pretty print a chunk of code.
+ * @param {string} sourceCodeHtml The HTML to pretty print.
+ * @param {string} opt_langExtension The language name to use.
+ *     Typically, a filename extension like 'cpp' or 'java'.
+ * @param {number|boolean} opt_numberLines True to number lines,
+ *     or the 1-indexed number of the first line in sourceCodeHtml.
+ * @return {string} code as html, but prettier
+ */
+var prettyPrintOne;
+/**
+ * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+ * {@code class=prettyprint} and prettify them.
+ *
+ * @param {Function} opt_whenDone called when prettifying is done.
+ * @param {HTMLElement|HTMLDocument} opt_root an element or document
+ *   containing all the elements to pretty print.
+ *   Defaults to {@code document.body}.
+ */
+var prettyPrint;
+
+
+(function () {
+  var win = window;
+  // Keyword lists for various languages.
+  // We use things that coerce to strings to make them compact when minified
+  // and to defeat aggressive optimizers that fold large string constants.
+  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
+  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
+      "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
+      "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
+  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
+      "new,operator,private,protected,public,this,throw,true,try,typeof"];
+  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
+      "concept,concept_map,const_cast,constexpr,decltype,delegate," +
+      "dynamic_cast,explicit,export,friend,generic,late_check," +
+      "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
+      "static_cast,template,typeid,typename,using,virtual,where"];
+  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
+      "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
+      "instanceof,interface,null,native,package,strictfp,super,synchronized," +
+      "throws,transient"];
+  var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
+      "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
+      "fixed,foreach,from,group,implicit,in,internal,into,is,let," +
+      "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
+      "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
+      "var,virtual,where"];
+  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
+      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
+      "throw,true,try,unless,until,when,while,yes";
+  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
+      "debugger,eval,export,function,get,null,set,undefined,var,with," +
+      "Infinity,NaN"];
+  var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
+      "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
+      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
+  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
+      "elif,except,exec,finally,from,global,import,in,is,lambda," +
+      "nonlocal,not,or,pass,print,raise,try,with,yield," +
+      "False,True,None"];
+  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
+      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
+      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
+      "BEGIN,END"];
+   var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
+      "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
+      "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
+  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
+      "function,in,local,set,then,until"];
+  var ALL_KEYWORDS = [
+      CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
+      PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
+
+  // token style names.  correspond to css classes
+  /**
+   * token style for a string literal
+   * @const
+   */
+  var PR_STRING = 'str';
+  /**
+   * token style for a keyword
+   * @const
+   */
+  var PR_KEYWORD = 'kwd';
+  /**
+   * token style for a comment
+   * @const
+   */
+  var PR_COMMENT = 'com';
+  /**
+   * token style for a type
+   * @const
+   */
+  var PR_TYPE = 'typ';
+  /**
+   * token style for a literal value.  e.g. 1, null, true.
+   * @const
+   */
+  var PR_LITERAL = 'lit';
+  /**
+   * token style for a punctuation string.
+   * @const
+   */
+  var PR_PUNCTUATION = 'pun';
+  /**
+   * token style for plain text.
+   * @const
+   */
+  var PR_PLAIN = 'pln';
+
+  /**
+   * token style for an sgml tag.
+   * @const
+   */
+  var PR_TAG = 'tag';
+  /**
+   * token style for a markup declaration such as a DOCTYPE.
+   * @const
+   */
+  var PR_DECLARATION = 'dec';
+  /**
+   * token style for embedded source.
+   * @const
+   */
+  var PR_SOURCE = 'src';
+  /**
+   * token style for an sgml attribute name.
+   * @const
+   */
+  var PR_ATTRIB_NAME = 'atn';
+  /**
+   * token style for an sgml attribute value.
+   * @const
+   */
+  var PR_ATTRIB_VALUE = 'atv';
+
+  /**
+   * A class that indicates a section of markup that is not code, e.g. to allow
+   * embedding of line numbers within code listings.
+   * @const
+   */
+  var PR_NOCODE = 'nocode';
+
+  
+  
+  /**
+   * A set of tokens that can precede a regular expression literal in
+   * javascript
+   * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
+   * has the full list, but I've removed ones that might be problematic when
+   * seen in languages that don't support regular expression literals.
+   *
+   * <p>Specifically, I've removed any keywords that can't precede a regexp
+   * literal in a syntactically legal javascript program, and I've removed the
+   * "in" keyword since it's not a keyword in many languages, and might be used
+   * as a count of inches.
+   *
+   * <p>The link above does not accurately describe EcmaScript rules since
+   * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
+   * very well in practice.
+   *
+   * @private
+   * @const
+   */
+  var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
+  
+  // CAVEAT: this does not properly handle the case where a regular
+  // expression immediately follows another since a regular expression may
+  // have flags for case-sensitivity and the like.  Having regexp tokens
+  // adjacent is not valid in any language I'm aware of, so I'm punting.
+  // TODO: maybe style special characters inside a regexp as punctuation.
+
+  /**
+   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
+   * matches the union of the sets of strings matched by the input RegExp.
+   * Since it matches globally, if the input strings have a start-of-input
+   * anchor (/^.../), it is ignored for the purposes of unioning.
+   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
+   * @return {RegExp} a global regex.
+   */
+  function combinePrefixPatterns(regexs) {
+    var capturedGroupIndex = 0;
+  
+    var needToFoldCase = false;
+    var ignoreCase = false;
+    for (var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.ignoreCase) {
+        ignoreCase = true;
+      } else if (/[a-z]/i.test(regex.source.replace(
+                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
+        needToFoldCase = true;
+        ignoreCase = false;
+        break;
+      }
+    }
+  
+    var escapeCharToCodeUnit = {
+      'b': 8,
+      't': 9,
+      'n': 0xa,
+      'v': 0xb,
+      'f': 0xc,
+      'r': 0xd
+    };
+  
+    function decodeEscape(charsetPart) {
+      var cc0 = charsetPart.charCodeAt(0);
+      if (cc0 !== 92 /* \\ */) {
+        return cc0;
+      }
+      var c1 = charsetPart.charAt(1);
+      cc0 = escapeCharToCodeUnit[c1];
+      if (cc0) {
+        return cc0;
+      } else if ('0' <= c1 && c1 <= '7') {
+        return parseInt(charsetPart.substring(1), 8);
+      } else if (c1 === 'u' || c1 === 'x') {
+        return parseInt(charsetPart.substring(2), 16);
+      } else {
+        return charsetPart.charCodeAt(1);
+      }
+    }
+  
+    function encodeEscape(charCode) {
+      if (charCode < 0x20) {
+        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
+      }
+      var ch = String.fromCharCode(charCode);
+      return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
+          ? "\\" + ch : ch;
+    }
+  
+    function caseFoldCharset(charSet) {
+      var charsetParts = charSet.substring(1, charSet.length - 1).match(
+          new RegExp(
+              '\\\\u[0-9A-Fa-f]{4}'
+              + '|\\\\x[0-9A-Fa-f]{2}'
+              + '|\\\\[0-3][0-7]{0,2}'
+              + '|\\\\[0-7]{1,2}'
+              + '|\\\\[\\s\\S]'
+              + '|-'
+              + '|[^-\\\\]',
+              'g'));
+      var ranges = [];
+      var inverse = charsetParts[0] === '^';
+  
+      var out = ['['];
+      if (inverse) { out.push('^'); }
+  
+      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
+        var p = charsetParts[i];
+        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
+          out.push(p);
+        } else {
+          var start = decodeEscape(p);
+          var end;
+          if (i + 2 < n && '-' === charsetParts[i + 1]) {
+            end = decodeEscape(charsetParts[i + 2]);
+            i += 2;
+          } else {
+            end = start;
+          }
+          ranges.push([start, end]);
+          // If the range might intersect letters, then expand it.
+          // This case handling is too simplistic.
+          // It does not deal with non-latin case folding.
+          // It works for latin source code identifiers though.
+          if (!(end < 65 || start > 122)) {
+            if (!(end < 65 || start > 90)) {
+              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+            }
+            if (!(end < 97 || start > 122)) {
+              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+            }
+          }
+        }
+      }
+  
+      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
+      // -> [[1, 12], [14, 14], [16, 17]]
+      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
+      var consolidatedRanges = [];
+      var lastRange = [];
+      for (var i = 0; i < ranges.length; ++i) {
+        var range = ranges[i];
+        if (range[0] <= lastRange[1] + 1) {
+          lastRange[1] = Math.max(lastRange[1], range[1]);
+        } else {
+          consolidatedRanges.push(lastRange = range);
+        }
+      }
+  
+      for (var i = 0; i < consolidatedRanges.length; ++i) {
+        var range = consolidatedRanges[i];
+        out.push(encodeEscape(range[0]));
+        if (range[1] > range[0]) {
+          if (range[1] + 1 > range[0]) { out.push('-'); }
+          out.push(encodeEscape(range[1]));
+        }
+      }
+      out.push(']');
+      return out.join('');
+    }
+  
+    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
+      // Split into character sets, escape sequences, punctuation strings
+      // like ('(', '(?:', ')', '^'), and runs of characters that do not
+      // include any of the above.
+      var parts = regex.source.match(
+          new RegExp(
+              '(?:'
+              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
+              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
+              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
+              + '|\\\\[0-9]+'  // a back-reference or octal escape
+              + '|\\\\[^ux0-9]'  // other escape sequence
+              + '|\\(\\?[:!=]'  // start of a non-capturing group
+              + '|[\\(\\)\\^]'  // start/end of a group, or line start
+              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
+              + ')',
+              'g'));
+      var n = parts.length;
+  
+      // Maps captured group numbers to the number they will occupy in
+      // the output or to -1 if that has not been determined, or to
+      // undefined if they need not be capturing in the output.
+      var capturedGroups = [];
+  
+      // Walk over and identify back references to build the capturedGroups
+      // mapping.
+      for (var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          // groups are 1-indexed, so max group index is count of '('
+          ++groupIndex;
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue) {
+            if (decimalValue <= groupIndex) {
+              capturedGroups[decimalValue] = -1;
+            } else {
+              // Replace with an unambiguous escape sequence so that
+              // an octal escape sequence does not turn into a backreference
+              // to a capturing group from an earlier regex.
+              parts[i] = encodeEscape(decimalValue);
+            }
+          }
+        }
+      }
+  
+      // Renumber groups and reduce capturing groups to non-capturing groups
+      // where possible.
+      for (var i = 1; i < capturedGroups.length; ++i) {
+        if (-1 === capturedGroups[i]) {
+          capturedGroups[i] = ++capturedGroupIndex;
+        }
+      }
+      for (var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          ++groupIndex;
+          if (!capturedGroups[groupIndex]) {
+            parts[i] = '(?:';
+          }
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue && decimalValue <= groupIndex) {
+            parts[i] = '\\' + capturedGroups[decimalValue];
+          }
+        }
+      }
+  
+      // Remove any prefix anchors so that the output will match anywhere.
+      // ^^ really does mean an anchored match though.
+      for (var i = 0; i < n; ++i) {
+        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
+      }
+  
+      // Expand letters to groups to handle mixing of case-sensitive and
+      // case-insensitive patterns if necessary.
+      if (regex.ignoreCase && needToFoldCase) {
+        for (var i = 0; i < n; ++i) {
+          var p = parts[i];
+          var ch0 = p.charAt(0);
+          if (p.length >= 2 && ch0 === '[') {
+            parts[i] = caseFoldCharset(p);
+          } else if (ch0 !== '\\') {
+            // TODO: handle letters in numeric escapes.
+            parts[i] = p.replace(
+                /[a-zA-Z]/g,
+                function (ch) {
+                  var cc = ch.charCodeAt(0);
+                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
+                });
+          }
+        }
+      }
+  
+      return parts.join('');
+    }
+  
+    var rewritten = [];
+    for (var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.global || regex.multiline) { throw new Error('' + regex); }
+      rewritten.push(
+          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
+    }
+  
+    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
+  }
+
+  /**
+   * Split markup into a string of source code and an array mapping ranges in
+   * that string to the text nodes in which they appear.
+   *
+   * <p>
+   * The HTML DOM structure:</p>
+   * <pre>
+   * (Element   "p"
+   *   (Element "b"
+   *     (Text  "print "))       ; #1
+   *   (Text    "'Hello '")      ; #2
+   *   (Element "br")            ; #3
+   *   (Text    "  + 'World';")) ; #4
+   * </pre>
+   * <p>
+   * corresponds to the HTML
+   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
+   *
+   * <p>
+   * It will produce the output:</p>
+   * <pre>
+   * {
+   *   sourceCode: "print 'Hello '\n  + 'World';",
+   *   //                     1          2
+   *   //           012345678901234 5678901234567
+   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
+   * }
+   * </pre>
+   * <p>
+   * where #1 is a reference to the {@code "print "} text node above, and so
+   * on for the other text nodes.
+   * </p>
+   *
+   * <p>
+   * The {@code} spans array is an array of pairs.  Even elements are the start
+   * indices of substrings, and odd elements are the text nodes (or BR elements)
+   * that contain the text for those substrings.
+   * Substrings continue until the next index or the end of the source.
+   * </p>
+   *
+   * @param {Node} node an HTML DOM subtree containing source-code.
+   * @param {boolean} isPreformatted true if white-space in text nodes should
+   *    be considered significant.
+   * @return {Object} source code and the text nodes in which they occur.
+   */
+  function extractSourceSpans(node, isPreformatted) {
+    var nocode = /(?:^|\s)nocode(?:\s|$)/;
+  
+    var chunks = [];
+    var length = 0;
+    var spans = [];
+    var k = 0;
+  
+    function walk(node) {
+      var type = node.nodeType;
+      if (type == 1) {  // Element
+        if (nocode.test(node.className)) { return; }
+        for (var child = node.firstChild; child; child = child.nextSibling) {
+          walk(child);
+        }
+        var nodeName = node.nodeName.toLowerCase();
+        if ('br' === nodeName || 'li' === nodeName) {
+          chunks[k] = '\n';
+          spans[k << 1] = length++;
+          spans[(k++ << 1) | 1] = node;
+        }
+      } else if (type == 3 || type == 4) {  // Text
+        var text = node.nodeValue;
+        if (text.length) {
+          if (!isPreformatted) {
+            text = text.replace(/[ \t\r\n]+/g, ' ');
+          } else {
+            text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
+          }
+          // 清除代码尾部的空行
+          text = text.replace(/\n[\s\t]+$/g,"");
+          // TODO: handle tabs here?
+          chunks[k] = text;
+          spans[k << 1] = length;
+          length += text.length;
+          spans[(k++ << 1) | 1] = node;
+        }
+      }
+    }
+  
+    walk(node);
+  
+    return {
+      sourceCode: chunks.join('').replace(/\n$/, ''),
+      spans: spans
+    };
+  }
+
+  /**
+   * Apply the given language handler to sourceCode and add the resulting
+   * decorations to out.
+   * @param {number} basePos the index of sourceCode within the chunk of source
+   *    whose decorations are already present on out.
+   */
+  function appendDecorations(basePos, sourceCode, langHandler, out) {
+    if (!sourceCode) { return; }
+    var job = {
+      sourceCode: sourceCode,
+      basePos: basePos
+    };
+    langHandler(job);
+    out.push.apply(out, job.decorations);
+  }
+
+  var notWs = /\S/;
+
+  /**
+   * Given an element, if it contains only one child element and any text nodes
+   * it contains contain only space characters, return the sole child element.
+   * Otherwise returns undefined.
+   * <p>
+   * This is meant to return the CODE element in {@code <pre><code ...>} when
+   * there is a single child element that contains all the non-space textual
+   * content, but not to return anything where there are multiple child elements
+   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
+   * is textual content.
+   */
+  function childContentWrapper(element) {
+    var wrapper = undefined;
+    for (var c = element.firstChild; c; c = c.nextSibling) {
+      var type = c.nodeType;
+      wrapper = (type === 1)  // Element Node
+          ? (wrapper ? element : c)
+          : (type === 3)  // Text Node
+          ? (notWs.test(c.nodeValue) ? element : wrapper)
+          : wrapper;
+    }
+    return wrapper === element ? undefined : wrapper;
+  }
+
+  /** Given triples of [style, pattern, context] returns a lexing function,
+    * The lexing function interprets the patterns to find token boundaries and
+    * returns a decoration list of the form
+    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
+    * where index_n is an index into the sourceCode, and style_n is a style
+    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
+    * all characters in sourceCode[index_n-1:index_n].
+    *
+    * The stylePatterns is a list whose elements have the form
+    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
+    *
+    * Style is a style constant like PR_PLAIN, or can be a string of the
+    * form 'lang-FOO', where FOO is a language extension describing the
+    * language of the portion of the token in $1 after pattern executes.
+    * E.g., if style is 'lang-lisp', and group 1 contains the text
+    * '(hello (world))', then that portion of the token will be passed to the
+    * registered lisp handler for formatting.
+    * The text before and after group 1 will be restyled using this decorator
+    * so decorators should take care that this doesn't result in infinite
+    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
+    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
+    * '<script>foo()<\/script>', which would cause the current decorator to
+    * be called with '<script>' which would not match the same rule since
+    * group 1 must not be empty, so it would be instead styled as PR_TAG by
+    * the generic tag rule.  The handler registered for the 'js' extension would
+    * then be called with 'foo()', and finally, the current decorator would
+    * be called with '<\/script>' which would not match the original rule and
+    * so the generic tag rule would identify it as a tag.
+    *
+    * Pattern must only match prefixes, and if it matches a prefix, then that
+    * match is considered a token with the same style.
+    *
+    * Context is applied to the last non-whitespace, non-comment token
+    * recognized.
+    *
+    * Shortcut is an optional string of characters, any of which, if the first
+    * character, gurantee that this pattern and only this pattern matches.
+    *
+    * @param {Array} shortcutStylePatterns patterns that always start with
+    *   a known character.  Must have a shortcut string.
+    * @param {Array} fallthroughStylePatterns patterns that will be tried in
+    *   order if the shortcut ones fail.  May have shortcuts.
+    *
+    * @return {function (Object)} a
+    *   function that takes source code and returns a list of decorations.
+    */
+  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
+    var shortcuts = {};
+    var tokenizer;
+    (function () {
+      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
+      var allRegexs = [];
+      var regexKeys = {};
+      for (var i = 0, n = allPatterns.length; i < n; ++i) {
+        var patternParts = allPatterns[i];
+        var shortcutChars = patternParts[3];
+        if (shortcutChars) {
+          for (var c = shortcutChars.length; --c >= 0;) {
+            shortcuts[shortcutChars.charAt(c)] = patternParts;
+          }
+        }
+        var regex = patternParts[1];
+        var k = '' + regex;
+        if (!regexKeys.hasOwnProperty(k)) {
+          allRegexs.push(regex);
+          regexKeys[k] = null;
+        }
+      }
+      allRegexs.push(/[\0-\uffff]/);
+      tokenizer = combinePrefixPatterns(allRegexs);
+    })();
+
+    var nPatterns = fallthroughStylePatterns.length;
+
+    /**
+     * Lexes job.sourceCode and produces an output array job.decorations of
+     * style classes preceded by the position at which they start in
+     * job.sourceCode in order.
+     *
+     * @param {Object} job an object like <pre>{
+     *    sourceCode: {string} sourceText plain text,
+     *    basePos: {int} position of job.sourceCode in the larger chunk of
+     *        sourceCode.
+     * }</pre>
+     */
+    var decorate = function (job) {
+      var sourceCode = job.sourceCode, basePos = job.basePos;
+      /** Even entries are positions in source in ascending order.  Odd enties
+        * are style markers (e.g., PR_COMMENT) that run from that position until
+        * the end.
+        * @type {Array.<number|string>}
+        */
+      var decorations = [basePos, PR_PLAIN];
+      var pos = 0;  // index into sourceCode
+      var tokens = sourceCode.match(tokenizer) || [];
+      var styleCache = {};
+
+      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
+        var token = tokens[ti];
+        var style = styleCache[token];
+        var match = void 0;
+
+        var isEmbedded;
+        if (typeof style === 'string') {
+          isEmbedded = false;
+        } else {
+          var patternParts = shortcuts[token.charAt(0)];
+          if (patternParts) {
+            match = token.match(patternParts[1]);
+            style = patternParts[0];
+          } else {
+            for (var i = 0; i < nPatterns; ++i) {
+              patternParts = fallthroughStylePatterns[i];
+              match = token.match(patternParts[1]);
+              if (match) {
+                style = patternParts[0];
+                break;
+              }
+            }
+
+            if (!match) {  // make sure that we make progress
+              style = PR_PLAIN;
+            }
+          }
+
+          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
+          if (isEmbedded && !(match && typeof match[1] === 'string')) {
+            isEmbedded = false;
+            style = PR_SOURCE;
+          }
+
+          if (!isEmbedded) { styleCache[token] = style; }
+        }
+
+        var tokenStart = pos;
+        pos += token.length;
+
+        if (!isEmbedded) {
+          decorations.push(basePos + tokenStart, style);
+        } else {  // Treat group 1 as an embedded block of source code.
+          var embeddedSource = match[1];
+          var embeddedSourceStart = token.indexOf(embeddedSource);
+          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
+          if (match[2]) {
+            // If embeddedSource can be blank, then it would match at the
+            // beginning which would cause us to infinitely recurse on the
+            // entire token, so we catch the right context in match[2].
+            embeddedSourceEnd = token.length - match[2].length;
+            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
+          }
+          var lang = style.substring(5);
+          // Decorate the left of the embedded source
+          appendDecorations(
+              basePos + tokenStart,
+              token.substring(0, embeddedSourceStart),
+              decorate, decorations);
+          // Decorate the embedded source
+          appendDecorations(
+              basePos + tokenStart + embeddedSourceStart,
+              embeddedSource,
+              langHandlerForExtension(lang, embeddedSource),
+              decorations);
+          // Decorate the right of the embedded section
+          appendDecorations(
+              basePos + tokenStart + embeddedSourceEnd,
+              token.substring(embeddedSourceEnd),
+              decorate, decorations);
+        }
+      }
+      job.decorations = decorations;
+    };
+    return decorate;
+  }
+
+  /** returns a function that produces a list of decorations from source text.
+    *
+    * This code treats ", ', and ` as string delimiters, and \ as a string
+    * escape.  It does not recognize perl's qq() style strings.
+    * It has no special handling for double delimiter escapes as in basic, or
+    * the tripled delimiters used in python, but should work on those regardless
+    * although in those cases a single string literal may be broken up into
+    * multiple adjacent string literals.
+    *
+    * It recognizes C, C++, and shell style comments.
+    *
+    * @param {Object} options a set of optional parameters.
+    * @return {function (Object)} a function that examines the source code
+    *     in the input job and builds the decoration list.
+    */
+  function sourceDecorator(options) {
+    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
+    if (options['tripleQuotedStrings']) {
+      // '''multi-line-string''', 'single-line-string', and double-quoted
+      shortcutStylePatterns.push(
+          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+           null, '\'"']);
+    } else if (options['multiLineStrings']) {
+      // 'multi-line-string', "multi-line-string"
+      shortcutStylePatterns.push(
+          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+           null, '\'"`']);
+    } else {
+      // 'single-line-string', "single-line-string"
+      shortcutStylePatterns.push(
+          [PR_STRING,
+           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+           null, '"\'']);
+    }
+    if (options['verbatimStrings']) {
+      // verbatim-string-literal production from the C# grammar.  See issue 93.
+      fallthroughStylePatterns.push(
+          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
+    }
+    var hc = options['hashComments'];
+    if (hc) {
+      if (options['cStyleComments']) {
+        if (hc > 1) {  // multiline hash comments
+          shortcutStylePatterns.push(
+              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
+        } else {
+          // Stop C preprocessor declarations at an unclosed open comment
+          shortcutStylePatterns.push(
+              [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
+               null, '#']);
+        }
+        // #include <stdio.h>
+        fallthroughStylePatterns.push(
+            [PR_STRING,
+             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
+             null]);
+      } else {
+        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
+      }
+    }
+    if (options['cStyleComments']) {
+      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
+      fallthroughStylePatterns.push(
+          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
+    }
+    var regexLiterals = options['regexLiterals'];
+    if (regexLiterals) {
+      /**
+       * @const
+       */
+      var regexExcls = regexLiterals > 1
+        ? ''  // Multiline regex literals
+        : '\n\r';
+      /**
+       * @const
+       */
+      var regexAny = regexExcls ? '.' : '[\\S\\s]';
+      /**
+       * @const
+       */
+      var REGEX_LITERAL = (
+          // A regular expression literal starts with a slash that is
+          // not followed by * or / so that it is not confused with
+          // comments.
+          '/(?=[^/*' + regexExcls + '])'
+          // and then contains any number of raw characters,
+          + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
+          // escape sequences (\x5C),
+          +    '|\\x5C' + regexAny
+          // or non-nesting character sets (\x5B\x5D);
+          +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
+          +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
+          // finally closed by a /.
+          + '/');
+      fallthroughStylePatterns.push(
+          ['lang-regex',
+           RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
+           ]);
+    }
+
+    var types = options['types'];
+    if (types) {
+      fallthroughStylePatterns.push([PR_TYPE, types]);
+    }
+
+    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
+    if (keywords.length) {
+      fallthroughStylePatterns.push(
+          [PR_KEYWORD,
+           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
+           null]);
+    }
+
+    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
+
+    var punctuation =
+      // The Bash man page says
+
+      // A word is a sequence of characters considered as a single
+      // unit by GRUB. Words are separated by metacharacters,
+      // which are the following plus space, tab, and newline: { }
+      // | & $ ; < >
+      // ...
+      
+      // A word beginning with # causes that word and all remaining
+      // characters on that line to be ignored.
+
+      // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
+      // comment but empirically
+      // $ echo {#}
+      // {#}
+      // $ echo \$#
+      // $#
+      // $ echo }#
+      // }#
+
+      // so /(?:^|[|&;<>\s])/ is more appropriate.
+
+      // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
+      // suggests that this definition is compatible with a
+      // default mode that tries to use a single token definition
+      // to recognize both bash/python style comments and C
+      // preprocessor directives.
+
+      // This definition of punctuation does not include # in the list of
+      // follow-on exclusions, so # will not be broken before if preceeded
+      // by a punctuation character.  We could try to exclude # after
+      // [|&;<>] but that doesn't seem to cause many major problems.
+      // If that does turn out to be a problem, we should change the below
+      // when hc is truthy to include # in the run of punctuation characters
+      // only when not followint [|&;<>].
+      '^.[^\\s\\w.$@\'"`/\\\\]*';
+    if (options['regexLiterals']) {
+      punctuation += '(?!\s*\/)';
+    }
+
+    fallthroughStylePatterns.push(
+        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
+        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
+        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
+        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
+        [PR_LITERAL,
+         new RegExp(
+             '^(?:'
+             // A hex number
+             + '0x[a-f0-9]+'
+             // or an octal or decimal number,
+             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+             // possibly in scientific notation
+             + '(?:e[+\\-]?\\d+)?'
+             + ')'
+             // with an optional modifier like UL for unsigned long
+             + '[a-z]*', 'i'),
+         null, '0123456789'],
+        // Don't treat escaped quotes in bash as starting strings.
+        // See issue 144.
+        [PR_PLAIN,       /^\\[\s\S]?/, null],
+        [PR_PUNCTUATION, new RegExp(punctuation), null]);
+
+    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
+  }
+
+  var decorateSource = sourceDecorator({
+        'keywords': ALL_KEYWORDS,
+        'hashComments': true,
+        'cStyleComments': true,
+        'multiLineStrings': true,
+        'regexLiterals': true
+      });
+
+  /**
+   * Given a DOM subtree, wraps it in a list, and puts each line into its own
+   * list item.
+   *
+   * @param {Node} node modified in place.  Its content is pulled into an
+   *     HTMLOListElement, and each line is moved into a separate list item.
+   *     This requires cloning elements, so the input might not have unique
+   *     IDs after numbering.
+   * @param {boolean} isPreformatted true iff white-space in text nodes should
+   *     be treated as significant.
+   */
+  function numberLines(node, opt_startLineNum, isPreformatted) {
+    var nocode = /(?:^|\s)nocode(?:\s|$)/;
+    var lineBreak = /\r\n?|\n/;
+    var invalidTail = /^[\s\t]+$/;
+  
+    var document = node.ownerDocument;
+  
+    var li = document.createElement('li');
+    while (node.firstChild) {
+      li.appendChild(node.firstChild);
+    }
+    // An array of lines.  We split below, so this is initialized to one
+    // un-split line.
+    var listItems = [li];
+  
+    function walk(node) {
+      var type = node.nodeType;
+      if (type == 1 && !nocode.test(node.className)) {  // Element
+        if ('br' === node.nodeName) {
+          breakAfter(node);
+          // Discard the <BR> since it is now flush against a </LI>.
+          if (node.parentNode) {
+            node.parentNode.removeChild(node);
+          }
+        } else {
+          for (var child = node.firstChild; child; child = child.nextSibling) {
+            walk(child);
+          }
+        }
+      } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
+        var text = node.nodeValue;
+        var match = text.match(lineBreak);
+        if (match) {
+          var firstLine = text.substring(0, match.index);
+          node.nodeValue = firstLine;
+          var tail = text.substring(match.index + match[0].length);
+          if (tail && !invalidTail.test(tail) ) {	// 清除代码尾部的空行, org: if (tail) {
+            var parent = node.parentNode;
+            parent.insertBefore(
+              document.createTextNode(tail), node.nextSibling);
+          }
+          breakAfter(node);
+          if (!firstLine) {
+            // Don't leave blank text nodes in the DOM.
+            node.parentNode.removeChild(node);
+          }
+        }
+      }
+    }
+  
+    // Split a line after the given node.
+    function breakAfter(lineEndNode) {
+      // If there's nothing to the right, then we can skip ending the line
+      // here, and move root-wards since splitting just before an end-tag
+      // would require us to create a bunch of empty copies.
+      while (!lineEndNode.nextSibling) {
+        lineEndNode = lineEndNode.parentNode;
+        if (!lineEndNode) { return; }
+      }
+  
+      function breakLeftOf(limit, copy) {
+        // Clone shallowly if this node needs to be on both sides of the break.
+        var rightSide = copy ? limit.cloneNode(false) : limit;
+        var parent = limit.parentNode;
+        if (parent) {
+          // We clone the parent chain.
+          // This helps us resurrect important styling elements that cross lines.
+          // E.g. in <i>Foo<br>Bar</i>
+          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
+          var parentClone = breakLeftOf(parent, 1);
+          // Move the clone and everything to the right of the original
+          // onto the cloned parent.
+          var next = limit.nextSibling;
+          parentClone.appendChild(rightSide);
+          for (var sibling = next; sibling; sibling = next) {
+            next = sibling.nextSibling;
+            parentClone.appendChild(sibling);
+          }
+        }
+        return rightSide;
+      }
+  
+      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
+  
+      // Walk the parent chain until we reach an unattached LI.
+      for (var parent;
+           // Check nodeType since IE invents document fragments.
+           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
+        copiedListItem = parent;
+      }
+      // Put it on the list of lines for later processing.
+      listItems.push(copiedListItem);
+    }
+  
+    // Split lines while there are lines left to split.
+    for (var i = 0;  // Number of lines that have been split so far.
+         i < listItems.length;  // length updated by breakAfter calls.
+         ++i) {
+      walk(listItems[i]);
+    }
+  
+    // Make sure numeric indices show correctly.
+    if (opt_startLineNum === (opt_startLineNum|0)) {
+      listItems[0].setAttribute('value', opt_startLineNum);
+    }
+  
+    var ol = document.createElement('ol');
+    ol.className = 'linenums';
+    var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
+    for (var i = 0, n = listItems.length; i < n; ++i) {
+      li = listItems[i];
+      // Stick a class on the LIs so that stylesheets can
+      // color odd/even rows, or any other row pattern that
+      // is co-prime with 10.
+      li.className = 'L' + ((i + offset) % 10);
+      if (!li.firstChild) {
+        li.appendChild(document.createTextNode('\xA0'));
+      }
+      ol.appendChild(li);
+    }
+  
+    node.appendChild(ol);
+  }
+  /**
+   * Breaks {@code job.sourceCode} around style boundaries in
+   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
+   * @param {Object} job like <pre>{
+   *    sourceCode: {string} source as plain text,
+   *    sourceNode: {HTMLElement} the element containing the source,
+   *    spans: {Array.<number|Node>} alternating span start indices into source
+   *       and the text node or element (e.g. {@code <BR>}) corresponding to that
+   *       span.
+   *    decorations: {Array.<number|string} an array of style classes preceded
+   *       by the position at which they start in job.sourceCode in order
+   * }</pre>
+   * @private
+   */
+  function recombineTagsAndDecorations(job) {
+    var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
+    isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
+    var newlineRe = /\n/g;
+  
+    var source = job.sourceCode;
+    var sourceLength = source.length;
+    // Index into source after the last code-unit recombined.
+    var sourceIndex = 0;
+  
+    var spans = job.spans;
+    var nSpans = spans.length;
+    // Index into spans after the last span which ends at or before sourceIndex.
+    var spanIndex = 0;
+  
+    var decorations = job.decorations;
+    var nDecorations = decorations.length;
+    // Index into decorations after the last decoration which ends at or before
+    // sourceIndex.
+    var decorationIndex = 0;
+  
+    // Remove all zero-length decorations.
+    decorations[nDecorations] = sourceLength;
+    var decPos, i;
+    for (i = decPos = 0; i < nDecorations;) {
+      if (decorations[i] !== decorations[i + 2]) {
+        decorations[decPos++] = decorations[i++];
+        decorations[decPos++] = decorations[i++];
+      } else {
+        i += 2;
+      }
+    }
+    nDecorations = decPos;
+  
+    // Simplify decorations.
+    for (i = decPos = 0; i < nDecorations;) {
+      var startPos = decorations[i];
+      // Conflate all adjacent decorations that use the same style.
+      var startDec = decorations[i + 1];
+      var end = i + 2;
+      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
+        end += 2;
+      }
+      decorations[decPos++] = startPos;
+      decorations[decPos++] = startDec;
+      i = end;
+    }
+  
+    nDecorations = decorations.length = decPos;
+  
+    var sourceNode = job.sourceNode;
+    var oldDisplay;
+    if (sourceNode) {
+      oldDisplay = sourceNode.style.display;
+      sourceNode.style.display = 'none';
+    }
+    try {
+      var decoration = null;
+      while (spanIndex < nSpans) {
+        var spanStart = spans[spanIndex];
+        var spanEnd = spans[spanIndex + 2] || sourceLength;
+  
+        var decEnd = decorations[decorationIndex + 2] || sourceLength;
+  
+        var end = Math.min(spanEnd, decEnd);
+  
+        var textNode = spans[spanIndex + 1];
+        var styledText;
+        if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
+            // Don't introduce spans around empty text nodes.
+            && (styledText = source.substring(sourceIndex, end))) {
+          // This may seem bizarre, and it is.  Emitting LF on IE causes the
+          // code to display with spaces instead of line breaks.
+          // Emitting Windows standard issue linebreaks (CRLF) causes a blank
+          // space to appear at the beginning of every line but the first.
+          // Emitting an old Mac OS 9 line separator makes everything spiffy.
+          if (isIE8OrEarlier) {
+            styledText = styledText.replace(newlineRe, '\r');
+          }
+          textNode.nodeValue = styledText;
+          var document = textNode.ownerDocument;
+          var span = document.createElement('span');
+          span.className = decorations[decorationIndex + 1];
+          var parentNode = textNode.parentNode;
+          parentNode.replaceChild(span, textNode);
+          span.appendChild(textNode);
+          if (sourceIndex < spanEnd) {  // Split off a text node.
+            spans[spanIndex + 1] = textNode
+                // TODO: Possibly optimize by using '' if there's no flicker.
+                = document.createTextNode(source.substring(end, spanEnd));
+            parentNode.insertBefore(textNode, span.nextSibling);
+          }
+        }
+  
+        sourceIndex = end;
+  
+        if (sourceIndex >= spanEnd) {
+          spanIndex += 2;
+        }
+        if (sourceIndex >= decEnd) {
+          decorationIndex += 2;
+        }
+      }
+    } finally {
+      if (sourceNode) {
+        sourceNode.style.display = oldDisplay;
+      }
+    }
+  }
+
+  /** Maps language-specific file extensions to handlers. */
+  var langHandlerRegistry = {};
+  /** Register a language handler for the given file extensions.
+    * @param {function (Object)} handler a function from source code to a list
+    *      of decorations.  Takes a single argument job which describes the
+    *      state of the computation.   The single parameter has the form
+    *      {@code {
+    *        sourceCode: {string} as plain text.
+    *        decorations: {Array.<number|string>} an array of style classes
+    *                     preceded by the position at which they start in
+    *                     job.sourceCode in order.
+    *                     The language handler should assigned this field.
+    *        basePos: {int} the position of source in the larger source chunk.
+    *                 All positions in the output decorations array are relative
+    *                 to the larger source chunk.
+    *      } }
+    * @param {Array.<string>} fileExtensions
+    */
+  function registerLangHandler(handler, fileExtensions) {
+    for (var i = fileExtensions.length; --i >= 0;) {
+      var ext = fileExtensions[i];
+      if (!langHandlerRegistry.hasOwnProperty(ext)) {
+        langHandlerRegistry[ext] = handler;
+      } else if (win['console']) {
+        console['warn']('cannot override language handler %s', ext);
+      }
+    }
+  }
+  function langHandlerForExtension(extension, source) {
+    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
+      // Treat it as markup if the first non whitespace character is a < and
+      // the last non-whitespace character is a >.
+      extension = /^\s*</.test(source)
+          ? 'default-markup'
+          : 'default-code';
+    }
+    return langHandlerRegistry[extension];
+  }
+  registerLangHandler(decorateSource, ['default-code']);
+  registerLangHandler(
+      createSimpleLexer(
+          [],
+          [
+           [PR_PLAIN,       /^[^<?]+/],
+           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
+           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
+           // Unescaped content in an unknown language
+           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
+           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
+           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
+           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
+           // Unescaped content in javascript.  (Or possibly vbscript).
+           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
+           // Contains unescaped stylesheet content
+           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
+           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
+          ]),
+      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
+  registerLangHandler(
+      createSimpleLexer(
+          [
+           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
+           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
+           ],
+          [
+           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
+           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
+           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
+           [PR_PUNCTUATION,  /^[=<>\/]+/],
+           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
+           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
+           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
+           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
+           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
+           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
+           ]),
+      ['in.tag']);
+  registerLangHandler(
+      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
+  registerLangHandler(sourceDecorator({
+          'keywords': CPP_KEYWORDS,
+          'hashComments': true,
+          'cStyleComments': true,
+          'types': C_TYPES
+        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
+  registerLangHandler(sourceDecorator({
+          'keywords': 'null,true,false'
+        }), ['json']);
+  registerLangHandler(sourceDecorator({
+          'keywords': CSHARP_KEYWORDS,
+          'hashComments': true,
+          'cStyleComments': true,
+          'verbatimStrings': true,
+          'types': C_TYPES
+        }), ['cs']);
+  registerLangHandler(sourceDecorator({
+          'keywords': JAVA_KEYWORDS,
+          'cStyleComments': true
+        }), ['java']);
+  registerLangHandler(sourceDecorator({
+          'keywords': SH_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true
+        }), ['bash', 'bsh', 'csh', 'sh']);
+  registerLangHandler(sourceDecorator({
+          'keywords': PYTHON_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'tripleQuotedStrings': true
+        }), ['cv', 'py', 'python']);
+  registerLangHandler(sourceDecorator({
+          'keywords': PERL_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'regexLiterals': 2  // multiline regex literals
+        }), ['perl', 'pl', 'pm']);
+  registerLangHandler(sourceDecorator({
+          'keywords': RUBY_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'regexLiterals': true
+        }), ['rb', 'ruby']);
+  registerLangHandler(sourceDecorator({
+          'keywords': JSCRIPT_KEYWORDS,
+          'cStyleComments': true,
+          'regexLiterals': true
+        }), ['javascript', 'js']);
+  registerLangHandler(sourceDecorator({
+          'keywords': COFFEE_KEYWORDS,
+          'hashComments': 3,  // ### style block comments
+          'cStyleComments': true,
+          'multilineStrings': true,
+          'tripleQuotedStrings': true,
+          'regexLiterals': true
+        }), ['coffee']);
+  registerLangHandler(sourceDecorator({
+          'keywords': RUST_KEYWORDS,
+          'cStyleComments': true,
+          'multilineStrings': true
+        }), ['rc', 'rs', 'rust']);
+  registerLangHandler(
+      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
+
+  function applyDecorator(job) {
+    var opt_langExtension = job.langExtension;
+
+    try {
+      // Extract tags, and convert the source code to plain text.
+      var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
+      /** Plain text. @type {string} */
+      var source = sourceAndSpans.sourceCode;
+      job.sourceCode = source;
+      job.spans = sourceAndSpans.spans;
+      job.basePos = 0;
+
+      // Apply the appropriate language handler
+      langHandlerForExtension(opt_langExtension, source)(job);
+
+      // Integrate the decorations and tags back into the source code,
+      // modifying the sourceNode in place.
+      recombineTagsAndDecorations(job);
+    } catch (e) {
+      if (win['console']) {
+        console['log'](e && e['stack'] || e);
+      }
+    }
+  }
+
+  /**
+   * Pretty print a chunk of code.
+   * @param sourceCodeHtml {string} The HTML to pretty print.
+   * @param opt_langExtension {string} The language name to use.
+   *     Typically, a filename extension like 'cpp' or 'java'.
+   * @param opt_numberLines {number|boolean} True to number lines,
+   *     or the 1-indexed number of the first line in sourceCodeHtml.
+   */
+  function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
+    var container = document.createElement('div');
+    // This could cause images to load and onload listeners to fire.
+    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
+    // We assume that the inner HTML is from a trusted source.
+    // The pre-tag is required for IE8 which strips newlines from innerHTML
+    // when it is injected into a <pre> tag.
+    // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
+    // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
+    container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
+    container = container.firstChild;
+    if (opt_numberLines) {
+      numberLines(container, opt_numberLines, true);
+    }
+
+    var job = {
+      langExtension: opt_langExtension,
+      numberLines: opt_numberLines,
+      sourceNode: container,
+      pre: 1
+    };
+    applyDecorator(job);
+    return container.innerHTML;
+  }
+
+   /**
+    * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+    * {@code class=prettyprint} and prettify them.
+    *
+    * @param {Function} opt_whenDone called when prettifying is done.
+    * @param {HTMLElement|HTMLDocument} opt_root an element or document
+    *   containing all the elements to pretty print.
+    *   Defaults to {@code document.body}.
+    */
+  function $prettyPrint(opt_whenDone, opt_root) {
+    var root = opt_root || document.body;
+    var doc = root.ownerDocument || document;
+    function byTagName(tn) { return root.getElementsByTagName(tn); }
+    // fetch a list of nodes to rewrite
+    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
+    var elements = [];
+    for (var i = 0; i < codeSegments.length; ++i) {
+      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
+        elements.push(codeSegments[i][j]);
+      }
+    }
+    codeSegments = null;
+
+    var clock = Date;
+    if (!clock['now']) {
+      clock = { 'now': function () { return +(new Date); } };
+    }
+
+    // The loop is broken into a series of continuations to make sure that we
+    // don't make the browser unresponsive when rewriting a large page.
+    var k = 0;
+    var prettyPrintingJob;
+
+    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
+    var prettyPrintRe = /\bprettyprint\b/;
+    var prettyPrintedRe = /\bprettyprinted\b/;
+    var preformattedTagNameRe = /pre|xmp/i;
+    var codeRe = /^code$/i;
+    var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
+    var EMPTY = {};
+
+    function doWork() {
+      var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
+                     clock['now']() + 250 /* ms */ :
+                     Infinity);
+      for (; k < elements.length && clock['now']() < endTime; k++) {
+        var cs = elements[k];
+
+        // Look for a preceding comment like
+        // <?prettify lang="..." linenums="..."?>
+        var attrs = EMPTY;
+        {
+          for (var preceder = cs; (preceder = preceder.previousSibling);) {
+            var nt = preceder.nodeType;
+            // <?foo?> is parsed by HTML 5 to a comment node (8)
+            // like <!--?foo?-->, but in XML is a processing instruction
+            var value = (nt === 7 || nt === 8) && preceder.nodeValue;
+            if (value
+                ? !/^\??prettify\b/.test(value)
+                : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
+              // Skip over white-space text nodes but not others.
+              break;
+            }
+            if (value) {
+              attrs = {};
+              value.replace(
+                  /\b(\w+)=([\w:.%+-]+)/g,
+                function (_, name, value) { attrs[name] = value; });
+              break;
+            }
+          }
+        }
+
+        var className = cs.className;
+        if ((attrs !== EMPTY || prettyPrintRe.test(className))
+            // Don't redo this if we've already done it.
+            // This allows recalling pretty print to just prettyprint elements
+            // that have been added to the page since last call.
+            && !prettyPrintedRe.test(className)) {
+
+          // make sure this is not nested in an already prettified element
+          var nested = false;
+          for (var p = cs.parentNode; p; p = p.parentNode) {
+            var tn = p.tagName;
+            if (preCodeXmpRe.test(tn)
+                && p.className && prettyPrintRe.test(p.className)) {
+              nested = true;
+              break;
+            }
+          }
+          if (!nested) {
+            // Mark done.  If we fail to prettyprint for whatever reason,
+            // we shouldn't try again.
+            cs.className += ' prettyprinted';
+
+            // If the classes includes a language extensions, use it.
+            // Language extensions can be specified like
+            //     <pre class="prettyprint lang-cpp">
+            // the language extension "cpp" is used to find a language handler
+            // as passed to PR.registerLangHandler.
+            // HTML5 recommends that a language be specified using "language-"
+            // as the prefix instead.  Google Code Prettify supports both.
+            // http://dev.w3.org/html5/spec-author-view/the-code-element.html
+            var langExtension = attrs['lang'];
+            if (!langExtension) {
+              langExtension = className.match(langExtensionRe);
+              // Support <pre class="prettyprint"><code class="language-c">
+              var wrapper;
+              if (!langExtension && (wrapper = childContentWrapper(cs))
+                  && codeRe.test(wrapper.tagName)) {
+                langExtension = wrapper.className.match(langExtensionRe);
+              }
+
+              if (langExtension) { langExtension = langExtension[1]; }
+            }
+
+            var preformatted;
+            if (preformattedTagNameRe.test(cs.tagName)) {
+              preformatted = 1;
+            } else {
+              var currentStyle = cs['currentStyle'];
+              var defaultView = doc.defaultView;
+              var whitespace = (
+                  currentStyle
+                  ? currentStyle['whiteSpace']
+                  : (defaultView
+                     && defaultView.getComputedStyle)
+                  ? defaultView.getComputedStyle(cs, null)
+                  .getPropertyValue('white-space')
+                  : 0);
+              preformatted = whitespace
+                  && 'pre' === whitespace.substring(0, 3);
+            }
+
+            // Look for a class like linenums or linenums:<n> where <n> is the
+            // 1-indexed number of the first line.
+            var lineNums = attrs['linenums'];
+            if (!(lineNums = lineNums === 'true' || +lineNums)) {
+              lineNums = className.match(/\blinenums\b(?::(\d+))?/);
+              lineNums =
+                lineNums
+                ? lineNums[1] && lineNums[1].length
+                  ? +lineNums[1] : true
+                : false;
+            }
+            if (lineNums) { numberLines(cs, lineNums, preformatted); }
+
+            // do the pretty printing
+            prettyPrintingJob = {
+              langExtension: langExtension,
+              sourceNode: cs,
+              numberLines: lineNums,
+              pre: preformatted
+            };
+            applyDecorator(prettyPrintingJob);
+          }
+        }
+      }
+      if (k < elements.length) {
+        // finish up in a continuation
+        setTimeout(doWork, 250);
+      } else if ('function' === typeof opt_whenDone) {
+        opt_whenDone();
+      }
+    }
+
+    doWork();
+  }
+
+  /**
+   * Contains functions for creating and registering new language handlers.
+   * @type {Object}
+   */
+  var PR = win['PR'] = {
+        'createSimpleLexer': createSimpleLexer,
+        'registerLangHandler': registerLangHandler,
+        'sourceDecorator': sourceDecorator,
+        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
+        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
+        'PR_COMMENT': PR_COMMENT,
+        'PR_DECLARATION': PR_DECLARATION,
+        'PR_KEYWORD': PR_KEYWORD,
+        'PR_LITERAL': PR_LITERAL,
+        'PR_NOCODE': PR_NOCODE,
+        'PR_PLAIN': PR_PLAIN,
+        'PR_PUNCTUATION': PR_PUNCTUATION,
+        'PR_SOURCE': PR_SOURCE,
+        'PR_STRING': PR_STRING,
+        'PR_TAG': PR_TAG,
+        'PR_TYPE': PR_TYPE,
+        'prettyPrintOne':
+           IN_GLOBAL_SCOPE
+             ? (win['prettyPrintOne'] = $prettyPrintOne)
+             : (prettyPrintOne = $prettyPrintOne),
+        'prettyPrint': prettyPrint =
+           IN_GLOBAL_SCOPE
+             ? (win['prettyPrint'] = $prettyPrint)
+             : (prettyPrint = $prettyPrint)
+      };
+
+  // Make PR available via the Asynchronous Module Definition (AMD) API.
+  // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
+  // The Asynchronous Module Definition (AMD) API specifies a
+  // mechanism for defining modules such that the module and its
+  // dependencies can be asynchronously loaded.
+  // ...
+  // To allow a clear indicator that a global define function (as
+  // needed for script src browser loading) conforms to the AMD API,
+  // any global define function SHOULD have a property called "amd"
+  // whose value is an object. This helps avoid conflict with any
+  // other existing JavaScript code that could have defined a define()
+  // function that does not conform to the AMD API.
+  if (typeof define === "function" && define['amd']) {
+    define("google-code-prettify", [], function () {
+      return PR; 
+    });
+  }
+})();

+ 124 - 0
hello H5+/doc/res/prettify.sons.css

@@ -0,0 +1,124 @@
+/*
+ * Derived from einaros's Sons of Obsidian theme at
+ * http://studiostyl.es/schemes/son-of-obsidian by
+ * Alex Ford of CodeTunnel:
+ * http://CodeTunnel.com/blog/post/71/google-code-prettify-obsidian-theme
+ */
+
+.str
+{
+    color: #EC7600;
+}
+.kwd
+{
+    color: #93C763;
+}
+.com
+{
+    color: #66747B;
+}
+.typ
+{
+    color: #678CB1;
+}
+.lit
+{
+    color: #FACD22;
+}
+.pun
+{
+    color: #F1F2F3;
+}
+.pln
+{
+    color: #F1F2F3;
+}
+.tag
+{
+    color: #8AC763;
+}
+.atn
+{
+    color: #E0E2E4;
+}
+.atv
+{
+    color: #EC7600;
+}
+.dec
+{
+    color: purple;
+}
+pre.prettyprint
+{
+    border: 0px solid #888;
+}
+ol.linenums
+{
+    margin-top: 0;
+    margin-bottom: 0;
+}
+.prettyprint {
+    background: #000;
+    border-radius: 3px;
+    padding: 1em 0;
+    overflow-x: scroll;
+    -webkit-overflow-scrolling: touch;
+    /*white-space: pre-wrap;*//*css-3*/
+    /*word-wrap: break-word;*//*Internet Explorer 5.5+*/
+}
+li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9
+{
+    color: #555;
+    list-style-type: decimal;
+}
+/*li.L1, li.L3, li.L5, li.L7, li.L9 {
+    background: #222;
+}*/
+@media print
+{
+    .str
+    {
+        color: #060;
+    }
+    .kwd
+    {
+        color: #006;
+        font-weight: bold;
+    }
+    .com
+    {
+        color: #600;
+        font-style: italic;
+    }
+    .typ
+    {
+        color: #404;
+        font-weight: bold;
+    }
+    .lit
+    {
+        color: #044;
+    }
+    .pun
+    {
+        color: #440;
+    }
+    .pln
+    {
+        color: #000;
+    }
+    .tag
+    {
+        color: #006;
+        font-weight: bold;
+    }
+    .atn
+    {
+        color: #404;
+    }
+    .atv
+    {
+        color: #060;
+    }
+}

+ 320 - 0
hello H5+/doc/runtime.html

@@ -0,0 +1,320 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Runtime Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.runtime">runtime</a></h1>
+<p>Runtime模块管理运行环境,可用于获取当前运行环境信息、与其它程序进行通讯等。通过plus.runtime可获取运行环境管理对象。</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.runtime.appid">appid</a>: 当前应用的APPID</li>
+<li>
+<a href="#plus.runtime.arguments">arguments</a>: 第三方程序调用时传递给程序的参数</li>
+<li>
+<a href="#plus.runtime.channel">channel</a>: 应用的渠道标识</li>
+<li>
+<a href="#plus.runtime.launcher">launcher</a>: 应用启动来源</li>
+<li>
+<a href="#plus.runtime.origin">origin</a>: 应用安装来源</li>
+<li>
+<a href="#plus.runtime.version">version</a>: 客户端的版本名称</li>
+<li>
+<a href="#plus.runtime.versionCode">versionCode</a>: 客户端的版本号</li>
+<li>
+<a href="#plus.runtime.innerVersion">innerVersion</a>: 客户端5+运行环境的内部版本号</li>
+<li>
+<a href="#plus.runtime.uniVersion">uniVersion</a>: 客户端uni-app运行环境的版本号</li>
+<li>
+<a href="#plus.runtime.launchLoadedTime">launchLoadedTime</a>: 获取当前应用首页加载的时间</li>
+<li>
+<a href="#plus.runtime.processId">processId</a>: 获取当前应用的进程标识</li>
+<li>
+<a href="#plus.runtime.startupTime">startupTime</a>: 获取当前应用的启动时间戳</li>
+<li>
+<a href="#plus.runtime.isRecovery">isRecovery</a>: 应用是否由于内核崩溃自动恢复</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.runtime.getProperty">getProperty</a>: 获取指定APPID对应的应用信息</li>
+<li>
+<a href="#plus.runtime.install">install</a>: 安装应用</li>
+<li>
+<a href="#plus.runtime.quit">quit</a>: 退出应用</li>
+<li>
+<a href="#plus.runtime.restart">restart</a>: 重启当前的应用</li>
+<li>
+<a href="#plus.runtime.setBadgeNumber">setBadgeNumber</a>: 设置程序快捷方式图标上显示的角标数字</li>
+<li>
+<a href="#plus.runtime.openURL">openURL</a>: 调用第三方程序打开指定的URL</li>
+<li>
+<a href="#plus.runtime.openWeb">openWeb</a>: 使用内置Webview窗口打开URL</li>
+<li>
+<a href="#plus.runtime.openFile">openFile</a>: 调用第三方程序打开指定的文件</li>
+<li>
+<a href="#plus.runtime.processDirectPage">processDirectPage</a>: 处理直达页面链接参数</li>
+<li>
+<a href="#plus.runtime.launchApplication">launchApplication</a>: 调用第三方程序</li>
+<li>
+<a href="#plus.runtime.isApplicationExist">isApplicationExist</a>: 判断第三方程序是否已存在</li>
+<li>
+<a href="#plus.runtime.isCustomLaunchPath">isCustomLaunchPath</a>: 判断是否自定义应用启动页面加载地址</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.runtime.ApplicationInf">ApplicationInf</a>: JSON对象,打开第三方程序参数</li>
+<li>
+<a href="#plus.runtime.BadgeOptions">BadgeOptions</a>: JSON对象,应用角标显示需要的通知栏消息的参数</li>
+<li>
+<a href="#plus.runtime.OpenFileOptions">OpenFileOptions</a>: JSON对象,打开文件参数</li>
+<li>
+<a href="#plus.runtime.WidgetInfo">WidgetInfo</a>: JSON对象,应用信息</li>
+<li>
+<a href="#plus.runtime.WidgetOptions">WidgetOptions</a>: JSON对象,应用安装参数</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.runtime.InstallSuccessCallback">InstallSuccessCallback</a>: 安装应用成功回调函数</li>
+<li>
+<a href="#plus.runtime.InstallErrorCallback">InstallErrorCallback</a>: 安装应用失败回调函数</li>
+<li>
+<a href="#plus.runtime.GetPropertyCallBack">GetPropertyCallBack</a>: 获取应用属性成功回调函数</li>
+<li>
+<a href="#plus.runtime.OpenErrorCallback">OpenErrorCallback</a>: 打开本地文件或URL失败回调函数</li>
+<li>
+<a href="#plus.runtime.LaunchErrorCallback">LaunchErrorCallback</a>: 调用第三方程序失败回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Runtime": {
+		"description": "运行环境"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.runtime.ApplicationInf">ApplicationInf</a></h1>
+<p>JSON对象,打开第三方程序参数</p>
+<h2>属性:</h2>
+<ul>
+<li>pname: <em>(<font class="type">String</font>
+	类型
+)</em>第三方程序包名<br><p>仅Android平台支持,表示程序的包名,其它平台忽略此属性值。</p>
+</li>
+<li>action: <em>(<font class="type">String</font>
+	类型
+)</em>程序的操作行为<br><p>Android平台上与系统的action值一致;iOS平台为要调用程序的URLScheme格式字符串。</p>
+</li>
+<li>newTask: <em>(<font class="type">Boolean</font>
+	类型
+)</em>新任务模式标记<br><p>
+	可取值:
+		true-使用新任务模式标记(FLAG_ACTIVITY_NEW_TASK)启动应用;
+		false-不使用新任务模式标记(FLAG_ACTIVITY_NEW_TASK)启动应用。
+	默认值为true。
+	注意:由于5+应用配置的launchMode为singleTask,所以另一个5+应用通过plus.runtime.launchApplication启动时如果应用已经在后台运行则不会触发newintent事件,为了避免此问题需要将newTask参数值设置为false。
+						</p>
+</li>
+<li>extra: <em>(<font class="type">JSON</font>
+	类型
+)</em>调用程序的参数<br><p>仅Android平台支持,为JSON格式,用于传递给要调用程序的参数,如extra:{url:"http://www.html5plus.org"}。</p>
+</li>
+</ul>
+<h1><a name="plus.runtime.BadgeOptions">BadgeOptions</a></h1>
+<p>JSON对象,应用角标显示需要的通知栏消息的参数</p>
+<h2>属性:</h2>
+<ul>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>消息的标题<br><p>
+	默认值为应用的名称。
+						</p>
+</li>
+<li>content: <em>(<font class="type">String</font>
+	类型
+)</em>消息的内容<br><p>
+	默认值为“您有x条未读消息"”,其中x未设置的角标数字值。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.runtime.OpenFileOptions">OpenFileOptions</a></h1>
+<p>JSON对象,打开文件参数</p>
+<h2>属性:</h2>
+<ul>
+<li>pname: <em>(<font class="type">String</font>
+	类型
+)</em>优先使用的程序包名<br><p>
+	如果指定包名的程序已经安装,则调用其打开文件,若程序不支持打开文件则触发错误回调。
+	如果指定包名的程序未安装,则弹出系统支持打开此文件的列表,由用户选择程序打开。
+						</p>
+</li>
+<li>popover: <em>(<font class="type">json</font>
+	类型
+)</em>弹出系统选择程序界面指示区域<br><p>
+	JSON对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,左上坐标相对于容器webview的位置。仅在iPad设备平台有效。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.runtime.WidgetInfo">WidgetInfo</a></h1>
+<p>JSON对象,应用信息</p>
+<h2>属性:</h2>
+<ul>
+<li>appid: <em>(<font class="type">String</font>
+	类型
+)</em>应用的APPID<br><p>
+	对应manifest.json中的id字段值。
+						</p>
+</li>
+<li>version: <em>(<font class="type">String</font>
+	类型
+)</em>应用的版本名称<br><p>
+	对应manifest.json中的version-&gt;name字段值。
+						</p>
+</li>
+<li>versionCode: <em>(<font class="type">String</font>
+	类型
+)</em>应用的版本号<br><p>
+	对应manifest.json中的version-&gt;code字段值。
+						</p>
+</li>
+<li>name: <em>(<font class="type">String</font>
+	类型
+)</em>应用的名称<br><p>
+	对应manifest.json中的name字段值。
+						</p>
+</li>
+<li>description: <em>(<font class="type">String</font>
+	类型
+)</em>应用描述信息<br><p>
+	对应manifest.json中的description字段值。
+						</p>
+</li>
+<li>author: <em>(<font class="type">String</font>
+	类型
+)</em>应用描述信息<br><p>
+	对应manifest.json中的developer-&gt;name字段值。
+						</p>
+</li>
+<li>email: <em>(<font class="type">String</font>
+	类型
+)</em>开发者邮箱地址<br><p>
+	对应manifest.json中的developer-&gt;email字段值。
+						</p>
+</li>
+<li>features: <em>(<font class="type">String[]</font>
+	类型
+)</em>应用许可特性列表<br><p>
+	对应manifest.json中的permissions字段下所有键名的列表。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.runtime.WidgetOptions">WidgetOptions</a></h1>
+<p>JSON对象,应用安装参数</p>
+<h2>说明:</h2>
+<p class="des">可通过对象设置安装的应用是否进行appid校验、版本号校验等。</p>
+<h2>属性:</h2>
+<ul><li>force: <em>(<font class="type">Boolean</font>
+	类型
+)</em>是否强制安装<br><p>
+	true表示强制安装,不进行版本号的校验;false则需要版本号校验,如果将要安装应用的版本号不高于现有应用的版本号则终止安装,并返回安装失败。
+	仅安装wgt和wgtu时生效,默认值 false。
+						</p>
+</li></ul>
+<h1><a name="plus.runtime.InstallSuccessCallback">InstallSuccessCallback</a></h1>
+<p>安装应用成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(widgetInfo){
+	// Code here
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>widgetInfo: 
+		<em>(
+			<font class="type">WidgetInfo</font>
+			)
+			必选 </em><br>应用信息,参见:WidgetInfo</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.runtime.InstallErrorCallback">InstallErrorCallback</a></h1>
+<p>安装应用失败回调函数</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Handle the error
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em><br>安装失败的错误信息</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.runtime.GetPropertyCallBack">GetPropertyCallBack</a></h1>
+<p>获取应用属性成功回调函数</p>
+<pre class="prettyprint linenums">
+void onGetPropertyCB(widgetInfo){
+	// Code here
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>widgetInfo: 
+		<em>(
+			<a href="#plus.runtime.WidgetInfo">WidgetInfo</a>
+			)
+			必选 </em>应用信息<br>
+	包括应用名称、标识等属性。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.runtime.OpenErrorCallback">OpenErrorCallback</a></h1>
+<p>打开本地文件或URL失败回调函数</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Handle the error
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em><br>打开操作失败的错误信息</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.runtime.LaunchErrorCallback">LaunchErrorCallback</a></h1>
+<p>调用第三方程序失败回调函数</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Handle the error
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>操作失败的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 539 - 0
hello H5+/doc/share.html

@@ -0,0 +1,539 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Share Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.share">share</a></h1>
+<p>Share模块管理客户端的社交分享功能,提供调用终端社交软件的分享能力。通过plus.share可获取社交分享管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.share.getServices">getServices</a>: 获取分享服务</li>
+<li>
+<a href="#plus.share.sendWithSystem">sendWithSystem</a>: 使用系统组件发送分享</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.share.AuthOptions">AuthOptions</a>: JSON对象,分享授权认证参数选项</li>
+<li>
+<a href="#plus.share.Authorize">Authorize</a>: 分享授权控件对象</li>
+<li>
+<a href="#plus.share.GeoPosition">GeoPosition</a>: JSON对象,用户位置信息</li>
+<li>
+<a href="#plus.share.ShareService">ShareService</a>: 分享服务对象</li>
+<li>
+<a href="#plus.share.ShareServerIdentity">ShareServerIdentity</a>: 分享服务标识</li>
+<li>
+<a href="#plus.share.ShareMessage">ShareMessage</a>: JSON对象,分享消息对象</li>
+<li>
+<a href="#plus.share.ShareMessageExtra">ShareMessageExtra</a>: JSON对象,保存分享消息扩展信息</li>
+<li>
+<a href="#plus.share.WeixinMiniProgramOptions">WeixinMiniProgramOptions</a>: JSON对象,微信小程序信息</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.share.ServicesSuccessCallback">ServicesSuccessCallback</a>: 获取分享服务成功回调</li>
+<li>
+<a href="#plus.share.AuthorizeSuccessCallback">AuthorizeSuccessCallback</a>: 分享授权认证成功回调</li>
+<li>
+<a href="#plus.share.ShareSuccessCallback">ShareSuccessCallback</a>: 分享操作成功回调</li>
+<li>
+<a href="#plus.share.ShareErrorCallback">ShareErrorCallback</a>: 分享操作失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Share": {
+		"description": "分享"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.share.AuthOptions">AuthOptions</a></h1>
+<p>JSON对象,分享授权认证参数选项</p>
+<pre class="prettyprint linenums">
+interface plus.share.AuthOptions {
+	attribute String appid;
+	attribute String appkey;
+	attribute String appsecret;
+	attribute String redirect_uri;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	此对象支持的属性值由分享服务的授权认证模块定义。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>appid: <em>(<font class="type">String</font>
+	类型
+)</em>分享服务平台申请的appid<br><p>
+	动态设置分享服务授权认证时需要使用的appid,仅需要此参数的分享服务(如“微信”、“QQ”)支持。
+	如果未设置则使用运行环境中内置的appid值(如在HBuilder中可在manifest.json的“SDK配置”项中进行设置)。
+						</p>
+</li>
+<li>appkey: <em>(<font class="type">String</font>
+	类型
+)</em>分享服务平台申请的appkey<br><p>
+	动态设置分享服务授权认证时需要使用的appkey,仅需要此参数的分享服务(如“新浪微博”)支持。
+	如果未设置则使用运行环境中内置的appkey值(如在HBuilder中可在manifest.json的“SDK配置”项中进行设置)。
+						</p>
+</li>
+<li>appsecret: <em>(<font class="type">String</font>
+	类型
+)</em>分享服务平台申请的appsecret<br><p>
+	动态设置分享服务中需要使用的appsecret,仅需要此参数的分享服务(如“微信”、“新浪微博”)支持。
+	如果未设置则使用运行环境中内置的appsecret值(如在HBuilder中可在manifest.json的“SDK配置”项中进行设置);当开放平台申请的appsecret值涉及到安全问题时,可在应用运行时从服务器获取,然后通过此api动态设置。
+						</p>
+</li>
+<li>redirect_url: <em>(<font class="type">String</font>
+	类型
+)</em>分享服务平台申请的redirect_url<br><p>
+	动态设置分享服务中需要使用的redirect_url,仅需要此参数的登录授权服务(如“新浪微博登录”)支持。
+	如果未设置则使用运行环境中内置的redirect_url值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.share.Authorize">Authorize</a></h1>
+<p>分享授权控件对象</p>
+<pre class="prettyprint linenums">
+interface plus.share.Authorize{
+	// Methods
+	function void load(id);
+	function void setVisible(visible);
+
+	// Events
+	function void onloaded();
+	function void onauthenticated();
+	function void onerror();
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	Authorize对象表示分享控件对象,用于在窗口中显示分享控件,使用此对象可自定义分享授权界面。
+				</p>
+<h2>构造:</h2>
+<ul><li>
+<a href="#plus.share.Authorize.Authorize(id,display)">Authorize(id,display)</a>: 创建分享授权控件对象</li></ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.share.Authorize.load">load</a>: 加载分享授权页面</li>
+<li>
+<a href="#plus.share.Authorize.setVisible">setVisible</a>: 设置分享授权控件是否可见</li>
+</ul>
+<h2>事件:</h2>
+<ul>
+<li>
+<a href="#plus.share.Authorize.onloaded">onloaded</a>: 分享控件加载完成事件</li>
+<li>
+<a href="#plus.share.Authorize.onauthenticated">onauthenticated</a>: 分享授权认证成功事件</li>
+<li>
+<a href="#plus.share.Authorize.onerror">onerror</a>: 分享授权认证失败事件</li>
+</ul>
+<h1><a name="plus.share.GeoPosition">GeoPosition</a></h1>
+<p>JSON对象,用户位置信息</p>
+<pre class="prettyprint linenums">
+interface plus.share.GeoPosition {
+	attribute Number latitude;
+	attribute Number longitude;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	GeoPosition对象用于表示用户分享消息时的位置信息。用于标识分享操作时用户的位置信息。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>latitude: <em>(<font class="type">Number</font>
+	类型
+)</em>用户位置的纬度坐标信息<br>
+</li>
+<li>longitude: <em>(<font class="type">Number</font>
+	类型
+)</em>用户位置的经度坐标信息<br>
+</li>
+</ul>
+<h1><a name="plus.share.ShareService">ShareService</a></h1>
+<p>分享服务对象</p>
+<pre class="prettyprint linenums">
+interface plus.share.ShareService {
+	// Attributes
+	attribute DOMString id;
+	attribute DOMString description;
+	attribute Boolean authenticated;
+	attribute DOMString accessToken;
+	attribute Boolean nativeClient;
+	
+	// Methods
+	function void authorize(successCallback, errorCallback, options);
+	function void forbid();
+	function void send(message);
+	function void launchMiniProgram(options);
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	ShareService对象用于表示分享服务,在JS中为对象,用于向系统请求分享操作。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>
+<a href="#plus.share.ShareService.id">id</a>: 分享服务标识</li>
+<li>
+<a href="#plus.share.ShareService.description">description</a>: 分享服务描述</li>
+<li>
+<a href="#plus.share.ShareService.authenticated">authenticated</a>: 是否授权认证</li>
+<li>
+<a href="#plus.share.ShareService.accessToken">accessToken</a>: 授权认证信息</li>
+<li>
+<a href="#plus.share.ShareService.nativeClient">nativeClient</a>: 是否存在对应的分享客户端</li>
+</ul>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.share.ShareService.authorize">authorize</a>: 授权认证操作</li>
+<li>
+<a href="#plus.share.ShareService.forbid">forbid</a>: 取消授权认证</li>
+<li>
+<a href="#plus.share.ShareService.send">send</a>: 发送分享</li>
+<li>
+<a href="#plus.share.ShareService.launchMiniProgram">launchMiniProgram</a>: 调用微信小程序</li>
+</ul>
+<h1><a name="plus.share.ShareServerIdentity">ShareServerIdentity</a></h1>
+<p>分享服务标识</p>
+<h2>常量:</h2>
+<ul>
+<li>"sinaweibo": <em>(<font class="type">DOMString</font>
+	类型
+)</em>新浪微博<br>
+</li>
+<li>"tencentweibo": <em>(<font class="type">DOMString</font>
+	类型
+)</em>腾讯微博<br>
+</li>
+<li>"weixin": <em>(<font class="type">DOMString</font>
+	类型
+)</em>微信<br>
+</li>
+</ul>
+<h1><a name="plus.share.ShareMessage">ShareMessage</a></h1>
+<p>JSON对象,分享消息对象</p>
+<pre class="prettyprint linenums">
+interface plus.share.ShareMessage {
+	attribute String type;
+	attribute String content;
+	attribute String[] thumbs;
+	attribute String[] pictures;
+	attribute String media;
+	attribute String href;
+	attribute String title;
+	attribute JSON extra;
+	attribute GEOPosition geo;
+	attribute ShareMessageExtra extra;
+	attribute WeixinMiniProgramOptions miniProgram;
+	attribute String interface;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">ShareMessage对象用于表示分享消息内容,在JS中为JSON对象,用于向系统发送分享信息操作。</p>
+<h2>属性:</h2>
+<ul>
+<li>type: <em>(<font class="type">String</font>
+	类型
+)</em>分享消息的类型<br><p>
+	微信分享平台,可取值:
+		
+			
+		"web"-分享网页类型,title(必填)、content(必填)、thumbs(必填)、href(网页url,必填)属性值有效;
+			
+			
+		"text"-分享文字类型,content(必填)属性值有效;
+			
+			
+		"image"-分享图片类型,pictures(必填)属性值有效;
+			
+			
+		"music"-分享音乐类型,title(必填)、content(必填)、thumbs(必填)、media(音乐url,必填)属性值有效;
+			
+			
+		"video"-分享视频类型,title(必填)、content(必填)、thumbs(必填)、media(视频url,必填)属性值有效;
+			
+			
+		"miniProgram"-分享小程序类型(仅支持分享到好友),title(必填)、content(必填)、thumbs(图片小于128K,宽高比为5:4,必填)、miniProgram(小程序参数,必填)属性值有效;
+			
+		
+		没有设置type时,如果href值有效则默认值为"web",如果pictures有效则默认值为"image",否则默认值为"text"。
+		
+	新浪微博分享平台,可取值:
+		
+			
+		"web"-分享网页类型,content、href(网页url,必填),分享链接添加到内容之后;
+			
+			
+		"text"-分享文字类型,content(必填)属性有效,可在内容中直接插入链接地址;
+			
+			
+		"image"-分享图片类型,content(可选)、thumbs(可选)、pictures(必填)属性有效;
+			
+			
+		"video"-分享视频类型,content(可选)、thumbs(可选)、media(本地视频文件,必填)属性有效;
+			
+		
+		没有设置type时,如果存在thumbs则默认值为"image",如果存在href则默认值为"web",否则默认为"text"。
+		
+	QQ分享平台,可取值:
+		
+			
+		"text"-分享文字类型,href(iOS可选,Android必填)、title(必填,最长30个字符)、content(可选,最长40个字符)、pictures或thumbs(可选,优先pictures,iOS不支持)属性有效;
+			
+			
+		"image"-分享图片类型,pictures或thumbs(必填,优先pictures)属性有效;
+			
+			
+		"music"-分享音乐类型,title(必填,最长30个字符)、content(可选,最长40个字符)、href(必填)、media(音乐url,必填)、pictures或thumbs(可选,优先pictures)属性值有效;
+			
+		
+		没有设置type时,默认值"text"。
+						</p>
+</li>
+<li>content: <em>(<font class="type">String</font>
+	类型
+)</em>分享消息的文字内容<br>
+</li>
+<li>pictures: <em>(<font class="type">Array</font>[
+				<font class="type">String</font>
+				]
+			
+	类型
+)</em>分享消息的图片<br><p>
+	分享消息中包含的图片路径,仅支持本地路径。
+	若分享平台仅支持提交一张图片,传入多张图片则仅提交第一张图片。
+	如果未指定type类型,优先级顺序为:pictures&gt;content(即设置了pictures则认为分享图片类型)。
+						</p>
+</li>
+<li>thumbs: <em>(<font class="type">Array</font>[
+				<font class="type">Stromg</font>
+				]
+			
+	类型
+)</em>分享消息的缩略图<br><p>
+	分享消息中包含的缩略图路径,支持本地路径及网络路径。
+	若分享平台仅支持提交一张图片,传入多张图片则仅提交第一张图片。
+	如果分享平台的信息不支持缩略图,若没有设置消息的图片(pictures)则使用缩略图,否则忽略其属性值。
+	注意:图片有大小限制,推荐图片小于20Kb。
+						</p>
+</li>
+<li>media: <em>(<font class="type">Strubg</font>
+	类型
+)</em>分享的多媒体资源<br><p>
+	分享的多媒体资源地址,当type值为"music"、"video"时有效。
+	注意:
+		微信分享平台支持音乐、视频类型,仅支持网络地址(以http://或https://开头);
+		QQ分享平台支持音乐类型,仅支持网络路径(以http://或https://开头);
+		新浪微博分享平台支持视频类型,仅支持本地文件路径。
+						</p>
+</li>
+<li>href: <em>(<font class="type">String</font>
+	类型
+)</em>分享独立的链接<br><p>
+	分享资源地址,仅支持网络地址(以http://或https://开头)。
+	如果未指定type类型,优先级顺序为:href&gt;pictures&gt;content(即设置了href则认为分享网页类型)。
+						</p>
+</li>
+<li>title: <em>(<font class="type">String</font>
+	类型
+)</em>分享消息的标题<br><p>
+	仅微信分享网页、音频、视频、小程序类型时支持。
+						</p>
+</li>
+<li>geo: <em>(<a href="#plus.share.GeoPosition">GeoPosition</a>
+	类型
+)</em>分享消息中包含的用户地理信息数据<br>
+</li>
+<li>extra: <em>(<a href="#plus.share.ShareMessageExtra">ShareMessageExtra</a>
+	类型
+)</em>分享消息扩展参数<br>
+</li>
+<li>miniProgram: <em>(<a href="#plus.share.WeixinMiniProgramOptions">WeixinMiniProgramOptions</a>
+	类型
+)</em>分享微信小程序参数<br><p>
+	仅微信分享小程序类型时支持。
+						</p>
+</li>
+<li>interface: <em>(<font class="type">String</font>
+	类型
+)</em>分享消息的模式<br><p>
+	可取值:
+    "auto" - 自动选择,如果已经安装微博客户端则采用编辑界面进行分享,否则采用无界面分享;
+    "slient" - 静默分享,采用无界面模式进行分享;
+    "editable" - 进入编辑界面,用户确认分享内容后发送,如果当前未安装微博客户端则触发错误回调。
+    默认值为"auto"。
+    (仅新浪微博分享时生效)
+						</p>
+</li>
+</ul>
+<h1><a name="plus.share.ShareMessageExtra">ShareMessageExtra</a></h1>
+<p>JSON对象,保存分享消息扩展信息</p>
+<pre class="prettyprint linenums">
+interface plus.share.ShareMessageExtra {
+	attribute String scene;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	ShareMessageExtra对象用于保存各分享平台扩展的参数,用于自定义分享功能。
+				</p>
+<h2>属性:</h2>
+<ul><li>scene: <em>(<font class="type">String</font>
+	类型
+)</em>微信分享场景,仅微信分享平台有效<br><p>
+	可取值:
+	"WXSceneSession"分享到微信的“我的好友”;
+	"WXSceneTimeline"分享到微信的“朋友圈”中;
+	"WXSceneFavorite"分享到微信的“我的收藏”中。
+	默认值为"WXSceneSession"。
+						</p>
+</li></ul>
+<h1><a name="plus.share.WeixinMiniProgramOptions">WeixinMiniProgramOptions</a></h1>
+<p>JSON对象,微信小程序信息</p>
+<pre class="prettyprint linenums">
+interface plus.share.WeixinMiniProgramOptions {
+	attribute String id;
+	attribute String path;
+	attribute Nnumber type;
+	attribute webUrl;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	用于配置分享小程序的参数,如小程序标识、页面路径等。
+	注意:分享的小程序需要在微信开放平台关联的开发者账号下,否则会分享失败。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>id: <em>(<font class="type">String</font>
+	类型
+)</em>微信小程序ID<br><p>
+	注意:是微信小程序的原始ID("g_"开头的字符串)。
+						</p>
+</li>
+<li>path: <em>(<font class="type">String</font>
+	类型
+)</em>微信小程序打开的页面路径<br>
+</li>
+<li>type: <em>(<font class="type">Number</font>
+	类型
+)</em>微信小程序版本类型<br><p>
+	可取值:
+	0-正式版;
+	1-测试版;
+	2-体验版。
+	默认值为0。
+						</p>
+</li>
+<li>webUrl: <em>(<font class="type">String</font>
+	类型
+)</em>兼容低版本的网页链接<br>
+</li>
+</ul>
+<h1><a name="plus.share.ServicesSuccessCallback">ServicesSuccessCallback</a></h1>
+<p>获取分享服务成功回调</p>
+<pre class="prettyprint linenums">
+void ServicesSuccessCallback(services){
+	// Get share services success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当获取分享服务列表成功时的回调函数,用于返回终端支持的分享服务列表。
+				</p>
+<h2>参数:</h2>
+<ul><li>services: 
+		<em>(
+			<font class="type">Array</font>[
+						<a href="#plus.share.ShareService">ShareService</a>
+						]
+					
+			)
+			必选 </em>数组,运行环境支持的分享服务列表<br>
+	运行环境支持的分享服务列表数组,可通过services.length获取分享服务列表的数目。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.share.AuthorizeSuccessCallback">AuthorizeSuccessCallback</a></h1>
+<p>分享授权认证成功回调</p>
+<pre class="prettyprint linenums">
+void AuthorizeSuccessCallback(services){
+	  // Authorize success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	分享服务授权认证操作成功时调用。
+				</p>
+<h2>参数:</h2>
+<ul><li>service: 
+		<em>(
+			<a href="#plus.share.ShareService">ShareService</a>
+			)
+			必选 </em>授权认证操作的分享服务对象<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.share.ShareSuccessCallback">ShareSuccessCallback</a></h1>
+<p>分享操作成功回调</p>
+<pre class="prettyprint linenums">
+void ShareSuccessCallback(){
+	// Share success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	分享操作成功回调函数,当分享操作成功时调用。
+				</p>
+<h2>参数:</h2>
+<p>无</p>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.share.ShareErrorCallback">ShareErrorCallback</a></h1>
+<p>分享操作失败回调</p>
+<pre class="prettyprint linenums">
+void ShareErrorCallback(error){
+	// Error 
+	var code = error.code; 			// 错误编码
+	var message = error.message;	// 错误描述信息
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当分享操作失败时的回调函数,用于返回分享相关操作失败的错误信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>分享操作失败错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 261 - 0
hello H5+/doc/speech.html

@@ -0,0 +1,261 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Speech Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.speech">speech</a></h1>
+<p>Speech模块管理语音输入功能,提供语音识别功能,可支持用户通过麦克风设备进行语音输入内容。通过plus.speech可获取语音输入管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.speech.startRecognize">startRecognize</a>: 启动语音识别</li>
+<li>
+<a href="#plus.speech.stopRecognize">stopRecognize</a>: 停止语音识别</li>
+<li>
+<a href="#plus.speech.addEventListener">addEventListener</a>: 监听语音识别事件</li>
+</ul>
+<h2>对象:</h2>
+<ul>
+<li>
+<a href="#plus.speech.SpeechRecognizeOptions">SpeechRecognizeOptions</a>: JSON对象,语音识别参数</li>
+<li>
+<a href="#plus.speech.SpeechRecoginzeEvents">SpeechRecoginzeEvents</a>: 语音识别事件类型</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.speech.RecognitionEventCallback">RecognitionEventCallback</a>: 语音识别事件回调函数</li>
+<li>
+<a href="#plus.speech.RecognitionSuccessCallback">RecognitionSuccessCallback</a>: 语音识别成功回调</li>
+<li>
+<a href="#plus.speech.RecognitionErrorCallback%20">RecognitionErrorCallback </a>: 语音识别失败回调</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Speech": {
+		"description": "语音输入"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.speech.SpeechRecognizeOptions">SpeechRecognizeOptions</a></h1>
+<p>JSON对象,语音识别参数</p>
+<pre class="prettyprint linenums">
+interface plus.speech.SpeechRecognizeOptions {
+	attribute Boolean continue;
+	attribute String engine;
+	attribute String lang;
+	attribute Number nbest;
+	attribute String punctuation;
+	attribute Number timeout;
+	attribute Boolean userInterface;
+	attribute EventHandler onstart;
+	attribute EventHandler onend;
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	控制语音识别引擎内部参数,在JS中为JSON对象,在启动语音识别时使用。
+				</p>
+<h2>属性:</h2>
+<ul>
+<li>continue: <em>(<font class="type">Boolean</font>
+	类型
+)</em>语音识别是否采用持续模式<br><p>
+	设置为true表示语音引擎不会根据语音输入自动结束,识别到文本内容将多次调用successCallback函数返回,如果需要结束语音识别则必须调用stopRecognize接口,默认值为false。
+						</p>
+</li>
+<li>engine: <em>(<font class="type">String</font>
+	类型
+)</em>语音识别引擎标识<br><p>
+	用于兼容多语音识别引擎的浏览器,使用语音识别厂商的产品名称,如未设置或设置不正确则使用运行环境默认的语音识别引擎。
+	支持以下语音识别引擎:
+		"baidu"-百度语音识别;
+		"iFly"-讯飞语音识别。
+						</p>
+</li>
+<li>lang: <em>(<font class="type">String</font>
+	类型
+)</em>语音识别引擎的语言<br><p>
+	用于定义语音识别引擎的语言,其取值需符合W3C的Language codes规范。
+	目前讯飞语音支持以下语言:
+		"zh-cn"-中文,普通话;
+		"en-us"-英语;
+		"zh-cantonese"-中文,粤语;
+		"zh-henanese"-中文,河南话(百度语音识别不支持此语言)。
+		默认值为"zh-cn"。
+
+						</p>
+</li>
+<li>nbest: <em>(<font class="type">Number</font>
+	类型
+)</em>指定识别结果识别包括多候选结果<br><p>
+	用于指定识别结果识别包括多候选结果。如nbest:3,识别返回3个候选结果,默认值为1。
+						</p>
+</li>
+<li>punctuation: <em>(<font class="type">Boolean</font>
+	类型
+)</em>识别结果中是否包含标点符号<br><p>
+	true表示识别结果文本中包含标点符号,false表示识别结果文本中不包含标点符号。
+	默认值为true。
+						</p>
+</li>
+<li>timeout: <em>(<font class="type">Number</font>
+	类型
+)</em>语音识别超时时间<br><p>
+	语音识别超时的时间,单位为ms,默认值为1000(即10秒)。
+	注:百度语音识别不支持此参数。
+						</p>
+</li>
+<li>userInterface: <em>(<font class="type">Boolean</font>
+	类型
+)</em>识别时是否显示用户界面<br><p>
+	用于指定识别时是否显示用户界面,设置为true表示显示浏览器内置语音识别界面;设置为false表示不显示浏览器内置语音识别界面。默认值为true。
+						</p>
+</li>
+<li>onstart: <em>(<font class="type">EventHandler</font>
+	类型
+)</em>语音识别开始事件(已废弃,使用start事件)<br><p>
+	事件函数,语音识别开始启动,在调用startRecognize方法后触发,与onend事件成对触发。
+	注:iOS平台未支持
+						</p>
+</li>
+<li>onend: <em>(<font class="type">EventHandler</font>
+	类型
+)</em>语音识别结束事件(已废弃,使用end事件)<br><p>
+	事件函数,语音识别结束,在调用stopRecognize方法后触发,或者在引擎内部自动完成语音识别后触发,与onstart事件成对触发。
+	注:iOS平台未支持
+						</p>
+</li>
+</ul>
+<h1><a name="plus.speech.SpeechRecoginzeEvents">SpeechRecoginzeEvents</a></h1>
+<p>语音识别事件类型</p>
+<h2>说明:</h2>
+<p class="des">
+	描述语音过程的触发事件列表,可以通过调用plus.sppech.addEventListener方法进行注册监听。
+				</p>
+<h2>常量:</h2>
+<ul>
+<li>start: <em>(<font class="type">String</font>
+	类型
+)</em>开始语音识别<br><p>
+	调用plus.speech.startRecognize方法开始语音识别时触发。
+	无回调函数参数。
+						</p>
+</li>
+<li>volumeChange: <em>(<font class="type">String</font>
+	类型
+)</em>音量变化<br><p>
+	开始语音识别后,麦克风录制到的语音音量变化时触发。
+	回调函数参数event={volume:"Number类型,取值范围0-1"}。
+						</p>
+</li>
+<li>recognizing: <em>(<font class="type">String</font>
+	类型
+)</em>临时语音识别结果<br><p>
+	返回临时语音识别结果时触发。
+	回调函数参数event={partialResult:"String类型,临时识别结果"}。
+						</p>
+</li>
+<li>recognition: <em>(<font class="type">String</font>
+	类型
+)</em>最终语音识别<br><p>
+	返回最终语音识别结果。
+	回调函数参数event={result:"String类型,最佳识别结果",results:"String数组类型,所有候选结果"}。
+						</p>
+</li>
+<li>end: <em>(<font class="type">String</font>
+	类型
+)</em>结束语音识别<br><p>
+	调用plus.speech.stopRecognize方法结束语音识别或语音识别完成后自动结束时触发。
+	无回调函数参数。
+						</p>
+</li>
+<li>error: <em>(<font class="type">String</font>
+	类型
+)</em>语音识别错误<br><p>
+	语音识别发生错误时触发。
+	回调函数参数event={code:"Number类型,错误编码",message:"String类型,错误描述信息"}。
+						</p>
+</li>
+</ul>
+<h1><a name="plus.speech.RecognitionEventCallback">RecognitionEventCallback</a></h1>
+<p>语音识别事件回调函数</p>
+<pre class="prettyprint linenums">
+void onEvent(event){
+	// Event code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	调用plus.speech.addEventListener方法监听语音识别事件的回调函数。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">JSON</font>
+			)
+			可选 </em><br>
+	不同事件返回的参数不一样,详情参考SpeechRecoginzeEvents事件说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.speech.RecognitionSuccessCallback">RecognitionSuccessCallback</a></h1>
+<p>语音识别成功回调</p>
+<pre class="prettyprint linenums">
+void onSuccess(result){
+	// Recognition success code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	语音识别成功时的回调函数,用于返回语音识别出的文本内容。
+				</p>
+<h2>参数:</h2>
+<ul><li>result: 
+		<em>(
+			<font class="type">String</font>
+			)
+			必选 </em>语音识别出的文本内容<br>
+</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.speech.RecognitionErrorCallback%20">RecognitionErrorCallback </a></h1>
+<p>语音识别失败回调</p>
+<pre class="prettyprint linenums">
+void onError(error){
+	// Recognition error code
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	当语音识别失败时的回调函数,用于返回语音识别失败的错误信息。
+				</p>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">Exception</font>
+			)
+			必选 </em>语音识别失败的错误信息<br>
+	可通过error.code(Number类型)获取错误编码;
+	可通过error.message(String类型)获取错误描述信息。
+	详细错误描述信息可参考:http://ask.dcloud.net.cn/article/282。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 58 - 0
hello H5+/doc/splashscreen.html

@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Splashscreen Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.navigator">navigator</a></h1>
+<p>Splashscreen管理程序启动界面</p>
+<h2>方法:</h2>
+<ul><li>
+<a href="#plus.navigator.closeSplashscreen">closeSplashscreen</a>: 关闭程序启动界面</li></ul>
+<h2>权限:</h2>
+<p>
+	5+功能模块(permissions)。
+	在plus节点下配置splashscreen节点信息设置程序启动界面参数。
+			</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Navigator": {
+		"description": "浏览器信息"
+	}
+}
+// ...
+"plus":{
+	// ...
+	"splashscreen": {
+		"autoclose": "true",	// 首页加载完成后自动关闭splash界面
+		"delay": ""
+	}
+}
+}
+			</pre>
+			属性:
+			<ul>
+<li>autoclose: 是否自动关闭程序启动界面<br>
+</li>
+<li>delay: 启动界面延迟关闭时间<br><p>
+	仅在autioclose属性设置为"true"时有效,用于定义程序启动界面在应用的首界面加载完毕后延迟关闭的时间,单位为ms,默认值为0。
+					</p>
+</li>
+<li>waiting: 启动界面是否显示系统等待框<br><p>
+	系统等待框使用的是系统雪花控件,各平台效果存在差异。
+					</p>
+</li>
+</ul>
+<br><br>
+</div></body>
+</html>

+ 94 - 0
hello H5+/doc/sqlite.html

@@ -0,0 +1,94 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>SQLite Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.sqlite">sqlite</a></h1>
+<p>SQLite模块用于操作本地数据库文件,可实现数据库文件的创建,执行SQL语句等功能。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.sqlite.openDatabase">openDatabase</a>: 打开数据库</li>
+<li>
+<a href="#plus.sqlite.isOpenDatabase">isOpenDatabase</a>: 判断数据库是否打开</li>
+<li>
+<a href="#plus.sqlite.closeDatabase">closeDatabase</a>: 关闭数据库</li>
+<li>
+<a href="#plus.sqlite.transaction">transaction</a>: 执行事务</li>
+<li>
+<a href="#plus.sqlite.executeSql">executeSql</a>: 执行增删改等操作的SQL语句</li>
+<li>
+<a href="#plus.sqlite.selectSql">selectSql</a>: 执行查询的SQL语句</li>
+</ul>
+<h2>回调方法:</h2>
+<ul>
+<li>
+<a href="#plus.sqlite.SQLiteSuccessCallback">SQLiteSuccessCallback</a>: SQLite操作成功回调函数</li>
+<li>
+<a href="#plus.sqlite.SQLiteFailCallback">SQLiteFailCallback</a>: SQLite操作失败回调函数</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"SQLite": {
+		"description": "SQLite数据库"
+	}
+}
+}
+			</pre>
+<h1><a name="plus.sqlite.SQLiteSuccessCallback">SQLiteSuccessCallback</a></h1>
+<p>SQLite操作成功回调函数</p>
+<pre class="prettyprint linenums">
+void onSuccess(event){
+}
+				</pre>
+<h2>说明:</h2>
+<p class="des">
+	不同接口触发的成功回调参数event包含的属性存在差异,具体参考对应的接口描述说明。
+				</p>
+<h2>参数:</h2>
+<ul><li>event: 
+		<em>(
+			<font class="type">json</font>
+			)
+			必选 </em>回调参数<br>
+	回调函数参数包含的属性由调用接口决定,具体参考对应的接口描述说明。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<h1><a name="plus.sqlite.SQLiteFailCallback">SQLiteFailCallback</a></h1>
+<p>SQLite操作失败回调函数</p>
+<pre class="prettyprint linenums">
+function void onFail(DOMException error){
+	// Handle error
+	var code = error.code; // 错误编码
+	var message = error.message; // 错误描述信息
+}
+				</pre>
+<h2>参数:</h2>
+<ul><li>error: 
+		<em>(
+			<font class="type">DOMException</font>
+			)
+			必选 </em>回调参数,错误信息<br>
+	可通过error.code(Number类型)获取错误码;
+	可通过error.message(String类型)获取错误描述信息。
+	完整错误码列表参考:5+API错误代码中的“Sqlite模块错误”章节。
+						</li></ul>
+<h2>返回值:</h2>
+<font class="type">void</font>
+			: 无<br><br>
+</div></body>
+</html>

+ 42 - 0
hello H5+/doc/statistic.html

@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Statistic Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.statistic">statistic</a></h1>
+<p>Statistic模块管理统计功能,用于提供应用内统计的能力,支持统计和分析用户属性和用户行为数据。通过plus.statistic可获取统计管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.statistic.eventTrig">eventTrig</a>: 触发事件</li>
+<li>
+<a href="#plus.statistic.eventDuration">eventDuration</a>: 精确持续事件</li>
+<li>
+<a href="#plus.statistic.eventStart">eventStart</a>: 开始持续事件(过期API,不推荐使用)</li>
+<li>
+<a href="#plus.statistic.eventEnd">eventEnd</a>: 结束持续事件(过期API,不推荐使用)</li>
+</ul>
+<h2>权限:</h2>
+<p>permissions</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Statistic": {
+		"description": "统计"
+	}
+}
+}
+			</pre>
+<br><br>
+</div></body>
+</html>

+ 46 - 0
hello H5+/doc/storage.html

@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+<meta name="HandheldFriendly" content="true">
+<meta name="MobileOptimized" content="320">
+<title>Storage Document</title>
+<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
+<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
+<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
+</head>
+<body><div id="content" class="content">
+<h1><a name="plus.storage">storage</a></h1>
+<p>Storage模块管理应用本地数据存储区,用于应用数据的保存和读取。应用本地数据与localStorage、sessionStorage的区别在于数据有效域不同,前者可在应用内跨域操作,数据存储期是持久化的,并且没有容量限制。通过plus.storage可获取应用本地数据管理对象。</p>
+<h2>方法:</h2>
+<ul>
+<li>
+<a href="#plus.storage.getLength">getLength</a>: 获取应用存储区中保存的键值对的个数</li>
+<li>
+<a href="#plus.storage.getItem">getItem</a>: 通过键(key)检索获取应用存储的值</li>
+<li>
+<a href="#plus.storage.setItem">setItem</a>: 修改或添加键值(key-value)对数据到应用数据存储中</li>
+<li>
+<a href="#plus.storage.removeItem">removeItem</a>: 通过key值删除键值对存储的数据</li>
+<li>
+<a href="#plus.storage.clear">clear</a>: 清除应用所有的键值对存储数据</li>
+<li>
+<a href="#plus.storage.key">key</a>: 获取键值对中指定索引值的key值</li>
+</ul>
+<h2>权限:</h2>
+<p>5+功能模块(permissions)</p>
+<pre class="prettyprint linenums">
+{
+// ...
+"permissions":{
+	// ...
+	"Storage": {
+		"description": "本地存储,访问应用本地存储数据"
+	}
+}
+}
+			</pre>
+<br><br>
+</div></body>
+</html>

Некоторые файлы не были показаны из-за большого количества измененных файлов