fix: 优化低码回显

This commit is contained in:
XieYongHong 2023-09-20 13:45:45 +08:00
parent 2d80c4ad4e
commit 1b4ebe5297
2 changed files with 11 additions and 4 deletions

View File

@ -1,19 +1,23 @@
<template>
<page-container>
<full-page>
<iframe
v-if="loading"
:src="iframeUrl"
scrolling="no"
frameBorder="0"
style="width: 100%; height: calc(100vh - 140px)"
style="width: 100%; height: 100%"
></iframe>
</full-page>
</page-container>
</template>
<script setup lang="ts">
<script lang="ts" name="IframgePage" setup>
import { TOKEN_KEY } from '@/utils/variable';
import { LocalStore, getToken } from '@/utils/comm';
import { getAppInfo_api } from '@/api/system/apply';
import { lowCodeUrl } from '@/api/comm'
import FullPage from "components/Layout/FullPage.vue";
const iframeUrl = ref<string>('');
const route = useRoute()
@ -42,9 +46,12 @@ const handle = async (appId: string, url: string) => {
const lowCode = () => {
lowCodeUrl().then(res => {
console.log(res.success && res.result)
if (res.success && res.result) {
const url = res.result['ui-addr']
iframeUrl.value = url + '/#' + route.path + '?&token=' + getToken()
console.log(iframeUrl.value)
loading.value = true
}
})
}

View File

@ -96,9 +96,9 @@ export default defineConfig(({ mode}) => {
// target: 'http://192.168.32.244:8881',
// target: 'http://192.168.32.163:8844', //张季本地
// target: 'http://120.77.179.54:8844', // 120测试
// target: 'http://192.168.33.46:8844', // 本地开发环境
target: 'http://192.168.33.46:8844', // 本地开发环境
// target: 'http://192.168.32.5:8848', // 刘本地
target: 'http://192.168.32.187:8844', // 刘本地
// target: 'http://192.168.32.187:8844', // 刘本地
ws: 'ws://192.168.33.46:8844',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')