update: 推送地址错误更改
This commit is contained in:
parent
eb54d5c001
commit
d73f115319
|
@ -42,6 +42,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
||||||
|
// import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||||
import { EventSourcePolyfill } from 'event-source-polyfill';
|
import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||||
import { PropType } from 'vue';
|
import { PropType } from 'vue';
|
||||||
import { downloadObject } from '@/utils/utils';
|
import { downloadObject } from '@/utils/utils';
|
||||||
|
@ -80,13 +81,12 @@ const flag = ref(false);
|
||||||
const errMessage = ref<any[]>([]);
|
const errMessage = ref<any[]>([]);
|
||||||
const errStr = computed(() => JSON.stringify(errMessage.value));
|
const errStr = computed(() => JSON.stringify(errMessage.value));
|
||||||
const publish = () => {
|
const publish = () => {
|
||||||
const activeAPI = `/${BASE_API_PATH}/media/gb28181-cascade/${
|
const activeAPI = `${BASE_API_PATH}/media/gb28181-cascade/${
|
||||||
props.data.id
|
props.data.id
|
||||||
}/bindings/publish?:X_Access_Token=${LocalStore.get(TOKEN_KEY)}`;
|
}/bindings/publish?:X_Access_Token=${LocalStore.get(TOKEN_KEY)}`;
|
||||||
const source = new EventSourcePolyfill(activeAPI);
|
const source = new EventSourcePolyfill(activeAPI);
|
||||||
source.onmessage = (e: any) => {
|
source.onmessage = (e: any) => {
|
||||||
const res = JSON.parse(e.data);
|
const res = JSON.parse(e.data);
|
||||||
console.log('res: ', res);
|
|
||||||
if (res.successful) {
|
if (res.successful) {
|
||||||
successCount.value += 1;
|
successCount.value += 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue