9e8e52ec by zhen

修改目录层级

1 parent 08afbf02
......@@ -48,6 +48,7 @@ export const constantRoutes = [
path: '/',
component: Layout,
redirect: '/monitor',
alwaysShow: true,
meta: {
title: '资源监控',
icon: 'home'
......@@ -71,14 +72,20 @@ export const constantRoutes = [
title: '远程订单详情'
},
props: route => ({ custInfo: route.query })
},
}
]
},
{
path: '/product',
component: Layout,
children: [
{
path: 'product-infor-management',
name: 'product-infor-management',
component: () => import('@/views/productInforManagement'),
meta: {
title: '产品资料管理',
icon: 'report'
icon: 'work'
}
},
{
......@@ -103,6 +110,11 @@ export const constantRoutes = [
}
}
]
},
{
path: '/iframe',
component: () => import('@/views/iframe'),
hidden: true
}
]
/**
......
<template>
<div>
<h2>客户端</h2>
<p>
<el-button type="primary" @click="open">呼叫</el-button>
<el-button type="primary" @click="cancelCall">取消呼叫</el-button>
</p>
<iframe
v-if="isStart"
ref="srtcIframe"
title="srtcIframe"
:src="target"
frameborder="2"
allow="microphone;camera;midi;encrypted-media;fullscreen;"
></iframe>
<p>callback:{{ message }}</p>
<p>这还少恩位置</p>
<p>这还少恩位置</p>
<p>这还少恩位置</p>
</div>
</template>
<script>
export default {
data() {
return {
baseUrl: 'https://localhost:8080',
isStart: false,
target: '',
strWindowFeatures: `
left=2400,
top=200
height=500,
width=700,
menubar=1,
toolbar=1,
fullscreen=1
`,
message: '',
windowRef: ''
}
},
beforeMount() {
window.addEventListener('message', this.receiveMessage, false)
},
methods: {
open() {
this.isStart = true
this.target = `${this.baseUrl}/#/srtc-iframe`
this.$nextTick().then(() => {
this.$refs.srtcIframe.onload = () => {
this.sendMessage()
}
})
},
sendMessage() {
this.$refs.srtcIframe.contentWindow.postMessage(
{
type: 'startCall',
data: {
appUserName: '123',
appUserPhone: '16621043587',
orderId: '123213',
webUserName: 'lz'
}
},
this.baseUrl
)
},
cancelCall() {
this.$refs.srtcIframe.contentWindow.postMessage(
{
type: 'cancelCall'
},
this.baseUrl
)
},
receiveMessage(e) {
if (e.origin !== this.baseUrl) {
return
}
const { type, data } = e
// switch (type) {
// case 'userJoin':
// this.popMessage(data)
// break
// case 'appHangUp':
// this.popMessage(data)
// break
// case 'webHangUp':
// this.popMessage(data)
// break
// }
this.popMessage(`${type}---${data}`)
},
popMessage(data) {
this.$message({
type: 'error',
message: data
})
}
}
}
</script>
<style lang="scss" scoped>
iframe {
width: 500px;
height: 600px;
position: fixed;
top: 0;
right: 0;
}
</style>
......@@ -26,23 +26,23 @@ module.exports = {
assetsDir: 'static',
// 打包时不生成map文件,减少打包体积,加快打包速度
productionSourceMap: false,
// devServer: {
// https: true,
// inline: true,
// proxy: {
// '/chery': {
// target: process.env.VUE_APP_BASE_API
// }
// // '/': {
// // bypass: devServerProxyBypass,
// // secure: false,
// // target: serverTarget,
// // headers: {
// // Host: new URL(serverTarget).host
// // }
// // }
// }
// },
devServer: {
https: true
// inline: true,
// proxy: {
// '/chery': {
// target: process.env.VUE_APP_BASE_API
// }
// // '/': {
// // bypass: devServerProxyBypass,
// // secure: false,
// // target: serverTarget,
// // headers: {
// // Host: new URL(serverTarget).host
// // }
// // }
// }
},
configureWebpack: {},
chainWebpack: config => {
config.resolve.alias
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!