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.
|
|
<template> <view class="main"> 登录方式 </view> </template>
<script> export default { data() { return { } }, onLoad() { // this.init()
}, methods: { init() { uni.login({ provider: 'weixin', "onlyAuthorize": true, success: function (loginRes) { console.log('11') console.log(loginRes) // 登录成功
uni.getUserInfo({ provider: 'weixin', success: function(info) { // 获取用户信息成功, info.authResult保存用户信息
console.log('11') console.log(info) } }) }, fail: function (err) { // 登录授权失败
// err.code是错误码
} }); }, } } </script>
<style lang="scss" scoped> // .radioWrap {
// display: flex;
// justify-content: flex-start;
// align-items: center;
// /deep/.radio-btn {
// margin-right: -9rpx !important;
// }
// radio {
// zoom: .8;
// }
// view:nth-child(2) {
// font-size: 24rpx;
// color: #bfbfbf;
// }
// text {
// color: #218DFF;
// font-size: 24rpx;
// }
// }
</style>
|