铝交易,微信公众号
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.

55 lines
1.1 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 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 = 'prod'
  8. // 环境配置
  9. const config = {
  10. dev : {
  11. baseUrl : 'http://www.gcosc.fun:82',
  12. },
  13. prod : {
  14. baseUrl : 'http://42.194.239.145:8014/aluminium-prod',
  15. }
  16. }
  17. // 默认配置
  18. const defaultConfig = {
  19. mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  20. aliOss : {
  21. url : 'https://tennis-oss.xzaiyp.top/',
  22. config : {
  23. //桶的地址
  24. region: 'oss-cn-guangzhou',
  25. //id
  26. accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
  27. //密钥
  28. accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
  29. //桶的名字
  30. bucket: 'zhuoqiu-image',
  31. endpoint:'oss-cn-guangzhou.aliyuncs.com',
  32. }
  33. },
  34. }
  35. uni.$uv.setConfig({
  36. // 修改$uv.config对象的属性
  37. config: {
  38. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  39. unit: 'rpx'
  40. },
  41. })
  42. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  43. Vue.prototype.$api = api
  44. export default Vue.prototype.$config