main.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import App from "./App";
  2. import store from "./store";
  3. Vue.prototype.$store = store;
  4. // uView配置
  5. import uView from "@/uni_modules/uview-ui";
  6. Vue.use(uView);
  7. uni.$u.config.unit = "rpx";
  8. // Vue.prototype.apiUrl = "http://10.34.48.105:81";
  9. // Vue.prototype.apiUrl = "http://192.168.1.100:9090";
  10. // #ifdef APP-PLUS
  11. Vue.prototype.apiUrl = "";
  12. // const apiInfo = uni.getStorageSync("apiInfo");
  13. // Vue.prototype.apiWebUrl = `${apiInfo.protocal}${apiInfo.hostname}:${apiInfo.port}/api`;
  14. // Vue.prototype.apiUrl = `${apiInfo.protocal}${apiInfo.hostname}:${apiInfo.port}/api`;
  15. // 测试
  16. // Vue.prototype.apiWebUrl = ''
  17. // Vue.prototype.apiUrl = "http://192.168.3.35:8080/api";
  18. // Vue.prototype.apiWebUrl = "http://192.168.3.51:18086/api"; //本地测试
  19. // Vue.prototype.apiUrl = 'http://192.168.3.38:8601/api' //本地测试
  20. // Vue.prototype.apiWebUrl = 'http://124.71.68.31:81/api'
  21. // Vue.prototype.apiUrl = 'http://124.71.68.31:81/api'
  22. // 生产
  23. /* Vue.prototype.apiWebUrl = 'http://10.34.48.105:81/web';
  24. Vue.prototype.apiUrl = 'http://10.34.48.105:81/api'; */
  25. // 测试
  26. // Vue.prototype.apiWebUrl = 'http://192.168.3.19:8601';
  27. // Vue.prototype.apiUrl = 'http://192.168.3.19:8601';
  28. // #endif
  29. // #ifdef H5
  30. Vue.prototype.apiUrl = "/api";
  31. Vue.prototype.apiWebUrl = "/web";
  32. // Vue.prototype.apiWebUrl = 'http://192.168.3.19:8601/web';
  33. // Vue.prototype.apiUrl = 'http://192.168.3.19:8601/api';
  34. // Vue.prototype.apiWebUrl = 'http://10.34.48.105:80/web';
  35. // Vue.prototype.apiUrl = 'http://10.34.48.105:80/api';
  36. // #endif
  37. // #ifndef VUE3
  38. import Vue from "vue";
  39. import "./utils/minxin.js";
  40. Vue.config.productionTip = false;
  41. App.mpType = "app";
  42. const app = new Vue({
  43. ...App,
  44. store,
  45. });
  46. app.$mount();
  47. // #endif
  48. // #ifdef VUE3
  49. import { createSSRApp } from "vue";
  50. export function createApp() {
  51. const app = createSSRApp(App);
  52. app.use(store);
  53. return {
  54. app,
  55. };
  56. }
  57. // #endif