百度内嵌登陆组件地址:https://smartprogram.baidu.com/docs/develop/component/login/
uniapp代码片段以及问题
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view>
<text class="title">{{title}}</text>
</view>
<view class="testLogin" @click="openLoginModule">点击吊起百度登陆</view>
<view class="shadow" v-if="loginModuleIsShow">
<login @getphonenumber="getPhoneNumber"></login>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
loginModuleIsShow:false
}
},
onLoad() {
},
methods: {
openLoginModule(){
this.loginModuleIsShow = true;
},
getPhoneNumber(e) {
console.log(e) // e=undefind
}
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin: 200rpx auto 50rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.testLogin{
width: 300rpx;
height: 100rpx;
background: red;
text-align: center;
color: #fff;
}
.shadow{
width: 100%;
height: 100vh;
background: rgba(0,0,0,0.2);
position: fixed;
bottom: 0;
left:0;
display: flex;
flex-direction: column-reverse;
}
</style>
希望官方人员帮忙看看怎么处理哈~ 辛苦~
2 个回复
DCloud_uni-ad_HDX
HBuilderX 3.3.0 已修复,即将发布
DCloud_UNI_Anne
HBuilderX alpha 3.3.0+ 已修复,请升级