Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-equity
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 e0b6dacf
authored
Sep 30, 2024
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
前端配置服务变更
1 parent
1b0e07c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
21 deletions
package.json
src/base.js
package.json
View file @
e0b6dac
...
...
@@ -13,6 +13,7 @@
"file-saver"
:
"^2.0.5"
,
"glsx-vue-common"
:
"^1.2.8"
,
"glsx-vue-components"
:
"^1.0.13"
,
"glsx-common"
:
"^2.10.1"
,
"sha1"
:
"^1.1.1"
,
"vee-validate"
:
"^2.1.7"
,
"vue"
:
"^2.5.17"
,
...
...
src/base.js
View file @
e0b6dac
...
...
@@ -14,7 +14,8 @@ import 'glsx-vue-components/dist/glsx-vue-components.css'
import
'./styles/index.css'
import
ElementUI
from
'element-ui'
;
import
'element-ui/lib/theme-chalk/index.css'
;
Vue
.
use
(
ElementUI
);
import
{
utils
}
from
'glsx-common'
Vue
.
use
(
ElementUI
)
//引用富文本编辑器
import
VueQuillEditor
from
'vue-quill-editor'
//引入富文本css
...
...
@@ -59,26 +60,40 @@ var mixin = {
}
}
const
URL
=
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/oss_rightsAndInterests'
)
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
let
config
=
JSON
.
parse
(
xhr
.
responseText
)
window
.
localStorage
.
setItem
(
'GLSX_OSS_EQUITY_CONFIG'
,
xhr
.
responseText
)
resolve
({
'vue'
:
Vue
,
'config'
:
config
})
}
}
xhr
.
open
(
'GET'
,
url
)
xhr
.
send
()
})
// const URL =
// 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const getConfig = (url = URL + '/oss_rightsAndInterests') => {
// return new Promise(resolve => {
// const xhr = new XMLHttpRequest()
// xhr.onreadystatechange = () => {
// if (xhr.readyState === 4 && xhr.status === 200) {
// let config = JSON.parse(xhr.responseText)
// window.localStorage.setItem('GLSX_OSS_EQUITY_CONFIG', xhr.responseText)
// resolve({ vue: Vue, config: config })
// }
// }
// xhr.open('GET', url)
// xhr.send()
// })
// }
const
getConfig
=
()
=>
{
let
params
=
{
moduleName
:
'glsx-oss-rightsAndInterests'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_rightsAndInterests'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
/* eslint-disable no-new */
return
new
Promise
((
resolve
,
reject
)
=>
{
utils
.
getConfig
(
params
).
then
(
res
=>
{
window
.
localStorage
.
setItem
(
'GLSX_OSS_EQUITY_CONFIG'
,
JSON
.
stringify
(
res
))
resolve
({
vue
:
Vue
,
config
:
res
})
})
})
}
/* eslint-disable no-new */
const
render
=
App
=>
{
window
.
vm
=
new
Vue
({
el
:
'#app'
,
...
...
@@ -90,4 +105,4 @@ getConfig()
export
default
{
render
,
getConfig
}
\ No newline at end of file
}
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