<template>
	<view>
		<button @click="login()">登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
			login() {
				let that = this
				uni.login({
					provider:'weixin',
					success:function(res){
						uniCloud.callFunction({
							name:'wxlogin',
							data:{code: res.code},
							success: (res) => {
								console.log(res)
							}
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
