3600);
var min = fill_zero_prefix(
Math.floor((second - hr *
3600) /
60));
var sec = fill_zero_prefix((second - hr *
3600 - min *
60));
return hr +
":" + min +
":" + sec +
" ";}
function getDistance(lat1, lng1, lat2, lng2) { var dis =
0;
var radLat1 = toRadians(lat1);
var radLat2 = toRadians(lat2);
var deltaLat = radLat1 - radLat2;
var deltaLng = toRadians(lng1) - toRadians(lng2);
var dis =
2 *
Math.asin(
Math.sqrt(
Math.pow(
Math.sin(deltaLat /
2),
2) +
Math.cos(radLat1) *
Math.cos(radLat2) *
Math.pow(
Math.sin(deltaLng /
2),
2)));
return dis *
6378137;
function toRadians(d) { return d *
Math.PI /
180;}}
function fill_zero_prefix(num) { return num <
10 ?
"0" + num : num}Page({ data: { clock:
'', isLocation:
false, latitude:
0, longitude:
0, markers: [], covers: [], meters:
0.00, time:
"0:00:00" }, >
function(options){
this.getLocation() console.log(
"onLoad") count_down(
this); }, openLocation:
function (){ wx.getLocation({ type:
'gcj02', success:
function(res){ wx.openLocation({ latitude: res.latitude, longitude: res.longitude, scale:
28, }) }, }) }, starRun :
function () { if 4/5 首页 上一页 2 3 4 5 下一页 尾页