调整仿真时间同步

This commit is contained in:
zyy 2020-09-07 17:07:09 +08:00
parent b943ef0e55
commit c3c5850bbf
3 changed files with 9 additions and 3 deletions

View File

@ -164,7 +164,7 @@ class MouseController extends Eventful {
click(e) {
var em = this.checkEvent(e);
console.log(e, em, '====');
// console.log(e, em, '====');
this.trigger(this.events.Selected, em);
}

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -18,6 +18,7 @@
<script>
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import { timeFormat } from '@/utils/date';
//
export default {
@ -67,6 +68,11 @@ export default {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
this.initDate(date);
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
this.initDate(date);
}
},
mounted() {