2025/04/28 地图适配

dev
zhaohongyu 2025-04-28 13:54:39 +08:00
parent 505a0bc85c
commit f18e59fd52
3 changed files with 19 additions and 15 deletions

View File

@ -11,7 +11,7 @@ module.exports = {
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: { proxyTable: {
'/api': { '/api': {
target: 'http://192.168.0.49:8091/', target: 'http://192.168.192.201:8991/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api': '' '^/api': ''
@ -23,6 +23,14 @@ module.exports = {
pathRewrite: { pathRewrite: {
'^/mapapi/': '' '^/mapapi/': ''
} }
},
'/file': {
target: 'http://192.168.192.201:8991/file/',
secure: true,
changeOrigin: true,
pathRewrite: {
'^/file': ''
}
} }
}, },

View File

@ -1133,11 +1133,8 @@ export default {
peopleTrajectoryValue: '' peopleTrajectoryValue: ''
} }
}, },
created() {
this.initUser()
},
mounted() { mounted() {
this.initCorpInfo() this.initUser()
this.pointBoxCfd = loadMapBoxCfd() this.pointBoxCfd = loadMapBoxCfd()
this.pointBox = loadMapBox() this.pointBox = loadMapBox()
}, },
@ -2929,24 +2926,23 @@ export default {
this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID
this.corpInfo.latitude = data.info.latitude this.corpInfo.latitude = data.info.latitude
this.corpInfo.longitude = data.info.longitude this.corpInfo.longitude = data.info.longitude
this.initUser() // this.initUser()
this.initMap() this.initMap()
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
}) })
}, },
initUser() { async initUser() {
const { userId } = this.$route.query const { userId } = this.$route.query
if (!userId) return if (!userId) return
requestFN( try {
'/admin/v2/login', const res = await requestFN('/admin/v2/login', { userId })
{ userId }
).then((res) => {
console.log(res) console.log(res)
}).catch((e) => { await this.initCorpInfo()
} catch (e) {
alert('登录失败') alert('登录失败')
window.close() window.close()
}) }
} }
} }
} }

View File

@ -1,11 +1,11 @@
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const config = { const config = {
weburl: 'http://192.168.8.124:8080/', // 前台地址 weburl: 'http://192.168.8.124:8080/', // 前台地址
httpurl: 'http://192.168.8.124:8091/', // 后台地址 httpurl: '/api', // 后台地址
qyurl: 'https://qgqy.qhdsafety.com/', // 企业前台 qyurl: 'https://qgqy.qhdsafety.com/', // 企业前台
adminurl: 'https://www.qdkjchina.com/qa-prevention-admin/', adminurl: 'https://www.qdkjchina.com/qa-prevention-admin/',
// 正式 // 正式
fileUrl: 'https://wwag.qhdsafety.com/file/', // 附件服务器地址 fileUrl: '/file', // 附件服务器地址
weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址 weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址
httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // , httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // ,
fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址, fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址,