页面回退刷新
This commit is contained in:
@@ -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 "";
|
||||
}
|
||||
Reference in New Issue
Block a user