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