Browse Source

Merge remote-tracking branch 'origin/master'

master
x_ying 2 years ago
parent
commit
a1993333c0
  1. 9
      .env.development
  2. 1
      .env.production
  3. 12
      src/views/storeManage/warehouse3D/module/video.vue

9
.env.development

@ -3,16 +3,17 @@ ENV = 'development'
# 接口地址 # 接口地址
#内网服务地址 #内网服务地址
#VUE_APP_BASE_API = 'http://192.168.99.207:7070'
#VUE_APP_WS_API = 'ws://192.168.99.207:7071'
VUE_APP_BASE_API = 'http://192.168.99.207:7070'
VUE_APP_WS_API = 'ws://192.168.99.207:7071'
CAMERA_APP_BASE_API = '192.168.99.207'
# 刘力-本地服地址 # 刘力-本地服地址
#VUE_APP_BASE_API = 'http://192.168.99.65:7070' #VUE_APP_BASE_API = 'http://192.168.99.65:7070'
#VUE_APP_WS_API = 'ws://192.168.99.65:7071' #VUE_APP_WS_API = 'ws://192.168.99.65:7071'
# 许镇-本地服地址 # 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.84:7070'
VUE_APP_WS_API = 'ws://192.168.99.84:7070'
#VUE_APP_BASE_API = 'http://192.168.99.84:7070'
#VUE_APP_WS_API = 'ws://192.168.99.84:7070'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

1
.env.production

@ -5,3 +5,4 @@ ENV = 'production'
VUE_APP_BASE_API = 'http://192.168.99.207:7070' VUE_APP_BASE_API = 'http://192.168.99.207:7070'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://192.168.99.207:7071' VUE_APP_WS_API = 'ws://192.168.99.207:7071'
CAMERA_APP_BASE_API = '192.168.99.207'

12
src/views/storeManage/warehouse3D/module/video.vue

@ -57,7 +57,8 @@ export default {
// this.myVideo.pause() // this.myVideo.pause()
// $.post('http://127.0.0.1:3000/cameras/close/', { rtspUrl: $('#rtsp').val() }, function(result) { // $.post('http://127.0.0.1:3000/cameras/close/', { rtspUrl: $('#rtsp').val() }, function(result) {
const data = { rtspUrl: this.rtspUrl } const data = { rtspUrl: this.rtspUrl }
axios.post('http://127.0.0.1:3000/cameras/close/', qs.stringify(data),
const Uri = 'http://' + process.env.CAMERA_APP_BASE_API + ':3000/cameras/close/'
axios.post(Uri, qs.stringify(data),
{ {
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
@ -75,7 +76,8 @@ export default {
}, },
play() { play() {
const data = { rtspUrl: this.rtspUrl, size: '1024*768' } const data = { rtspUrl: this.rtspUrl, size: '1024*768' }
axios.post('http://127.0.0.1:3000/cameras/', qs.stringify(data),
const Uri = 'http://' + process.env.CAMERA_APP_BASE_API + ':3000/cameras/'
axios.post(Uri, qs.stringify(data),
{ {
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
@ -83,7 +85,7 @@ export default {
} }
).then(res => { ).then(res => {
// res.data.port // res.data.port
const url = 'ws://127.0.0.1:' + res.data.port
const url = 'ws://' + process.env.CAMERA_APP_BASE_API + ':' + res.data.port
// var canvas = document.getElementById('canvas') // var canvas = document.getElementById('canvas')
const opt = { const opt = {
contianer: this.$refs['canvas-wrap'], contianer: this.$refs['canvas-wrap'],
@ -107,5 +109,9 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog { ::v-deep .el-dialog {
height: 835xp; height: 835xp;
display: flex;
justify-content: center;
align-items: center;
color: white;
} }
</style> </style>
Loading…
Cancel
Save