Commit b49bcbe5 by 杨北旺

.

1 parent 26c394b5
......@@ -28,5 +28,29 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve),
meta: {}
},
{
name: 'Account',
path: '/account',
component: resolve => require([`@/views/account/index.vue`], resolve),
meta: {
url: 'http://192.168.2.9:5501/html/merchant/index.html'
}
},
{
name: 'Employee',
path: '/employee',
component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {
url: 'http://192.168.2.9:5501/html/employee/index.html'
}
},
{
name: 'Role',
path: '/role',
component: resolve => require([`@/views/role/index.vue`], resolve),
meta: {
url: 'http://192.168.2.9:5501/html/role/index.html'
}
},
])
export default staticRoutes
\ No newline at end of file
import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLExternal } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -11,6 +11,7 @@ let router = null
let instance = null
Vue.use(GLTable)
Vue.use(ElementUI)
Vue.use(GLExternal)
export async function bootstrap({ name, id, history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
......
<template>
<div>
<GLExternal :url="url" :subscribe="subscribe"></GLExternal>
</div>
</template>
<script>
export default {
name: 'adapter',
data() {
return {
url: this.$router.currentRoute.meta.url
}
},
methods: {
subscribe(child) {
child.on('route-to', params => {
this.$history.push(params)
})
}
}
}
</script>
<style></style>
<template>
<div>
<GLExternal :url="url" :subscribe="subscribe"></GLExternal>
</div>
</template>
<script>
export default {
name: 'adapter',
data() {
return {
url: this.$router.currentRoute.meta.url
}
},
methods: {
subscribe(child) {
child.on('route-to', params => {
this.$history.push(params)
})
}
}
}
</script>
<style></style>
<template>
<div>
<GLExternal :url="url" :subscribe="subscribe"></GLExternal>
</div>
</template>
<script>
export default {
name: 'adapter',
data() {
return {
url: this.$router.currentRoute.meta.url
}
},
methods: {
subscribe(child) {
child.on('route-to', params => {
this.$history.push(params)
})
}
}
}
</script>
<style></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!