diff --git a/common/request.js b/common/request.js index 22854ec..129510f 100644 --- a/common/request.js +++ b/common/request.js @@ -14,7 +14,8 @@ const coreRequestBase = (url, reqParams, options = {}, methodType = "POST", core url, data: reqParams, header: options, - method: methodType, + method: methodType, + timeout: 10*60*1000, // 请求超时 ...coreParams, success: (res) => { resolve(res) @@ -80,28 +81,28 @@ let coreRequest = function(url, params = {}, options = {}, methodType, coreParam // emoUnicode(res, 2) return res }) +} + +const coreDownloadRequest = (url, params = {}, options = {}, methodType = 'GET', coreParams = {})=> { + let comReqData = getCommonReqData() + // 统一把emo转unicode + // emoUnicode(params) + const reqParams = { + ...baseParam, + ...params, + } + url = `${host}${url}` + options = { + ...comReqData.header, + ...options, + } + + // get请求 需要转成query参 + url = url + (url.indexOf('?') == -1 ? '?': '') + tansGetParamsToQuery(reqParams) + return { url, header: options } } -const coreDownloadRequest = (url, params = {}, options = {}, methodType = 'GET', coreParams = {})=> { - let comReqData = getCommonReqData() - // 统一把emo转unicode - // emoUnicode(params) - const reqParams = { - ...baseParam, - ...params, - } - url = `${host}${url}` - options = { - ...comReqData.header, - ...options, - } - - // get请求 需要转成query参 - url = url + (url.indexOf('?') == -1 ? '?': '') + tansGetParamsToQuery(reqParams) - return { url, header: options } -} - -export { +export { coreDownloadRequest, coreRequest } \ No newline at end of file diff --git a/components/buns-locus-pos/buns-locus-pos.vue b/components/buns-locus-pos/buns-locus-pos.vue index 5162ec6..58094df 100644 --- a/components/buns-locus-pos/buns-locus-pos.vue +++ b/components/buns-locus-pos/buns-locus-pos.vue @@ -52,7 +52,7 @@ filDataList: this.list } }, - created() { + mounted() { this.initData() }, onHide() { diff --git a/components/buns-order-templates/bo-detail-tmp.vue b/components/buns-order-templates/bo-detail-tmp.vue index 86089d2..b180607 100644 --- a/components/buns-order-templates/bo-detail-tmp.vue +++ b/components/buns-order-templates/bo-detail-tmp.vue @@ -1,5 +1,5 @@ + + \ No newline at end of file diff --git a/components/buns-post-edit-templates/bpe-coststatic-tmp.vue b/components/buns-post-edit-templates/bpe-coststatic-tmp.vue index c154e60..016463f 100644 --- a/components/buns-post-edit-templates/bpe-coststatic-tmp.vue +++ b/components/buns-post-edit-templates/bpe-coststatic-tmp.vue @@ -35,11 +35,11 @@