Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
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 3c7d4b92
authored
Dec 10, 2021
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改配置
1 parent
d2c2b3a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
src/config/index.js
src/main.js
src/config/index.js
View file @
3c7d4b9
...
@@ -15,7 +15,7 @@ export const fetchConfig = function(isEnv = true) {
...
@@ -15,7 +15,7 @@ export const fetchConfig = function(isEnv = true) {
Object
.
assign
(
request
,
{
timeout
})
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
config
)
return
Promise
.
resolve
(
config
)
}
}
return
window
.
fetch
(
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-
main-mobile
-config'
,
{}).
then
(
res
=>
res
.
json
())
return
window
.
fetch
(
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-
activity
-config'
,
{}).
then
(
res
=>
res
.
json
())
}
}
export
const
cfg
=
{
export
const
cfg
=
{
install
(
vue
,
config
)
{
install
(
vue
,
config
)
{
...
...
src/main.js
View file @
3c7d4b9
...
@@ -26,20 +26,19 @@ Vue.prototype.api = api
...
@@ -26,20 +26,19 @@ Vue.prototype.api = api
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
tools
=
tools
Vue
.
prototype
.
tools
=
tools
Vue
.
prototype
.
local
=
local
Vue
.
prototype
.
local
=
local
Vue
.
prototype
.
to
=
function
(
name
,
params
)
{
Vue
.
prototype
.
to
=
function
(
name
,
params
)
{
if
(
name
===
-
1
)
{
if
(
name
===
-
1
)
{
router
.
go
(
-
1
)
router
.
go
(
-
1
)
return
return
}
router
.
push
({
name
,
params
})
}
}
// 移动端适配 rem
router
.
push
({
name
,
params
})
// import 'lib-flexible/flexible.js'
}
// 移动端适配 rem
// import 'lib-flexible/flexible.js'
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
import
VConsole
from
'vconsole'
import
VConsole
from
'vconsole'
const
vConsole
=
new
VConsole
()
const
isMock
=
true
const
isMock
=
true
fetchConfig
(
!
isMock
).
then
(
res
=>
{
fetchConfig
(
!
isMock
).
then
(
res
=>
{
...
@@ -47,7 +46,9 @@ fetchConfig(!isMock).then(res => {
...
@@ -47,7 +46,9 @@ fetchConfig(!isMock).then(res => {
// 设置 js中可以访问 $cdn
// 设置 js中可以访问 $cdn
Vue
.
use
(
cfg
)
Vue
.
use
(
cfg
)
window
.
$fetchConfig
=
res
window
.
$fetchConfig
=
res
/**登录过期 重新登录 */
if
(
res
.
vconsole
)
new
VConsole
()
/**登录过期 重新登录 */
window
.
reLogin
=
()
=>
{
window
.
reLogin
=
()
=>
{
console
.
log
(
'重新登录'
)
console
.
log
(
'重新登录'
)
util
.
clearSessionId
()
util
.
clearSessionId
()
...
@@ -59,4 +60,4 @@ fetchConfig(!isMock).then(res => {
...
@@ -59,4 +60,4 @@ fetchConfig(!isMock).then(res => {
store
,
store
,
render
:
h
=>
h
(
App
)
render
:
h
=>
h
(
App
)
})
})
})
\ No newline at end of file
\ 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