You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
484 B
37 lines
484 B
<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>
|