Commit 3c7d4b92 by 李伟康

修改配置

1 parent d2c2b3a5
...@@ -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) {
......
...@@ -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
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!