l***@gmail.com
l***@gmail.com
  • 发布:2025-06-26 07:27
  • 更新:2025-06-26 08:50
  • 阅读:121

微信小程序 button 按钮无法触发

分类:uni-app
<view class="login-btn auth-btn">  
        <text>用户一键登录</text>  
        <button open-type="getUserInfo" @getuserinfo="authLogin" />  
</view>
.login-btn {  
      width: 620rpx;  
      height: 100rpx;  
      background: var(--primary-color-bg);  
      box-shadow: 0 0 30rpx 0 rgba(0,0,0,0.05);  
      border-radius: 100rpx;  
      margin: 76rpx auto 0;  
      display: flex;  
      align-items: center;  
      justify-content: center;  
      font-family: PingFang SC, PingFang SC;  
      font-weight: bold;  
      font-size: 32rpx;  
      color: var(--primary-btn-font-color);  
}  

.auth-btn {  
      background: #51A938;  
      color: #ffffff;  
      margin-top: 34rpx;  
      position: relative;  

      button {  
           position: absolute;  
           inset: 0;  
           opacity: 0;  
           z-index: 9999;  
      }  
}

部分用户点击按钮无法拉起授权

2025-06-26 07:27 负责人:无 分享
已邀请:
DCloud_UNI_JBB

DCloud_UNI_JBB

有报错吗?试试微信原生小程序这样写生不生效

要回复问题请先登录注册