Commit 3c7d4b92 by 李伟康

修改配置

1 parent d2c2b3a5
......@@ -15,7 +15,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout })
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 = {
install(vue, config) {
......
......@@ -26,20 +26,19 @@ Vue.prototype.api = api
Vue.prototype.bus = bus
Vue.prototype.tools = tools
Vue.prototype.local = local
Vue.prototype.to = function(name, params) {
if (name === -1) {
router.go(-1)
return
}
router.push({ name, params })
Vue.prototype.to = function (name, params) {
if (name === -1) {
router.go(-1)
return
}
// 移动端适配 rem
// import 'lib-flexible/flexible.js'
router.push({ name, params })
}
// 移动端适配 rem
// import 'lib-flexible/flexible.js'
Vue.config.productionTip = false
import VConsole from 'vconsole'
const vConsole = new VConsole()
const isMock = true
fetchConfig(!isMock).then(res => {
......@@ -47,7 +46,9 @@ fetchConfig(!isMock).then(res => {
// 设置 js中可以访问 $cdn
Vue.use(cfg)
window.$fetchConfig = res
/**登录过期 重新登录 */
if (res.vconsole) new VConsole()
/**登录过期 重新登录 */
window.reLogin = () => {
console.log('重新登录')
util.clearSessionId()
......@@ -59,4 +60,4 @@ fetchConfig(!isMock).then(res => {
store,
render: h => h(App)
})
})
\ No newline at end of file
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!