<script>
	export default {
		globalData: {
			//正式
			// url: 'https://pay.bxb.cn/crest',
			// imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
			//测试
			// url: 'https://paycs.dctpay.com/crest',
			// imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
			userInfo: "",
			openId: '',
			token: '',
			appId: 'wxa075e8509802f826',
			code: '', //code获取openid
			snNo: '', // 设备sn号
			//正式
			url: 'https://hsg.dctpay.com/user',
			graurl:'https://pay.dctpay.com/crest',
			imgUrl: 'https://pay.dctpay.com/filesystem/',
			imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
			//测试
			// url: 'https://hsgcs.dctpay.com/user',
			// graurl:'https://gratia-pay.dctpay.com/crest',
			// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
			// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
		},
		onLaunch: function() {
			console.log('App Launch');
		},
		onShow: function() {
			console.log('App Show')
			let that = this;
			uni.getStorage({
				key: 'openId',
				success(e) {
					if (e.data) {
						that.globalData.openId = e.data;
					}
				}
			})
			uni.getStorage({
				key: 'user',
				success(e) {
					if (e.data) {
						that.globalData.userInfo = e.data;
					}
				}
			})

			uni.getStorage({
				key: 'token',
				success(e) {
					if (e.data) {
						that.globalData.token = e.data;
					}
				}
			})
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
