dev-production
This commit is contained in:
parent
d82a339c23
commit
4fb80154da
@ -37,6 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Vue from 'vue'
|
||||||
import Card from './components/Card.vue'
|
import Card from './components/Card.vue'
|
||||||
import Lobby from './components/Lobby.vue'
|
import Lobby from './components/Lobby.vue'
|
||||||
|
|
||||||
@ -70,10 +71,12 @@ export default {
|
|||||||
sockets: {
|
sockets: {
|
||||||
connect() {
|
connect() {
|
||||||
this.isConnected = true;
|
this.isConnected = true;
|
||||||
|
if (Vue.config.devtools) {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
this.username =(1+Math.random() * 100 % 100).toFixed(2).toString();
|
this.username = (1+Math.random() * 100 % 100).toFixed(2).toString();
|
||||||
this.setUsername();
|
this.setUsername();
|
||||||
}.bind(this), 1000)
|
}.bind(this), 1000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
disconnect() {
|
disconnect() {
|
||||||
this.isConnected = false;
|
this.isConnected = false;
|
||||||
|
@ -5,7 +5,7 @@ Vue.config.productionTip = false
|
|||||||
import VueSocketIO from 'vue-socket.io'
|
import VueSocketIO from 'vue-socket.io'
|
||||||
Vue.use(new VueSocketIO({
|
Vue.use(new VueSocketIO({
|
||||||
debug: true,
|
debug: true,
|
||||||
connection: 'http://localhost:5001',
|
connection: Vue.config.devtools?'http://localhost:5001':'http://51.15.199.193:5001',
|
||||||
}))
|
}))
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
|
Loading…
Reference in New Issue
Block a user