index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="page-container">
  3. <nav-bar title="推荐官"></nav-bar>
  4. <view class="content">
  5. <image src="@/static/images/my/tuijianguan.png" class="people-img"></image>
  6. <view class="title flex align-center justify-center">
  7. <image src="@/static/images/my/agree.png" class="agree-icon"></image>
  8. <text>金牌推荐官</text>
  9. </view>
  10. <view class="sub-title">成为亿职赞金牌推荐官,享超值权益</view>
  11. <view class="section">
  12. <view class="section-title flex align-center justify-between">
  13. <text>推荐人群:</text>
  14. <view class="tag">跨境</view>
  15. </view>
  16. <view class="tip">跨境电商从业者</view>
  17. <view class="tip">从业时间≥半年</view>
  18. <view class="tip">平台运营或产品开发</view>
  19. </view>
  20. <view class="section">
  21. <view class="section-title flex align-center">
  22. <text>推荐达标标准:</text>
  23. </view>
  24. <view class="tip">被推荐人成功注册</view>
  25. <view class="tip">简历完善度>80%</view>
  26. </view>
  27. <view class="section">
  28. <view class="section-title flex align-center">
  29. <text>超值权益:</text>
  30. </view>
  31. <view class="tip">成为推荐官,添加客服后即可获得10元奖励</view>
  32. <view class="tip">推得越多,单价越高! 奖金次日微信红包秒发!</view>
  33. <view class="tip">推1-10人:2元/人 (稳稳起步)</view>
  34. <view class="tip">推11-30人:5元/人 (加速前进)</view>
  35. <view class="tip">推31人以上:20元/人 (芜湖起飞!)</view>
  36. </view>
  37. </view>
  38. <view class="button-section fixed-section">
  39. <view class="submit-btn" @click="handleBecomeOfficer">成为推荐官</view>
  40. </view>
  41. <!-- 海报弹窗 -->
  42. <Poster
  43. :value="showPoster"
  44. :rank="rank"
  45. :posterBase64Url="posterBase64Url"
  46. :posterMime="posterMime"
  47. @close="handleClosePoster"
  48. @saved="handleSaved"
  49. ></Poster>
  50. </view>
  51. </template>
  52. <script>
  53. import navBar from '@/components/nav-bar/index.vue';
  54. import Poster from '@/components/poster/poster.vue'
  55. export default {
  56. components: {
  57. navBar,
  58. Poster
  59. },
  60. data() {
  61. return {
  62. loading: false,
  63. showPoster: false,
  64. // 推荐官顺位
  65. rank: 0,
  66. posterBase64Url: ''
  67. }
  68. },
  69. methods: {
  70. // 成为推荐官
  71. handleBecomeOfficer() {
  72. this.loading = true
  73. this.$queue.showLoading('成为推荐官中...')
  74. this.$Request.getT('/app/user/updateRecommender')
  75. .then(res => {
  76. if (res.code == 0) {
  77. this.getPosterData()
  78. } else {
  79. this.$queue.hideLoading()
  80. }
  81. })
  82. .catch(() => {
  83. this.$queue.hideLoading()
  84. })
  85. .finally(() => {
  86. this.loading = false
  87. })
  88. },
  89. // 获取海报数据
  90. getPosterData() {
  91. this.$queue.showLoading('获取海报数据中...')
  92. this.$Request.getT('/app/invite/getMyPoster')
  93. .then(res => {
  94. if (res.code == 0) {
  95. this.showPoster = true
  96. this.rank = res.data?.user?.recommenderRark ?? 0
  97. this.posterBase64Url = res.data?.image ?? ''
  98. }
  99. }).finally(() => {
  100. this.$queue.hideLoading()
  101. })
  102. },
  103. // 关闭海报弹窗
  104. handleClosePoster() {
  105. this.showPoster = false
  106. uni.redirectTo({
  107. url: '/pages/my/recommendationOfficer/list'
  108. })
  109. },
  110. handleSaved() {
  111. uni.redirectTo({
  112. url: '/pages/my/recommendationOfficer/list'
  113. })
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. @import '@/common.scss';
  120. .page-container {
  121. display: flex;
  122. flex-direction: column;
  123. height: 100vh;
  124. font-family: DM Sans;
  125. background-image: url('@/static/images/my/bg1.png');
  126. background-size: 100% 100%;
  127. .content {
  128. flex: 1;
  129. }
  130. .people-img {
  131. display: block;
  132. width: 336rpx;
  133. height: 336rpx;
  134. margin: 0 auto;
  135. }
  136. .title {
  137. margin: 18rpx 0 20rpx;
  138. color: rgba(51, 51, 51, 1);
  139. font-size: 36rpx;
  140. font-weight: 500;
  141. line-height: 46px;
  142. .agree-icon {
  143. width: 48rpx;
  144. height: 48rpx;
  145. margin-right: 8rpx;
  146. }
  147. }
  148. .sub-title {
  149. color: rgba(51, 51, 51, 1);
  150. font-size: 28rpx;
  151. font-weight: 500;
  152. line-height: 36rpx;
  153. text-align: center;
  154. margin-bottom: 28rpx;
  155. }
  156. .section {
  157. margin: 16rpx 20rpx;
  158. background: #fff;
  159. border-radius: 12rpx;
  160. padding: 16rpx 36rpx;
  161. .section-title {
  162. color: rgba(51, 51, 51, 1);
  163. font-weight: 500;
  164. line-height: 36rpx;
  165. }
  166. .tag {
  167. height: 32rpx;
  168. font-size: 20rpx;
  169. line-height: 1;
  170. color: #fff;
  171. border-radius: 8rpx;
  172. background: linear-gradient(90.00deg, rgba(13, 39, 247, 0.75) 0%,rgba(19, 193, 234, 0.75) 100%);
  173. padding: 6rpx 7rpx;
  174. margin-top: 6rpx;
  175. margin-left: 20rpx;
  176. box-sizing: border-box;
  177. }
  178. .tip {
  179. color: rgba(124, 125, 125, 1);
  180. font-size: 24rpx;
  181. font-weight: 400;
  182. line-height: 40rpx;
  183. margin-top: 12rpx;
  184. }
  185. }
  186. .fixed-section {
  187. box-shadow: none;
  188. background: transparent;
  189. }
  190. }
  191. </style>