Commit 9b6808fb by 前端

Merge branch 'v3.2.1' into 'master'

加密

See merge request !1
2 parents 947fdbeb c6ac4815
......@@ -3,22 +3,28 @@ import axios from 'axios'
import qs from 'qs'
// import GlsxVueCommon from 'glsx-vue-common'
import sign from './sign'
import {
GlAxios
} from 'glsx-vue-common'
const request = (params = {}, method = RequestMethods.GET, noSignAttr = [], url = '') => {
import { GlAxios } from 'glsx-vue-common'
const request = (
params = {},
method = RequestMethods.GET,
noSignAttr = [],
url = ''
) => {
params.source = 'glsx-oss-merchant-data'
params.appKey = '48e5e13229b82c1b4e6e8c96151f0637'
params.timestamp = new Date().getTime()
params.v = '1.0.0'
params.format = 'json'
params.sessionAuth = 'st'
// params.createBy = this.$get_session_config().user.id
var data = sign(params, noSignAttr)
if (url) {
return axios.post(`${url}/router?method=${method}`, qs.stringify(data))
}
return method === RequestMethods.GET ? GlAxios.get('router', {
params: sign(params, noSignAttr)
}) : GlAxios.post('router', data)
return method === RequestMethods.GET
? GlAxios.get('router', {
params: sign(params, noSignAttr),
})
: GlAxios.post('router', data)
}
export default request
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!