diff --git a/fangija-zsyf/audio/friendship.mp3 b/fangija-zsyf/audio/friendship.mp3
deleted file mode 100644
index 4f0cdd6..0000000
Binary files a/fangija-zsyf/audio/friendship.mp3 and /dev/null differ
diff --git a/fangija-zsyf/audio/shake.wav b/fangija-zsyf/audio/shake.wav
deleted file mode 100644
index a353d66..0000000
Binary files a/fangija-zsyf/audio/shake.wav and /dev/null differ
diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js
index ce2d4c9..5cca8c7 100644
--- a/fangija-zsyf/config.js
+++ b/fangija-zsyf/config.js
@@ -1,11 +1,29 @@
/**服务端地址**/
-var BASE_PATH = "http://youfang.fangjia.com";
+//var BASE_PATH = "http://youfang.fangjia.com";
//var BASE_PATH = "http://192.168.10.128:8084";
-//var BASE_PATH = "http://192.168.10.47:8086";
-//var BASE_PATH = "http://192.168.10.161:8084";
-//var BASE_PATH = "http://192.168.10.47:8086";
-//var BASE_PATH = "http://192.168.10.161:8084";
+var BASE_PATH = "http://192.168.10.164:8084";
//var BASE_PATH = "http://192.168.10.53:8084";
+//var BASE_PATH = "http://192.168.10.47:8086";
+//var BASE_PATH = "http://192.168.10.161:8084";
+//var BASE_PATH = "http://192.168.10.170:8084";
//var BASE_PATH = "http://192.168.10.171:8084";
+//var BASE_PATH = "http://192.168.10.164:8084";
/**是否显示过启动页面**/
-var lauchFlag = false;
\ No newline at end of file
+var lauchFlag = false;
+
+/*广告位类型常量*/
+var TOU_ZI_SHOU_YI=0;//"房产分析/出租管理-租金回报率"
+var JUN_JIA_PAI_MING=1;//"房产分析/出租管理-出租状态"
+var ZU_SHOU_BI=2;//"出售分析-增长率收益"
+var LIU_DONG_XING_PING_JI=3;//"出售分析-挂牌建议"
+var XIANG_SI_XIAO_QU=4;//"置换建议-小区详情-顶部描述"
+var HOME_PAGE_BANNER=5;//"首页banner"
+var LOAN_PAGE_BANNER=6;//"贷款页banner"
+var SET_QR_CODE=7;//"设置页二维码"
+var EVALUATE_REPORT=8;//"有房评估报告-广告图"
+var DISTRICT_DETAIL=9;// "有房小区详情-广告图"
+var EVALUATE_LIST=10;// "有房房产评估列表-广告图"
+var ESTATE_MARKET_COUNTRY=11;// "有房房产行情全国-广告图"
+var ESTATE_MARKET_SHANGHAI=12;// "有房房产行情上海-广告图"
+var ESTATE_DETAIL=13;// "有房房产详情-广告图"
+var DISTRICT_DETAIL_PRICE=14;// "有房小区详情-广告图"
\ No newline at end of file
diff --git a/fangija-zsyf/css/common.css b/fangija-zsyf/css/common.css
index 120945b..051df71 100644
--- a/fangija-zsyf/css/common.css
+++ b/fangija-zsyf/css/common.css
@@ -30,7 +30,7 @@ header {
font-size: 17px;
text-align: center;
line-height: 44px;
- background: #D74B28;
+ background: #FFF;
/*background: -webkit-linear-gradient(top,rgba(215,75,40,1),rgba(215,75,40,0.8));*/
z-index: 9999;
/*border-bottom: 1px solid rgba(215,75,40,0.8);*/
diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index 713ec7c..7306cce 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -1,6 +1,6 @@
@charset "utf-8";
/* CSS Document */
-[v-cloak]{display:none;}
+
/* 公用 */
*{font-size:16px;font-family:arial,"华文细黑";}
ul li{list-style:none;}
@@ -12,13 +12,18 @@ em{font-style:normal;color:#333;}
em.up{color:#EB5F34;}
em.down{color:#88D053;}
*/
+
::-webkit-scrollbar{display:none;}
.bt{border-top:solid 0.5rem #f3f3f3;}
.bb{border-bottom:solid 0.5rem #f3f3f3;}
+
+::../../images{display:none;}
+
.tac{text-align:center;}
.dn{display:none;}
.di{display:inline;}
+.page,.page-group{background:#f3f3f3;}
.content{background:#fff;color:#333;z-index:1;}
.content.f3{background:#f3f3f3;}
.popup{background:#f3f3f3;}
@@ -278,7 +283,7 @@ em.down{color:#88D053;}
.list-block .item-subtitle div em i{width:7px;height:10px;margin-left:0.2rem;}
.list-block .item-subtitle div label{display:block;font-size:0.7rem;color:#666;text-align:center;max-width:100%;}
.list-block .item-subtitle div p{margin-bottom:0;}
-.list-block .item-subtitle div.price{position:absolute;bottom:-0.3rem;right:0;}
+
.list-block .item-subtitle div.price em{font-size:0.8rem;color:#EB5F34;}
.list-block .item-subtitle div.price em strong{font-size:1.4rem;color:#EB5F34;font-weight:bold;margin-right:0.1rem;}
.list-block .item-subtitle div.priceBox01 em{display:block;color:#333;}
@@ -296,9 +301,14 @@ em.down{color:#88D053;}
.list-block .item-inner .item-media{width:1.2rem;height:1.2rem;float:left;margin-right:0.2rem;}
.list-block .item-inner .item-media img{width:100%;}
-.list-block .add{background:none;font-size:0.75rem;color:#F18D00;position:absolute;top:0;right:0;padding:0.5rem 0.75rem;}
-.list-block .add01{padding:0 0.5rem;top:1.1rem;right:0.75rem;}
-.list-block .add01a{top:inherit;bottom:0.75rem;right:0.75rem;}
+.list-block .add{background:none;font-size:0.75rem;color:#F18D00;position:absolute;top:0;right:0;padding:0.5rem 1.25rem;}
+.list-block .add01{padding:0 0.5rem;top:1rem;right:0.75rem;}
+.list-block .add01a{top:inherit;bottom:0.75rem;right:1.25rem;}
+.list-block .delete{width:1.5rem;height:1.55rem;background:url(../images/delete.png) no-repeat center center;background-size:100%;position:absolute;top:-1px;right:0;}
+.starBox{position:absolute;top:0.6rem;right:1.25rem;font-size:0.7rem;color:#666;text-align:right;}
+.starBox .star{display:block;}
+.starBox .star .icon{margin-right:0;margin-left:0.1rem;}
+.cardPrice .starBox{top:0.55rem;right:0.75rem;}
.list-block li.noData{padding:0.75rem;padding-top:1rem;}
.list-block li.noData img{margin:0 auto;}
@@ -322,8 +332,9 @@ em.down{color:#88D053;}
.content-padded + .newCss ul{padding-bottom:0;}
.list-block .item-content label.label-checkbox{float:left;padding-left:0;}
+.list-block .item-content label.label-checkbox:last-child{margin-left:0.8rem;}
.list-block .item-content label.label-checkbox .item-media{width:auto;height:auto;padding:0;margin:0;}
-label.label-checkbox i.icon-form-checkbox{margin-right:0.5rem;}
+
label.label-checkbox i.current{background:url(../images/checkImg.png) no-repeat center center #F18D00;background-size:0.55rem;border:none;}
.item-media i.check{width:24px;height:24px;border-radius:1.1rem;border:solid 1px #c7c7cc;margin:0;}
.item-media i.checked{background:url(../images/checkImg.png) no-repeat center center #F18D00;border:solid 1px #F18D00;background-size:0.55rem;}
@@ -408,7 +419,6 @@ input::-webkit-input-placeholder{
.list-block .item-subtitle small.small01:nth-of-type(2){background:#fff7e7;color:#f5b715;}
.list-block .item-subtitle small.small01:nth-of-type(3){background:#e9f8f0;color:#88D053;}
.list-block .item-subtitle small.small04{color:#fff;}
-.delete_btn{width:12px;height:15px;background:url(../images/delete.png) no-repeat left center;background-size:100%;float:right;margin-right:0.75rem;margin-top:0.3rem;}
/* 卡片 */
.card{border-radius:0;box-shadow:none;}
@@ -441,7 +451,7 @@ input::-webkit-input-placeholder{
.cardPrice01{border-bottom:solid 0.5rem #f3f3f3;}
.cardPrice01 .card-content{background:url(../images/cardBg01.png) no-repeat center bottom;background-size:100%;}
.cardPrice01 .card-content-inner{padding-top:0.5rem;padding-bottom:4rem;}
-.cardPrice01 .card-footer{width:100%;padding:0 0.75rem;background:none;position:absolute;bottom:0;}
+.cardPrice01 .card-footer{width:100%;padding:0 0.75rem;background:none;position:absolute;bottom:0.3rem;}
.cardPrice01 .card-footer span{width:50%;border-right:none;text-align:left;}
.cardPrice01 .card-footer span:last-child{text-align:right;}
@@ -454,7 +464,6 @@ input::-webkit-input-placeholder{
.cardNearbyName{margin-top:0;margin-bottom:0;padding-bottom:0.3rem;}
.cardNearbyName span{font-size:0.75rem;}
.cardNearbyBox{width:100%;background:#f3f3f3;overflow-x:auto;}
-.cardNearbyBox::-webkit-scrollbar{display:none;}
.cardNearbyWin{width:22.5rem;margin-left:0.25rem;overflow:hidden;}
.cardNearby{width:6.75rem;border-radius:0.16rem;float:left;margin-right:0;color:#333;}
.cardNearby div{padding-top:0;padding-bottom:0;}
@@ -470,7 +479,6 @@ input::-webkit-input-placeholder{
.arrow-up{font-size:0;line-height:0;border-width:10px;border-color:#f3f3f3;border-top-width:0;border-style:dashed;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;position:absolute;bottom:0;left:16%;}
.cardRentBox{width:100%;background:#fff;overflow-x:auto;border-bottom:solid 1px #e7e7e7;}
-.cardRentBox::-webkit-scrollbar{display:none;}
.cardRentWin{width:25rem;overflow:hidden;margin-left:0.75rem;border-left:solid 1px #e7e7e7;}
.cardRent{border-radius:0;border-right:solid 1px #e7e7e7;box-shadow:none;float:left;margin:0;}
.cardRent .card-content-inner{font-size:0.7rem;color:#EB5F34;padding:0.5rem 0.75rem;}
@@ -530,6 +538,9 @@ input::-webkit-input-placeholder{
.cardInfo03 .card-content-inner div.vote02 label{color:#8698F0;text-align:left;}
.cardInfo03 .card-content-inner em{font-size:1rem;color:#F18D00;text-align:center;line-height:45px;position:absolute;left:48%;}
+.cardInfo01 .cardInfoPlaceholder{width:100%;height:180px;background:url(../images/cardInfoPlaceholderImg.png) no-repeat center center;background-size:20%;border:solid 1px #e7e7e7;}
+.cardInfo02 .cardInfoPlaceholder{width:6.5rem;height:5.2rem;background:url(../images/cardInfoPlaceholderImg.png) no-repeat center center;background-size:30%;border:solid 1px #e7e7e7;}
+
.icon-eye-white{width:0.89rem;height:0.57rem;background:url(../images/icon-eye-white.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-eye-grey{width:0.85rem;height:0.6rem;background:url(../images/icon-eye-grey.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-eye-orange{width:0.7rem;height:0.5rem;background:url(../images/icon-eye-orange.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
@@ -647,6 +658,7 @@ input::-webkit-input-placeholder{
.popup .bar .searchbar .icon-left{padding:0;line-height:38px;color:#666;}
.popup .bar .searchbar .search-input input{height:36px;border:solid 1px #e6e6ea;}
.bar.bar-nav01{height:auto;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem;}
+.bar.bar-nav01 .title{margin-left:-0.5rem;}
.bar.bar-nav01 .button-link{color:#F18D00;}
/* 底部 */
@@ -852,17 +864,19 @@ input::-webkit-input-placeholder{
.topic .topicContent .topicContent_bottom01 label em{color:#EB5F34;margin-left:0.1rem;}
/* 广告 */
-.ad{display:block;border-bottom:solid 0.5rem #f3f3f3;}
+.ad{display:block;}
.ad img{width:100%;}
/* 图表 */
.chart{width:100%;height:250px;}
.chart tspan{font-size:0.6rem;text-shadow:none;}
-/*
-#tabChart{width:100%;height:360px;}
-#tabChart1{width:100%;position:absolute;z-index:1;}
-#tabChart2{width:100%;display:block;position:absolute;z-index:-1;}
-*/
+.chart01Box{height:270px;position:relative;}
+#chart01a{height:270px;position:absolute;z-index:1;}
+#chart01{height:270px;position:absolute;z-index:-1;}
+.topic .topicTitle > div.icon01Box{overflow:hidden;float:none;display:inline-block;vertical-align:middle;}
+.icon-chart01a{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01a.png) no-repeat center center;background-size:100%;float:left;}
+.icon-chart01{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01.png) no-repeat center center;background-size:100%;float:left;}
+
.scoreBox{height:130px;position:relative;}
.score{width:250px;height:250px;margin:0 auto;margin-top:1rem;}
.scoreText{width:250px;height:150px;position:absolute;top:0;left:50%;margin-left:-125px;}
@@ -884,10 +898,10 @@ input::-webkit-input-placeholder{
.topic .topicTitle > div.content-block{padding:0;margin:0;position:absolute;top:0.6rem;right:0;z-index:100;}
.topic .date{text-align:right;font-size:0.75rem;color:#ccc;padding-right:0.75rem;margin:0;}
-.buttons-row .button{height:1.35rem;line-height:1.35rem;}
.buttons-row01 .button{border-radius:0.1rem;margin-left:0.5rem;padding:0;font-size:0.65rem;}
.buttons-row01 .button:first-child,.buttons-row01 .button:last-child{border-radius:0.1rem;}
.buttons-row01a .button{width:22%;}
+.buttonBox .button{border-radius:0.15rem;border-color:#D7D7D7;font-size:0.65rem;color:#333;margin-bottom:0.5rem;padding:0;}
.topic .topicTitle > div.content-block.content-block01{position:relative;float:none;}
.content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e7e7e7;}
@@ -943,6 +957,7 @@ input::-webkit-input-placeholder{
.cardCity01 .card-header label{font-size:1rem;color:#333;}
.cardCity01 .card-header .button{top:0.6rem;}
.cardCity01 .card-content-inner{padding-bottom:5rem;}
+
.cardCity01 .card-footer{bottom:1.5rem;}
.cardCity02{background:url(../images/rankingBg.png) no-repeat center 5rem;background-size:100%;padding:0 0.75rem;padding-top:2.5rem;padding-bottom:0.8rem;border-bottom:none;position:relative;}
@@ -952,16 +967,17 @@ input::-webkit-input-placeholder{
.cardCity02 .card-footer span:nth-child(2) em{color:#333;}
.cardCity02 .card-footer img{width:3.65rem;position:absolute;top:-1.825rem;left:50%;margin-left:-1.825rem;}
-
.list-block.cityList ul:before{height:0;}
.list-block.cityList ul:after{height:0;}
+.list-block.cityList ul.list-container{margin-bottom:0.5rem;}
.list-block.cityList .item-inner{padding-right:0;padding-top:0;padding-bottom:0;min-height:1.5rem;}
.list-block.cityList .item-inner:after{height:0;}
.list-block.cityList .item-subtitle{color:#333;}
-.list-block.cityList ul li:nth-child(1) .item-subtitle{color:#999;}
+.list-block.cityList ul li:nth-child(1) .item-subtitle div{color:#999;}
+.list-block.cityList ul.list-container > div .item-subtitle div{color:#999;}
.list-block.cityList .item-subtitle div:first-child{margin-left:0;}
+.list-block.cityList .item-subtitle div.col-20{position:relative;height:1.1rem;}
.list-block.cityList .item-subtitle div.col-20:last-child em{color:#F18D00;}
-.list-block.cityList .item-subtitle div.col-20{position:relative;}
.list-block.cityList .item-subtitle div.col-20 .button{width:auto;height:1.1rem;top:0;left:0;right:inherit;font-style:normal;line-height:1rem;}
.list-block.cityList .item-subtitle div.col-25 .star .icon{margin-right:0;}
.list-block.cityList .item-subtitle div em{font-size:0.7rem;}
@@ -1072,7 +1088,7 @@ input::-webkit-input-placeholder{
.contentSuggest .noData a{text-decoration:underline;}
.contentSuggest .noData a.button{text-decoration:none;}
-.topBg02{background:#ecf6ff;border-bottom:solid 1px #e7e7e7;color:#333;text-align:justify;padding-top:1rem;margin-bottom:0.5rem;}
+
.topBg02 p{font-size:0.75rem;}
.topBg02 p label{color:#999;font-size:0.75rem;}
.topBg02 p em{color:#EB5F34;font-size:0.75rem;}
@@ -1145,12 +1161,30 @@ input::-webkit-input-placeholder{
.contentText{background:#fff;}
.topBg01{width:100%;background:url(../images/topBg.png) no-repeat center top;background-size:100%;border-bottom:solid 1px #e7e7e7;padding:1.2rem 0.75rem;padding-bottom:0;color:#fff;overflow:hidden;position:relative;}
-.topBg01 img{width:3rem;height:3rem;margin:0 auto;margin-top:0.6rem;}
-.topBg01 p{font-size:0.7rem;color:#333;text-align:center;margin-top:0.6rem;}
-.topBg01 p .button{width:4rem;margin:0 auto;}
+.topBg01 > img{width:3rem;height:3rem;margin:0 auto;margin-top:0.6rem;}
+.topBg01 > p{text-align:center;}
+.topBg01 > p label{font-size:0.7rem;color:#333;display:block;margin-top:0.6rem;position:relative;}
+.topBg01 > p label a{font-size:0.7rem;position:absolute;right:0;top:0;}
+.topBg01 > p .button{width:4rem;margin:0 auto;}
.tabs .noData img{width:30%;margin:0 auto;margin-top:3rem;}
+.topic .topicContent.homeBox{overflow-x:auto;}
+.topic .topicContent .topicContent_center.homeWin{width:540px;overflow:hidden;}
+.topic .topicContent .topicContent_center.homeWin div{width:90px;}
+
+/* 税费计算 */
+.buttons-tab .button{color:#999;}
+
+/* 分享 */
+.shareBox{height:66px;padding-left:0;padding-right:0.5rem;border-top:solid 1px #e7e7e7;bottom:0;}
+.shareBox ul:before{height:0;}
+.shareBox .list-block .item-media img{width:2.3rem;height:2.3rem;}
+.shareBox .list-block .item-title{font-size:0.75rem;line-height:1.2rem;}
+.shareBox .list-block .item-title em{color:#F18D00;}
+.shareBox .button{top:0.5rem;}
+.shareBox .icon-close{width:10px;height:10px;background:url(../images/icon-close.png) no-repeat center center;background-size:100%;position:absolute;top:0.25rem;right:0.25rem;}
+
/* 出错页面 */
.contentError{padding-top:30%;}
.contentError img{width:30%;margin:0 auto;}
@@ -1309,24 +1343,16 @@ input[type=range]::-webkit-slider-thumb {
.contentStart{background:#F18D00;}
.contentStart .time{width:65px;height:30px;line-height:1.6rem;text-align:center;font-size:0.7rem;color:#fff;background:rgba(0,0,0,0.3);border-radius:1.25rem;display:block;position:absolute;top:0.75rem;right:0.75rem;z-index:4;}
.contentStart #time{font-size:0.7rem;vertical-align:middle;}
-.contentStart .startImg01{width:50%;position:absolute;top:30%;left:50%;margin-left:-25%;z-index:3;}
-.contentStart .startImg02{width:100%;position:absolute;bottom:0;z-index:2;}
-.contentStart .startImg03{width:100%;position:absolute;top:0;z-index:1;}
+.contentStart .startImg{width:100%;}
/* 引导页 */
-.swiper-container{width:100%;height:100%;background:#fff;z-index:10000;}
-.swiper-slide img{margin:0 auto;margin-top:7rem;}
-.swiper-slide img.guideImg01{width:90%;}
-.swiper-slide img.guideImg02{width:85%;}
-.swiper-slide img.guideImg03{width:55%;}
-.swiper-slide div{position:absolute;bottom:5rem;width:100%;}
-.swiper-slide p{text-align:center;padding:0 1rem;}
-.swiper-slide p label{font-size:1rem;}
-.swiper-slide p small{font-size:0.7rem;color:#999;}
-.swiper-slide div.content-block{bottom:0.5rem;}
-.swiper-slide div.content-block .button{width:50%;margin:0 auto;height:2.1rem;line-height:2rem;}
-.swiper-pagination-bullet{width:10px;height:10px;background:#D7D7D7;opacity:1;}
-.swiper-pagination-bullet-active{width:22px;height:10px;background:#F18D00;border-radius:0.3rem;}
+.guideSwiper.swiper-container{width:100%;height:100%;background:#fff;z-index:10000;}
+.guideSwiper .swiper-slide img{width:100%;}
+.guideSwiper .swiper-slide div{position:absolute;bottom:5rem;width:100%;}
+.guideSwiper .swiper-slide div.content-block{bottom:0.5rem;}
+.guideSwiper .swiper-slide div.content-block .button{width:50%;margin:0 auto;height:2.1rem;line-height:2rem;}
+.guideSwiper .swiper-pagination-bullet{width:10px;height:10px;background:#D7D7D7;opacity:1;}
+.guideSwiper .swiper-pagination-bullet-active{width:22px;height:10px;background:#F18D00;border-radius:0.3rem;}
/* 字体图标 */
@font-face {font-family: "iconfont";
@@ -1378,6 +1404,7 @@ input[type=range]::-webkit-slider-thumb {
.textAlignLeft01{left:110px;}
label.spacing01{margin-right:41px;}
label.spacing02{margin-right:42px;}
+ small.spacing{letter-spacing:32px;}
small.spacing01a{margin-right:3.7px;}
.rangeNote span.span01{margin-right:8.5%;}
.rangeNote span.span01a{margin-left:8%;}
@@ -1393,6 +1420,7 @@ input[type=range]::-webkit-slider-thumb {
.list-block .item-title span.c3a{max-width:180px;}
label.spacing01{margin-right:11px;}
label.spacing02{margin-right:12px;}
+ small.spacing{letter-spacing:28px;}
.rangeNote span.span01{margin-right:8.5%;}
.rangeNote span.span01a{margin-left:9%;}
.rangeNote span.span02{margin-right:8%;}
@@ -1401,6 +1429,7 @@ input[type=range]::-webkit-slider-thumb {
.rangeNote span.span05{margin-right:13%;}
}
@media(max-width:320px){
+ .topic .topicTitle{font-size:0.75rem;}
.list-block .item-title span.c3a{max-width:112px;}
.list-block .item-title label{max-width:100px;}
label.spacing01{margin-right:11px;}
@@ -1416,21 +1445,25 @@ input[type=range]::-webkit-slider-thumb {
.cardInfo02 img{width:5rem;height:4rem;}
.cardInfo02 .item-subtitle{margin-top:0;}
.cardCity .card-footer span em strong{font-size:0.9rem;}
- .list-block.media-list.cityList ul li:nth-child(1) .item-subtitle div{font-size:0.6rem;}
+ .list-block.cityList ul li:nth-child(1) .item-subtitle div{font-size:0.6rem;}
+ .list-block.cityList ul.list-container > div .item-subtitle div{font-size:0.6rem;}
.adBoxApp{width:88%;}
+ .bar-nav01c + .picker-modal-inner .picker-items-col .picker-item{padding:0 5rem;}
}
@media(min-height:750px){
.bar-tab{bottom:1.7rem;}
.bar-tab ~ .content{bottom:4.2rem;}
- .swiper-slide div{bottom:12rem;}
- .swiper-slide div.content-block{bottom:5rem;}
- .swiper-container-horizontal>.swiper-pagination{bottom:4rem;}
+ .guideSwiper .swiper-slide div{bottom:12rem;}
+ .guideSwiper .swiper-slide div.content-block{bottom:5rem;}
+ .guideSwiper.swiper-container-horizontal >.swiper-pagination{bottom:4rem;}
}
@media only screen and (-webkit-min-device-pixel-ratio:2){
.list-block .item-inner:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
+ .buttons-tab:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
}
@media only screen and (-webkit-min-device-pixel-ratio:3){
.list-block .item-inner:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
+ .buttons-tab:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
}
diff --git a/fangija-zsyf/css/theme-orange.css b/fangija-zsyf/css/theme-orange.css
index d9a8b4d..c8ca97c 100644
--- a/fangija-zsyf/css/theme-orange.css
+++ b/fangija-zsyf/css/theme-orange.css
@@ -245,6 +245,8 @@ html:not(.watch-active-state) .theme label.label-radio:active,
.buttons-row.theme .button{border-color:#D7D7D7;color:#999;}
.buttons-row.theme .button.active{background:none;border-color:#F18D00;color:#F18D00;}
.buttons-row01.theme .button{color:#333;}
+.buttonBox .button.active{background:none;border-color:#F18D00;color:#F18D00;}
+.buttonBox .button:active{background:none;border-color:#F18D00;color:#F18D00;}
.selectBox div.theme{background:none;}
.selectBox div.theme.active{color:#F18D00;}
diff --git a/fangija-zsyf/doc/accelerometer.html b/fangija-zsyf/doc/accelerometer.html
deleted file mode 100644
index e480c0f..0000000
--- a/fangija-zsyf/doc/accelerometer.html
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Accelerometer模块管理设备加速度传感器,用于获取设备加速度信息,包括x(屏幕水平方向)、y(垂直屏幕水平方向)、z(垂直屏幕平面方向)三个方向的加速度信息。通过plus.accelerometer获取设备加速度传感器管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Accelerometer": {
- "description": "加速度传感器"
- }
-}
-}
-
-
-
设备加速度信息对象
-
-interface Acceleration {
- readonly attribute Number xAxis;
- readonly attribute Number yAxis;
- readonly attribute Number zAxis;
-}
-
-
说明:
-
- JSON对象,保存获取设备的加速度信息,包括x、y、z三个方向的加速度信息。
-
-
属性:
-
-xAxis: (Number
- 类型
-) x轴方向的加速度获取当前设备x轴方向的加速度,浮点型数据,与物理学中的加速度值一致。
-
-yAxis: (Number
- 类型
-) y轴方向的加速度获取当前设备y轴方向的加速度,浮点型数据,与物理学中的加速度值一致。
-
-zAxis: (Number
- 类型
-) z轴方向的加速度获取当前设备z轴方向的加速度,浮点型数据,与物理学中的加速度值一致。
-
-
-
-
监听设备加速度感应器参数
-
-interface Acceleration {
- readonly attribute DOMString frequency;
-}
-
-
说明:
-
- JSON对象,用于设置获取设备加速度信息的参数。
-
-
属性:
-
-
-
获取设备加速度信息成功的回调函数
-
-void onSuccess( acceleration ) {
- // Get acceleration code.
-}
-
-
参数:
-
acceleration:
- (
- Acceleration
- )
- 必选 设备的加速度信息
- Acceleration类型对象,用于获取各方向的详细加速度值。
-
-
返回值:
-
void
- : 无
-
获取设备加速度信息失败的回调函数
-
-function void onAccelerometerError( Exception error ) {
- // Handle error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 获取加速度操作的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/android.html b/fangija-zsyf/doc/android.html
deleted file mode 100644
index 8a85332..0000000
--- a/fangija-zsyf/doc/android.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Native.js for Android封装一条通过JS语法直接调用Native Java接口通道,通过plus.android可调用几乎所有的系统API。
-
方法:
-
-
对象:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Invocation": {
- "description": "Native.js"
- }
-}
-}
-
-
-
Java类对象
-
-interface ClassObject {
- // ...
- function Object plusGetAttribute( String name );
- function Object plusSetAttribute( String name, Object value );
- // ...
-}
-
-
说明:
-
- Java类对象,可通过其属性获取类的常量,可通过方法来操作类的静态变量和方法,也通过new方法来创建类的实例对象。
- 对于类的常量,则直接通过.后面跟随常量名称调用即可。
-
-
方法:
-
-
-
Java实例对象
-
-interface InstanceObject {
- // ...
- function Object plusGetAttribute( String name );
- function Object plusSetAttribute( String name, Object value );
- // ...
-}
-
-
说明:
-
- Java实例对象,可通过其方法来操作实例的变量和方法。
- 注意:必须通过plusGetAttribute()方法读取实例对象的属性值,通过plusSetAttribute()方法设置实例对象的属性值。
-
-
方法:
-
-
-
-
diff --git a/fangija-zsyf/doc/audio.html b/fangija-zsyf/doc/audio.html
deleted file mode 100644
index cbd3ffd..0000000
--- a/fangija-zsyf/doc/audio.html
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Audio模块用于提供音频的录制和播放功能,可调用系统的麦克风设备进行录音操作,也可调用系统的扬声器设备播放音频文件。通过plus.audio获取音频管理对象。
-
常量:
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Audio": {
- "description": "音频"
- }
-}
-}
-
-
-
录音对象
-
-interface AudioRecorder {
- readonly attribute String[] supportedSamplerates;
- readonly attribute String[] supportedFormats;
- function record( option, successCB, errorCB );
- function stop();
-}
-
-
属性:
-
-
方法:
-
-
-
音频播放对象
-
-interface AudioPlayer {
- function void play( successCB, errorCB );
- function void pause();
- function void resume();
- function void stop();
- function void seekTo( position );
- function Number getDuration();
- function Number getPosition();
- function void setRoute( route );
-}
-
-
说明:
-
- 音频播放对象,用于音频文件的播放。不能通过new方法直接创建,只能通过audio.createPlayer方法创建。
-
-
方法:
-
-
-
JSON对象,调用麦克风设备进行录音的参数
-
属性:
-
-filename: (String
- 类型
-) 保存录音文件的路径
- 可设置具体文件名,也可只设置路径,如果以“/”结尾则表明是路径,文件名由录音程序自动生成。
- 如未设置则使用默认目录生成随机文件名称,默认目录为应用%APPID%下的documents目录。
-
-
-samplerate: (String
- 类型
-) 录音文件的采样率
- 需通过supportedSamplerates属性获取设备支持的采样率,若设置无效的值,则使用系统默认的采样率。
-
-format: (String
- 类型
-) 录音文件的格式
- 需通过supportedFormats属性获取设备支持的录音格式,若设置无效的值,则使用系统默认的录音格式。
-
-
-
-
-
录音操作成功回调
-
-void onSuccess( recordFile ) {
- // Get record file code.
-}
-
-
说明:
-
麦克风录音操作成功的回调函数,在录音操作完成调用stop()方法时调用。
-
参数:
-
recordFile:
- (
- String
- )
- 必选 录音操作保存的音频文件路径
-
-
返回值:
-
void
- : 无
-
播放音频文件操作成功回调
-
-void onCompleted() {
- // Play audio file completed code.
-}
-
-
说明:
-
- 音频播放操作成功的回调函数,在音频播放完成或调用stop()方法时触发。
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
音频操作失败回调
-
-void onError( error ) {
- // Handle audio error
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 音频操作的错误信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/barcode.html b/fangija-zsyf/doc/barcode.html
deleted file mode 100644
index 20beb38..0000000
--- a/fangija-zsyf/doc/barcode.html
+++ /dev/null
@@ -1,252 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Barcode模块管理条码扫描,提供常见的条码(二维码及一维码)的扫描识别功能,可调用设备的摄像头对条码图片扫描进行数据输入。通过plus.barcode可获取条码码管理对象。
-
常量:
-
-
-QR : 条码类型常量,QR二维码,数值为0
-
-EAN13 : 条码类型常量,EAN一维条形码码标准版,数值为1
-
-EAN8 : 条码类型常量,ENA一维条形码简版,数值为2
-
-AZTEC : 条码类型常量,Aztec二维码,数值为3
-
-DATAMATRIX : 条码类型常量,Data Matrix二维码,数值为4
-
-UPCA : 条码类型常量,UPC码标准版,数值为5
-
-UPCE : 条码类型常量,UPC码缩短版,数值为6
-
-CODABAR : 条码类型常量,Codabar码,数值为7
-
-CODE39 : 条码类型常量,Code39一维条形码,数值为8
-
-CODE93 : 条码类型常量,Code93码,数值为9
-
-CODE128 : 条码类型常量,Code128码,数值为10
-
-ITF : 条码类型常量,ITF码,数值为11
-
-MAXICODE : 条码类型常量,MaxiCode二维码,数值为12
-
-PDF417 : 条码类型常量,PDF 417码,数值为13
-
-RSS14 : 条码类型常量,RSS 14组合码,数值为14
-
-RSSEXPANDED : 条码类型常量,扩展式RSS组合码,数值为15
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
permissions
-
-{
-// ...
-"permissions":{
- // ...
- "Barcode": {
- "description": "二维码"
- }
-}
-}
-
-
-
条码扫描识别控件对象
-
-interface plus.barcode.Barcode {
- // Methods
- function void start( options );
- function void cancel();
- function void close();
- function void setFlash( open );
-
- // Events
- function void onmarked();
- function void onerror();
-}
-
-
说明:
-
-Barcode对象表示条码识别控件对象,在窗口中显示条码识别控件,使用此对象可自定义条码识别界面。
-
-
构造:
-
-
方法:
-
-
事件:
-
-
-
条码扫描控件样式参数
-
-interface plus.barcode.BarcodeStyles {
- attribute String frameColor;
- attribute String scanbarColor;
- attribute String background;
-}
-
-
说明:
-
- 设置条码识别控件的样式,如扫描框、扫描条的颜色等。
-
-
属性:
-
-frameColor: (String
- 类型
-) 扫描框颜色
- 颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
-
-
-scanbarColor: (String
- 类型
-) 扫描条颜色
- 颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
-
-
-background: (String
- 类型
-) 条码识别控件背景颜色
- 颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
-
-
-
-
-
条码识别控件扫描参数
-
-interface plus.barcode.BarcodeOptions {
- attribute Boolean conserve;
- attribute String filename;
- attribute Boolean vibrate;
- attribute String sound;
-}
-
-
说明:
-
- 设置条码识别控件扫描条码的参数,如是否保存扫描成功时的截图等。
-
-
属性:
-
-conserve: (Boolean
- 类型
-) 是否保存成功扫描到的条码数据时的截图
- 如果设置为true则在成功扫描到条码数据时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。默认值为false,不保存图片。
-
-
-filename: (String
- 类型
-) 保存成功扫描到的条码数据时的图片路径
- 可通过此参数设置保存截图的路径或名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
-
-
-vibrate: (Boolean
- 类型
-) 成功扫描到条码数据时是否需要震动提醒
- 如果设置为true则在成功扫描到条码数据时震动设备,false则不震动。默认值为true。
-
-
-sound: (String
- 类型
-) 成功扫描到条码数据时播放的提示音类型
- 可取值:
- "none" - 不播放提示音;
- "default" - 播放默认提示音(5+引擎内置)。
- 默认值为"default"。
-
-
-
-
-
条码识别成功的回调函数
-
-void BarcodeSuccessCallback ( type, code, file ) {
- // Barcode success code
-}
-
-
说明:
-
当获取条码识别成功时的回调函数,用于返回识别成功的条码数据。
-
参数:
-
-type:
- (
- Number
- )
- 必选 识别到的条码类型 Number类型的值,与Barcode对象定义的条码类型常量一致。
-code:
- (
- String
- )
- 必选 识别到的条码数据 从条码图片中扫描出的数据内容,字符串采用UTF8编码格式。
-file:
- (
- String
- )
- 可选 识别到的条码图片文件路径 识别到的条码数据图片,为png格式文件,为设置为不保存图片,则返回undefined。
-
-
返回值:
-
void
- : 无
-
条码识别错误的回调函数
-
-void BarcodeErrorCallback(error){
- // Error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 条码识别的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/cache.html b/fangija-zsyf/doc/cache.html
deleted file mode 100644
index 57b7ba8..0000000
--- a/fangija-zsyf/doc/cache.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Cache模块用于管理应用缓存,通过plus.cache获取缓存管理对象。
-
方法:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Cache": {
- "description": "应用缓存"
- }
-}
-}
-
-
-
清除应用缓存完成回调
-
-void onCompleted() {
- // Clear cache completed code.
-}
-
-
说明:
-
清除应用缓存回调函数,调用plus.cache.clear清除缓存操作时作为参数传入,在清除缓存操作完成时触发回调。
-
参数:
-
-
返回值:
-
void
- : 无
-
计算应用使用缓存容量回调
-
-void onCompleted( size ) {
- // Calculate cache complete code.
-}
-
-
说明:
-
计算应用当前使用缓存容量回调函数,调用plus.cache.calculate计算缓存容量操作时作为参数传入,在计算缓存容量大小完成时触发回调。
-
参数:
-
size:
- (
- Number
- )
- 必选 应用当前使用缓存的大小,单位为byte
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/camera.html b/fangija-zsyf/doc/camera.html
deleted file mode 100644
index d451b46..0000000
--- a/fangija-zsyf/doc/camera.html
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Camera模块管理设备的摄像头,可用于拍照、摄像操作,通过plus.camera获取摄像头管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Camera": {
- "description": "摄像头"
- }
-}
-}
-
-
-
摄像头对象
-
-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();
-}
-
-
属性:
-
-
方法:
-
-
-
JSON对象,调用摄像头的参数
-
-interface CameraOption {
- attribute String filename;
- attribute String format;
- attribute String index;
- attribute PopPosition popover;
-}
-
-
属性:
-
-filename: (String
- 类型
-) 拍照或摄像文件保存的路径
- 可设置具体文件名(如"_doc/camera/a.jpg");也可只设置路径,以"/"结尾则表明是路径(如"_doc/camera/")。如未设置文件名称或设置的文件名冲突则文件名由程序程序自动生成。
-
-
-format: (String
- 类型
-) 拍照或摄像的文件格式
- 可通过Camera对象的supportedImageFormats或supportedVideoFormats获取,如果设置的参数无效则使用系统默认值。
-
-
-index: (String
- 类型
-) 拍照或摄像默认使用的摄像头
- 拍照或摄像界面默认使用的摄像头编号,1表示主摄像头,2表示辅摄像头。
-
-
-popover: (PopPosition
- 类型
-) 拍照或摄像界面弹出指示区域
- 对于大屏幕设备如iPad,拍照或摄像界面为弹出窗口,此时可通过此参数设置弹出窗口位置,其为JSON对象,格式如{top:"10px",left:"10px",width:"200px",height:"200px"},默认弹出位置为屏幕居中。
-
-
-
-
-
JSON对象,弹出拍照或摄像界面指示位置
-
属性:
-
-top: (String
- 类型
-) 指示区域距离容器顶部的距离
- 弹出拍照或摄像窗口指示区域距离容器顶部的距离,支持像素值(如"100px")和百分比(如"50%")。
-
-left: (String
- 类型
-) 指示区域距离容器左侧的距离
- 弹出拍照或摄像窗口指示区域距离容器左侧的距离,支持像素值(如"100px")和百分比(如"50%")。
-
-width: (String
- 类型
-) 指示区域的宽度
- 弹出拍照或摄像窗口指示区域的宽度,支持像素值(如"100px")和百分比(如"50%")。
-
-height: (String
- 类型
-) 指示区域的高度
- 弹出拍照或摄像窗口指示区域的高度,支持像素值(如"100px")和百分比(如"50%")。
-
-
-
-
调用摄像头操作成功回调
-
-void onSuccess( capturedFile ) {
- // Caputre image/video file code.
-}
-
-
说明:
-
调用摄像头操作成功的回调函数,在拍照或摄像操作成功时调用,用于返回图片或视频文件的路径。
-
参数:
-
capturedFile:
- (
- String
- )
- 必选 拍照或摄像操作保存的文件路径
-
-
返回值:
-
void
- : 无
-
摄像头操作失败回调
-
-void onError( error ) {
- // Handle camera error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 摄像头操作的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/console.html b/fangija-zsyf/doc/console.html
deleted file mode 100644
index d1b3cb9..0000000
--- a/fangija-zsyf/doc/console.html
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Console模块用于跟踪调试的API,可根据调试需求输出日志,协助开发人员定位业务逻辑问题。
-
方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Console": {
- "description": "日志,跟踪调试输出日志信息"
- }
-}
-}
-
-
-
-
diff --git a/fangija-zsyf/doc/contacts.html b/fangija-zsyf/doc/contacts.html
deleted file mode 100644
index c67900b..0000000
--- a/fangija-zsyf/doc/contacts.html
+++ /dev/null
@@ -1,407 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Contacts模块管理系统通讯录,用于可对系统通讯录进行增、删、改、查等操作。通过plus.contacts获取系统通讯录管理对象。
-
常量:
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Contacts": {
- "description": "通讯录,访问系统联系人"
- }
-}
-}
-
-
-
通讯录对象
-
-interface AddressBook {
- function Contact create();
- function void find( contactFields, successCB, errorCB, findOptions );
-}
-
-
说明:
-
通讯录管理对象,可对系统通讯录进行联系人的增、删、改、查操作。
-
方法:
-
-
-
联系人对象
-
-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 );
-}
-
-
说明:
-
联系人对象,包括联系人的各种信息,如名称、电话号码、地址等。也包括新增、删除联系人的操作方法。
-
属性:
-
-
方法:
-
-
-
JSON对象,联系人域数据对象
-
-interface ContactField {
- attribute String type;
- attribute String value;
- attribute Boolean preferred;
-}
-
-
说明:
-
联系人域数据对象,保存联系人特定域信息。
-
属性:
-
-type: (String
- 类型
-) 联系人域类型,如电话号码中的“mobile”、“home”、“company”
-
-value: (String
- 类型
-) 联系人域值
-
-preferred: (Boolean
- 类型
-) 是否为首选项
-
-
-
-
JSON对象,联系人名称对象
-
-interface ContactName {
- attribute String formatted;
- attribute String familyName;
- attribute String givenName;
- attribute String middleName;
- attribute String honorificPrefix;
- attribute String honorificSuffix;
-}
-
-
说明:
-
联系人名称对象,保存联系人名称信息,如姓、名等。
-
属性:
-
-formatted: (String
- 类型
-) 联系人的完整名称,由其它字段组合生成
-
-familyName: (String
- 类型
-) 联系人的姓
-
-givenName: (String
- 类型
-) 联系人的名
-
-middleName: (String
- 类型
-) 联系人的中间名
-
-honorificPrefix: (String
- 类型
-) 联系人的前缀(如Mr.或Dr.)
-
-honorificSuffix: (String
- 类型
-) 联系人的后缀
-
-
-
-
JSON对象,联系人地址对象
-
-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;
-}
-
-
说明:
-
联系人地址对象,保存联系人地址信息,如国家、省份、城市等。
-
属性:
-
-type: (String
- 类型
-) 联系人地址类型,如“home”表示家庭地址、“company”表示单位地址
-
-formatted: (String
- 类型
-) 完整地址,由其它字段组合而成
-
-streetAddress: (String
- 类型
-) 完整的街道地址
-
-locality: (String
- 类型
-) 城市或地区
-
-region: (String
- 类型
-) 省或地区
-
-country: (String
- 类型
-) 国家
-
-postalCode: (String
- 类型
-) 邮政编码
-
-preferred: (Boolean
- 类型
-) 是否为首选项
-
-
-
-
JSON对象,联系人所属组织信息
-
-interface ContactOrganization {
- attribute String type;
- attribute String name;
- attribute String department;
- attribute String title;
- attribute Boolean preferred;
-}
-
-
属性:
-
-type: (String
- 类型
-) 联系人所属组织类型,如"company"
-
-name: (String
- 类型
-) 联系人所属组织名称
-
-department: (String
- 类型
-) 联系人所属组织部门
-
-title: (String
- 类型
-) 联系人在组织中的职位
-
-preferred: (Boolean
- 类型
-) 是否为首选项
-
-
-
-
JSON对象,查找联系人参数
-
-interface ContactFindOption {
- attribute ContactFindFilte[] filter;
- attribute Boolean multiple;
-}
-
-
属性:
-
-filter: (ContactFindFilter
- 类型
-) 数组,查找时的过滤器可设置为空,表示不过滤。
-
-multiple: (Boolean
- 类型
-) 是否查找多个联系人,默认值为true
-
-
-
-
JSON对象,联系人查找过滤器
-
-interface ContactFindFilter {
- attribute String logic;
- attribute String field;
- attribute String value;
-}
-
-
属性:
-
-
-
获取通讯录操作成功回调函数
-
-void onSuccess( addressbook ){
- // Code AddressBook here
-}
-
-
参数:
-
-
返回值:
-
void
- : 无
-
查找联系人操作成功回调函数
-
-void onSuccess( contacts ){
- // Find contact success.
-}
-
-
参数:
-
contacts:
- (
- Contact
- )
- 必选 数组,查找到的联系人对象
-
-
返回值:
-
void
- : 无
-
联系人操作成功回调函数
-
-void onSuccess(){
- // Operate success
-}
-
-
参数:
-
-
返回值:
-
void
- : 无
-
联系人操作失败回调
-
-void onError( error ){
- // Handle the error
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 联系人操作的错误信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/device.html b/fangija-zsyf/doc/device.html
deleted file mode 100644
index ed7b9b3..0000000
--- a/fangija-zsyf/doc/device.html
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Device模块管理设备信息,用于获取手机设备的相关信息,如IMEI、IMSI、型号、厂商等。通过plus.device获取设备信息管理对象。
-
属性:
-
-
方法:
-
-
对象:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Device": {
- "description": "设备信息"
- }
-}
-}
-
-
-
Screen模块管理设备屏幕信息
-
属性:
-
-
方法:
-
-
-
Display模块管理应用可使用的显示区域信息
-
属性:
-
-
-
Device模块用于获取网络信息
-
常量:
-
-
方法:
-
-
-
OS模块管理操作系统信息
-
属性:
-
-
-
-
diff --git a/fangija-zsyf/doc/downloader.html b/fangija-zsyf/doc/downloader.html
deleted file mode 100644
index 6f076c9..0000000
--- a/fangija-zsyf/doc/downloader.html
+++ /dev/null
@@ -1,310 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Downloader模块管理网络文件下载任务,用于从服务器下载各种文件,并支持跨域访问操作。通过plus.downloader获取下载管理对象。Downloader下载使用HTTP的GET/POST方式请求下载文件,符合标准HTTP/HTTPS传输协议。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Downloader": {
- "description": "文件下载,管理文件下载任务"
- }
-}
-}
-
-
-
Download对象管理一个下载任务
-
-interface 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( headerName );
- function void pause();
- function void resume();
- function void setRequestHeader( String headerName, String headerValue );
- function void start();
-}
-
-
属性:
-
-
方法:
-
-
-
下载任务事件类型
-
常量:
-
-
-
下载任务状态
-
常量:
-
-undefined: (undefined
- 类型
-) 下载任务未开始
- 通过plus.downloader.createDownload()方法创建下载任务后的初始状态,此时可调用其start()方法开始下载。
-
-
-0: (Number
- 类型
-) 下载任务开始调度
- 调用下载任务的start()方法之后处于此状态,此时下载任务处于可调度下载状态。
-
-
-1: (Number
- 类型
-) 下载任务开始请求
- 下载任务建立网络连接,发送请求到服务器并等待服务器的响应。
-
-
-2: (Number
- 类型
-) 下载任务请求已经接收
- 下载任务网络连接已建立,服务器返回响应,准备传输数据内容。
-
-
-3: (Number
- 类型
-) 下载任务接收数据
- 下载任务接收数据,监听statechanged事件时可多次触发此状态。
-
-
-4: (Number
- 类型
-) 下载任务已完成
- 下载任务完成数据传输并断开连接,下载成功或失败都会设置为此状态。
-
-
-5: (Number
- 类型
-) 下载任务已暂停
- 调用下载任务的pause()方法将任务暂停,此时可调用其resume()方法重新开始下载。
-
-
--1: (Number
- 类型
-) 枚举任务状态
- 非下载任务状态,泛指所有下载任务的状态,用于enumerate()和clear()操作时指定作用于所有下载任务。
-
-
-
-
-
下载任务参数
-
说明:
-
- 在创建下载任务时设置的参数,如设置下载任务使用的HTTP协议类型、优先级等。
-
-
属性:
-
-method: (String
- 类型
-) 网络请求类型
- 支持http协议的“GET”、“POST”,默认为“GET”请求。
-
-
-data: (String
- 类型
-) POST请求时提交的数据
- 仅在网络请求类型method设置为"POST"时有效,"GET"请求时忽略此数据。
-
-
-filename: (String
- 类型
-) 下载文件保存的路径
- 保存文件路径仅支持以"_downloads/"、"_doc/"、"_documents/"开头的字符串。
- 文件路径以文件后缀名结尾(如"_doc/download/a.doc")表明指定保存文件目录及名称,以“/”结尾则认为指定保存文件的目录(此时程序自动生成文件名)。
- 如果指定的文件已经存在,则自动在文件名后面加"(i)",其中i为数字,如果文件名称后面已经是此格式,则数字i递增,如"download(1).doc"。
- 默认保存目录为("_downloads"),并自动生成文件名称。
-
-
-priority: (Number
- 类型
-) 下载任务的优先级
- 数值类型,数值越大优先级越高,默认优先级值为0。
-
-
-timeout: (Number
- 类型
-) 下载任务超时时间
- 数值类型,单位为s(秒),默认值为120s。
- 超时时间为服务器响应请求的时间(不是下载任务完成的总时间),如果设置为0则表示永远不超时。
-
-
-retry: (Number
- 类型
-) 下载任务重试次数
- 数值类型,默认为重试3次。
-
-
-retryInterval: (Number
- 类型
-) 下载任务重试间隔时间
- 数值类型,单位为s(秒),默认值为30s。
-
-
-
-
-
下载任务完成时的回调
-
-vaoid onCompleted( Download download, Number status ) {
- // Download file complete code
-}
-
-
说明:
-
- 下载任务完成时的回调函数,在下载任务完成时调用。
- 下载任务失败也将触发此回调。
-
-
参数:
-
-download :
- (
- Download
- )
- 必选 下载任务对象
-
-status:
- (
- Number
- )
- 必选 下载结果状态码
- HTTP传输协议状态码,如果未获取传输状态则其值则为0,如下载成功其值通常为200。
-
-
-
返回值:
-
void
- : 无
-
下载任务状态变化回调
-
-void onStateChanged( Download download, status ) {
- // Download state changed code.
-}
-
-
参数:
-
-download :
- (
- Download
- )
- 必选 下载任务对象
-
-status:
- (
- Number
- )
- 必选 下载结果状态码
- HTTP传输协议状态码,如果未获取传输状态则其值则为0,如下载成功其值通常为200。
-
-
-
返回值:
-
void
- : 无
-
枚举下载任务回调
-
-void onEnumerated( Download[] downloads ) {
- // Enumerate success code
-}
-
-
参数:
-
downloads:
- (
- Array [
- Download
- ]
-
- )
- 必选 枚举到的下载任务对象数组
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/events.html b/fangija-zsyf/doc/events.html
deleted file mode 100644
index a36f241..0000000
--- a/fangija-zsyf/doc/events.html
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Events模块管理客户端事件,包括系统事件,如扩展API加载完毕、程序前后台切换等。
-
常量:
-
-
方法:
-
-
回调方法:
-
-
-
事件触发回调函数
-
-
-void onTrig(){
- // Event trig code
-}
-
-
-
说明:
-
- 指定事件触发时的回调函数,在指定的事件已经发生时调用。
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
页面加载错误事件回调函数
-
-
-void onErrorTrig(Event event){
- // Event trig code
- var url = event.url; // 加载错误的页面路径,API中传入的url值
- var href = event.href; // 加载错误的页面完整路径,通常以“file://”开头的路径
-}
-
-
-
说明:
-
- 当Webview窗口加载页面失败后打开错误页面时触发此事件。
-
-
参数:
-
event:
- (
- Event
- )
- 可选 加载页面失败信息
- 可通过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”。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/gallery.html b/fangija-zsyf/doc/gallery.html
deleted file mode 100644
index 428dafe..0000000
--- a/fangija-zsyf/doc/gallery.html
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Gallery模块管理系统相册,支持从相册中选择图片或视频文件、保存图片或视频文件到相册等功能。通过plus.gallery获取相册管理对象。
-
方法:
-
-
-pick : 从系统相册选择文件(图片或视频)
-
-save : 保存文件到系统相册中
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Gallery": {
- "description": "系统相册"
- }
-}
-}
-
-
-
JSON对象,从相册中选择文件的参数
-
属性:
-
-animation: (Boolean
- 类型
-) 是否显示系统相册文件选择界面的动画是否显示系统相册文件选择界面的动画,可取值true、false,默认值为true。
-
-filename: (String
- 类型
-) 选择文件保存的路径
- 某些系统不能直接使用系统相册的路径,这时需要将选择的文件保存到应用可访问的目录中,可通过此参数设置保存文件的路径。
- 如果路径中包括文件后缀名称,则表明指定文件路径及名称,否则仅指定文件保存目录,文件名称自动生成。
-
-
-filter: (GalleryFilter
- 类型
-) 相册中选择文件类型过滤器
- 系统相册选择器中可选择的文件类型,可设置为仅选择图片文件(“image”)、视频文件(“video”)或所有文件(“none”),默认值为“image”。
-
-
-maximum: (Number
- 类型
-) 最多选择的图片数量
- 仅在支持多选时有效,取值范围为1到Infinity,默认值为Infinity,即不限制选择的图片数。
- 如果设置的值非法则使用默认值Infinity。
-
-
-multiple: (Boolean
- 类型
-) 是否支持多选图片
- 可从系统相册中选择多张图片,选择图片后通过GalleryMultiplePickSuccessCallback回调返回选择的图片。
-
-
-onmaxed: (Function
- 类型
-) 超过最多选择图片数量事件
- 使用相册多选图片时,可通过maximum属性设置最多选择的图片数量,当用户操作选择的数量大于此时触发此事件。
-
-
-popover: (PopPosition
- 类型
-) 相册选择界面弹出指示区域
- 对于大屏幕设备如iPad,相册选择界面为弹出窗口,此时可通过此参数设置弹出窗口位置。
- 其为JSON对象,格式如{top:"10px",left:"10px",width:"200px",height:"200px"},所有值为像素值,左上坐标相对于容器的位置,默认弹出位置为屏幕居中。
-
-
-selected: (Array [
- String
- ]
-
- 类型
-) 已选择的图片路径列表
- 仅在多图片选择时生效,相册选择界面将选中指定的图片路径列表。
- 如果指定的路径无效,则忽略此项;如果指定的路径数超过maximum属性指定的最大选择数目则超出的图片不选中。
-
-
-system: (Boolean
- 类型
-) 是否使用系统相册文件选择界面
- 设置为true时,如果系统自带相册选择控件时则优先使用,否则使用5+统一相册选择控件;设置为false则不使用系统自带相册选择控件,直接使用5+统一相册选择界面。
- 默认值为true。
-
-
-
-
-
相册选择文件过滤类型
-
属性:
-
-"image": (String
- 类型
-) 仅可选择图片文件
-
-"video": (String
- 类型
-) 仅可选择视频文件
-
-"none": (String
- 类型
-) 不过滤,可选择图片或视频文件
-
-
-
-
JSON对象,弹出拍照或摄像界面指示位置
-
属性:
-
-top: (String
- 类型
-) 指示区域距离容器顶部的距离
- 弹出拍照或摄像窗口指示区域距离容器顶部的距离,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值值。
-
-left: (String
- 类型
-) 指示区域距离容器左侧的距离
- 弹出拍照或摄像窗口指示区域距离容器左侧的距离,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。
-
-width: (String
- 类型
-) 指示区域的宽度
- 弹出拍照或摄像窗口指示区域的宽度,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。
-
-height: (String
- 类型
-) 指示区域的高度
- 弹出拍照或摄像窗口指示区域的高度,单位支持像素值(如"100px")和百分比(如"50%"),如不写单位则为像素值。
-
-
-
-
单选系统相册图片成功的回调
-
-void onSuccess( file ) {
- // Success code
-}
-
-
说明:
-
- 系统相册中单选图片或视频文件成功的回调函数,在选择文件操作成功时调用。
-
-
参数:
-
file:
- (
- String
- )
- 必选 选择的图片或视频文件路径
-
-
返回值:
-
void
- : 无
-
多选系统相册图片成功的回调
-
-void onSuccess( event ) {
- // Pick success
- var files = event.files; // 保存多选的图片或视频文件路径
-}
-
-
说明:
-
- 系统相册中多选图片或视频文件成功的回调函数,在多选择文件操作成功时调用。
-
-
参数:
-
event:
- (
- Event
- )
- 必选 多选系统相册返回数据
- Event对象包含以下属性:
- files - 字符串数组,保存多选的图片或视频文件路径。
-
-
返回值:
-
void
- : 无
-
操作系统相册成功的回调
-
-void onSuccess() {
- // Success code
-}
-
-
说明:
-
- 系统相册操作成功的回调函数,在保存文件到系统相册操作成功时调用。
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
系统相册操作失败的回调
-
-void onError( error ) {
- // Handle error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
说明:
-
- 系统相册操作失败的回调函数,在选择或保存图片操作失败时调用。
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 相册操作失败的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/geolocation.html b/fangija-zsyf/doc/geolocation.html
deleted file mode 100644
index 7ee0604..0000000
--- a/fangija-zsyf/doc/geolocation.html
+++ /dev/null
@@ -1,340 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Geolocation模块管理设备位置信息,用于获取地理位置信息,如经度、纬度等。通过plus.geolocation可获取设备位置管理对象。虽然W3C已经提供标准API获取位置信息,但在某些平台存在差异或未实现,为了保持各平台的统一性,定义此规范接口获取位置信息。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Geolocation": {
- "description": "位置信息"
- }
-}
-}
-
-
-
JSON对象,设备位置信息数据
-
-interface Position {
- readonly attribute Coordinates coords;
- readonly attribute String coordsType;
- readonly attribute Number timestamp;
- readonly attribute Address address;
- readonly attribute String addresses;
-}
-
-
属性:
-
-coords: (Coordinates
- 类型
-) 地理坐标信息,包括经纬度、海拔、速度等信息
-
-coordsType: (String
- 类型
-) 获取到地理坐标信息的坐标系类型
- 可取以下坐标系类型:
- “gps”:表示WGS-84坐标系;
- “gcj02”:表示国测局经纬度坐标系;
- “bd09”:表示百度墨卡托坐标系;
- “bd09ll”:表示百度经纬度坐标系。
-
-
-timestamp: (Number
- 类型
-) 获取到地理坐标的时间戳信息
- 时间戳值为从1970年1月1日至今的毫秒数。
-
-
-address: (Address
- 类型
-) 获取到地理位置对应的地址信息
- 获取地址信息需要连接到服务器进行解析,所以会消耗更多的资源,如果不需要获取地址信息可通过设置PositionOptions参数的geocode属性值为false避免获取地址信息。
- 如果没有获取到地址信息则返回undefined。
-
-
-addresses: (String
- 类型
-) 获取完整地址描述信息
- 如果没有获取到地址信息则返回undefined。
-
-
-
-
-
JSON对象,地址信息
-
-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;
-}
-
-
属性:
-
-country: (String
- 类型
-) 国家
- 如“中国”,如果无法获取此信息则返回undefined。
-
-
-province: (String
- 类型
-) 省份名称
- 如“北京市”,如果无法获取此信息则返回undefined。
-
-
-city: (String
- 类型
-) 城市名称
- 如“北京市”,如果无法获取此信息则返回undefined。
-
-
-district: (String
- 类型
-) 区(县)名称
- 如“朝阳区”,如果无法获取此信息则返回undefined。
-
-
-street: (String
- 类型
-) 街道信息
- 如“酒仙桥路”,如果无法获取此信息则返回undefined。
-
-
-streetNum: (String
- 类型
-) 获取街道门牌号信息
- 如“3号”,如果无法获取此信息则返回undefined。
-
-
-poiName: (String
- 类型
-) POI信息
- 如“电子城.国际电子总部”,如果无法获取此信息则返回undefined。
-
-
-postalCode: (String
- 类型
-) 邮政编码
- 如“100016”,如果无法获取此信息则返回undefined。
-
-
-cityCode: (String
- 类型
-) 城市代码
- 如“010”,如果无法获取此信息则返回undefined。
-
-
-
-
-
JSON对象,地理坐标信息
-
-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;
-}
-
-
属性:
-
-latitude: (Number
- 类型
-) 坐标纬度值数据类型对象,地理坐标中的纬度值。
-
-longitude: (Number
- 类型
-) 坐标经度值数据类型对象,地理坐标中的经度值。
-
-altitude: (Number
- 类型
-) 海拔信息数据类型对象,如果无法获取此信息,则此值为空(null)。
-
-accuracy: (Number
- 类型
-) 地理坐标信息的精确度信息数据类型对象,单位为米,其有效值必须大于0。
-
-altitudeAccuracy: (Number
- 类型
-) 海拔的精确度信息数据类型对象,单位为米,其有效值必须大于0。如果无法获取海拔信息,则此值为空(null)。
-
-heading: (Number
- 类型
-) 表示设备移动的方向
- 数据类型对象,范围为0到360,表示相对于正北方向的角度。如果无法获取此信息,则此值为空(null)。如果设备没有移动则此值为NaN。
-
-
-speed: (Number
- 类型
-) 表示设备移动的速度
- 数据类型对象,单位为米每秒(m/s),其有效值必须大于0。如果无法获取速度信息,则此值为空(null)。
-
-
-
-
-
JSON对象,监听设备位置信息参数
-
属性:
-
-enableHighAccuracy: (Boolean
- 类型
-) 是否高精确度获取位置信息高精度获取表示需要使用更多的系统资源,默认值为false。
-
-timeout: (Number
- 类型
-) 获取位置信息的超时时间单位为毫秒(ms),默认值为不超时。如果在指定的时间内没有获取到位置信息则触发错误回调函数。
-
-maximumAge: (Number
- 类型
-) 获取位置信息的间隔时间
- 单位为毫秒(ms),默认值为5000(即5秒)。调用plus.geolocation.watchPosition时为更新位置信息的间隔时间。
- 注意:在不同定位模块下支持范围值可能不同,如百度定位模块的间隔范围为大于等于1秒,如果设置的值小于最小值则使用最小值。
-
-
-provider: (String
- 类型
-) 优先使用的定位模块
- 可取以下供应者:
- "system":表示系统定位模块,支持wgs84坐标系;
- "baidu":表示百度定位模块,支持gcj02/bd09/bd09ll坐标系;
- "amap":表示高德定位模板,支持gcj02坐标系。
- 默认值按以下优先顺序获取(amap>baidu>system),若指定的provider不存在或无效则返回错误回调。
- 注意:百度/高德定位模块需要配置百度/高德地图相关参数才能正常使用。
-
-
-coordsType: (String
- 类型
-) 指定获取的定位数据坐标系类型
- 可取以下坐标系类型:
- “wgs84”:表示WGS-84坐标系;
- “gcj02”:表示国测局经纬度坐标系;
- “bd09”:表示百度墨卡托坐标系;
- “bd09ll”:表示百度经纬度坐标系;
- provider为“system”时,默认使用“wgs84”类型;provider为“baidu”是,默认使用“bd09ll”类型。
- 如果设置的坐标系类型provider不支持,则返回错误。
-
-
-geocode: (Boolean
- 类型
-) 是否解析地址信息
- 解析的地址信息保存到Position对象的address、addresses属性中,true表示解析地址信息,false表示不解析地址信息,返回的Position对象的address、addresses属性值为undefined,默认值为true。
- 如果解析地址信息失败则返回的Position对象的address、addresses属性值为null。
-
-
-
-
-
JSON对象,定位错误信息
-
-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;
-}
-
-
属性:
-
-
-
获取设备位置信息成功的回调函数
-
-void onSuccess( position ) {
- // Get Position code.
-}
-
-
参数:
-
position:
- (
- Position
- )
- 必选 设备的地理位置信息,参考Position
-
-
返回值:
-
void
- : 无
-
获取设备位置信息失败的回调函数
-
-function void onGeolocationError( GeolocationError error ) {
- // Handle error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- GeolocationError
- )
- 必选 获取位置操作的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/interface-orientation.html b/fangija-zsyf/doc/interface-orientation.html
deleted file mode 100644
index dc365b3..0000000
--- a/fangija-zsyf/doc/interface-orientation.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
获取应用的横竖屏信息
-
方法:
-
-
事件:
-
-
-
-
diff --git a/fangija-zsyf/doc/io.html b/fangija-zsyf/doc/io.html
deleted file mode 100644
index f900d23..0000000
--- a/fangija-zsyf/doc/io.html
+++ /dev/null
@@ -1,567 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
IO模块管理本地文件系统,用于对文件系统的目录浏览、文件的读取、文件的写入等操作。通过plus.io可获取文件系统管理对象。
-
常量:
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "File": {
- "description": "文件系统"
- }
-}
-}
-
-
-
文件系统中的目录对象,用于管理特定的本地目录
-
属性:
-
-
-isFile : 操作对象的是否为文件,DirectoryEntry对象固定其值为false
-
-isDirectory : 操作对象是否为目录,DirectoryEntry对象固定其值为true
-
-name : 目录操作对象的名称,不包括路径
-
-fullPath : 目录操作对象的完整路径,文件系统的绝对路径
-
-fileSystem : 文件操作对象所属的文件系统对象,参考FileSystem
-
-
方法:
-
-
-
读取目录信息对象,用于获取目录中包含的文件及子目录
-
方法:
-
-
-
文件系统中的文件数据对象,用于获取文件的数据
-
属性:
-
-
方法:
-
-
-
文件系统中的文件对象,用于管理特定的本地文件
-
属性:
-
-
-isFile : 文件操作对象的是否为文件,FileEntry对象固定其值为true
-
-isDirectory : 文件操作对象是否为目录,FileEntry对象固定其值为false
-
-name : 文件操作对象的名称,不包括路径
-
-fullPath : 文件操作对象的完整路径,文件系统的绝对路径
-
-fileSystem : 文件操作对象所属的文件系统对象,参考FileSystem
-
-
方法:
-
-
-
文件系统中的读取文件对象,用于获取文件的内容
-
说明:
-
- FileReader对象是从设备文件系统读取文件FileReader对象是从设备文件系统读取文件的一种方式,文件以文本或者Base64编码的字符串形式读出来。
- 用户注册自己的事件监听器来接收loadstart、progress、load、loadend、error和abort事件。
-
-
构造:
-
-
常量:
-
-
属性:
-
-
方法:
-
-
事件:
-
-
-
文件系统中的写文件对象,用于写入文件内容
-
说明:
-
- FileWriter对象是从设备文件系统写入文件FileWriter对象是从设备文件系统写入文件的一种方式,用户注册自己的事件监听器来接收writestart、progress、write、writeend、error和abort事件。
- 一个FileWriter对象是为单个文件的操作而创建。你可以使用该对象多次对相应文件进行写入操作。FileWriter维护该文件的指针位置及长度属性,这样你就可以寻找和写入文件的任何地方。
- 默认情况下,FileWriter从文件的开头开始写入(将覆盖现有数据)。FileWriter对象的seek方法可设置文件操作指定位置,如fw.seek(fw.length-1)写入操作就会从文件的末尾开始。
-
-
常量:
-
-
属性:
-
-
方法:
-
-
事件:
-
-
-
文件系统对象,用于管理特定本地文件目录
-
说明:
-
- 文件系统对象表示一个应用可访问的根目录。name属性用于标识此根目录的名称,与LocalFileSystem中的文件系统类型一一对应。root属性为文件目录对象,用于实际操作文件系统,参考DirectoryEntry。
-
-
属性:
-
-
-
JSON对象,获取文件操作的参数
-
属性:
-
-
-
JSON对象,保存文件或目录的状态信息对象
-
说明:
-
可通过DirectoryEntry或FileEntry对象的getMetaData方法获取
-
属性:
-
-modificationTime: (Date
- 类型
-) 文件或目录的最后修改时间
-
-size: (Number
- 类型
-) 文件的大小若获取的是目录对象的属性则值为0。
-
-directoryCount: (Number
- 类型
-) 包含的子目录数若自身是文件则其值为0。
-
-fileCount: (Number
- 类型
-) 目录的文件数若自身是文件则其值为0。
-
-
-
-
文件或目录操作事件对象
-
说明:
-
- 所有文件或目录操作事件回调函数中都创建该对象的实例。
- 该对象从DOMEvent继承而来,可通过该其target属性获取事件触发的文件或目录操作对象。
-
-
属性:
-
-
-
文件路径类型
-
说明:
-
在文件系统中的文件路径需转换成URL格式,已方便runtime快速加载。
-
-
相对路径URL
-
说明:
-
只能在扩展API中使用,相对于基座提供的特定目录,以“_”开头。
-
常量:
-
-"_www": (DOMString
- 类型
-) 应用资源目录
- 保存应用的所有html、css、js等资源文件,与文件系统中根目录PRIVATE_WWW一致,后面加相对路径如“_www/res/icon.png”。
- 注意:应用资源目录是只读目录,只能读取次目录下的文件,不能修改或新建。
-
-
-"_doc": (DOMString
- 类型
-) 应用私有文档目录用于保存应用运行期业务逻辑数据,与文件系统中根目录PRIVATE_DOCUMENTS,如“_doc/userdata.xml”。
-
-"_documents": (DOMString
- 类型
-) 程序公用文档目录用于保存程序中各应用间可共享文件的目录,与文件系统中根目录PUBLIC_DOCUMENTS,如“_document/share.doc”。
-
-"_downloads": (DOMString
- 类型
-) 程序公用下载目录 用于保存程序下载文件的目录,与文件系统中根目录PUBLIC_DOWNLOADS,如“_download/mydoc.doc”。
-
-
-
-
本地路径URL
-
说明:
-
- 可在html页面中直接访问本地资源,以“file:///”开头,后面跟随系统的绝对路径。
- 如示例:“file:///D:/res/hello.html”。
-
-
-
网络路径URL
-
说明:
-
- 可在html页面中以网络资源模式访问本地资源,以“http://”开头,后面跟随相对路径。
- 如示例:“http://localhost:13131/_www/res/icon.png”,其中“_www”字段可支持类型与相对路径URL一致。
-
-
-
文件事件回调
-
-void onEvent( event ) {
- // Event code.
-}
-
-
说明:
-
- 文件或目录操作回调事件。
- 通常在FileReader和FileWriter对象的事件函数中触发。
-
-
参数:
-
-
返回值:
-
void
- : 无
-
请求文件系统成功的回调函数
-
-void onSuccess( fs ) {
- // File System operate code.
-}
-
-
参数:
-
-
返回值:
-
void
- : 无
-
通过URL参数获取目录或文件对象成功的回调函数
-
-void onSuccess( entry ) {
- // File or Direcory entry operate code.
-}
-
-
参数:
-
entry:
- (
- DirectoryEntry
- )
- 必选 请求到的目录或文件对象 可指向文件或目录对象(DirectoryEntry|FileEntry)。
-
返回值:
-
void
- : 无
-
获取文件或目录状态信息成功的回调函数
-
-void onSuccess( metadata ) {
- // Metadata code.
-}
-
-
参数:
-
metadata:
- (
- Metadata
- )
- 必选 文件或目录的状态信息
-
-
返回值:
-
void
- : 无
-
操作文件或目录对象成功的回调函数
-
-void onSuccess( entry ) {
- // Entry code.
-}
-
-
参数:
-
entry:
- (
- DirectoryEntry
- )
- 必选 文件或目录对象的引用 可指向文件或目录对象(DirectoryEntry|FileEntry)。
-
返回值:
-
void
- : 无
-
操作文件或目录对象数组成功的回调函数
-
-void onSuccess( entrys ) {
- // Entrys code.
-}
-
-
参数:
-
entrys:
- (
- DirectoryEntry
- )
- 必选 文件或目录对象数组 可指向文件或目录对象数组(DirectoryEntry[]|FileEntry[])。
-
返回值:
-
void
- : 无
-
写文件操作成功的回调函数
-
-void onSuccess( writer ) {
- // FileWriter code.
-}
-
-
参数:
-
-
返回值:
-
void
- : 无
-
文件操作成功的回调函数
-
-void onSuccess( file ) {
- // file code.
-}
-
-
参数:
-
file:
- (
- File
- )
- 必选 文件数据对象的引用
-
-
返回值:
-
void
- : 无
-
文件操作失败的回调函数
-
-void onError( error ) {
- // Error code.
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 文件操作失败的信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/ios.html b/fangija-zsyf/doc/ios.html
deleted file mode 100644
index da166cd..0000000
--- a/fangija-zsyf/doc/ios.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Native.js for iOS封装一条通过JS语法直接调用Native Objective-C接口通道,通过plus.ios可调用几乎所有的系统API。
-
方法:
-
-
对象:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Invocation": {
- "description": "Native.js"
- }
-}
-}
-
-
-
Objective-C类对象
-
-interface ClassObject {
- // ...
-}
-
-
说明:
-
- Objective-C类对象,可通过其属性获取类的常量,可通过方法来操作类的静态方法,也通过new方法来创建类的实例对象。
- 对于类的静态方法,则直接通过.后面跟随方法名称调用。
-
-
-
Objective-C实例对象
-
-interface InstanceObject {
- // ...
- function Object plusGetAttribute( String name );
- function Object plusSetAttribute( String name, Object value );
- // ...
-}
-
-
说明:
-
- Objective-C实例对象,可通过其方法来操作示例的变量和方法。
- 注意:必须通过plusGetAttribute()方法读取示例对象的属性值,通过plusSetAttribute()方法设置示例对象的属性值。
-
-
方法:
-
-
-
-
diff --git a/fangija-zsyf/doc/key.html b/fangija-zsyf/doc/key.html
deleted file mode 100644
index 8ae648c..0000000
--- a/fangija-zsyf/doc/key.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Key管理设备按键事件
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Webview": {
- "description": "窗口管理"
- }
-}
-}
-
-
-
按键类型
-
常量:
-
-"backbutton": (String
- 类型
-) 设备“返回”按钮按键事件
- 如果需要改变默认“返回”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"backbutton"事件。
-
-
-"keydown": (String
- 类型
-) 键按下事件
- 如果需要改变默认键按下的处理逻辑,则可通过plus.key.addEventListener来注册监听"keydown"事件。
- 可通过回调函数中KeyEvent对象的keyCode来获取按下的键值。
-
-
-"keyup": (String
- 类型
-) 键松开事件
- 如果需要改变默认键松开的处理逻辑,则可通过plus.key.addEventListener来注册监听"keyup"事件。
- 可通过回调函数中KeyEvent对象的keyCode来获取松开的键值。
-
-
-"longpressed": (String
- 类型
-) 长按键事件
- 如果需要改变默认长按键的处理逻辑,则可通过plus.key.addEventListener来注册监听"longpressed"事件。
- 长按键时会多次触发回调函数,通过回调函数中KeyEvent对象的keyCode来获取长按的键值。
-
-
-"menubutton": (String
- 类型
-) 设备“菜单”按钮按键事件
- 如果需要改变默认“菜单”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"menubutton"事件。
-
-
-"searchbutton": (String
- 类型
-) 设备“搜索”按钮按键事件
- 如果需要改变默认“搜索”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"searchbutton"事件。
-
-
-"volumeupbutton": (String
- 类型
-) 设备“音量+”按钮按键事件
- 如果需要改变默认“音量+”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"volumeupbutton"事件。
-
-
-"volumedownbutton": (String
- 类型
-) 设备“音量-”按钮按键事件
- 如果需要改变默认“音量-”按钮的处理逻辑,则可通过plus.key.addEventListener来注册监听"volumedownbutton"事件。
-
-
-
-
-
按键事件
-
属性:
-
-
-
按键事件的回调函数
-
-void onKeyEvent( KeyEvent event ){
- // Event handled code.
- var key=event.keyCode; // 用户按键的键值
-}
-
-
参数:
-
event:
- (
- KeyEvent
- )
- 必选 监听用户按键操作返回的数据
- 可通过event的keyCode属性(String类型)获取用户按键的类型,参考KeyType类型。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/maps.html b/fangija-zsyf/doc/maps.html
deleted file mode 100644
index 745c875..0000000
--- a/fangija-zsyf/doc/maps.html
+++ /dev/null
@@ -1,939 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Maps模块管理地图控件,用于在web页面中显示地图控件,提供各种接口操作地图控件,如添加标点、路线等。通过plus.maps可获取地图管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
permissions
-
-{
-// ...
-"permissions":{
- // ...
- "Maps": {
- "description": "地图"
- }
-}
-}
-
-
-
地图控件对象
-
构造:
-
-
方法:
-
-
事件:
-
-
-
地图对象的参数
-
说明:
-
- 设置地图对象初始化显示时使用的属性参数。
-
-
属性:
-
-center: (Point
- 类型
-) 地图的中心位置
- 未设置则使用地图的默认中心点(由地图供应商确定)。
-
-
-zoom: (Number
- 类型
-) 地图的缩放级别
- 有效范围为1-22,默认值为12,设置无效的值则使用默认值。
-
-
-type: (MapType
- 类型
-) 地图的视图类型
- 可设置普通街道视图、卫星视图,默认值为普通街道视图。
-
-
-traffic: (Boolean
- 类型
-) 地图的是否显示交通信息
- true表示显示地图的交通信息图层,false则不显示,默认值为false。
-
-
-zoomControls: (Boolean
- 类型
-) 是否显示地图的内置缩放控件
- true表示显示地图的内置缩放控件,false则不显示,默认值为false。
-
-
-position: (String
- 类型
-) 地图控件在Webview窗口的布局模式
- 可取值:
- "static" - 地图控件在页面中正常布局模式,如果页面存在滚动条则随窗口内容滚动;
- "absolute" - 地图控件在页面中绝对布局模式,如果页面存在滚动条不随窗口内容滚动;
- 默认值为"static"。
- 注意:布局模式并不影响地图控件在窗口中的位置及大小,如果构造时传入的DOM元素位置及大小发生变化,可通过resize方法更新。
-
-
-
-
-
地理编码转换的参数
-
属性:
-
-
-
地图坐标转换的参数
-
属性:
-
-
-
Point对象用于表示地图元素的坐标
-
说明:
-
常用语对地图上元素进行定位时使用。
-
构造:
-
-
方法:
-
-
-
地理区域
-
说明:
-
- 有西南及东北坐标点数据组成的矩形区域。
-
-
构造:
-
-
方法:
-
-
-
地图视图类型
-
常量:
-
-MAPTYPE_NORMAL: (Number
- 类型
-) 普通街道视图类型地图视图类型常量,普通街道视图。
-
-MAPTYPE_SATELLITE: (Number
- 类型
-) 卫星视图地图视图类型常量,卫星视图。
-
-
-
-
地图覆盖物基类对象
-
-interface Overlay {
- function Boolean isVisible();
- function void show();
- function void hide();
-}
-
-
说明:
-
-Overlay是地图上显示元素的基类,用于抽象地图元素,不用于实例化。
-
-
方法:
-
-
-
地图上显示的标点对象
-
说明:
-
从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
-
构造:
-
-
方法:
-
-
事件:
-
-
-
地图上显示的气泡对象
-
说明:
-
- 此对象不能直接添加到地图上显示,只可关联到地图标点覆盖物上,用户点击标点时弹出显示。
-
-
构造:
-
-
方法:
-
-
事件:
-
-
-
地图上显示的圆圈对象
-
说明:
-
从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
-
构造:
-
-
方法:
-
-
-
地图上显示的折线对象
-
说明:
-
从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
-
构造:
-
-
方法:
-
-
-
地图上显示的多边形对象
-
说明:
-
从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
-
构造:
-
-
方法:
-
-
-
地图检索对象
-
说明:
-
- Search对象用于管理地图上的检索功能,包括位置检索、周边检索和范围检索。
-
-
构造:
-
-
方法:
-
-
事件:
-
-
-
检索策略类型
-
说明:
-
在线路检索时设置检索策略时使用。
-
常量:
-
-TRANSIT_TIME_FIRST: (Number
- 类型
-) 时间优先检索策略类型常量,用于公交检索策略
-
-TRANSIT_TRANSFER_FIRST: (Number
- 类型
-) 最少换乘优先检索策略类型常量,用于公交检索策略
-
-TRANSIT_WALK_FIRST: (Number
- 类型
-) 最少步行距离优先检索策略类型常量,用于公交检索策略
-
-TRANSIT_FEE_FIRST: (Number
- 类型
-) 选择车票花销最少优先检索策略类型常量,用于公交检索策略
-
-DRIVING_DIS_FIRST: (Number
- 类型
-) 最短距离优先检索策略类型常量,用于驾车检索策略
-
-DRIVING_NO_EXPRESSWAY: (Number
- 类型
-) 无高速公路线路检索策略类型常量,用于驾车检索策略
-
-DRIVING_FEE_FIRST: (Number
- 类型
-) 最少费用优先检索策略类型常量,用于驾车检索策略
-
-
-
-
保存位置检索、周边检索和范围检索返回的结果
-
属性:
-
-
方法:
-
-
-
保存位置检索、周边检索和范围检索返回的结果
-
说明:
-
- 不可通过new操作符创建SearchRouteResult对象,在触发onRouteSearchComplete()时自动创建。
-
-
属性:
-
-
方法:
-
-
-
检索结果的位置点
-
构造:
-
-
属性:
-
-
-
地图中的路线对象
-
说明:
-
- 从Overlay对象继承而来,可通过Map对象的addOverlay()方法将对象添加地图中。
-
-
构造:
-
-
属性:
-
-
-
地理编码转换成功的回调函数
-
-void onGeocodeSuccess( Event event ) {
- // JS code.
- var address = event.address; // 转换后的地理位置
- var point = event.coord; // 转换后的坐标信息
- var coordType = event.coordType; // 转换后的坐标系类型
-}
-
-
说明:
-
- 在地理编码转换成功触发,并返回转换结果。
-
-
参数:
-
event:
- (
- Event
- )
- 可选 转换后的坐标信息
- 可通过event.coord(Point类型)获取转换后的坐标值。
- 可通过event.coordType(String类型)获取转换后的坐标系类型,“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系。
-
-
返回值:
-
void
- : 无
-
坐标转换成功的回调函数
-
-void onConvertSuccess( Event event ) {
- // JS code.
- var point = event.coord; // 转换后的坐标值
- var coordType = event.coordType; // 转换后的坐标系类型
-}
-
-
说明:
-
- 在坐标转换成功触发,并返回转换结果。
-
-
参数:
-
event:
- (
- Event
- )
- 可选 转换后的坐标信息
- 可通过event.coord(Point类型)获取转换后的坐标值。
- 可通过event.coordType(String类型)获取转换后的坐标系类型,“wgs84”:表示WGS-84坐标系; “gcj02”:表示国测局经纬度坐标系; “bd09”:表示百度墨卡托坐标系; “bd09ll”:表示百度经纬度坐标系。
-
-
返回值:
-
void
- : 无
-
距离计算成功的回调函数
-
-void onCalculateSuccess( Event event ) {
- // JS code.
- var distance = event.distance; // 转换后的距离值
-}
-
-
说明:
-
- 在距离计算成功触发,并返回计算结果。
-
-
参数:
-
event:
- (
- Event
- )
- 可选 距离计算后的信息
- 可通过event.distance(Number类型)获取计算后的距离值,单位为米(m)。
-
-
返回值:
-
void
- : 无
-
地理区域面积计算成功的回调函数
-
-void onCalculateSuccess( Event event ) {
- // JS code.
- var area = event.area; // 计算后的面积值
-}
-
-
说明:
-
- 在地理区域面积计算成功触发,并返回计算结果。
-
-
参数:
-
event:
- (
- Event
- )
- 可选 地理区域面积计算后的信息
- 可通过event.area(Number类型)获取计算后的面积值,单位为平方米。
-
-
返回值:
-
void
- : 无
-
获取用户当前位置信息成功回调
-
-void onSuccess( state, point ) {
- // Get location code
-}
-
-
参数:
-
-state:
- (
- Number
- )
- 必选 获取用户位置操作状态码,0表示成功,其它为错误码
-
-point:
- (
- Point
- )
- 必选 位置经纬度坐标,如果获取操作失败则为null对象
-
-
-
返回值:
-
void
- : 无
-
用户点击地图回调事件
-
-void onClick( point ) {
- // Click code
-}
-
-
参数:
-
point:
- (
- Point
- )
- 必选 用户在地图上点击的坐标点
-
-
返回值:
-
void
- : 无
-
地图状态变化回调事件
-
-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)
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 地图状态变化对象
- 可通过event.target(plus.maps.Map类型)获取状态变化的地图对象;
- 可通过event.bounds(plus.maps.Bounds类型)获取地图当前的可视区域;
- 可通过event.center(plus.maps.Point类型)获取地图当前的中心点坐标;
- 可通过event.zoom(Number类型)获取地图当前的缩放级别。
-
-
返回值:
-
void
- : 无
-
用户点击地图覆盖物回调事件
-
-void onClick( overlay ) {
- // Click code
-}
-
-
参数:
-
overlay:
- (
- Overlay
- )
- 必选 用户在地图上点击的覆盖物对象
- overlay可以是Marker、Bubble、Circle、Polyline、Polygon对象的引用。
-
-
返回值:
-
void
- : 无
-
用户拖拽覆盖物回调事件
-
-void onDrag( target ) {
- // Click code
- var marker = target; // 拖拽的覆盖物对象
-}
-
-
参数:
-
target:
- (
- Event
- )
- 必选 拖拽事件对象
- 可通过target(Overlay类型)获取拖拽的覆盖物对象,target可以是Marker、Bubble、Circle、Polyline、Polygon对象的引用。
-
-
返回值:
-
void
- : 无
-
兴趣点检索完成事件
-
-void onPoiSearchComplete( state, result ) {
- // JS code.
-}
-
-
说明:
-
- 在兴趣点检索完成时触发,并返回检索结果。
-
-
参数:
-
-state:
- (
- Number
- )
- 必选 检索结果状态号 0表示检索正确并返回结果,其它表示检索错误。
-result:
- (
- SearchPoiResult
- )
- 必选 POI检索结果 若检索错误,则为null对象。
-
-
返回值:
-
void
- : 无
-
线路检索完成事件
-
-void onRouteSearchComplete( state, result ) {
- // JS code.
-}
-
-
说明:
-
- 在线路检索完成时触发,并返回检索结果。
-
-
参数:
-
-state:
- (
- Number
- )
- 必选 检索结果状态号 0表示检索正确并返回结果,其它表示检索错误。
-result:
- (
- SearchRouteResult
- )
- 必选 线路检索结果 若检索错误,则为null对象。
-
-
返回值:
-
void
- : 无
-
地图操作成功回调函数
-
-void onSuccess(){
- // Success code.
-}
-
-
说明:
-
- 地图操作成功后触发回调函数。
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
地图操作失败的回调函数
-
-function void onError( error ) {
- // Handle error
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 地图操作的错误信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/messaging.html b/fangija-zsyf/doc/messaging.html
deleted file mode 100644
index 4596d9f..0000000
--- a/fangija-zsyf/doc/messaging.html
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Messaging模块管理设备通讯功能,可用于短信、彩信、邮件发送等。通过plus.messaging可获取设备通讯管理对象。另外也可以直接通过html中的href直接快速发送短信、拨打电话、发送邮件等。
-
常量:
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Messaging": {
- "description": "短信彩信邮件消息"
- }
-}
-}
-
-
-
消息对象
-
属性:
-
-
方法:
-
-
-
消息体内容类型
-
说明:
-
用于设定消息的消息体内容。
-
-
消息发送成功的回调函数
-
-void onSuccess() {
- // Send message success code.
-}
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
消息发送失败的回调函数
-
-void onError( error ) {
- // Error code.
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 失败信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/native.js.html b/fangija-zsyf/doc/native.js.html
deleted file mode 100644
index 935284f..0000000
--- a/fangija-zsyf/doc/native.js.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
- Hello H5+
-
-
-
-
-
-
-
-
Native.JS一种把操作系统的原生对象转义,映射为JS对象,在JS里编写原生代码的技术。可通过plus.android.*和plus.ios.*提供的API分别调用Android和iOS平台的Native API。
-
-
-
-
diff --git a/fangija-zsyf/doc/nativeUI.html b/fangija-zsyf/doc/nativeUI.html
deleted file mode 100644
index bef87c8..0000000
--- a/fangija-zsyf/doc/nativeUI.html
+++ /dev/null
@@ -1,497 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
nativeUI管理系统原生界面,可用于弹出系统原生提示对话框窗口、时间日期选择对话框、等待对话框等。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "NativeUI": {
- "description": "原生UI控件"
- }
-}
-}
-
-
-
JSON对象,原生选择按钮框上按钮的样式参数
-
属性:
-
-color: (String
- 类型
-) 按钮上显示的文字颜色
- 可取值:
- "#RRGGBB"格式字符串,如"#FF0000"表示文字颜色为红色;
- "rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
-
-
-title: (String
- 类型
-) 按钮上显示的文字内容
-
-style: (String
- 类型
-) 按钮的样式
- 可取值:
- "destructive" - 表示警示按钮样式,默认文字颜色为红色;
- "default" - 表示默认按钮样式。
- 默认值为"default"。
-
-
-
-
-
JSON对象,原生选择按钮框的样式参数
-
属性:
-
-title: (String
- 类型
-) 选择按钮框的标题
-
-cancel: (String
- 类型
-) 取消按钮上显示的文字内容
- 不设置此属性,则不显示取消按钮。
-
-
-buttons: (Array [
- ActionButtonStyles
- ]
-
- 类型
-) 选择框上的按钮,ActionButtonStyles对象数组
-
-
-
-
JSON对象,日期选择对话框的参数
-
属性:
-
-title: (String
- 类型
-) 日期选择对话框显示的标题
- 如果未设置标题,则默认显示标题为当前选择的日期。
-
-
-date: (Date
- 类型
-) 日期选择对话框默认显示的日期
- 如果未设置默认显示的日期,则显示当前的日期。
-
-
-minDate: (Date
- 类型
-) 日期选择对话框可选择的最小日期
- Date类型对象,如果未设置可选择的最小日期,则使用系统默认可选择的最小日期值。
-
-
-maxDate: (Date
- 类型
-) 日期选择对话框可选择的最大日期
- Date类型对象,如果未设置可选择的最大日期,则使用系统默认可选择的最大日期值。
- 其值必须大于minDate设置的值,否则使用系统默认可选择的最大日期值。
-
-
-popover: (JSON
- 类型
-) 时间选择对话框弹出指示区域
- JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值为相对于容器Webview的位置。
- 如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
-
-
-
-
-
JSON对象,时间选择对话框的参数
-
属性:
-
-time: (Date
- 类型
-) 时间选择对话框默认显示的时间
- 如果未设置标题,则默认显示标题为当前选择的时间。
-
-
-title: (String
- 类型
-) 时间选择对话框显示的标题
- 如果未设置标题,则默认显示标题为当前选择的时间。
-
-
-is24Hour: (Boolean
- 类型
-) 是否24小时制模式
- true表示使用24小时制模式显示,fale表示使用12小时制模式显示,默认值为true。
-
-
-popover: (JSON
- 类型
-) 日期选择对话框弹出指示区域
- JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值相对于容器webview的位置。
- 如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
-
-
-
-
-
系统原生界面基类对象
-
-interface NativeUIObj{
- function void close();
-}
-
-
方法:
-
-
-
系统等待对话框对象
-
说明:
-
- 从NativeUIObj对象继承而来,通过plus.nativeUI.showWaiting方法创建时返回。
- 用于控制系统样式等待对话框的操作,如关闭、设置标题内容等。
-
-
方法:
-
-
事件:
-
-
-
JSON对象,原生等待对话框的参数
-
属性:
-
-width: (String
- 类型
-) 等待框背景区域的宽度
- 值支持像素值("500px")或百分比("50%"),百分比相对于屏幕的宽计算,如果不设置则根据内容自动计算合适的宽度。
-
-
-height: (String
- 类型
-) 等待框背景区域的高度
- 值支持像素绝对值("500px")或百分比("50%"),如果不设置则根据内容自动计算合适的高度。
-
-
-color: (String
- 类型
-) 等待框中文字的颜色
- 颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为白色。
-
-
-size: (String
- 类型
-) 等待框中文字的字体大小
- 如"14px"表示使用14像素高的文字,未设置则使用系统默认字体大小。
-
-
-textalign: (String
- 类型
-) 等待对话框中标题文字的水平对齐方式
- 对齐方式可选值包括:"left":水平居左对齐显示,"center":水平居中对齐显示,"right":水平居右对齐显示。默认值为水平居中对齐显示,即"center"。
-
-
-padding: (String
- 类型
-) 等待对话框的内边距
- 值支持像素值("10px")和百分比("5%"),百分比相对于屏幕的宽计算,默认值为"3%"。
-
-
-background: (String
- 类型
-) 等待对话框显示区域的背景色
- 背景色的值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为rgba(0,0,0,0.8)。
-
-
-style: (String
- 类型
-) 等待对话框样式
- 可取值"black"、"white",black表示等待框为黑色雪花样式,通常在背景主色为浅色时使用;white表示等待框为白色雪花样式,通常在背景主色为深色时使用。
- 仅在iOS平台有效,其它平台忽略此值,未设置时默认值为white。
-
-
-modal: (Boolen
- 类型
-) 等待框是否模态显示
- 模态显示时用户不可操作直到等待对话框关闭,否则用户在等待对话框显示时也可操作下面的内容,未设置时默认为true。
-
-
-round: (Number
- 类型
-) 等待框显示区域的圆角
- 值支持像素值("10px"),未设置时使用默认值"10px"。
-
-
-padlock: (Boolen
- 类型
-) 点击等待显示区域是否自动关闭
- true表示点击等待对话框显示区域时自动关闭,false则不关闭,未设置时默认值为false。
-
-
-back: (String
- 类型
-) 返回键处理方式
- 可取值"none"表示截获处理返回键,但不做任何响应;"close"表示截获处理返回键并关闭等待框;"transmit"表示不截获返回键,向后传递给Webview窗口继续处理(与未显示等待框的情况一致)。
-
-
-loading: (WaitingLoadingOptions
- 类型
-) 自定义等待框上loading图标样式
-
-
-
-
JSON对象,原生等待对话框上loading图标自定义样式
-
属性:
-
-display: (String
- 类型
-) loading图标显示样式
- 可取值:
- "block"表示图标与文字分开两行显示,上面显示loading图标,下面显示文字;
- "inline"表示loading图标与文字在同一行显示,左边显示loading图标,右边显示文字;
- "none"表示不显示loading图标;
-
-
-height: (String
- 类型
-) loading图标高度
- 设置loading图标的高度(宽度等比率缩放),取值类型:像素值,如"14px"表示14像素高。
-
-
-icon: (String
- 类型
-) loading图标路径
- 自定义loading图标的路径,png格式,并且必须是本地资源地址;
- loading图要求宽是高的整数倍,显示等待框时按照图片的高横向截取每帧刷新。
-
-
-interval: (Number
- 类型
-) loading图每帧刷新间隔
- 单位为ms(毫秒),默认值为100ms。
-
-
-
-
-
JSON对象,系统提示消息框要设置的参数
-
属性:
-
-icon: (String
- 类型
-) 提示消息框上显示的图标
-
-style: (String
- 类型
-) 提示消息框上显示的样式
- 可取值:
- "block"表示图标与文字分两行显示,上面显示图标,下面显示文字;
- "inline"表示图标与文字在同一行显示,左边显示图标,右边显示文字。
- 默认值为"block"。
-
-
-duration: (String
- 类型
-) 提示消息框显示的时间
- 可选值为"long"、"short",值为"long"时显示时间约为3.5s,值为"short"时显示时间约为2s,未设置时默认值为"short"。
-
-
-align: (String
- 类型
-) 提示消息框在屏幕中的水平位置
- 可选值为"left"、"center"、"right",分别为水平居左、居中、居右,未设置时默认值为"center"。
-
-
-verticalAlign: (String
- 类型
-) 提示消息在屏幕中的垂直位置
- 可选值为"top"、"center"、"bottom",分别为垂直居顶、居中、居底,未设置时默认值为"bottom"。
-
-
-
-
-
系统选择按钮框的回调函数
-
-void onActioned( Event event ){
- // actionsheet handled code.
- var index=event.index; // 用户关闭时点击按钮的索引值
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 用户操作选择按钮框关闭后返回的数据
- 可通过event.index(Number类型)获取用户关闭时点击按钮的索引值,索引值从0开始;
- 0表示用户点击取消按钮,大于0值表示用户点击ActionSheetStyles中buttons属性定义的按钮,索引值从1开始(即1表示点击buttons中定义的第一个按钮)。
- 通过API(close()方法)关闭,则回调函数中event的index属性值为-1。
-
-
返回值:
-
void
- : 无
-
系统提示框确认的回调函数
-
-void onAlerted( Event event ){
- // Alert handled code.
- var index=event.index; // 用户关闭提示对话框点击按钮的索引值
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 用户操作确认对话框关闭后返回的数据
- 可通过event.index(Number类型)获取用户关闭确认对话框点击按钮的索引值,点击确认键的索引值为0。
- Android平台上通过返回按钮关闭时索引值为-1。
-
-
返回值:
-
void
- : 无
-
关闭确认对话框的回调函数
-
-void onConfirmed( Event event ) {
- // Confirm handled code.
- var index=event.index; // 用户关闭确认对话框点击按钮的索引值
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 用户操作确认对话框关闭后返回的数据
- 可通过event.index(Number类型)获取用户关闭确认对话框点击按钮的索引值,索引值从0开始;
-
-
返回值:
-
void
- : 无
-
系统输入对话框关闭后的回调函数
-
-function void onPrompted( Event event ) {
- // Prompt handled code.
- var index=event.index; // 用户关闭输入对话框点击按钮的索引值
- var value=event.value; // 用户输入的内容
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 用户操作输入对话框关闭后返回的数据
- 可通过event.index(Number类型)获取用户关闭输入对话框点击按钮的索引值,索引值从0开始;
- 通过event.value(String类型)获取用户输入的内容,如果没有输入则返回空字符串。
-
-
返回值:
-
void
- : 无
-
选择日期或时间操作成功的回调函数
-
-function void onPickSuccess( Event event ) {
- // Date picked code.
- var date = event.date;// 用户选择的日期或时间
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 用户完成选择日期或时间后返回的数据
- 可通过event.date(Date类型)获取选择的日期或时间值。
- 若调用的是日期选择操作则仅年、月、日信息有效,若调用的是时间选择操作则仅时、分信息有效。
-
-
返回值:
-
void
- : 无
-
选择日期或时间操作取消或失败的回调函数
-
-function void onPickError( Exception error ) {
- // Date picked error.
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 用户选择操作失败信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/nativeobj.html b/fangija-zsyf/doc/nativeobj.html
deleted file mode 100644
index 6c24622..0000000
--- a/fangija-zsyf/doc/nativeobj.html
+++ /dev/null
@@ -1,840 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
nativeObj管理系统原生对象。
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "NativeObj": {
- "description": "原生对象"
- }
-}
-}
-
-
-
原生图片对象
-
-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();
-}
-
说明:
-
- 原生图片对象会占用较大的内存资源,在使用时需谨慎管理,当图片不再使用时应该及时调用clear方法进行销毁。
-
-
构造:
-
-
属性:
-
-
方法:
-
-
-
JSON对象,保存图片的参数
-
-interface BitmapSaveOptions {
- attribute Boolean overwrite;
- attribute String format;
- attribute Number quality;
- attribute Rect clip;
-}
-
属性:
-
-overwrite: (Boolean
- 类型
-) 覆盖保存图片文件
- 仅在保存的图片路径文件存在时有效:
- true表示覆盖存在的文件;
- false表示不覆盖,如果文件存在,则返回失败。
- 默认值为false。
-
-
-format: (String
- 类型
-) 保存图片的格式
- 支持"jpg"、"png",如果未指定则默认使用指定的保存路径后缀对应的文件格式,如果后缀文件格式无效则使用jpg格式。
-
-
-quality: (Number
- 类型
-) 保存图片的质量
- 取值范围为1-100,1表示使用最低的图片质量(保存后的图片文件最小)、100表示使用最高的图片质量(保存后的图片文件最大);
- 默认值为50。
-
-
-clip: (Rect
- 类型
-) 指定裁剪区域保存图片
- 相对于图片的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
-
-
-
-
-
原生控件对象
-
-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 reset();
- function void restore();
- function void show();
- function void setStyle(styles);
- function void setTouchEventRect(rect);
- function void hide();
- function void interceptTouchEvent(intercept);
- function Boolean isVisible();
-}
-
-
说明:
-
- 原生控件对象可用于在屏幕上绘制图片或文本内容,当控件不再使用时需要调用clear方法销毁控件。
-
-
构造:
-
-
属性:
-
-
方法:
-
-
-
原生动画参数
-
-interface AnimationOptions {
- attribute String type;
- attribute Number duration;
-}
-
说明:
-
- 指定动画的类型、持续时间等信息。
-
-
属性:
-
-
-
原生动画窗口样式
-
-interface AnimationViewStyles {
- attribute Bitmap bitmap;
- attribute String text;
-}
-
说明:
-
- 指定动画窗口的样式,如背景图片,绘制的文字等。
-
-
属性:
-
-bitmap: (Bitmap
- 类型
-) 动画窗口上绘制的背景图片
- 图片可以通过Webview对象的draw方法截图,也可以通过Bitmap的API从本地文件中加载。
-
-
-text: (String
- 类型
-) 动画窗口上绘制的文本内容
-
-textStyles: (TextStyles
- 类型
-) 动画窗口上绘制的文本样式
-
-textRect: (Rect
- 类型
-) 动画窗口上绘制的文本区域
- 默认值为{top:'0px',left:'0px',width:'100%',height:'44px'}。
-
-
-
-
-
区域信息对象
-
-interface Rect {
- attribute String top;
- attribute String left;
- attribute String width;
- attribute String height;
-}
-
说明:
-
- 包括位置、大小等信息。
-
-
属性:
-
-top: (String
- 类型
-) 区域左上角的垂直偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象的高度;自动计算,如"auto",根据height值自动计算,相对于作用对象垂直居中。
-
-
-left: (String
- 类型
-) 区域左上角的水平偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象的宽度;自动计算,如"auto",根据width值自动计算,相对于作用对象水平居中。
-
-
-width: (String
- 类型
-) 区域的宽度
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象的宽度。
-
-
-height: (String
- 类型
-) 区域的高度
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象的高度。
-
-
-
-
-
区域信息对象
-
-interface Position {
- attribute String top;
- attribute String left;
- attribute String width;
- attribute String height;
- attribute String bottom;
- attribute String right;
-}
-
说明:
-
- 包括位置、大小等信息。
-
-
属性:
-
-top: (String
- 类型
-) 区域顶部相对于作用对象(或容器)向下的偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度;
- 自动计算,如"auto",根据height值自动计算,相对于作用对象(或容器)垂直居中。
-
-
-left: (String
- 类型
-) 区域左侧相对于作用对象(或容器)向右的偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度;
- 自动计算,如"auto",根据width值自动计算,相对于作用对象(或容器)水平居中。
-
-
-width: (String
- 类型
-) 区域的宽度
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度。
-
-
-height: (String
- 类型
-) 区域的高度
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度。
-
-
-bottom: (String
- 类型
-) 区域底部相对于作用对象(或容器)向上的偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的高度。
- 当设置了top和height值时,忽略此属性值;
- 当未设置top值时,可通过bottom属性值来确定区域的垂直位置;
- 当未设置height值时,可通过top和bottom属性值来确定区域的高度。
-
-
-right: (String
- 类型
-) 区域右侧相对于作用对象(或容器)向左的偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于作用对象(或容器)的宽度。
- 当设置了left和width值时,忽略此属性值;
- 当未设置left值时,可通过right属性值来确定区域的水平位置;
- 当未设置width值时,可通过left和right属性值来确定区域的宽度。
-
-
-
-
-
文本样式对象
-
-interface Rect {
- attribute String color;
- attribute String align;
- attribute String family;
- attribute String size;
- attribute String style;
- attribute String weight;
- attribute String fontSrc;
- attribute String overflow;
-}
-
说明:
-
- 用于定义文本的显示样式,如字体大小、字体颜色、字体粗细、字体样式、字体名称等信息。
-
-
属性:
-
-color: (String
- 类型
-) 字体颜色
- 可取值:
- "#RRGGBB"格式字符串,如"#FF0000"表示绘制红色区域;
- "rgba(R,G,B,A)",其中R/G/B分别代表红色值/绿色值/蓝色值,正整数类型,取值范围为0-255,A为透明度,浮点数类型,取值范围为0-1(0为全透明,1为不透明),如"rgba(255,0,0,0.5)",表示红色半透明。
- 默认值为"#000000"(黑色)。
-
-
-align: (String
- 类型
-) 字体水平对齐方式
- 可取值:
- "left"-字体在指定的区域中居左对齐;
- "center"-字体在指定的区域中居中对齐;
- "right"-字体在指定的区域中居右对齐。
- 默认值为"center"。
-
-
-family: (String
- 类型
-) 字体名称
- 例如"Times New Roman", 如果指定名称的字体不存在,则使用默认字体。
-
-
-margin: (String
- 类型
-) 字体的边距
- 用于设置字体在绘制目标区域四个方向(top/right/bottom/left)的边距,可取值:像素值,如"10px";百分比,相对于绘制目标区域,如"5%";
- 默认值为"0px"。
-
-
-size: (String
- 类型
-) 字体大小
- 可取值:字体高度像素值,数字加"px"格式字符串,如"12px"。
- 默认值为"16px"。
-
-
-style: (String
- 类型
-) 字体样式
- 可取值:"normal" - 正常字体样式;"italic" - 斜体样式。默认值为"normal"。
-
-
-weight: (String
- 类型
-) 字体粗细
- 可取值:"normal" - 普通字体;"bold" - 粗字体。默认值为"normal"。
-
-
-fontSrc: (String
- 类型
-) 字体文件路径
- 加载字体文件路径。
-
-
-overflow: (String
- 类型
-) 文本内容超出显示区域时处理方式
- 可取值:
- "clip" - 超出显示区域时内容裁剪;
- "ellipsis" - 超出显示区域时尾部显示省略标记(...)。
- 默认值为"clip"。
-
-
-
-
-
View控件动画参数
-
-interface ViewAnimationOptions {
- attribute String type;
- attribute Number duration;
- attribute Number frames;
- attribute Rect region;
-}
-
说明:
-
- 指定动画的类型、持续时间等信息。
-
-
属性:
-
-type: (String
- 类型
-) 动画类型
- 可取值:"shrink" - 从上到下分块收缩清除窗口动画。
-
-
-duration: (Number
- 类型
-) 动画持续时间
- 单位为毫秒,默认值为200ms。
-
-
-frames: (Number
- 类型
-) 动画帧数
- 必须为大于0的整数,默认值为12。
-
-
-region: (json
- 类型
-) 动画作用区域
- 支持以下属性:
- top - 区域距离控件顶部的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的高度),默认值为'0px';
- bottom - 区域距离控件底部的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的高度),默认值为'0px';
- left - 区域距离控件左侧的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的宽度),默认值为'0px';
- right - 区域距离控件右侧的偏移量,属性值可取像素值(如"100px"),百分比(如"10%",相对于控件的宽度),默认值为'0px'。
- 如“{top:'44px',bottom:'48px'}”。
-
-
-
-
-
View控件绘制元素参数
-
-interface ViewDrawTagStyles {
- attribute String id;
- attribute String tag;
- attribute String color;
- attribute Position position;
- attribute String src;
- attribute Position sprite;
- attribute String text;
- attribute TextStyles textStyles;
-}
-
说明:
-
- 指定绘制图片、矩形区域、文本内容等信息。
-
-
属性:
-
-id: (String
- 类型
-) 绘制操作标识
- 可通过view对象的drawBitmap/drawRect/drawText/clearRect方法进行更新。
-
-
-tag: (String
- 类型
-) 绘制操作类型
- 可取值:
- "img" - 绘制图片,与drawBitmap操作一致,此时id、src、position、sprite属性值有效;
- "rect" - 绘制矩形区域,与drawRect操作一致,此时id、color、position属性值有效;
- "font" - 绘制文本内容,与drawText操作一致,此时id、position、text、textStyles属性值有效。
-
-
-color: (String
- 类型
-) 矩形区域颜色
- 可取值:
- "#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"(白色)。
-
-
-position: (Position
- 类型
-) 绘制内容区域
- 当tag属性值为"img"时,用于指定绘制图片的目标区域;
- 当tag属性值为"rect"时,用于指定绘制的矩形区域;
- 当tag属性值为"font"时,用于指定绘制文本的目标区域。
- 相对于View控件的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
-
-
-src: (String
- 类型
-) 绘制的图片资源
- 当tag属性值为"img"时有效,可以是图片资源路径(字符串类型)或者图片对象(plus.nativeObj.Bitmap对象)。
- src路径支持gif图片,但设置的图片路径文件使用".gif"后缀时则认为是gif图片,如"_www/loading.gif"。
-
-
-sprite: (Position
- 类型
-) 图片源的绘制区域
- 当tag属性值为"img"时有效,用于指定图片源的绘制区域,相对于图片的区域信息,默认值为{top:'0px',left:'0px',width:'100%',height:'100%'}。
-
-
-text: (String
- 类型
-) 绘制的文本内容
- 当tag属性值为"font"时有效,用于保存绘制的文本内容。
-
-
-textStyles: (TextStyles
- 类型
-) 绘制文本的样式
- 当tag属性值为"font"时有效,用于指定绘制文本内容的字体大小、字体颜色、字体类型等信息。
-
-
-
-
-
View控件事件
-
常量:
-
-"doubleclick": (String
- 类型
-) 双击事件
- 双击屏幕时触发。
- 注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
-
-
-
-"click": (String
- 类型
-) 点击事件
- 当手指点击屏幕时触发。
- 注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
-
-
-
-"touchstart": (String
- 类型
-) 开始触屏事件
- 当手指触摸屏幕时候触发。
- 注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
-
-
-"touchmove": (String
- 类型
-) 触摸滑屏事件
- 当手指在屏幕上滑动的时候连续地触发。
- 注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
-
-
-"touchend": (String
- 类型
-) 结束触屏事件
- 当手指从屏幕上离开的时候触发。
- 注意:如果将View控件设置为不拦截触屏事件(view.interceptTouchEvent(false))则不会触发此事件。
-
-
-
-
-
JSON对象,View控件的系统状态栏区域样式
-
说明:
-
- 仅在应用设置为沉浸式状态栏样式下有效,非沉浸式状态栏样式下忽略此属性。
-
-
属性:
-
-
-
View控件样式
-
-interface ViewStyles {
- attribute String bottom;
- attribute String top;
- attribute String left;
- attribute String width;
- attribute String height;
- attribute String backgroundColor;
- attribute String dock;
- attribute String position;
- attribute Number opacity;
- attribute ViewStatusbarStyles statusbar;
-}
-
说明:
-
- 包括位置、大小等信息,位置信息相对于父容器控件进行计算。
-
-
属性:
-
-bottom: (String
- 类型
-) View控件垂直向上的偏移量
- 支持百分比、像素值,默认值无值(根据top和height属性值来自动计算)。
- 当设置了top和height值时,忽略此属性值;
- 当未设置height值时,可通过top和bottom属性值来确定View控件的高度。
-
-
-top: (String
- 类型
-) View控件左上角的垂直偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于父控件的高度;自动计算,如"auto",根据height值自动计算,相对于父控件垂直居中。
-
-
-left: (String
- 类型
-) 区域左上角的水平偏移量
- 可取值:像素值,如"100px";百分比,如"10%",相对于父控件的宽度;自动计算,如"auto",根据width值自动计算,相对于父控件水平居中。
-
-
-width: (String
- 类型
-) 区域的宽度
- 可取值:像素值,如"100px";百分比,如"10%",相对于父控件的宽度。
-
-
-height: (String
- 类型
-) 区域的高度
- 可取值:像素值,如"100px";百分比,如"10%",相对于父控件的高度。
-
-
-backgroundColor: (String
- 类型
-) 区域背景颜色
- 颜色值格式为"#RRGGBB",如"#FF0000"为红色,默认值为透明区域。
-
-
-dock: (String
- 类型
-) View控件的停靠方式
- 仅当View控件添加到Webview窗口对象中并且position属性值设置为"dock"时才生效,此时View控件挤压Webview窗口的大小。
- 可取值:"top",控件停靠则页面顶部;"bottom",控件停靠在页面底部;"right",控件停靠在页面右侧;"left",控件停靠在页面左侧。
-
-
-position: (String
- 类型
-) View控件的排版方式
- 仅当View控件添加到Webview窗口对象中时才生效。
- 可取值:
- "static",View控件在页面中正常定位,如果页面存在滚动条则随窗口内容滚动;
- "absolute",Veiw控件在页面中绝对定位,如果页面存在滚动条不随窗口内容滚动;
- "dock",View控件在页面中停靠,停靠的位置由dock属性值决定。
- 默认值为"absolute"。
-
-
-opacity: (Number
- 类型
-) View控件的不透明度
- 取值范围为0-1,0为全透明,1为不透明,默认值为1,即不透明。
-
-
-statusbar: (ViewStatusbarStyles
- 类型
-) View控件的状态栏样式
- 仅在应用设置为沉浸式状态栏样式下有效,设置此属性后将自动保留系统状态栏区域不被View控件占用(即View控件非沉浸式样式显示)。
-
-
-
-
-
图片保存操作成功回调接口
-
-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
-}
-
-
参数:
-
event:
- (
- Event
- )
- 可选 保存后的图片信息
- 可通过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。
-
-
返回值:
-
void
- : 无
-
触屏事件的回调函数
-
-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;
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 触屏数据
- Event对象包含以下属性:
- target:保存触发此事件的对象;
- clientX:Number类型,保存触摸目标在View控件中的X坐标;
- clientY:Number类型,保存触摸目标在View控件中的Y坐标;
- pageX:Number类型,保存触摸目标在当前页面(运行此脚本的窗口)中的X坐标;
- pageY:Number类型,保存触摸目标在当前页面(运行此脚本的窗口)中的Y坐标;
- screenX:Number类型,保存触摸目标在屏幕中的X坐标;
- screenY:Number类型,保存触摸目标在屏幕中的Y坐标。
-
-
返回值:
-
void
- : 无
-
操作成功回调函数接口
-
-void onSuccess(){
- // Code here
-}
-
-
参数:
-
无
-
返回值:
-
void
- : 无
-
操作错误回调函数接口
-
-function void onError( Exception error ) {
- // Error.
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 用户选择操作失败信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/navigator.html b/fangija-zsyf/doc/navigator.html
deleted file mode 100644
index 218760a..0000000
--- a/fangija-zsyf/doc/navigator.html
+++ /dev/null
@@ -1,270 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
navigator用于管理浏览器运行环境信息
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Navigator": {
- "description": "浏览器信息"
- }
-}
-}
-
-
-
创建应用快捷方式要设置的参数
-
属性:
-
-name: (String
- 类型
-) 快捷方式名称
- 如果未设置则使用应用的名称,manifest.json中name属性值。
-
-
-icon: (String
- 类型
-) 快捷方式的图标
- 如果未设置则优先使用应用中指定的图标(manifest.json中icon节点下对应分辨率的图标),如未区配则使用应用的图标(仅在独立打包时),否则使用runtime提供的默认图标。
-
-
-toast: (String
- 类型
-) 创建快捷方式后的提示信息
- 快捷方式创建成功后显示,默认提示内容为“"XXXX"已创建桌面快捷方式”,其中"XXXX"为程序的名称,如果不需要提示则设置此值为空字符串。
-
-
-extra: (JSON
- 类型
-) 快捷方式的扩展参数
- 其中key和value值都必须是字符串类型。
-
-
-classname: (String
- 类型
-) 要启动Activity类名
- 通常情况下不需要指定此值,仅在5+SDK集成时自定义Activity才用到。
-
-
-force: (Boolean
- 类型
-) 是否需要强制创建快捷方式
- true表示强制创建,false表示不强制创建,默认值为true。
- 强制创建可能会导致在无法判断快捷方式是否存在的设备上重复创建,如果需要尽可能避免出现重复创建桌面快捷方式则应该设置force属性值为false。
-
-
-
-
-
更新应用启动界面要设置的参数
-
属性:
-
-image: (String
- 类型
-) 启动界面的图片路径
- 仅支持本地文件路径,图片必须为png格式。
-
-
-autoclose: (Boolean
- 类型
-) 是否自动关闭启动界面
- true表示应用启动后自动关闭启动界面,false表示应用启动后不自动关闭启动界面,需要在应用调用plus.navigator.closeSplashscreen()方法关闭。
-
-
-autoclose_w2a: (Boolean
- 类型
-) 是否自动关闭启动界面(WAP2APP应用)
- 与autoclose属性值作用一致,仅在WAP2APP应用中有效。
- 不推荐设置此值,如果未设置会自动使用autoclose属性值。
-
-
-delay: (Number
- 类型
-) 启动界面延时关闭时间
- 仅在设置为自动关闭启动界面时有效。
-
-
-delay_w2a: (Number
- 类型
-) 启动界面延时关闭时间(WAP2APP应用)
- 与delay属性值作用一致,仅在WAP2APP应用中有效。
- 不推荐设置此值,如果未设置会自动使用delay属性值。
-
-
-
-
-
运行环境权限类型
-
常量:
-
-CAMERA: (String
- 类型
-) 访问摄像头权限
- 用于调用摄像头(plus.camera.*/plus.barcode.*)。
-
-
-CONTACTS: (String
- 类型
-) 访问系统联系人权限
- 用于访问(读、写)系统通讯录(plus.gallery.*)。
-
-
-GALLERY: (String
- 类型
-) 访问系统相册权限
- 用于访问(读、写)系统相册(plus.gallery.*)。
-
-
-LOCATION: (String
- 类型
-) 定位权限
- 用于获取当前用户位置信息(plus.geolocation.*)。
-
-
-NOTIFITION: (String
- 类型
-) 消息通知权限
- 用于接收系统消息通知(plus.push.*)。
-
-
-RECORD: (String
- 类型
-) 录音权限
- 用于进行本地录音操作(plus.audio.AudioRecorder)。
-
-
-SHORTCUT: (String
- 类型
-) 创建桌面快捷方式权限
- 用于在系统桌面创建快捷方式图标(plus.navigator.createShortcut)。
-
-
-
-
-
创建桌面快捷方式成功的回调函数
-
-void onSuccess( Event event ){
- var result=event.result; // 快捷方式是否已经存在,调用plus.navigator.hasShortcut方法时有效
- var sure=event.sure; // 是否确定创建桌面快捷方式成功,调用plus.navigator.createShortcut方法时有效
-}
-
-
参数:
-
event:
- (
- Event
- )
- 必选 创建桌面快捷方式返回的数据
- 此对象包含以下属性值:
- event.result - 查询快捷方式是否存在的结果(plus.navigator.hasShortcut),可取值:
- existing",快捷方式已存在;
- "none",快捷方式不存在(支持创建);
- "unsupported",不支持创建桌面快捷方式;
- "unknown":不确定快捷方式是否存在。
- event.sure - 创建快捷方式的结果(plus.navigator.createShortcut),Boolean类型,可取值:
- true,表示在当前环境下确定快捷方式创建成功;
- false,表示不确定快捷方式是否已创建。
-
-
返回值:
-
void
- : 无
-
操作错误回调函数接口
-
-function void onError( Exception error ) {
- // Error.
- var code = error.code; // 错误编码
- var message = error.message; // 错误描述信息
-}
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 操作失败信息
- 可通过error.code(Number类型)获取错误编码;
- 可通过error.message(String类型)获取错误描述信息。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/oauth.html b/fangija-zsyf/doc/oauth.html
deleted file mode 100644
index ff0a5a9..0000000
--- a/fangija-zsyf/doc/oauth.html
+++ /dev/null
@@ -1,347 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
OAuth模块管理客户端的用户登录授权验证功能,允许应用访问第三方平台的资源。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
permissions
-
-{
-// ...
-"permissions":{
- // ...
- "OAuth": {
- "description": "登录鉴权"
- }
-}
-}
-
-
-
登录授权认证服务对象
-
-interface plus.oauth.AuthService {
- // Attributes
- attribute String id;
- attribute String description;
- attribute AuthInfo authResult;
- attribute UserInfo userInfo;
- attribute JSON extra;
-
- // Methods
- function void login( successCallback, errorCallback, options );
- function void logout( successCallback, errorCallback );
- function void getUserInfo( successCallback, errorCallback );
- function void addPhoneNumber( successCallback, errorCallback );
-}
-
-
说明:
-
- AuthService对象用于表示登录授权认证服务,在JS中为对象,用于向系统进行登录授权认证操作。
-
-
属性:
-
-
方法:
-
-
-
JSON对象,授权认证参数选项
-
-interface plus.oauth.AuthOptions {
- attribute String scope;
- attribute String state;
- attribute String appid;
- attribute String appkey;
- attribute String appsecret;
- attribute String redirect_uri;
-}
-
-
说明:
-
- 此对象支持的属性值由登录授权认证服务定义。
- 例如“微信”,则可配置以下参数:
- scope - 应用授权作用域;
- state - 用于保持请求和回调的状态参数。
-
-
属性:
-
-scope: (String
- 类型
-) 申请的权限作用范围
- 如果存在多个权限,则以","符号分割。
-
-
-state: (String
- 类型
-) 客户端的当前状态,可以指定任意值,登录认证后原封不动的返回保存到AuthService对象的extra中
-
-appid: (String
- 类型
-) 登录授权认证服务平台申请的appid
- 动态设置登录授权服务中需要使用的appid,仅需要此参数的登录授权服务(如“微信登录”、“QQ登录”)支持。
- 如果未设置则使用运行环境中内置的appid值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
-
-
-appkey: (String
- 类型
-) 登录授权认证服务平台申请的appkey
- 动态设置登录授权服务中需要使用的appkey,仅需要此参数的登录授权服务(如“新浪微博登录”、“360登录”)支持。
- 如果未设置则使用运行环境中内置的appkey值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
-
-
-appsecret: (String
- 类型
-) 登录授权认证服务平台申请的appsecret
- 动态设置登录授权服务中需要使用的appsecret,仅需要此参数的登录授权服务(如“微信登录”、“新浪微博登录”)支持。
- 如果未设置则使用运行环境中内置的appkey值(如在HBuilder中可在manifest.json的SDK配置项中进行设置);当开放平台申请的appsecret值涉及到安全问题时,可在应用运行时从服务器获取,然后通过此api动态设置。
-
-
-redirect_url: (String
- 类型
-) 登录授权认证服务平台申请的redirect_url
- 动态设置登录授权服务中需要使用的redirect_url,仅需要此参数的登录授权服务(如“新浪微博登录”)支持。
- 如果未设置则使用运行环境中内置的redirect_url值(如在HBuilder中可在manifest.json的SDK配置项中进行设置)。
-
-
-
-
-
登录授权认证信息
-
-interface plus.oauth.AuthInfo {
- attribute String openid;
- attribute String access_token;
- attribute String expires_in:
- attribute String refresh_token;
- attribute String scope;
-}
-
-
说明:
-
- 此对象仅定义标准属性,登录授权认证服务可扩展定义。
- 例如“微信”登录授权服务,则包括以下数据:
- unionid - 用户统一标识,针对一个微信开放平台帐号下的应用,同一用户的unionid是唯一的。
-
-
属性:
-
-access_token: (String
- 类型
-) 登录授权的访问令牌
- 如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-openid: (String
- 类型
-) 登录授权用户的唯一标识
- 如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-expires_in: (String
- 类型
-) 登录授权访问令牌过期时间
- 单位为秒,如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-refresh_token: (String
- 类型
-) 登录授权的更新令牌
- 用来获取下一次的访问令牌,如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-scope: (String
- 类型
-) 登录授权的权限范围
- 如果存在多个权限,则以","符号分割。
-
-
-
-
-
登录授权用户信息
-
-interface plus.oauth.UserInfo {
- attribute String openid;
- attribute String headimgurl:
- attribute String nickname;
-}
-
-
说明:
-
- 用于保存登录授权用户的信息。
- 此对象仅定义标准属性,登录授权认证服务可扩展定义。
- 例如“微信”登录授权服务,则包括以下数据:
- sex - 普通用户性别,1为男性,2为女性;
- province - 普通用户个人资料填写的省份;
- city - 普通用户个人资料填写的城市;
- country - 国家,如中国为CN;
- privilege - 用户特权信息,json数组,如微信沃卡用户为(chinaunicom);
- unionid - 用户统一标识,针对一个微信开放平台帐号下的应用,同一用户的unionid是唯一的。
-
-
属性:
-
-openid: (String
- 类型
-) 登录授权用户的唯一标识
- 如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-headimgurl: (String
- 类型
-) 登录授权用户的头像图片地址
- 要求为"http://"或"https://"开头的地址,如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-nickname: (String
- 类型
-) 登录授权用户的昵称
- 如果登录授权服务不支持此属性,则返回"undefined"。
-
-
-
-
-
获取登录授权认证服务成功回调
-
-void ServicesSuccessCallback( services ) {
- // Get oauth services success code
-}
-
-
说明:
-
- 当获取登录授权认证服务列表成功时触发,并通过services参数返回运行环境支持的登录授权认证服务列表。
-
-
参数:
-
services:
- (
- Array [
- AuthService
- ]
-
- )
- 必选 运行环境支持的登录授权认证服务列表
- 运行环境支持的登录授权认证服务列表数组,可通过services.length获取服务列表的数目。
- 如果当前运行环境没有支持的登录授权认证服务,则返回空数组。
-
-
返回值:
-
void
- : 无
-
注销登录授权认证操作成功回调函数
-
-void AuthLogoutSuccessCallback( event ) {
- // logout code
-}
-
-
说明:
-
- 注销登录授权认证成功时触发,并返回操作结果。
-
-
参数:
-
event:
- (
- JSON
- )
- 必选 注销登录授权认证操作回调事件参数
- 包括以下参数:
- event.target - 表示登录授权认证服务对象;
- 其它属性可保存注销登录授权的扩展数据。
-
-
返回值:
-
void
- : 无
-
登录授权认证服务操作成功回调函数
-
-void AuthSuccessCallback( event ) {
- // auth code
-}
-
-
说明:
-
- 登录授权认证服务操作如请求登录授权认证、获取登录授权用户信息成功时触发,并返回操作结果。
-
-
参数:
-
event:
- (
- JSON
- )
- 必选 登录授权认证服务操作回调事件参数
- 包括以下参数:
- event.target - 表示登录授权认证服务对象,可以通过此对象的authResult、userInfo属性来获取操作结果信息。
-
-
返回值:
-
void
- : 无
-
登录授权认证服务操作失败回调函数
-
-void AuthErrorCallback(error){
- // Error code
-}
-
-
说明:
-
- 登录授权认证服务操作如请求登录授权认证、注销登录授权认证、获取登录授权用户信息失败时触发,并返回错误信息。
-
-
参数:
-
error:
- (
- Exception
- )
- 必选 操作失败错误信息
- 包括以下参数:
- error.code - 表示错误代码;
- error.message - 错误描述信息;
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/orientation.html b/fangija-zsyf/doc/orientation.html
deleted file mode 100644
index 2b8fddc..0000000
--- a/fangija-zsyf/doc/orientation.html
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Orientation模块管理设备的方向信息,包括alpha、beta、gamma三个方向信息,通过plus.orientation可获取设备方向管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Orientation": {
- "description": "方向传感器"
- }
-}
-}
-
-
-
JSON对象,监听设备方向感应器参数
-
属性:
-
frequency: (Number
- 类型
-) 更新方向信息的时间间隔数值类型,单位为ms,默认值为500ms。
-
-
-
JSON对象,设备方向信息数据
-
-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;
-}
-
-
属性:
-
-alpha: (float
- 类型
-) 以z方向为轴心的旋转角度浮点数类型,只读属性,取值范围为0到360(不等于360)。
-
-beta: (float
- 类型
-) 以x方向为轴心的旋转角度浮点数类型,只读属性,取值范围为-180到180(不等于180)。
-
-gamma: (float
- 类型
-) 以y方向为轴心的旋转角度浮点数类型,只读属性,取值范围为-180到180(不等于180)。
-
-magneticHeading: (float
- 类型
-) 设备方向与地球磁场北极方向的角度浮点数类型,只读属性,取值范围为0到360(不等于360)。
-
-trueHeading: (float
- 类型
-) 设备方向与地球真实北极方向的角度浮点数类型,只读属性,取值范围为0到360(不等于360)。
-
-headingAccuracy: (float
- 类型
-) 设备方向值的误差值浮点数类型,只读属性,取值范围为0到360(不等于360)。
-
-
-
-
获取设备方向信息成功的回调函数
-
-void onSuccess( rotation ){
- // Get orientation success code.
-}
-
-
参数:
-
rotation:
- (
- DOMString
- )
- 必选 设备的方向信息Rotation
-
-
返回值:
-
void
- : 无
-
获取设备方向信息失败的回调函数
-
-void onError( error ) {
- // Get orientation error code.
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 失败信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/payment.html b/fangija-zsyf/doc/payment.html
deleted file mode 100644
index e2fea62..0000000
--- a/fangija-zsyf/doc/payment.html
+++ /dev/null
@@ -1,407 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Payment模块管理支付功能,用于提供网页安全支付能力,支持通过Web接口进行支付操作。通过plus.payment可获取支付管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
permissions
-
-{
-// ...
-"permissions":{
- // ...
- "Payment": {
- "description": "支付"
- }
-}
-}
-
-
-
支付通道对象
-
-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);
-}
-
-
说明:
-
-PaymentChannel对象表示特定的支付通道,用于向系统请求支付操作。
-
-
属性:
-
-
方法:
-
-
-
IAP订单数据对象
-
-interface plus.payment.OrderStatementIAP {
- attribute String productid;
- attribute String username;
- attribute String quantity;
-}
-
-
说明:
-
- 描述IAP商品订单信息,如标识、数量等。
-
-
属性:
-
-productid: (String
- 类型
-) 商品的标识
-
-username: (String
- 类型
-) 购买用户名称
-
-quantity: (String
- 类型
-) 商品数量
-
-
-
-
支付操作结果对象
-
-interface plus.payment.PaymentResult {
- attribute PaymentChannel channel;
- attribute String tradeno;
- attribute String description;
- attribute String url;
- attribute String signature;
- attribute String rawdata;
-}
-
-
说明:
-
-PaymentResult对象表示支付操作返回结果,用于确认支付操作成功。
-
-
属性:
-
-channel: (PaymentChannel
- 类型
-) 支付通道对象
- 用于发起支付操作的支付通道对象。
-
-
-tradeno: (String
- 类型
-) 交易编号信息
- 如果支付平台不支持此数据则返回undefined。
-
-
-description: (Boolean
- 类型
-) 交易描述信息
- 如果支付平台不支持此数据则返回undefined。
-
-
-url: (Boolean
- 类型
-) 查找支付交易信息地址
- 用于向支付平台查询交易信息,如果支付平台不支持此数据则返回undefined。
-
-
-signature: (String
- 类型
-) 支付操作指纹信息
- 用于向支付平台查询支付订单信息,如果支付平台不支持此数据则返回undefined。
-
-
-rawdata: (String
- 类型
-) 支付平台返回的原始数据
- 如果支付平台返回key-value类型字符串,则组合成符合JSON格式的字符串。
-
-
-
-
-
IAP商品对象
-
-interface plus.payment.IAPProduct {
- attribute String productid;
- attribute String price;
- attribute String title;
- attribute String description;
-}
-
-
说明:
-
- 描述IAP商品详细信息,如标识、价格、标题、描述信息等。
-
-
属性:
-
-productid: (String
- 类型
-) 商品的标识
-
-price: (String
- 类型
-) 商品的价格
-
-title: (String
- 类型
-) 商品标题
-
-description: (String
- 类型
-) 商品的描述信息
-
-
-
-
购买IAP商品对象
-
-interface plus.payment.IAPProductInfo {
- attribute String productIdentifier;
- attribute String quantity;
-}
-
-
说明:
-
- 描述购买的IAP商品详细信息,如标识、数量等。
-
-
属性:
-
-productIdentifier: (String
- 类型
-) 商品的标识
-
-quantity: (String
- 类型
-) 商品的数量
-
-
-
-
购买IAP商品交易信息对象
-
-interface plus.payment.IAPTransaction {
- attribute IAPProductInfo payment;
- attribute String transactionDate;
- attribute String transactionIdentifier;
- attribute String transactionReceipt;
- attribute String transactionState;
-}
-
-
说明:
-
- 描述购买的IAP商品交易详细信息,如购买商品信息、交易日期、订单标识等。
-
-
属性:
-
-
-
获取支付通道成功回调
-
-void ChannelsSuccessCallback( channels ) {
- // Get payment channels success code
-}
-
-
说明:
-
- 当获取支付通道列表成功时的回调函数,用于返回终端支持的支付通道列表。
-
-
参数:
-
channels:
- (
- Array
- )
- 必选 数组,系统支持的支付通道PaymentChannel列表
-
-
返回值:
-
void
- : 无
-
请求支付商品列表回调方法
-
-void onsuccess( results ) {
- // Payment success code
-}
-
-
说明:
-
- 获取IAP商品列表信息成功时的回调函数,返回商品详细信息。
-
-
参数:
-
results:
- (
- Array [
- IAPProduct
- ]
-
- )
- 必选 商品信息数据
-
-
返回值:
-
void
- : 无
-
请求已经购买的非消耗性商品和订阅商品回调方法
-
-void onsuccess( results ) {
- // Payment success code
-}
-
-
说明:
-
- 获取IAP商品列表信息成功时的回调函数,返回商品详细信息。
-
-
参数:
-
results:
- (
- Array [
- IAPTransaction
- ]
-
- )
- 必选 已购买的非消耗性商品和订阅商品交易信息
-
-
返回值:
-
void
- : 无
-
支付操作成功回调
-
-void PaymentSuccessCallback ( result ) {
- // Payment success code
-}
-
-
说明:
-
- 当支付操作成功时的回调函数,用于返回支付操作的成功信息。
-
-
参数:
-
-
返回值:
-
void
- : 无
-
支付操作失败回调
-
-void PaymentErrorCallback(error){
- // Payment error code
-}
-
-
说明:
-
当支付操作失败时的回调函数,用于返回支付操作失败的错误信息。
-
参数:
-
error:
- (
- DOMException
- )
- 必选 支付操作失败错误信息,可通过error.code获取错误代码,具体错误码有各支付通道定义
- 支付宝支付错误代码如下:
- 62000,客户端未安装支付通道依赖的服务;
- 62001,用户取消支付操作;
- 62002,此设备不支持支付;
- 62003,数据格式错误;
- 62004,支付账号状态错误;
- 62005,订单信息错误;
- 62006,支付操作内部错误;
- 62007,支付服务器错误;
- 62008,网络问题引起的错误;
- 62009,其它未定义的错误。
- 微信支付错误代码如下:
- -1,一般错误;
- -2,用户取消;
- -3,发送失败;
- -4,认证被否决;
- -5,不支持错误。
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/proximity.html b/fangija-zsyf/doc/proximity.html
deleted file mode 100644
index c895982..0000000
--- a/fangija-zsyf/doc/proximity.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Proximity模块管理设备距离传感器,可获取当前设备的接近距离信息,通过plus.proximity可获取设备距离传感管理对象。
-
方法:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Proximity": {
- "description": "距离感应器"
- }
-}
-}
-
-
-
获取设备接近距离信息成功的回调函数
-
-void onSuccess( distance ) {
- // Get distance success code.
-}
-
-
参数:
-
distance:
- (
- Number
- )
- 必选 设备接近距离 设备接近距离传感器获取的距离值,单位为厘米。如果感应器无法获取准确的距离值,则在接近设备时返回0,否则返回Infinity。
-
返回值:
-
void
- : 无
-
获取设备接近距离信息失败的回调函数
-
-void onError( error ) {
- // Get distance error code.
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 失败信息
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/push.html b/fangija-zsyf/doc/push.html
deleted file mode 100644
index 3adb4f1..0000000
--- a/fangija-zsyf/doc/push.html
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
-
-
-
-
-Hello H5+
-
-
-
-
-
-
-
Push模块管理推送消息功能,可以实现在线、离线的消息推送,通过plus.push可获取推送消息管理对象。
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
permissions
-
-{
-// ...
-"permissions":{
- // ...
- "Push": {
- "description": "消息推送"
- }
-}
-}
-
- 属性:
-
-
-
JSON对象,获取的客户端标识信息
-
属性:
-
-token: (String
- 类型
-) 设备令牌(iOS设备唯一标识),用于APNS服务推送中标识设备的身份
-
-clientid: (String
- 类型
-) 推送服务令牌(设备唯一标识),用于标识推送信息接收者身份
- 第三方推送服务器管理的设备唯一标识,在iOS平台此值通常与token不同;在其它平台此值通常与token值一致。
- 此值与设备及应用都相关,即不同的apk/ipa安装到同一台设备上的值都不相同。
-
-
-appid: (String
- 类型
-) 第三方推送服务的应用标识第三方推送服务器管理的应用标识,通常需要在第三方推送服务器平台进行注册获取。
-
-appkey: (String
- 类型
-) 第三方推送服务器的应用键值第三方推送服务器管理的应用键值,通常需要在第三方推送服务器平台进行注册获取。
-
-
-
-
JSON对象,推送消息对象
-
属性:
-
-
-
JSON对象,获客户端创建本地消息的参数
-
属性:
-
-appid: (String
- 类型
-) 要启动流应用的appid
- 默认值为当前流应用的appid。
-
-
-title: (String
- 类型
-) 推送消息的标题
- 在系统消息中心显示的通知消息标题,默认值为程序的名称。
-
-
-sound: (String
- 类型
-) 推送消息的提示音
- 显示消息时的播放的提示音,可取值:
- “system”-表示使用系统通知提示音;
- “none”-表示不使用提示音;
- 默认值为“system”。
-
-
-cover: (Boolean
- 类型
-) 是否覆盖上一次提示的消息
- 可取值true或false,true为覆盖,false不覆盖,默认为permission中设置的cover值。
-
-
-when: (Date
- 类型
-) 消息上显示的提示时间
- 默认为当前时间,如果延迟显示则使用延时后显示消息的时间。
-
-
-delay: (Number
- 类型
-) 提示消息延迟显示的时间
- 当设备接收到推送消息后,可不立即显示,而是延迟一段时间显示,延迟时间单位为s,默认为0s,立即显示。
-
-
-
-
-
客户端接收到推动消息的回调函数
-
-void onReceive( msg ) {
- // Recieved push message code.
-}
-
-
参数:
-
msg:
- (
- String
- )
- 必选 接收到的推送信息msg
-
-
返回值:
-
void
- : 无
-
用户点击推送消息事件的回调函数
-
-void onClick( msg ) {
- // Clicked push message code.
-}
-
-
参数:
-
msg:
- (
- String
- )
- 必选 用户点击的推送信息msg
-
-
返回值:
-
void
- : 无
-
-
diff --git a/fangija-zsyf/doc/res/doc.css b/fangija-zsyf/doc/res/doc.css
deleted file mode 100644
index 091d7de..0000000
--- a/fangija-zsyf/doc/res/doc.css
+++ /dev/null
@@ -1,61 +0,0 @@
-* {
- -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);
-}
diff --git a/fangija-zsyf/doc/res/doc.js b/fangija-zsyf/doc/res/doc.js
deleted file mode 100644
index e67a19a..0000000
--- a/fangija-zsyf/doc/res/doc.js
+++ /dev/null
@@ -1,14 +0,0 @@
-(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);
\ No newline at end of file
diff --git a/fangija-zsyf/doc/res/prettify.js b/fangija-zsyf/doc/res/prettify.js
deleted file mode 100644
index 7fbe7aa..0000000
--- a/fangija-zsyf/doc/res/prettify.js
+++ /dev/null
@@ -1,1658 +0,0 @@
-// 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.
- *
- *
- * For a fairly comprehensive set of languages see the
- * README
- * 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.
- *
- * Usage:
- * include this source file in an html page via
- * {@code }
- * define style rules. See the example page for examples.
- * mark the {@code } and {@code } tags in your source with
- * {@code class=prettyprint.}
- * You can also use the (html deprecated) {@code } tag, but the pretty
- * printer needs to do more substantial DOM manipulations to support that, so
- * some css styles may not be preserved.
- *
- * 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 } or {@code } element to specify the
- * language, as in {@code }. 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.
- *
- * Change log:
- * cbeust, 2006/08/22
- *
- * Java annotations (start with "@") are now captured as literals ("lit")
- *
- * @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 } and {@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.
- *
- * 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.
- *
- *
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.} 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.
- *
- *
- * The HTML DOM structure:
- *
- * (Element "p"
- * (Element "b"
- * (Text "print ")) ; #1
- * (Text "'Hello '") ; #2
- * (Element "br") ; #3
- * (Text " + 'World';")) ; #4
- *
- *
- * corresponds to the HTML
- * {@code
print 'Hello ' + 'World';
}.
- *
- *
- * It will produce the output:
- *
- * {
- * sourceCode: "print 'Hello '\n + 'World';",
- * // 1 2
- * // 012345678901234 5678901234567
- * spans: [0, #1, 6, #2, 14, #3, 15, #4]
- * }
- *
- *
- * where #1 is a reference to the {@code "print "} text node above, and so
- * on for the other text nodes.
- *
- *
- *
- * 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.
- *
- *
- * @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.
- *
- * This is meant to return the CODE element in {@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 ...... } 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
- * '
-
-
-
-
Runtime模块管理运行环境,可用于获取当前运行环境信息、与其它程序进行通讯等。通过plus.runtime可获取运行环境管理对象。
-
属性:
-
-
方法:
-
-
对象:
-
-
回调方法:
-
-
权限:
-
5+功能模块(permissions)
-
-{
-// ...
-"permissions":{
- // ...
- "Runtime": {
- "description": "运行环境"
- }
-}
-}
-
-
-
JSON对象,应用安装参数
-
说明:
-
可通过对象设置安装的应用是否进行appid校验、版本号校验等。
-
属性:
-
-
-
JSON对象,应用信息
-
属性:
-
-appid: (String
- 类型
-) 应用的APPID
-
-version: (String
- 类型
-) 应用的版本号
-
-name: (String
- 类型
-) 应用的名称
-
-description: (String
- 类型
-) 应用描述信息
-
-author: (String
- 类型
-) 应用描述信息
-
-email: (String
- 类型
-) 开发者邮箱地址
-
-license: (String
- 类型
-) 应用授权描述信息
-
-licensehref: (String
- 类型
-) 应用授权说明链接地址
-
-features: (String[]
- 类型
-) 应用许可特性列表
-
-
-
-
JSON对象,打开文件参数
-
属性:
-
-
-
JSON对象,打开第三方程序参数
-
属性:
-
-pname: (String
- 类型
-) 第三方程序包名仅Android平台支持,表示程序的包名,其它平台忽略此属性值。
-
-action: (String
- 类型
-) 程序的操作行为Android平台上与系统的action值一致;iOS平台为要调用程序的URLScheme格式字符串。
-
-extra: (JSON
- 类型
-) 调用程序的参数仅Android平台支持,为JSON格式,用于传递给要调用程序的参数,如extra:{url:"http://www.html5plus.org"}。
-
-
-
-
安装应用成功回调函数
-
-void onSuccess(widgetInfo){
- // Code here
-}
-
-
参数:
-
widgetInfo:
- (
- WidgetInfo
- )
- 必选 应用信息,参见:WidgetInfo
-
返回值:
-
void
- : 无
-
安装应用失败回调函数
-
-void onError(error){
- // Handle the error
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 安装失败的错误信息
-
返回值:
-
void
- : 无
-
获取应用属性成功回调函数
-
-void onGetPropertyCB(widgetInfo){
- // Code here
-}
-
-
参数:
-
widgetInfo:
- (
- WidgetInfo
- )
- 必选 应用信息,参见:WidgetInfo
-
返回值:
-
void
- : 无
-
打开本地文件或URL失败回调函数
-
-void onError(error){
- // Handle the error
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 打开操作失败的错误信息
-
返回值:
-
void
- : 无
-
调用第三方程序失败回调函数
-
-void onError(error){
- // Handle the error
-}
-
-
参数:
-
error:
- (
- DOMException
- )
- 必选 操作失败的错误信息
-
返回值:
-
void
- : 无
-
-