| 
 | |
| import Vue from 'vue' | |
| 
 | |
| import utils from './utils/utils.js' | |
| 
 | |
| // 当前环境 | |
| const type = 'prod' | |
| 
 | |
| 
 | |
| // 环境配置 | |
| const config = { | |
| 	local : { | |
| 		baseUrl : 'http://127.0.0.1:8001/employ-api', | |
| 	}, | |
| 	dev : { | |
| 		baseUrl : 'http://augcl.natapp1.cc/employ-api', | |
| 	}, | |
| 	prod : { | |
| 		baseUrl : 'https://admin.zhixuanlietou.com/employ-api', | |
| 	} | |
| } | |
| 
 | |
| 
 | |
| // 默认配置 | |
| const defaultConfig = { | |
| 	mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', | |
| 	aliOss : { | |
| 		url : 'https://oss.zhixuanlietou.com/', | |
| 		config : { | |
| 			//桶的地址 | |
| 			region: 'oss-cn-beijing', | |
| 			//id | |
| 			accessKeyId:'LTAI5t7QjvTcHz9rnULaKuU1', | |
| 			//密钥 | |
| 			accessKeySecret:'Kc9bnuNK2k9FIMeupHyTLnQX7JjHqj', | |
| 			//桶的名字 | |
| 			bucket: 'zxltoss', | |
| 			endpoint:'oss-cn-beijing.aliyuncs.com', | |
| 		} | |
| 	}, | |
| 	/** | |
| 	 *   accessKey: LTAI5t7QjvTcHz9rnULaKuU1 | |
|   secretKey: Kc9bnuNK2k9FIMeupHyTLnQX7JjHqj | |
|   endpoint: oss-cn-beijing.aliyuncs.com | |
|   bucketName: zxltoss | |
|   staticDomain: https://oss.zhixuanlietou.com | |
|  | |
| 	 */ | |
| } | |
| 
 | |
| 
 | |
| uni.$u.setConfig({ | |
| 	// 修改$uv.config对象的属性 | |
| 	config: { | |
| 		// 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx' | |
| 		unit: 'px' | |
| 	}, | |
| }) | |
| 
 | |
| Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type]) | |
| 
 | |
| // Vue.prototype.$api = api | |
|  | |
| export default Vue.prototype.$config
 |