<script>
	// const uat_URL = 'https://carwash.test.zyucgj.com/gc-shop/' // 预发布
	const uat_URL = 'http://192.168.16.105:8302/gc-shop/' // 本地
	const pro_URL = 'https://carwash.zyucgj.com/gc-shop/'  // 生产
	const buildType = 0 // 打包环境对应类型，1 生产 0 预发布
	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url
	const envText = ['预发布环境','生产环境']
	const envTips = process.env.NODE_ENV == 'development' ? envText[0] : envText[buildType]
	console.log(process.env.NODE_ENV)
	export default {
		globalData: {  
			baseUrl: process.env.NODE_ENV == 'development' ? uat_URL : buildURL,
			token: '',
			version: '', // 当前版本号
			buildType: buildType,
			envTips: envTips
		},
		mounted() {
			// 非V3模式
			if(this.$scope){
				this.$scope.globalData.token = this.$store.state.vuex_token
			}else{
				// V3模式
				getApp({allowDefault: true}).globalData.token = this.$store.state.vuex_token
			}
		},
		onLaunch: function() {
			 console.log('App onLaunch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */
	page {
		min-height: 100%;
		display: flex;
		background-color: #F8F8F8;
	}
	.content {
		padding: 20upx;
	}
</style>
