App.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <script>
  2. // const uat_URL = 'https://aitour.test.zyucgj.com/at-employee/' // 预发布
  3. // // const uat_URL = 'http://192.168.16.100:9102/at-employee/' // 本地
  4. // const pro_URL = 'https://aitour.zyucgj.com/at-employee/' // 生产
  5. const uat_URL = 'https://aitour.test.qiubcar.com/at-employee/' // 预发布
  6. // const uat_URL = 'http://192.168.16.100:9102/at-employee/' // 本地
  7. const pro_URL = 'https://aitour.qiubcar.com/at-employee/' // 生产
  8. const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
  9. const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url
  10. const envText = ['预发布环境','生产环境']
  11. const envTips = process.env.NODE_ENV == 'development' ? envText[0] : envText[buildType]
  12. export default {
  13. globalData: {
  14. baseUrl: process.env.NODE_ENV == 'development' ? uat_URL : buildURL,
  15. token: '',
  16. version: '', // 当前版本号
  17. buildType: buildType,
  18. envTips: envTips
  19. },
  20. mounted() {
  21. // 非V3模式
  22. if(this.$scope){
  23. this.$scope.globalData.token = this.$store.state.vuex_token
  24. }else{
  25. // V3模式
  26. getApp({allowDefault: true}).globalData.token = this.$store.state.vuex_token
  27. }
  28. },
  29. onLaunch: function() {
  30. console.log('App onLaunch')
  31. },
  32. onShow: function() {
  33. console.log('App Show')
  34. },
  35. onHide: function() {
  36. console.log('App Hide')
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. /* 自定义图标字体 */
  42. @import "./static/iconfont/iconfont.css";
  43. /*uview css */
  44. @import "uview-ui/index.scss";
  45. /* 登录页是否记住密码多选框样式 */
  46. uni-checkbox.login-form-checkbox .uni-checkbox-input{
  47. width: 24upx !important;
  48. height: 24upx !important;
  49. }
  50. .list-nomore{
  51. text-align: center;
  52. padding: 20upx;
  53. color: #999;
  54. }
  55. </style>