<script setup>
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
import { usePageAuth } from '@/hooks/usePageAuth'
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'

usePageAuth()

onLaunch(() => {
  console.log('App Launch')
})
onShow(() => {
  console.log('App Show')
})
onHide(() => {
  console.log('App Hide')
})
</script>

<style lang="scss">
button::after {
  border: none;
}

swiper,
scroll-view {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

image {
  width: 100%;
  height: 100%;
  vertical-align: middle;
}

// ==================== 认证页面公共样式 ====================
// 包含登录、注册、忘记密码等页面的通用样式

// 背景图片区域样式
.auth-bg-section {
  background-image: url('/static/login-bg.png');
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  min-height: 28vh; /* 占据上半部分屏幕 */
}

// 输入框样式 - 使用特殊化命名避免冲突
:deep(.bandhu-auth-input-field) {
  box-sizing: border-box;
  height: 72rpx !important;
  background: #ffffff !important;
  border-radius: 8rpx !important;
  border: 2rpx solid rgba(166, 166, 166, 0.65) !important;
  padding: 0 24rpx !important;
  font-size: 28rpx !important;
  display: flex !important;
  align-items: center !important;
  &.is-disabled {
    background: #efefef !important;
    .wd-input__inner {
      color: #000000 !important;
    }
  }
}

// 主要按钮样式
:deep(.bandhu-auth-primary-btn) {
  box-sizing: border-box;
  height: 88rpx !important;
  border-radius: 44rpx !important;
  font-size: 32rpx !important;
  font-weight: bold !important;
}

// 次要按钮样式（如获取验证码按钮）
:deep(.bandhu-auth-secondary-btn) {
  box-sizing: border-box;
  width: 160rpx !important;
  height: 72rpx !important;
  border-radius: 12rpx !important;
  font-size: 24rpx !important;
}
</style>
