Commit a88aa5f5 by 王志慧

修复bug

1 parent bf6d0742
/*
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-07-12 15:57:51
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-07-18 14:00:00
* @FilePath: \glsx-oss-configuration\src\api\request.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import RequestMethods from './request.methods'
import axios from 'axios'
import qs from 'qs'
// import GlsxVueCommon from 'glsx-vue-common'
import sign from './sign'
import Vue from 'vue'
import {
GlAxios
} from 'glsx-vue-common'
const request = (params = {}, method = RequestMethods.GET, noSignAttr = [], url = '') => {
params.source = 'glsx-oss-merchant-data'
params.appKey = '48e5e13229b82c1b4e6e8c96151f0637'
params.appKey = Vue.prototype.$params.external.params.appKey
params.timestamp = new Date().getTime()
params.v = '1.0.0'
params.format = 'json'
// params.createBy = this.$get_session_config().user.id
var data = sign(params, noSignAttr)
var data = sign(params, noSignAttr,Vue.prototype.$params.external.secret)
if (url) {
return axios.post(`${url}/router?method=${method}`, qs.stringify(data))
}
return method === RequestMethods.GET ? GlAxios.get('router', {
params: sign(params, noSignAttr)
params: sign(params, noSignAttr,Vue.prototype.$params.external.secret)
}) : GlAxios.post('router', data)
}
export default request
/*
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-07-12 15:57:51
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-07-18 13:59:40
* @FilePath: \glsx-oss-configuration\src\api\sign.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import sha1 from 'sha1'
import qs from 'qs'
import _ from 'lodash'
const secret = window.location.href.includes('dj.glsx.com.cn') ? '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' : 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const sign = (params, noSignAttr = []) => {
// const secret = window.location.href.includes('dj.glsx.com.cn') ? '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' : 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const sign = (params, noSignAttr = [],secret) => {
delete params.sign
var objStr = qs.stringify(_.cloneDeep(params), {
arrayFormat: 'indices',
......
......@@ -48,7 +48,6 @@ var mixin = {
connection.promise.then(parent => {
const cfg = _this.$get_session_config()
_this.$$parent = parent
console.log(parent, '---')
if (cfg) return
parent.getResources().then(config => {
_this.$set_session_config(config)
......
/*
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-07-12 15:57:51
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-07-18 10:08:01
* @FilePath: \glsx-oss-configuration\src\views\config\index\app.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
console.log(config)
vue.prototype.$params = config
base.render(App)
})
/*
* @Author: 王志慧 wangzh@didihu.com.cn
* @Date: 2024-07-12 15:57:51
* @LastEditors: 王志慧 wangzh@didihu.com.cn
* @LastEditTime: 2024-07-18 10:06:14
* @FilePath: \glsx-oss-configuration\src\views\customer\glsx\app.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
console.log(config)
vue.prototype.$params = config
base.render(App)
})
......@@ -5,5 +5,7 @@ import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
console.log(config)
vue.prototype.$params = config
base.render(App)
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!