diff --git a/fangija-zsyf/js/common.js b/fangija-zsyf/js/common.js
index 6f08bb6..1bf58bb 100644
--- a/fangija-zsyf/js/common.js
+++ b/fangija-zsyf/js/common.js
@@ -61,7 +61,7 @@ var openw=null,waiting=null;
* @param {boolean} ns : 是否不自动显示
* @param {JSON} ws : Webview窗口属性
*/
-w.clicked=function(id,wa,ns,ws){
+w.clicked=function(id,wa,ns,ws, params,callback,callbackParams){
if(openw){//避免多次打开同一个页面
return null;
}
@@ -71,7 +71,7 @@ w.clicked=function(id,wa,ns,ws){
ws.scrollIndicator||(ws.scrollIndicator='none');
ws.scalable||(ws.scalable=false);
var pre='';//'http://192.168.1.178:8080/h5/';
- openw=plus.webview.create(pre+id,id,ws);
+ openw=plus.webview.create(pre+id,id,ws,params);
ns||openw.addEventListener('loaded',function(){//页面加载完成后才显示
// setTimeout(function(){//延后显示可避免低端机上动画时白屏
openw.show(as);
@@ -79,6 +79,10 @@ w.clicked=function(id,wa,ns,ws){
// },200);
},false);
openw.addEventListener('close',function(){//页面关闭后可再次打开
+ //可以设置页面关闭时回调的方法,可以对数据进行重新加载操作
+ if(callback){
+ callback(callbackParams);
+ }
openw=null;
},false);
return openw;
diff --git a/fangija-zsyf/js/plus.info.js b/fangija-zsyf/js/plus.info.js
new file mode 100644
index 0000000..27dcd88
--- /dev/null
+++ b/fangija-zsyf/js/plus.info.js
@@ -0,0 +1,41 @@
+/**
+ * 获取手机上的信息,比如位置,手机ID
+ * @author yinjihuan
+ */
+//扩展API加载完毕后调用onPlusReady回调函数
+document.addEventListener('plusready', onPlusReady, false);
+//扩展API加载完毕,现在可以正常调用扩展API
+function onPlusReady(){
+ getPosition();
+}
+// 获取当前用户位置
+function getPosition(){
+ plus.geolocation.getCurrentPosition(function(p){
+ province = p.address.province;
+ city = p.address.city;
+ region = p.address.district;
+ }, function(e){
+
+ },
+ {
+ provider:'baidu',
+ enableHighAccuracy:true,
+ coordsType:'bd09ll'
+ }
+ );
+}
+
+function getPushInfo(){
+ try {
+ var info = plus.push.getClientInfo();
+ return info.clientid;
+ }catch(error) {
+ console.log( error);
+ }
+// console.log( "获取客户端推送标识信息:" );
+// console.log( "token: "+info.token );
+// alert( "clientid: "+info.clientid );
+// console.log( "appid: "+info.appid );
+// console.log( "appkey: "+info.appkey );
+ return "";
+}
\ No newline at end of file
diff --git a/fangija-zsyf/views/user/bindingMobile.html b/fangija-zsyf/views/user/bindingMobile.html
index cd2cc36..4976692 100644
--- a/fangija-zsyf/views/user/bindingMobile.html
+++ b/fangija-zsyf/views/user/bindingMobile.html
@@ -84,6 +84,7 @@ $.config = {router: false}
+