This commit is contained in:
hzz 2023-12-18 11:05:46 +08:00
parent 1f0793847f
commit aca439876a
3 changed files with 9 additions and 3 deletions

View File

@ -9,8 +9,8 @@
*/
// export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://192.168.3.97:9018/",imgxhr:process.env.VUE_APP_BASE_API+"/image/"}
export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API+"/screen/image/"}
export const production={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API+"/screen/image/"}
export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API}
export const production={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API}
//拼接图片url路径
export function imgurlAddXhr(img){
let src=null

View File

@ -91,6 +91,8 @@ val.citylist.forEach(res=>{
let a = [...new Set(imagedata)]
//
imagedata=[]
console.log(a,'111');
a.forEach((res,index)=>{
imagedata.push({image:res,id:index})
})

View File

@ -43,6 +43,7 @@ import { useI18n } from "vue-i18n";
import { getStoredLanguage, saveStoredLanguage } from "@/utils/languageStorage";
import { useRoute } from 'vue-router'
import { getScreenByHash } from "@/http/rule/index"
import {imgurlAddXhr} from "@/utils/devSever"
let langicon = require("@/assets/svg/language.svg")
let route = useRoute()
window.document.title = "大屏物联管理系统";
@ -315,15 +316,18 @@ async function reqScreenByHash() {
if (res.code === 200) {
let {data} = res
routerList.value = data.map((item:any) => {
const regex = /^(http|https):\/\/[^ "]+$/;
let isTrue = regex.test(item.img);
return {
id: item.id,
isLink: false,
path: item.path,
title: item.title,
url: item.img,
url: isTrue?item.img:imgurlAddXhr(item.img),
hash: hash
}
})
}
}