zhangjq
2026-01-27 6f51f667ae7b13dca029045c221d0b1722cf98df
public/vcCore/core.js
@@ -59,15 +59,6 @@
    var DEFAULT_NAMESPACE = "default";
    vc.http = {
        post: function (componentCode, componentMethod, param, options, successCallback, errorCallback) {
            // 获取访问令牌
            let _accessToken = vc.getData('hc_accessToken');
            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';
            vc.loading('open');
            Vue.http.post('/callComponent/' + componentCode + "/" + componentMethod, param, options)
                .then(function (res) {
@@ -89,15 +80,6 @@
                });
        },
        get: function (componentCode, componentMethod, param, successCallback, errorCallback) {
            // 获取访问令牌
            let _accessToken = vc.getData('hc_accessToken');
            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';
            //加入缓存机制
            var _getPath = '/' + componentCode + '/' + componentMethod;
            if (vc.constant.GET_CACHE_URL.includes(_getPath)) {
@@ -132,15 +114,6 @@
                });
        },
        upload: function (componentCode, componentMethod, param, options, successCallback, errorCallback) {
            // 获取访问令牌
            let _accessToken = vc.getData('hc_accessToken');
            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';
            vc.loading('open');
            Vue.http.post('/callComponent/upload/' + componentCode + "/" + componentMethod, param, options)
                .then(function (res) {