diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/store/modules/imouPlayerToken.js b/src/store/modules/imouPlayerToken.js new file mode 100644 index 0000000..9f556c3 --- /dev/null +++ b/src/store/modules/imouPlayerToken.js @@ -0,0 +1,34 @@ +import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门 + +let accessParam = { + system: { + ver: '1.0', + sign: '', + appId: '', + time: '', + nonce: '', + }, + params: {}, + id: '', +}; + +const useImouPlayerStore = defineStore('imouPlayer', { + state: () => { + return { + kitToken: '', + access_token: '', + }; + }, + actions: {}, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + storage: sessionStorage, + paths: ['deptList', 'systemDeptList', 'userList'], + }, + ], + }, +}); +export default useImouPlayerStore; diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/store/modules/imouPlayerToken.js b/src/store/modules/imouPlayerToken.js new file mode 100644 index 0000000..9f556c3 --- /dev/null +++ b/src/store/modules/imouPlayerToken.js @@ -0,0 +1,34 @@ +import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门 + +let accessParam = { + system: { + ver: '1.0', + sign: '', + appId: '', + time: '', + nonce: '', + }, + params: {}, + id: '', +}; + +const useImouPlayerStore = defineStore('imouPlayer', { + state: () => { + return { + kitToken: '', + access_token: '', + }; + }, + actions: {}, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + storage: sessionStorage, + paths: ['deptList', 'systemDeptList', 'userList'], + }, + ], + }, +}); +export default useImouPlayerStore; diff --git a/src/views/DialogTabs/component/ImouPlayer.vue b/src/views/DialogTabs/component/ImouPlayer.vue index f51b3df..7f2f23a 100644 --- a/src/views/DialogTabs/component/ImouPlayer.vue +++ b/src/views/DialogTabs/component/ImouPlayer.vue @@ -1,5 +1,5 @@ diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/store/modules/imouPlayerToken.js b/src/store/modules/imouPlayerToken.js new file mode 100644 index 0000000..9f556c3 --- /dev/null +++ b/src/store/modules/imouPlayerToken.js @@ -0,0 +1,34 @@ +import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门 + +let accessParam = { + system: { + ver: '1.0', + sign: '', + appId: '', + time: '', + nonce: '', + }, + params: {}, + id: '', +}; + +const useImouPlayerStore = defineStore('imouPlayer', { + state: () => { + return { + kitToken: '', + access_token: '', + }; + }, + actions: {}, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + storage: sessionStorage, + paths: ['deptList', 'systemDeptList', 'userList'], + }, + ], + }, +}); +export default useImouPlayerStore; diff --git a/src/views/DialogTabs/component/ImouPlayer.vue b/src/views/DialogTabs/component/ImouPlayer.vue index f51b3df..7f2f23a 100644 --- a/src/views/DialogTabs/component/ImouPlayer.vue +++ b/src/views/DialogTabs/component/ImouPlayer.vue @@ -1,5 +1,5 @@ diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue index 469770f..3471cb7 100644 --- a/src/views/oneMap/BIM/Tunnel.vue +++ b/src/views/oneMap/BIM/Tunnel.vue @@ -238,7 +238,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '7H0961CPAN3025A', dataTime: '', toP: { x: -1886.2723566649995, @@ -267,7 +267,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '6M07046RANBCF8D', dataTime: '', toP: { x: -1752.3189961540095, @@ -296,7 +296,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPANC7F5D', dataTime: '', toP: { x: 2084.596738127489, @@ -325,7 +325,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPAN08D33', dataTime: '', toP: { x: 1902.5691003457061, @@ -388,7 +388,7 @@ let data = { title: point.name, comIDs: ['Imou'], - // getSiteId: item.id, + getSiteId: point.pointCode, }; bus.emit('publicDialog', data); } @@ -605,8 +605,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/store/modules/imouPlayerToken.js b/src/store/modules/imouPlayerToken.js new file mode 100644 index 0000000..9f556c3 --- /dev/null +++ b/src/store/modules/imouPlayerToken.js @@ -0,0 +1,34 @@ +import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门 + +let accessParam = { + system: { + ver: '1.0', + sign: '', + appId: '', + time: '', + nonce: '', + }, + params: {}, + id: '', +}; + +const useImouPlayerStore = defineStore('imouPlayer', { + state: () => { + return { + kitToken: '', + access_token: '', + }; + }, + actions: {}, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + storage: sessionStorage, + paths: ['deptList', 'systemDeptList', 'userList'], + }, + ], + }, +}); +export default useImouPlayerStore; diff --git a/src/views/DialogTabs/component/ImouPlayer.vue b/src/views/DialogTabs/component/ImouPlayer.vue index f51b3df..7f2f23a 100644 --- a/src/views/DialogTabs/component/ImouPlayer.vue +++ b/src/views/DialogTabs/component/ImouPlayer.vue @@ -1,5 +1,5 @@ diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue index 469770f..3471cb7 100644 --- a/src/views/oneMap/BIM/Tunnel.vue +++ b/src/views/oneMap/BIM/Tunnel.vue @@ -238,7 +238,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '7H0961CPAN3025A', dataTime: '', toP: { x: -1886.2723566649995, @@ -267,7 +267,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '6M07046RANBCF8D', dataTime: '', toP: { x: -1752.3189961540095, @@ -296,7 +296,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPANC7F5D', dataTime: '', toP: { x: 2084.596738127489, @@ -325,7 +325,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPAN08D33', dataTime: '', toP: { x: 1902.5691003457061, @@ -388,7 +388,7 @@ let data = { title: point.name, comIDs: ['Imou'], - // getSiteId: item.id, + getSiteId: point.pointCode, }; bus.emit('publicDialog', data); } @@ -605,8 +605,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index cd3aaeb..1ba450b 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -290,7 +290,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '7H0961CPAN77924', dataTime: '', toP: { x: -70.27433095597907, @@ -319,7 +319,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPAN0754B', dataTime: '', toP: { x: 69.1252383332412, @@ -385,7 +385,7 @@ let data = { title: point.name, comIDs: ['Imou'], - // getSiteId: item.id, + getSiteId: point.pointCode, }; bus.emit('publicDialog', data); } @@ -607,8 +607,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 diff --git a/src/api/imouPlayerApi.js b/src/api/imouPlayerApi.js new file mode 100644 index 0000000..4ab75bc --- /dev/null +++ b/src/api/imouPlayerApi.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// /accessToken +export function getAccessToken(data) { + return request({ + url: `/lcyApi/accessToken`, + method: 'post', + data, + }); +} + +// /getKitToken +export function getKitToken(data) { + return request({ + url: `/lcyApi/getKitToken`, + method: 'post', + data, + }); +} \ No newline at end of file diff --git a/src/store/modules/imouPlayerToken.js b/src/store/modules/imouPlayerToken.js new file mode 100644 index 0000000..9f556c3 --- /dev/null +++ b/src/store/modules/imouPlayerToken.js @@ -0,0 +1,34 @@ +import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门 + +let accessParam = { + system: { + ver: '1.0', + sign: '', + appId: '', + time: '', + nonce: '', + }, + params: {}, + id: '', +}; + +const useImouPlayerStore = defineStore('imouPlayer', { + state: () => { + return { + kitToken: '', + access_token: '', + }; + }, + actions: {}, + persist: { + enabled: true, + // 自定义持久化参数 + strategies: [ + { + storage: sessionStorage, + paths: ['deptList', 'systemDeptList', 'userList'], + }, + ], + }, +}); +export default useImouPlayerStore; diff --git a/src/views/DialogTabs/component/ImouPlayer.vue b/src/views/DialogTabs/component/ImouPlayer.vue index f51b3df..7f2f23a 100644 --- a/src/views/DialogTabs/component/ImouPlayer.vue +++ b/src/views/DialogTabs/component/ImouPlayer.vue @@ -1,5 +1,5 @@ diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue index 469770f..3471cb7 100644 --- a/src/views/oneMap/BIM/Tunnel.vue +++ b/src/views/oneMap/BIM/Tunnel.vue @@ -238,7 +238,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '7H0961CPAN3025A', dataTime: '', toP: { x: -1886.2723566649995, @@ -267,7 +267,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '6M07046RANBCF8D', dataTime: '', toP: { x: -1752.3189961540095, @@ -296,7 +296,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPANC7F5D', dataTime: '', toP: { x: 2084.596738127489, @@ -325,7 +325,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPAN08D33', dataTime: '', toP: { x: 1902.5691003457061, @@ -388,7 +388,7 @@ let data = { title: point.name, comIDs: ['Imou'], - // getSiteId: item.id, + getSiteId: point.pointCode, }; bus.emit('publicDialog', data); } @@ -605,8 +605,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index cd3aaeb..1ba450b 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -290,7 +290,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '7H0961CPAN77924', dataTime: '', toP: { x: -70.27433095597907, @@ -319,7 +319,7 @@ icon: '/Three/icon/sxj_icon.png', data: [], show: false, - pointCode: '114', + pointCode: '8L06A0DPAN0754B', dataTime: '', toP: { x: 69.1252383332412, @@ -385,7 +385,7 @@ let data = { title: point.name, comIDs: ['Imou'], - // getSiteId: item.id, + getSiteId: point.pointCode, }; bus.emit('publicDialog', data); } @@ -607,8 +607,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 diff --git a/vite.config.js b/vite.config.js index 60a4979..302bd92 100644 --- a/vite.config.js +++ b/vite.config.js @@ -43,6 +43,10 @@ cors: true, hmr: true, //vue3 vite配置热更新不用手动刷新 open: true, + headers: { + 'Cross-Origin-Embedder-Policy': 'require-corp', + 'Cross-Origin-Opener-Policy': 'same-origin', + }, proxy: { '/business': { target: targetUrl, //测试服务 @@ -96,11 +100,18 @@ }, // 天气 '/tqApi': { - target: 'http://113.200.135.155:9103', + target: 'http://113.200.135.155:9103', changeOrigin: true, logLevel: 'debug', rewrite: p => p.replace(/^\/tqApi/, ''), }, + // 乐橙云 + '/lcyApi': { + target: 'https://openapi.lechange.cn:443/openapi', + changeOrigin: true, + logLevel: 'debug', + rewrite: p => p.replace(/^\/lcyApi/, ''), + }, //百度全景 '/bdApi': { // target: 'http://192.168.16.34:8105/', //测试服务