<script>
	// const uat_domain = 'https://cust.test.sxzxyj.net' // 预发布
	const uat_domain = 'http://192.168.16.213:8308' // 本地
	const pro_domain = 'https://cust.sxzxyj.net' // 生产
	const uat_URL = uat_domain+'/gc-cust/' // 预发布
	const pro_URL = pro_domain+'/gc-cust/'  // 生产
	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: {  
			baseDomain: process.env.NODE_ENV == 'development' ? uat_domain : pro_domain,
			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";
	// @import "/static/iconfont-weapp-icon.css";
	@import "/static/iconfont/iconfont.css";
	/*每个页面公共css */
	page {
		min-height: 100%;
		display: flex;
		background-color: #F8F8F8;
	}
	.content {
		padding: 20upx;
	}
	.form-input {
		font-size: 28rpx;
		color: #333;
		// text-align: right;
		width: 95%;
		box-sizing: border-box;
		height: 60rpx;
		line-height: 60rpx;
		&.textarea{
			height: 240rpx;
			padding: 24rpx 0;
			text-align: left;
		}
	}
	
	.form-input-placeholder {
		font-size: 28rpx;
		color: #999;
	}
	/* 显示一行省略号 */
	.ellipsis-one{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
		word-break: break-all;
	}
	/* 显示两行，省略号 */
	.ellipsis-two{
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	/* felx布局 */
	.flex{
		display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */  
		display: -moz-flex; /* Firefox 18+ */  
		display: -ms-flexbox; /* IE 10 */  
		display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
	}
	/*伸缩流方向*/
	.flex_column{
	    -webkit-box-orient: vertical;
	    -ms-flex-direction: column;
	    -webkit-flex-direction: column;
	    flex-direction: column;
	}
	/*主轴对齐*/
	.justify_center{
	    -webkit-box-pack: center;
	    -ms-flex-pack: center;
	    -webkit-justify-content: center;
	    justify-content: center;
	}
	.justify_end{
	    -webkit-box-pack: end;
	    -ms-flex-pack: end;
	    -webkit-justify-content: flex-end;
	    justify-content: flex-end;
	}
	.justify_between{
	    -webkit-box-pack: justify;
	    -ms-flex-pack: justify;
	    -webkit-justify-content: space-between;
	    justify-content: space-between;
	}
	/*侧轴对齐*/
	.align_start{
	    -webkit-box-align: start;
	    -ms-flex-align: start;
	    -webkit-align-items: flex-start;
	    align-items: flex-start;
	}
	.align_end{
	    -webkit-box-align: end;
	    -ms-flex-align: end;
	    -webkit-align-items: flex-end;
	    align-items: flex-end;
	}
	.align_center{
	    -webkit-box-align: center;
	    -ms-flex-align: center;
	    -webkit-align-items: center;
	    align-items: center;
	}
	.align_baseline{
	    -webkit-box-align: baseline;
	    -ms-flex-align: baseline;
	    -webkit-align-items: baseline;
	    align-items: baseline;
	}
	/*伸缩性*/
	.flex_auto{
	    -webkit-box-flex: 1;
	    -ms-flex: auto;
	    -webkit-flex: auto;
	    flex: auto;
	}
	.flex_1{
	    -webkit-box-flex: 1;
	    -ms-flex: 1;
	    -webkit-flex: 1;
	    flex: 1;    
	}
</style>
