Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-record
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e0d0c8a0
authored
Sep 30, 2024
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
前端配置服务变更
1 parent
0108ab9e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
package.json
src/base.js
package.json
View file @
e0d0c8a
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"element-ui"
:
"^2.15.1"
,
"element-ui"
:
"^2.15.1"
,
"glsx-vue-common"
:
"^1.2.8"
,
"glsx-vue-common"
:
"^1.2.8"
,
"glsx-common"
:
"^2.10.1"
,
"node-sass"
:
"^4.14.1"
,
"node-sass"
:
"^4.14.1"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
"vue"
:
"^2.5.17"
"vue"
:
"^2.5.17"
...
...
src/base.js
View file @
e0d0c8a
...
@@ -16,6 +16,7 @@ import { Request as request } from 'glsx-vue-common'
...
@@ -16,6 +16,7 @@ import { Request as request } from 'glsx-vue-common'
// import '@/styles/index.css'
// import '@/styles/index.css'
// 组件
// 组件
import
'@/components'
import
'@/components'
import
{
utils
}
from
'glsx-common'
// import { Util } from './common/util'
// import { Util } from './common/util'
// import _ from 'lodash'
// import _ from 'lodash'
// import axios from 'axios'
// import axios from 'axios'
...
@@ -95,16 +96,32 @@ Date.prototype.format = function (fmt) {
...
@@ -95,16 +96,32 @@ Date.prototype.format = function (fmt) {
}
}
return
fmt
return
fmt
}
}
const
URL
=
// const URL =
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/record-config'
)
=>
{
// const getConfig = (url = URL + '/record-config') => {
return
new
Promise
((
resolve
,
reject
)
=>
{
// return new Promise((resolve, reject) => {
request
({
url
}).
then
((
res
)
=>
{
// request({ url }).then((res) => {
if
(
res
.
status
===
'success'
)
{
// if (res.status === 'success') {
resolve
({
vue
:
Vue
,
config
:
JSON
.
parse
(
res
.
data
)
})
// resolve({ vue: Vue, config: JSON.parse(res.data) })
}
else
{
// } else {
reject
(
'ERROR.'
)
// reject('ERROR.')
// }
// })
// })
// }
const
getConfig
=
()
=>
{
let
params
=
{
moduleName
:
'glsx-oss-record'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/record-config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
utils
.
getConfig
(
params
).
then
(
res
=>
{
resolve
({
vue
:
Vue
,
config
:
res
})
})
})
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment