| 
						 | 
						- import Vue from 'vue'
 - import api from '@/api/api.js'
 - import utils from './utils/utils.js'
 - 
 - import uvUI from '@/uni_modules/uv-ui-tools'
 - Vue.use(uvUI);
 - 
 - // 当前环境
 - const type = 'prod'
 - 
 - 
 - // 环境配置
 - const config = {
 - 	dev: {
 - 		baseUrl: 'http://h5.xzaiyp.top/clockin-api',
 - 		// baseUrl: 'http://127.0.0.1:8083/clockin-api',
 - 	},
 - 	test: {
 - 		baseUrl: 'https://clockin.java996.icu/clockin-api',
 - 	},
 - 	prod: {
 - 		baseUrl: 'https://admin.ptchemicalscc.com/clockin-api',
 - 	}
 - }
 - 
 - 
 - // 默认配置
 - const defaultConfig = {
 - 	mapKey: 'WPKBZ-OKICI-ZAIGE-U6TQ4-RPQIV-OXBJO',
 - 	aliOss: {
 - 		url: 'https://image.ptchemicalscc.com/',
 - 		config: {
 - 			//桶的地址
 - 			region: 'oss-cn-beijing',
 - 			//id
 - 			accessKeyId: 'LTAI5tA1mo2mRHVwKLLE2V7Y',
 - 			//密钥
 - 			accessKeySecret: 'PBs2Dx3mTuVSH7ReWkiZGW3Vc9i22I',
 - 			//桶的名字
 - 			bucket: 'ptchemicalscc',
 - 			endpoint: 'oss-cn-beijing.aliyuncs.com',
 - 		}
 - 	},
 - 	// aliOss: {
 - 	// 	url: 'https://image.hhlm1688.com/',
 - 	// 	config: {
 - 	// 		//桶的地址
 - 	// 		region: 'oss-cn-guangzhou',
 - 	// 		//id
 - 	// 		accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
 - 	// 		//密钥
 - 	// 		accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
 - 	// 		//桶的名字
 - 	// 		bucket: 'hanhaiimage',
 - 	// 		endpoint: 'oss-cn-shenzhen.aliyuncs.com',
 - 	// 	}
 - 	// },
 - }
 - 
 - 
 - uni.$uv.setConfig({
 - 	// 修改$uv.config对象的属性
 - 	config: {
 - 		// 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
 - 		unit: 'rpx'
 - 	},
 - })
 - 
 - Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
 - 
 - Vue.prototype.$api = api
 - 
 - export default Vue.prototype.$config
 
 
  |