Sfoglia il codice sorgente

设置开发环境

chris 2 anni fa
parent
commit
0dacd06e64
2 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 2 1
      config/index.js
  2. 4 2
      src/views/main.vue

+ 2 - 1
config/index.js

@@ -14,7 +14,8 @@ module.exports = {
     // 代理列表, 是否开启代理通过[./dev.env.js]配置
     proxyTable: devEnv.OPEN_PROXY === false ? {} : {
       '/proxyApi': {
-        target: 'https://www.muzhikeji.cn/api',
+        // target: 'https://www.muzhikeji.cn/api', // 正式地址
+        target: 'http://116.62.189.171/api', // 开发地址
         changeOrigin: true,
         pathRewrite: {
           '^/proxyApi': ''

+ 4 - 2
src/views/main.vue

@@ -93,8 +93,10 @@
             this.$cookie.set('name', data.data.name)
 
             // websocket初始化
-            // this.$store.dispatch('websocket/WEBSOCKET_INIT', 'ws://112.74.164.79:10088/web_socket/' + data.data.userId + '_' + (Math.ceil(Math.random() * 100000000)).toString())
-            this.$store.dispatch('websocket/WEBSOCKET_INIT', 'wss://www.muzhikeji.cn/wss/web_socket/' + data.data.userId + '_' + (Math.ceil(Math.random() * 100000000)).toString())
+            // 开发地址
+            this.$store.dispatch('websocket/WEBSOCKET_INIT', 'ws://116.62.189.171:10088/web_socket/' + data.data.userId + '_' + (Math.ceil(Math.random() * 100000000)).toString())
+            // 正式地址
+            // this.$store.dispatch('websocket/WEBSOCKET_INIT', 'wss://www.muzhikeji.cn/wss/web_socket/' + data.data.userId + '_' + (Math.ceil(Math.random() * 100000000)).toString())
           }
         })
       }