删除多余注释
This commit is contained in:
parent
11750df501
commit
e1b082e9d7
16
src/App.vue
16
src/App.vue
@ -61,22 +61,6 @@ declare const mqtt: any
|
||||
const selectedDeviceId = ref<string>('')
|
||||
const deviceList = ref<DeviceItem[]>([])
|
||||
|
||||
// const config = reactive<GlobalConfig>({
|
||||
// serverIp: '118.145.200.78',
|
||||
// getSources: ':3000/ks/source',
|
||||
// subscribe: ':3000/stream/live/subscribe',
|
||||
// resultTopic: 'ks/video_detection',
|
||||
// streamInfoTopic: 'ks/stream_local',
|
||||
// media_http_api: 3001,
|
||||
// websocket: 8083,
|
||||
// mqttAuth: ['work', 'Bjhmdys@202010'],
|
||||
// accessKey: '6952564ceb712e2daeea7039',
|
||||
// accessSecret: 'df717a60-85b7-4a63-b638-0aed4605d277',
|
||||
// token: '',
|
||||
// getToken: ':3000/ks/system/user/token',
|
||||
// getTime: ':3000/ks/system/time',
|
||||
// })】
|
||||
|
||||
const config = reactive<GlobalConfig>({
|
||||
resultTopic: 'ks/video_detection',
|
||||
streamInfoTopic: 'ks/stream_local',
|
||||
|
||||
@ -1,30 +1,6 @@
|
||||
import type { GlobalConfig, SourceItem, MqttServerInfo, DeviceItem } from '../types'
|
||||
// import { generateSignature, generateRandomString } from '../utils/signature'
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
export function createApis() {
|
||||
// const baseUrl = () => `http://${config.serverIp}`
|
||||
// const authHeader = () => ({ Authorization: `Bearer ${config.token}` })
|
||||
|
||||
// async function request<T>(url: string, headers?: Record<string, string>): Promise<T> {
|
||||
// const res = await fetch(url, { headers: { ...authHeader(), ...headers } })
|
||||
// if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
||||
// return res.json()
|
||||
// }
|
||||
|
||||
// async function getTimestamp(): Promise<{ data: number }> {
|
||||
// return request(`${baseUrl()}${config.getTime}`)
|
||||
// }
|
||||
|
||||
// async function getToken(): Promise<{ error_code: number; data: string }> {
|
||||
// const timestampRes = await getTimestamp()
|
||||
// const timestamp = timestampRes.data
|
||||
// const nonce = generateRandomString(10)
|
||||
// const signature = generateSignature(config.accessKey, config.accessSecret, timestamp, nonce)
|
||||
// const url = `${baseUrl()}${config.getToken}?signature=${signature}&ak=${config.accessKey}×tamp=${timestamp}&nonce=${nonce}`
|
||||
// const res = await fetch(url)
|
||||
// return res.json()
|
||||
// }
|
||||
|
||||
async function getSources(deviceId:string): Promise<SourceItem[]> {
|
||||
const res = await window.HybridWebView.InvokeDotNet('GetSourceListAsync', [deviceId]);
|
||||
console.log(res);
|
||||
|
||||
@ -1,17 +1,6 @@
|
||||
export interface GlobalConfig {
|
||||
// serverIp: string
|
||||
// getSources: string
|
||||
// subscribe: string
|
||||
resultTopic: string
|
||||
streamInfoTopic: string
|
||||
// media_http_api: number
|
||||
// websocket: number
|
||||
// mqttAuth: [string, string]
|
||||
// accessKey: string
|
||||
// accessSecret: string
|
||||
// token: string
|
||||
// getToken: string
|
||||
// getTime: string
|
||||
}
|
||||
|
||||
export interface AlgInfo {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user