<script setup>
	/**
	 * name：
	 * user：sa0ChunLuyu
	 * date：2022-04-20 09:02:17
	 */
	import {
		ref
	} from 'vue'
	import {
		GzhConfig,
		$response
	} from '@/api'
	const wxGetUserInfo = (res) => {
		let appid = GzhConfig.id
		let state = encodeURIComponent(GzhConfig.jump)
		let redirect_uri = encodeURIComponent(GzhConfig.auth);
		const url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appid + '&redirect_uri=' +
			redirect_uri + '&response_type=code&scope=snsapi_base&state=' + state + '#wechat_redirect';
		window.location = url;
	}
</script>
<template>
	<uni-section title="用户Code" type="line">
		<view class="uni-ma-5 uni-pb-5 example_item_wrapper">
			<button size="mini" @click="wxGetUserInfo">获取Code</button>
		</view>
	</uni-section>
</template>
<style scoped>
	.button_line_wrapper {
		display: flex;
		justify-content: space-around;
	}

	.textarea_wrapper {
		margin-top: 100rpx;
		height: 400rpx;
	}
</style>