my-fapiao.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="web_box">
  3. <view class="vflex acenter jcenter top">
  4. <view class="title">邀请好友加入内核</view>
  5. <view class="subtitle">你与好友均可获得超值奖励</view>
  6. </view>
  7. <view class="box vflex acenter">
  8. <image src="../static/images/logo.png" mode="" class="logo"></image>
  9. <view class="title">内核招聘</view>
  10. <view class="subtitle">邀请你注册内核招聘,完成注册可获得超值奖励</view>
  11. <!-- <image src="" mode="" class="code-img"></image> -->
  12. <view class="code-text vflex acenter">
  13. <view class="hflex acenter jcenter">
  14. <view class="text">邀请码</view>
  15. <view class="text">{{code}}</view>
  16. </view>
  17. <view class="copy" @click="copy">复制邀请码</view>
  18. </view>
  19. </view>
  20. <view class="bottom hflex acenter jbetween">
  21. <button class="save" @click="save">保存图片</button>
  22. <button class="invite" @click="invite">马上邀请好友</button>
  23. </view>
  24. <view class="list hflex acenter jcenter" @click="tolist">
  25. <view>已邀请<span style="color: #0C66C2;">{{num || 0}}</span>人</view>
  26. <u-icon name="arrow-rightward" color="rgba(68,68,68,.4)" size="14"></u-icon>
  27. </view>
  28. <view class="" style="height: 40rpx;"></view>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. index,
  34. invite_list
  35. } from "@/units/inquire.js"
  36. export default {
  37. data() {
  38. return {
  39. code: '',
  40. num: 0,
  41. list: [],
  42. money: 0,
  43. };
  44. },
  45. onLoad() {
  46. this.getuser()
  47. this.getlist()
  48. },
  49. methods: {
  50. getuser() {
  51. index().then((res) => {
  52. console.log(res);
  53. this.code = res.data.invitation_code
  54. this.money = res.data.money
  55. })
  56. },
  57. getlist() {
  58. invite_list({
  59. page: 1
  60. }).then((res) => {
  61. this.list = res.data.data
  62. this.num = res.data.total
  63. })
  64. },
  65. copy() {
  66. uni.setClipboardData({
  67. data: this.code,
  68. success: function() {
  69. this.$u.toasta('复制成功')
  70. }
  71. })
  72. },
  73. save() {
  74. },
  75. invite() {},
  76. tolist() {
  77. console.log(this.money);
  78. uni.navigateTo({
  79. url: '/pagesD/invite-list?money=' + this.money
  80. })
  81. },
  82. }
  83. }
  84. </script>
  85. <style lang="scss">
  86. .web_box {
  87. background: #FAFAFC;
  88. padding: 0 52rpx;
  89. .top {
  90. padding: 54rpx 0;
  91. .title {
  92. font-size: 48rpx;
  93. font-family: PingFangSC-Medium, PingFang SC;
  94. font-weight: 500;
  95. color: #141414;
  96. }
  97. .subtitle {
  98. font-size: 28rpx;
  99. font-family: PingFangSC-Regular, PingFang SC;
  100. font-weight: 400;
  101. color: #444444;
  102. padding: 16rpx 0 0;
  103. }
  104. }
  105. .box {
  106. width: 646rpx;
  107. height: 872rpx;
  108. background: #FFFFFF;
  109. box-shadow: 0rpx 4rpx 68rpx 0rpx rgba(0, 0, 0, 0.1);
  110. border-radius: 20rpx;
  111. position: relative;
  112. .logo {
  113. width: 107rpx;
  114. height: 107rpx;
  115. margin: 0 auto;
  116. z-index: 9;
  117. }
  118. .title {
  119. font-size: 36rpx;
  120. font-family: PingFangSC, PingFang SC;
  121. font-weight: 500;
  122. color: #222222;
  123. padding: 54rpx 0 24rpx;
  124. }
  125. .subtitle {
  126. font-size: 22rpx;
  127. font-family: PingFangSC, PingFang SC;
  128. font-weight: 400;
  129. color: #555555;
  130. padding: 0 0 56rpx;
  131. }
  132. .code-img {
  133. width: 210rpx;
  134. height: 210rpx;
  135. margin-bottom: 66rpx;
  136. }
  137. .code-text {
  138. width: 546rpx;
  139. background: #F3F3F3;
  140. border-radius: 20rpx;
  141. padding: 32rpx 0;
  142. .text {
  143. font-size: 36rpx;
  144. font-family: PingFangSC, PingFang SC;
  145. font-weight: 500;
  146. color: #222222;
  147. padding: 0 48rpx 0 0;
  148. }
  149. .text:nth-child(2) {
  150. padding: 0 0 0 48rpx;
  151. border-left: 1px solid #E0E0E0;
  152. }
  153. .copy {
  154. padding: 32rpx 0 0;
  155. font-size: 24rpx;
  156. font-family: PingFangSC, PingFang SC;
  157. font-weight: 400;
  158. color: #0C66C2;
  159. }
  160. }
  161. }
  162. .box::before {
  163. content: "";
  164. position: absolute;
  165. width: 110rpx;
  166. height: 110rpx;
  167. background: #fff;
  168. top: -40rpx;
  169. left: 268rpx;
  170. border-radius: 50%;
  171. }
  172. .bottom {
  173. padding: 28rpx 0 60rpx;
  174. .save {
  175. width: 244rpx;
  176. height: 112rpx;
  177. background: #E7E7E7;
  178. border-radius: 56rpx;
  179. font-size: 32rpx;
  180. font-family: PingFangSC, PingFang SC;
  181. font-weight: 400;
  182. color: #333333;
  183. padding: 0;
  184. line-height: 112rpx;
  185. }
  186. .invite {
  187. width: 364rpx;
  188. height: 112rpx;
  189. background: #0C66C2;
  190. border-radius: 56rpx;
  191. font-size: 32rpx;
  192. font-family: PingFangSC, PingFang SC;
  193. font-weight: 400;
  194. color: #FFFFFF;
  195. padding: 0;
  196. line-height: 112rpx;
  197. }
  198. }
  199. .list {
  200. font-size: 24rpx;
  201. font-family: PingFangSC, PingFang SC;
  202. font-weight: 400;
  203. color: rgba(51, 51, 51, 0.6);
  204. padding: 0 12rpx 0 0;
  205. }
  206. }
  207. </style>