<template>
	<view class="container">
		<button @click="wxLogin">登录</button>
		<button type="default" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信手机号一键登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			wxLogin() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
				// uni.login({
				// 	provider: 'weixin', //使用微信登录
				// 	success: function(loginRes) {
				// 		console.log(loginRes);
				// 	}
				// });
			},
			getPhoneNumber(e) {
				console.log(e.detail);
			}
		}
	}
</script>

<style>
	.container {}
</style>