| | |
| | | let _componentHeader = _tree.html.getElementsByTagName('head'); |
| | | let _componentBody = _tree.html.getElementsByTagName('body'); |
| | | |
| | | // 检查元素是否存在,避免null引用错误 |
| | | if (!_vcCreateEl) { |
| | | console.warn('找不到元素ID:', _tree.treeId, '跳过渲染'); |
| | | continue; |
| | | } |
| | | |
| | | if (_vcCreateEl.hasAttribute("location") && 'head' == _vcCreateEl.getAttribute('location')) { |
| | | let _componentHs = _componentHeader[0].childNodes; |
| | | _header[0].appendChild(_componentHeader[0]); |
| | |
| | | if(_accessToken){ |
| | | Vue.http.headers.common['Authorization'] = 'Bearer '+_accessToken.token; |
| | | } |
| | | // 添加USER-ID请求头 |
| | | Vue.http.headers.common['USER-ID'] = '-1'; |
| | | // 添加VERSION请求头 |
| | | Vue.http.headers.common['VERSION'] = 'v1.8'; |
| | | vcFramework.loading('open'); |
| | | Vue.http.post('/callComponent/upload/' + componentCode + "/" + componentMethod, param, options) |
| | | .then(function (res) { |
| | |
| | | //refreshVcFramework(); |
| | | //修改锚点 |
| | | location.hash = url.substring(url.indexOf("#") + 1, url.length); |
| | | vcFramework.reBuilderVcTree(); |
| | | //vcFramework.reBuilderVcTree(); |
| | | }; |
| | | |
| | | //跳转至商城 |