|
|
|
@ -161,7 +161,7 @@ function execApi(number, method, query) {
|
|
|
|
|
.then(function (response) {
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
console.error(error);
|
|
|
|
|
})
|
|
|
|
|
.finally(function () {
|
|
|
|
|
loading.hide();
|
|
|
|
@ -174,10 +174,10 @@ function execScene(id) {
|
|
|
|
|
loading.show();
|
|
|
|
|
axios.post(config.service('platform/api/v1/api/execScene'), { id, connectionId })
|
|
|
|
|
.then(function (response) {
|
|
|
|
|
console.log(response);
|
|
|
|
|
//console.log(response);
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
console.error(error);
|
|
|
|
|
})
|
|
|
|
|
.finally(function () {
|
|
|
|
|
loading.hide();
|
|
|
|
@ -213,8 +213,8 @@ function connect() {
|
|
|
|
|
if (connection.state === signalR.HubConnectionState.Disconnected) {
|
|
|
|
|
connection.start().then(function () {
|
|
|
|
|
console.log('signalr connected');
|
|
|
|
|
}).catch(function (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
}).catch(function (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
setTimeout(connect, 5000);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -250,7 +250,6 @@ var loading = {
|
|
|
|
|
var connectionId;
|
|
|
|
|
var connection = new signalR.HubConnectionBuilder().withUrl(config.service('platform/hub?group=page')).build();
|
|
|
|
|
connection.onclose(function () {
|
|
|
|
|
console.log('connect closed');
|
|
|
|
|
connect();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -260,7 +259,6 @@ connection.on('Connected', function (id) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connection.on("ServerToClient", function (method, message, to, from) {
|
|
|
|
|
console.log(method);
|
|
|
|
|
PubSub.publish(method, { message: message, to: to, from: from });
|
|
|
|
|
});
|
|
|
|
|
//connect();
|
|
|
|
|