mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
moving config.json to config folder (#536)
* moving config.json to config folder * delete config Co-authored-by: elsiosanchez <elsiosanches@gmial.com>
This commit is contained in:
parent
6d55b7cb52
commit
9c90f63b3e
@ -1,5 +1,6 @@
|
||||
/**
|
||||
* Instance for connection to API RESTful with axios
|
||||
* @author EdwinBetanc0urt <EdwinBetanc0urt@oulook.com>
|
||||
* @author elsiosanchez <elsiosanches@gmail.com>
|
||||
* @param {string} url to resource request
|
||||
* @param {string} method rest, 'get' and 'post' (as default)
|
||||
@ -23,7 +24,7 @@ export function ApiRest({
|
||||
})
|
||||
return request.interceptors
|
||||
}
|
||||
const config = require('@/api/ADempiere/config.json')
|
||||
const config = require('../../../config/config.json')
|
||||
const apiRestAddress = config.adempiereStore.images.protocol + config.adempiereStore.images.baseUrl + config.adempiereStore.images.port + config.service
|
||||
const axios = require('axios')
|
||||
const request = axios.create({
|
||||
@ -56,6 +57,7 @@ export function ApiRest({
|
||||
/**
|
||||
* Evaluate the response if is a success or error
|
||||
* @author EdwinBetanc0urt <EdwinBetanc0urt@oulook.com>
|
||||
* @author elsiosanchez <elsiosanches@gmail.com>
|
||||
* @param {object} response
|
||||
* @returns {mixed}
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@ export function buildImageFromArray({
|
||||
|
||||
/**
|
||||
* Build a base 64 image from arrayBuffer
|
||||
* @author EdwinBetanc0urt <EdwinBetanc0urt@oulook.com>
|
||||
* @author elsiosanchez <Elsiosanches@gmail.com>
|
||||
* @param {array} arrayBuffer
|
||||
* @param {string} contentType
|
||||
@ -43,6 +44,7 @@ export function buildImageFromArrayBuffer({
|
||||
|
||||
/**
|
||||
* Get path to get file
|
||||
* @author EdwinBetanc0urt <EdwinBetanc0urt@oulook.com>
|
||||
* @author elsiosanchez <Elsiosanches@gmail.com>
|
||||
* @param {string} file
|
||||
* @param {number} width
|
||||
@ -57,7 +59,7 @@ export function getImagePath({
|
||||
operation = 'fit'
|
||||
}) {
|
||||
// TODO: Evaluate path url 'http://domain:port/adempiere-api', 'adempiere-api' is part of urn
|
||||
const config = require('@/api/ADempiere/config.json')
|
||||
const config = require('../../../config/config.json')
|
||||
const url = config.adempiereStore.images.protocol + config.adempiereStore.images.baseUrl + config.adempiereStore.images.port + config.service
|
||||
const urn = `/img?action=${operation}&width=${width}&height=${height}&url=${file}`
|
||||
const uri = `${url}${urn}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user