speakerInvitation.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. },
  45. methods: {}
  46. };
  47. </script>
  48. <style lang="scss" scoped>
  49. /* 小程序页面全局重置:消除默认样式 */
  50. page {
  51. margin: 0;
  52. padding: 0;
  53. background-color: #F8F7F5;
  54. font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  55. }
  56. /* 根容器:全屏+垂直布局 */
  57. .container {
  58. min-height: 100vh;
  59. display: flex;
  60. flex-direction: column;
  61. background-color: #F8F7F5;
  62. position: relative;
  63. .bg {
  64. position: absolute;
  65. top: 0;
  66. width: 100%;
  67. height: 100%;
  68. }
  69. }
  70. /* 状态栏占位:透明背景,仅占高度 */
  71. .status-bar {
  72. width: 100%;
  73. background-color: transparent;
  74. }
  75. .return {
  76. position: relative;
  77. height: 88rpx;
  78. z-index: 2;
  79. line-height: 88rpx;
  80. .return-img {
  81. width: 40rpx;
  82. height: 40rpx;
  83. margin-left: 32rpx;
  84. }
  85. }
  86. /* 核心内容区:水平居中+顶部间距 */
  87. .main-content {
  88. width: 100%;
  89. display: flex;
  90. flex-direction: column;
  91. align-items: center;
  92. padding: 52rpx 74rpx 0;
  93. box-sizing: border-box;
  94. position: relative;
  95. z-index: 2;
  96. /* 页面大标题:讲者邀请(匹配UI字体/大小/颜色) */
  97. .page-title {
  98. font-weight: 600;
  99. font-size: 48rpx;
  100. color: #FFFFFF;
  101. margin-bottom: 124rpx;
  102. display: flex;
  103. align-items: center;
  104. .title-img {
  105. width: 134rpx;
  106. height: 12rpx;
  107. }
  108. .title-txt {
  109. margin: 0 20rpx;
  110. }
  111. .rotate180 {
  112. transform: rotate(180deg);
  113. }
  114. }
  115. /* 邀请卡片:白色背景+圆角+轻微阴影(1:1匹配) */
  116. .invite-card {
  117. width: 100%;
  118. background-color: #FFFFFF;
  119. border-radius: 32rpx;
  120. box-shadow: 0rpx 16rpx 28rpx 0rpx rgba(45, 109, 199, 0.37);
  121. padding: 60rpx 40rpx 80rpx;
  122. position: relative;
  123. box-sizing: border-box;
  124. /* 邀请人信息区:头像+文字横向布局 */
  125. .inviter-section {
  126. position: absolute;
  127. top: -72rpx;
  128. left: 50%;
  129. transform: translateX(-50%);
  130. display: flex;
  131. flex-direction: column;
  132. justify-content: center;
  133. align-items: center;
  134. .inviter-avatar {
  135. width: 144rpx;
  136. height: 144rpx;
  137. border-radius: 50%;
  138. margin-bottom: 18rpx;
  139. }
  140. /* 邀请人姓名 */
  141. .inviter-name {
  142. color: #000000;
  143. font-weight: 600;
  144. font-size: 36rpx;
  145. margin-bottom: 36rpx;
  146. }
  147. /* 邀请文案 */
  148. .invite-desc {
  149. font-size: 32rpx;
  150. color: #666666;
  151. }
  152. }
  153. .qrcode-box {
  154. width: 372rpx;
  155. height: 372rpx;
  156. background-color: #FFFFFF;
  157. display: flex;
  158. align-items: center;
  159. justify-content: center;
  160. margin: 200rpx auto 40rpx;
  161. .qrcode-img {
  162. width: 372rpx;
  163. height: 372rpx;
  164. }
  165. }
  166. /* 扫码提示文字:居中+浅灰色 */
  167. .scan-tip {
  168. text-align: center;
  169. font-size: 32rpx;
  170. color: #333333;
  171. }
  172. }
  173. }
  174. </style>