rain
2024-12-02 8608f7fc85a0caada59f1d8887994418df16b370
遥控器上云
3 files modified
14 ■■■■ changed files
src/api/http/config.ts 5 ●●●●● patch | view | raw | blame | history
src/api/pilot-bridge.ts 2 ●●● patch | view | raw | blame | history
src/pages/page-pilot/pilot-home.vue 7 ●●●●● patch | view | raw | blame | history
src/api/http/config.ts
@@ -10,14 +10,15 @@
  // baseURL: 'http://192.168.1.133:6789', // This url must end with "/". Example: 'http://192.168.1.1:6789/'
  baseURL: 'http://192.168.1.198:6789', // This url must end with "/". Example: 'http://192.168.1.1:6789/'
  // ws: 'ws//127.0.0.1:6789/api/v1/ws',
  ws: 'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws',
  // ws://192.168.1.198:1883/
  websocketURL: 'ws://192.168.1.198:6789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
  websocketURL: 'ws://192.168.1.114:6790/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
  // websocketURL: 'ws://192.168.1.133:6789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
  // websocketURL: 'wss://dev.jxpskj.com:36789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
  // livestreaming
  // RTMP  Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
  rtmpURL: 'rtmp://www.ainfo.top:735/uav/', // Example: 'rtmp://192.168.1.1/live/'
  rtmpURL: 'rtmp://139.196.74.78/live/', // Example: 'rtmp://192.168.1.1/live/'
  // GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
  // gbServerIp: '171.34.76.175',
  // gbServerPort: '15060',
src/api/pilot-bridge.ts
@@ -236,7 +236,7 @@
    return window.djiBridge.wsConnect(host, token, callback)
  },
  wsDisconnect (): string {
    return window.djiBridge.wsConnect()
    return window.djiBridge.wsDisconnect()
  },
  wsSend (message: string): string {
    return window.djiBridge.wsSend(message)
src/pages/page-pilot/pilot-home.vue
@@ -295,8 +295,8 @@
      connectCallback: 'connectCallback'
    }
    components.set(EComponentName.Thing, param)
    components.set(EComponentName.Ws, param)
    apiPilot.loadComponent(EComponentName.Thing, components.get(EComponentName.Thing))
    bindParam.device_sn = device.data.gateway_sn
    bindParam.user_id = res.data.user_id
    bindParam.workspace_id = res.data.workspace_id
@@ -464,20 +464,19 @@
    }
    case EComponentName.Ws: {
      const wsParam: WsParam = components.get(EComponentName.Ws)
      wsParam.token = '' + localStorage.getItem(ELocalStorageKey.Token)
      wsParam.token = '' + localStorage.getItem(ELocalStorageKey.Token)?.replace('bearer ', '')
      param = wsParam
      break
    }
    default:
      param = components.get(m.module)
  }
  components.set(m.module, param)
  console.info(components.get(m.module))
  apiPilot.loadComponent(m.module, components.get(m.module))
  refreshStatus()
}
function moduleUninstall (m: any) {
  message.info('卸载 ' + m.module)
  apiPilot.unloadComponent(m.module)