export function tencentMap(key) {
    return new Promise(function(resolve, reject) {
        window.init = function() {
            resolve(qq);
        };
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = document.URL.split('/')[0] + '//map.qq.com/api/js?v=2.exp&callback=initMap&key=' + key;
        script.onerror = reject;
        document.head.appendChild(script);
    });
}