Commit 4cdd4e67 by liwk

commit

1 parent a6768fec
const { http } = window.$HTTP
export default { export default {
/**OAuth2授权登陆 */ /**OAuth2授权登陆 */
login(data) { login(data) {
data.returnAll = true data.returnAll = true
data.method = 'scrm.api.sso.ww.oauth.login' data.method = 'scrm.api.sso.ww.oauth.login'
return http({ data }) return window.$HTTP({ data })
}, },
/** 选择登录账号 */ /** 选择登录账号 */
selectAccount(data) { selectAccount(data) {
data.returnAll = true data.returnAll = true
data.method = 'scrm.api.sso.user.login.select' data.method = 'scrm.api.sso.user.login.select'
return http({ data }) return window.$HTTP({ data })
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -16,13 +16,12 @@ import router from './router' ...@@ -16,13 +16,12 @@ import router from './router'
import store from './store' import store from './store'
import api from './api' import api from './api'
import { fetchConfig, cfg } from '@/config' import { fetchConfig, cfg } from '@/config'
import { axsinit } from './plugins/axios'
import '@/assets/css/index.scss' import '@/assets/css/index.scss'
import { bus, tools, store as local } from './utils' import { bus, tools, store as local } from './utils'
import './utils/util' import './utils/util'
import 'components' import 'components'
import { components } from '@/plugins/vant' import { components } from '@/plugins/vant'
import { HTTP } from 'glsx-common' import { Http } from 'glsx-common'
components.forEach(component => Vue.use(component)) components.forEach(component => Vue.use(component))
Vue.prototype.api = api Vue.prototype.api = api
Vue.prototype.bus = bus Vue.prototype.bus = bus
...@@ -48,7 +47,7 @@ fetchConfig(!isMock).then(res => { ...@@ -48,7 +47,7 @@ fetchConfig(!isMock).then(res => {
// 从配置服务器获取动态配置 // 从配置服务器获取动态配置
// 设置 js中可以访问 $cdn // 设置 js中可以访问 $cdn
Vue.use(cfg) Vue.use(cfg)
window.$Http = new HTTP({...res }) window.$Http = new Http({...res })
window.vm = new Vue({ window.vm = new Vue({
el: '#app', el: '#app',
router, router,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!