//接收
self.onmessage = function (obj) {
    var arr = JSON.parse(JSON.stringify(obj.data.arr));
    var token = obj.data.token;
    var url = obj.data.url;
    var svgObj = {}
    arr.forEach(function (obj, index) {
        var oReq = new XMLHttpRequest();
        oReq.open("GET", url + obj.value, false);
        oReq.setRequestHeader("Content-type", "application/json");
        oReq.setRequestHeader("token", token);
        oReq.send(JSON.stringify());
        // "data:image/svg+xml;base64," + escape()
        var field = obj.value.replace(".svg", "")
        obj.content = oReq.responseText
        svgObj[field] = obj        
    })
    self.postMessage(svgObj); // 把数据发送回给主线程
    self.close()
}