const baseurl = 'http://jtjcapi.vnet1000.net/api/';
const api_key = 16859729295369;
const api_secret = "C7DEA02B195942EAA973A6FBF4151741";
var station_id = '';
var access_token = '';
var province = '';
var city = '';
window._AMapSecurityConfig = {
    securityJsCode: '0711374220aba81dbf7515aaac08e50b',
}
// 自适应
resetFontSize();
function resetFontSize() {
    var baseFontSize = 100
    var designWidth = 1920
    var width = window.innerWidth;
    var maxWidth = 3280;
    var minWidth = 1260;
    width = Math.min(maxWidth, width);
    width = Math.max(minWidth, width);
    sizeScale = width / designWidth;
    var currentFontSize = Math.ceil(sizeScale * baseFontSize);
    document.getElementsByTagName('html')[0].style.fontSize = currentFontSize + 'px'
}
$(function () {
    window.onresize = function () {
        resetFontSize();
    };
})

function getTimestamp() {
	return Math.round(new Date().getTime()/10);
}

function sort(obj) {
	var newkey = Object.keys(obj).sort();
	var sortObj = {};
	for (var i = 0; i < newkey.length; i++) {
		sortObj[newkey[i]] = obj[newkey[i]];
	}
	let newObj = [];
	for (let i in sortObj) {
		var arr = {
			key: i,
			value: sortObj[i]
		}
		newObj.push(arr)
	}
	let str = '';
	for (let i = 0; i < newObj.length; i++) {
		if (newObj[i].value !== '' && newObj[i].key !== 'signcode') {
			str += newObj[i].key + newObj[i].value;
		}
	}
	return str;
}