Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-marketing-push
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 8fea9d57
authored
Sep 29, 2024
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
前端服务配置变更
1 parent
5e4fa8a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
package.json
src/base.js
package.json
View file @
8fea9d5
...
@@ -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.1"
,
"glsx-vue-common"
:
"^1.2.1"
,
"glsx-common"
:
"^2.10.1"
,
"js-md5"
:
"^0.7.3"
,
"js-md5"
:
"^0.7.3"
,
"lodash"
:
"^4.17.10"
,
"lodash"
:
"^4.17.10"
,
"qs"
:
"^6.10.0"
,
"qs"
:
"^6.10.0"
,
...
...
src/base.js
View file @
8fea9d5
...
@@ -10,6 +10,7 @@ import '@/styles/index.css'
...
@@ -10,6 +10,7 @@ import '@/styles/index.css'
// 组件
// 组件
import
'@/components'
import
'@/components'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
{
utils
}
from
'glsx-common'
// import _ from 'lodash'
// import _ from 'lodash'
// import axios from 'axios'
// import axios from 'axios'
Vue
.
prototype
.
notice
=
notice
Vue
.
prototype
.
notice
=
notice
...
@@ -37,18 +38,35 @@ var mixin = {
...
@@ -37,18 +38,35 @@ var mixin = {
})
})
}
}
}
}
const
URL
=
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/marketing-push-config'
)
=>
{
// const getConfig = (url = URL + '/marketing-push-config') => {
// return new Promise((resolve, reject) => {
// request({ url }).then(res => {
// if (res.status === 'success') {
// window.globalConfig = {
// baseURL: JSON.parse(res.data).axios.baseURL
// }
// resolve({ 'vue': Vue, 'config': JSON.parse(res.data) })
// } else {
// reject('ERROR.')
// }
// })
// })
// }
const
getConfig
=
()
=>
{
let
params
=
{
moduleName
:
'glsx-oss-marketing-push'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/marketing-push-config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
request
({
url
}).
then
(
res
=>
{
utils
.
getConfig
(
params
).
then
(
res
=>
{
if
(
res
.
status
===
'success'
)
{
window
.
globalConfig
=
{
baseURL
:
res
.
axios
.
baseURL
}
window
.
globalConfig
=
{
resolve
({
vue
:
Vue
,
config
:
res
})
baseURL
:
JSON
.
parse
(
res
.
data
).
axios
.
baseURL
}
resolve
({
'vue'
:
Vue
,
'config'
:
JSON
.
parse
(
res
.
data
)
})
}
else
{
reject
(
'ERROR.'
)
}
})
})
})
})
}
}
...
...
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