艺易修小程序24.08.21
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
973 B

8 months ago
8 months ago
8 months ago
8 months ago
  1. import Vue from 'vue'
  2. import api from '@/api/api.js'
  3. import utils from './utils/utils.js'
  4. import uvUI from '@/uni_modules/uv-ui-tools'
  5. Vue.use(uvUI)
  6. // 当前环境
  7. const type = 'dev'
  8. // 环境配置
  9. const config = {
  10. dev : {
  11. // baseUrl : 'http://admin.anqi.shop/a-notice-api',
  12. baseUrl : 'http://h5.xzaiyp.top/a-notice-api/',
  13. },
  14. prod : {
  15. baseUrl : 'http://xxx.xxx.xxx/xxx',
  16. }
  17. }
  18. // 默认配置
  19. const defaultConfig = {
  20. mapKey : '',
  21. aliOss : {
  22. url : 'https://tennis-oss.xzaiyp.top/',
  23. config : {
  24. //桶的地址
  25. region: 'oss-cn-guangzhou',
  26. //id
  27. accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
  28. //密钥
  29. accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
  30. //桶的名字
  31. bucket: 'zhuoqiu-image',
  32. endpoint:'oss-cn-guangzhou.aliyuncs.com',
  33. }
  34. },
  35. }
  36. uni.$uv.setConfig({
  37. config: {
  38. unit: 'rpx'
  39. },
  40. })
  41. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  42. Vue.prototype.$api = api
  43. export default Vue.prototype.$config