<script>
	export default {
		onLaunch: function() {
			const that = this;
			if (!uni.getStorageSync('jy-recruit-token')) {
				uni.login({
					success(e) {
						that.$http.get('/public/ali/getopenId', {
							code: e.code,
						}).then(res => {
							const code = JSON.parse(res.code)
							uni.setStorageSync('openId', code.alipay_system_oauth_token_response.open_id)
							// 无账号注册账号
							that.$http.post('/public/person/c', {
								openId: code.alipay_system_oauth_token_response.open_id
							}).then(res => {
							})
						})
					}
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import '@/uni_modules/uview-ui/index.scss';
	@import '@/static/public.scss'
</style>
