fix: 优化nginx配置server_name
* fix: 优化lodash-es * fix: 优化nginx配置server_name
This commit is contained in:
parent
3beae8b718
commit
7986f367ca
|
@ -1,14 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
API_BASE_PATH=$API_BASE_PATH;
|
||||
SERVER_NAME=$SERVER_NAME
|
||||
NAMESERVERS=$(cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}' | tr '\n' ' ')
|
||||
if [ -z "$API_BASE_PATH" ]; then
|
||||
API_BASE_PATH="http://jetlinks:8844/";
|
||||
fi
|
||||
|
||||
if [ -z "$SERVER_NAME" ]; then
|
||||
SERVER_NAME="localhost";
|
||||
fi
|
||||
|
||||
apiUrl="proxy_pass $API_BASE_PATH\$1;"
|
||||
resolver="resolver $NAMESERVERS ipv6=off;"
|
||||
serverName="server_name $SERVER_NAME;"
|
||||
|
||||
sed -i '4c '"$serverName"'' /etc/nginx/conf.d/default.conf
|
||||
sed -i '11c '"$resolver"'' /etc/nginx/conf.d/default.conf
|
||||
sed -i '20c '"$apiUrl"'' /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
# gzip config
|
||||
server_name _;
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 9;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<UserInfo />
|
||||
</div>
|
||||
</template>
|
||||
<Iframe :key="route.path" />
|
||||
<Iframe :key="route.path" noMargin />
|
||||
</j-pro-layout>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
根据visible标识对数据进行递归过滤,得到最后的数据
|
||||
*/
|
||||
|
||||
import _ from 'lodash';
|
||||
import _ from 'lodash-es';
|
||||
|
||||
export type TreeNode = {
|
||||
id: string;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Badge, Descriptions, Modal, Tooltip, AIcon, DescriptionsItem } from "jetlinks-ui-components"
|
||||
import TitleComponent from '@/components/TitleComponent/index.vue'
|
||||
import styles from './index.module.less'
|
||||
import _ from "lodash";
|
||||
import _ from "lodash-es";
|
||||
|
||||
const DiagnosticAdvice = defineComponent({
|
||||
props: {
|
||||
|
|
|
@ -7,7 +7,7 @@ import { useInstanceStore } from "@/store/instance"
|
|||
import { startNetwork, startGateway, getGatewayDetail, queryGatewayState, queryProtocolDetail, detail, queryProductState, queryProductConfig, queryDeviceConfig, _deploy } from '@/api/device/instance'
|
||||
import { PropType, VNode } from "vue"
|
||||
import { _deploy as _deployProduct } from "@/api/device/product"
|
||||
import _ from "lodash"
|
||||
import _ from "lodash-es"
|
||||
import DiagnosticAdvice from './DiagnosticAdvice'
|
||||
import ManualInspection from './ManualInspection'
|
||||
import { deployDevice } from "@/api/initHome"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<page-container>
|
||||
<page-container class="iframe-warp">
|
||||
<full-page>
|
||||
<iframe
|
||||
v-if="loading"
|
||||
|
@ -26,6 +26,21 @@ import { TokenLose} from "@/utils/request";
|
|||
const iframeUrl = ref<string>('');
|
||||
const route = useRoute()
|
||||
const loading = ref(false)
|
||||
|
||||
const props = defineProps({
|
||||
noMargin: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const className = computed(() => {
|
||||
return {
|
||||
'iframe-warp': true,
|
||||
'margin-full': props.hasOwnProperty('noMargin') && props.noMargin !== false
|
||||
}
|
||||
})
|
||||
|
||||
const handle = async (appId: string, url: string) => {
|
||||
const res = await getAppInfo_api(appId);
|
||||
let menuUrl: any = url;
|
||||
|
@ -63,7 +78,7 @@ const handle = async (appId: string, url: string) => {
|
|||
iframeUrl.value = urlOther;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const lowCode = () => {
|
||||
lowCodeUrl().then(res => {
|
||||
|
@ -78,7 +93,6 @@ const lowCode = () => {
|
|||
}
|
||||
|
||||
const onMessage = (msg: any) => {
|
||||
console.log('onMessage',msg)
|
||||
if (msg?.data?.token === 'LOSE') {
|
||||
TokenLose()
|
||||
setTimeout(() => {
|
||||
|
@ -115,7 +129,5 @@ watchEffect(() => {
|
|||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
:deep(.children-full-height) {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue