wxml
<view class="container">
<image class="logo" src="../../assets/liudaxq.png" mode="aspectFit"></image>
<button class="logon" bindtap="onLogonOrRegister">登录</button>
</view>
wxss
.container {
display: flex;
flex-direction: column;
position: relative;
width: 100%;
height: 100%;
background-color: #323335;
justify-content: space-around;
align-items: center;
}
.logo {
display: flex;
box-sizing: border-box;
position: relative;
height: 10vh;
width: 70%;
justify-content: center;
align-items: center;
}
.logon {
display: flex;
box-sizing: border-box;
position: relative;
width: 600rpx;
height: 80rpx;
justify-content: center;
align-items: center;
text-align: center;
background-color: #3CAE89;
border-radius: 50rpx;
color: white;
font-size: 36rpx;
font-weight: bolder;
}
js
onLogonOrRegister(){
console.log("登录")
}
复现正常可以输出请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。