Browse Source

动态请求接口路径

DESKTOP-SVI9JE1\muzen 1 year ago
parent
commit
29203c6693
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/utils/request.js

+ 3 - 1
src/utils/request.js

@@ -1,6 +1,8 @@
 // const baseUrl = 'https://o3tapi.radio1964.com/web' // 测试
 // const baseUrl = 'https://client.ohplay.radio1964.net/web' // 生产
-const baseUrl = 'http://192.168.198.184:2033/web' // 本地
+// const baseUrl = 'http://192.168.198.184:2033/web' // 本地
+
+const baseUrl = process.env.NODE_ENV === 'development' ? 'https://o3tapi.radio1964.com/web' :  'https://client.ohplay.radio1964.net/web'
 
 function request(e) {
   if (!e.data) {