speakerInvitation.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="container">
  3. <image class="bg" src="@/static/image/bg_invite.png" mode="aspectFill"></image>
  4. <!-- 状态栏占位(微信小程序原生适配) -->
  5. <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
  6. <view class="return">
  7. <image class="return-img" src="@/static/image/back_white.png" mode="aspectFill"></image>
  8. </view>
  9. <!-- 核心内容区:居中布局 -->
  10. <view class="main-content">
  11. <!-- 页面大标题:讲者邀请 -->
  12. <view class="page-title">
  13. <image class="title-img" src="@/static/image/img_title.png" mode="aspectFill"></image>
  14. <text class="title-txt">讲者邀请</text>
  15. <image class="title-img rotate180" src="@/static/image/img_title.png" mode="aspectFill"></image>
  16. </view>
  17. <!-- 邀请卡片:白色背景+圆角+轻微阴影(1:1匹配UI) -->
  18. <view class="invite-card">
  19. <!-- 邀请人信息区 -->
  20. <view class="inviter-section">
  21. <image class="inviter-avatar" src="@/static/image/my_heads_icon.png" mode="aspectFill"></image>
  22. <text class="inviter-name">王小明</text>
  23. <text class="invite-desc">邀请你成为讲者</text>
  24. </view>
  25. <!-- 二维码区域:白色边框+圆角 -->
  26. <view class="qrcode-box">
  27. <image class="qrcode-img" src="@/static/image/bg_invite.png"></image>
  28. </view>
  29. <!-- 扫码提示文字 -->
  30. <view class="scan-tip">扫一扫,注册学苑</view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. // 仅获取微信小程序状态栏高度,无多余逻辑
  40. statusBarHeight: uni.getSystemInfoSync().statusBarHeight
  41. };
  42. },
  43. onLoad() {},
  44. methods: {}
  45. };
  46. </script>
  47. <style lang="scss" scoped>
  48. /* 小程序页面全局重置:消除默认样式 */
  49. page {
  50. margin: 0;
  51. padding: 0;
  52. background-color: #F8F7F5;
  53. font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  54. }
  55. /* 根容器:全屏+垂直布局 */
  56. .container {
  57. min-height: 100vh;
  58. display: flex;
  59. flex-direction: column;
  60. background-color: #F8F7F5;
  61. position: relative;
  62. .bg {
  63. position: absolute;
  64. top: 0;
  65. width: 100%;
  66. height: 100%;
  67. }
  68. }
  69. /* 状态栏占位:透明背景,仅占高度 */
  70. .status-bar {
  71. width: 100%;
  72. background-color: transparent;
  73. }
  74. .return {
  75. position: relative;
  76. height: 88rpx;
  77. z-index: 2;
  78. line-height: 88rpx;
  79. .return-img {
  80. width: 40rpx;
  81. height: 40rpx;
  82. margin-left: 32rpx;
  83. }
  84. }
  85. /* 核心内容区:水平居中+顶部间距 */
  86. .main-content {
  87. width: 100%;
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. padding: 52rpx 74rpx 0;
  92. box-sizing: border-box;
  93. position: relative;
  94. z-index: 2;
  95. /* 页面大标题:讲者邀请(匹配UI字体/大小/颜色) */
  96. .page-title {
  97. font-weight: 600;
  98. font-size: 48rpx;
  99. color: #FFFFFF;
  100. margin-bottom: 124rpx;
  101. display: flex;
  102. align-items: center;
  103. .title-img {
  104. width: 134rpx;
  105. height: 12rpx;
  106. }
  107. .title-txt {
  108. margin: 0 20rpx;
  109. }
  110. .rotate180 {
  111. transform: rotate(180deg);
  112. }
  113. }
  114. /* 邀请卡片:白色背景+圆角+轻微阴影(1:1匹配) */
  115. .invite-card {
  116. width: 100%;
  117. background-color: #FFFFFF;
  118. border-radius: 32rpx;
  119. box-shadow: 0rpx 16rpx 28rpx 0rpx rgba(45, 109, 199, 0.37);
  120. padding: 60rpx 40rpx 80rpx;
  121. position: relative;
  122. box-sizing: border-box;
  123. /* 邀请人信息区:头像+文字横向布局 */
  124. .inviter-section {
  125. position: absolute;
  126. top: -72rpx;
  127. left: 50%;
  128. transform: translateX(-50%);
  129. display: flex;
  130. flex-direction: column;
  131. justify-content: center;
  132. align-items: center;
  133. .inviter-avatar {
  134. width: 144rpx;
  135. height: 144rpx;
  136. border-radius: 50%;
  137. margin-bottom: 18rpx;
  138. }
  139. /* 邀请人姓名 */
  140. .inviter-name {
  141. color: #000000;
  142. font-weight: 600;
  143. font-size: 36rpx;
  144. margin-bottom: 36rpx;
  145. }
  146. /* 邀请文案 */
  147. .invite-desc {
  148. font-size: 32rpx;
  149. color: #666666;
  150. }
  151. }
  152. .qrcode-box {
  153. width: 372rpx;
  154. height: 372rpx;
  155. background-color: #FFFFFF;
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. margin: 200rpx auto 40rpx;
  160. .qrcode-img {
  161. width: 372rpx;
  162. height: 372rpx;
  163. }
  164. }
  165. /* 扫码提示文字:居中+浅灰色 */
  166. .scan-tip {
  167. text-align: center;
  168. font-size: 32rpx;
  169. color: #333333;
  170. }
  171. }
  172. }
  173. </style>