invite-new-user.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <layout title="邀请好友得现金" :isGoBack="true" padding="0">
  3. <template #right>
  4. <!-- nav right -->
  5. <img @click="onRightHandle" src="~assets/image/activity/invite-user/invite-new-user/nav-right.png" alt="">
  6. </template>
  7. <!-- container -->
  8. <div class="invite-container">
  9. <div class="share-btn mb-8" @click="shareHandle">
  10. 分享赚佣金
  11. </div>
  12. <div class="day-statistics mb-3">今日邀请注册人数:1000</div>
  13. <div class="user-main pt-3 pr-3 pb-3 pl-3 mb-3">
  14. <div class="userinfo">
  15. <div class="avatar mr-1"></div>
  16. <!-- <img class="avatar mr-4" src="~assets/image/activity/invite-user/invite-new-user/avatar.png" alt=""> -->
  17. <div class="userinfo-text ml-1">
  18. <div class="userinfo-name">用户昵称</div>
  19. <div class="userinfo-id">ID:123456789</div>
  20. </div>
  21. </div>
  22. <div class="possess-warp mb-3">
  23. <div class="withdrawal-text">可提现<span class="withdrawal-money ml-2">¥30.0</span></div>
  24. <div class="withdrawal-btn">提现</div>
  25. </div>
  26. <div class="userinfo-detail">
  27. <div class="userinfo-detail-item pt-4 pr-3 pb-3 pl-3">
  28. <div class="userinfo-detail-item-content">1000</div>
  29. <div class="userinfo-detail-item-title">累计邀请人数</div>
  30. </div>
  31. <div style="flex: 0 0 11px"></div>
  32. <div class="userinfo-detail-item pt-4 pr-3 pb-3 pl-3">
  33. <div class="userinfo-detail-item-content">1000</div>
  34. <div class="userinfo-detail-item-title">累计邀请金额</div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="record-wrap">
  39. <van-tabs v-model="activeTab" shrink background="#FFFBE2">
  40. <van-tab v-for="(tab, i) in tabs" :title="tab.title" :key="i">
  41. <!-- 邀请记录 -->
  42. <RecordList
  43. v-if="activeTab === 0"
  44. class="mt-3 pr-1 pl-1 list-wrqp"
  45. :data="tab.data"
  46. :key="i"
  47. />
  48. <!-- 购买记录 -->
  49. <BuyRecordList class="mt-3 pr-1 pl-1 list-wrqp" v-if="activeTab === 1" :data="tab.data"/>
  50. <!-- 提现记录 -->
  51. <RecordList
  52. v-if="activeTab === 2"
  53. class="mt-3 pr-1 pl-1 list-wrqp"
  54. :data="tab.data"
  55. :key="i"
  56. />
  57. <!-- 分页 -->
  58. <InvitePagination v-if="tab.total" :total="tab.total" :pageSize="tab.query.pageSize" :currentPage="tab.query.pageNum" @onPageChange="pageChangeHandle" />
  59. </van-tab>
  60. </van-tabs>
  61. </div>
  62. <!-- 分享弹窗 -->
  63. <SharePopup ref="sharePopup" />
  64. </div>
  65. </layout>
  66. </template>
  67. <script>
  68. /**
  69. * Date: 2025-4-3 oem商户拉新分佣活动
  70. */
  71. import layoutBack from '@/components/layout';
  72. import layout from './components/layout';
  73. import RecordList from './components/RecordList';
  74. import InvitePagination from './components/InvitePagination';
  75. import BuyRecordList from './components/BuyRecordList';
  76. import SharePopup from './components/SharePopup';
  77. export default {
  78. auth: false,
  79. name: 'OemInviteNewUser',
  80. head: {
  81. title: '邀请好友得现金',
  82. },
  83. components: { layout, layoutBack, RecordList, InvitePagination, BuyRecordList, SharePopup },
  84. data() {
  85. return {
  86. activeTab: 0,
  87. tabs: [{
  88. title: '邀请记录',
  89. query: {
  90. pageNum: 1,
  91. pageSize: 10,
  92. },
  93. data: [{
  94. id: 1,
  95. name: '1305677',
  96. phone: '13800138000',
  97. time: '2025-04-03 10:00:00',
  98. money: '100.00',
  99. status: '已提现',
  100. statusColor: '#FF505C',
  101. },
  102. {
  103. id: 1,
  104. name: '1305677',
  105. phone: '13800138000',
  106. time: '2025-04-03 10:00:00',
  107. money: '100.00',
  108. status: '已提现',
  109. statusColor: '#FF505C',
  110. },
  111. {
  112. id: 1,
  113. name: '1305677',
  114. phone: '13800138000',
  115. time: '2025-04-03 10:00:00',
  116. money: '100.00',
  117. status: '已提现',
  118. statusColor: '#FF505C',
  119. },
  120. {
  121. id: 1,
  122. name: '1305677',
  123. phone: '13800138000',
  124. time: '2025-04-03 10:00:00',
  125. money: '100.00',
  126. status: '已提现',
  127. statusColor: '#FF505C',
  128. },
  129. {
  130. id: 1,
  131. name: '1305677',
  132. phone: '13800138000',
  133. time: '2025-04-03 10:00:00',
  134. money: '100.00',
  135. status: '已提现',
  136. statusColor: '#FF505C',
  137. },
  138. // {
  139. // id: 1,
  140. // name: '1305677',
  141. // phone: '13800138000',
  142. // time: '2025-04-03 10:00:00',
  143. // money: '100.00',
  144. // status: '已提现',
  145. // statusColor: '#FF505C',
  146. // },
  147. // {
  148. // id: 1,
  149. // name: '1305677',
  150. // phone: '13800138000',
  151. // time: '2025-04-03 10:00:00',
  152. // money: '100.00',
  153. // status: '已提现',
  154. // statusColor: '#FF505C',
  155. // },
  156. // {
  157. // id: 1,
  158. // name: '1305677',
  159. // phone: '13800138000',
  160. // time: '2025-04-03 10:00:00',
  161. // money: '100.00',
  162. // status: '已提现',
  163. // statusColor: '#FF505C',
  164. // },
  165. // {
  166. // id: 1,
  167. // name: '1305677',
  168. // phone: '13800138000',
  169. // time: '2025-04-03 10:00:00',
  170. // money: '100.00',
  171. // status: '已提现',
  172. // statusColor: '#FF505C',
  173. // },
  174. // {
  175. // id: 1,
  176. // name: '1305677',
  177. // phone: '13800138000',
  178. // time: '2025-04-03 10:00:00',
  179. // money: '100.00',
  180. // status: '已提现',
  181. // statusColor: '#FF505C',
  182. // }
  183. ],
  184. total: 0,
  185. },{
  186. title: '购买记录',
  187. query: {
  188. pageNum: 1,
  189. pageSize: 10,
  190. },
  191. data: [{
  192. id: 1,
  193. name: '1305677',
  194. phone: '13800138000',
  195. time: '2025-04-03 10:00:00',
  196. money: '100.00',
  197. status: '30.00',
  198. statusColor: '#FF505C',
  199. },{
  200. id: 1,
  201. name: '1305677',
  202. phone: '13800138000',
  203. time: '2025-04-03 10:00:00',
  204. money: '100.00',
  205. status: '30.00',
  206. statusColor: '#FF505C',
  207. },{
  208. id: 1,
  209. name: '1305677',
  210. phone: '13800138000',
  211. time: '2025-04-03 10:00:00',
  212. money: '100.00',
  213. status: '30.00',
  214. statusColor: '#FF505C',
  215. },{
  216. id: 1,
  217. name: '1305677',
  218. phone: '13800138000',
  219. time: '2025-04-03 10:00:00',
  220. money: '100.00',
  221. status: '30.00',
  222. statusColor: '#FF505C',
  223. },{
  224. id: 1,
  225. name: '1305677',
  226. phone: '13800138000',
  227. time: '2025-04-03 10:00:00',
  228. money: '100.00',
  229. status: '30.00',
  230. statusColor: '#FF505C',
  231. },],
  232. total: 0,
  233. },{
  234. title: '提现记录',
  235. query: {
  236. pageNum: 1,
  237. pageSize: 10,
  238. },
  239. data: [],
  240. total: 0,
  241. }],
  242. }
  243. },
  244. methods: {
  245. // nav right菜单点击事件
  246. onRightHandle() {
  247. this.$router.push({ path: '/activity/invite-user/invite-new-user-rule' })
  248. },
  249. // 分享按钮点击事件
  250. shareHandle() {
  251. this.$refs.sharePopup.showPopup();
  252. },
  253. // 分页点击事件
  254. pageChangeHandle(page) {
  255. let active = this.activeTab;
  256. this.tabs[active].query.pageNum = page;
  257. console.log('pageChangeHandle', page);
  258. // 发起请求
  259. }
  260. }
  261. }
  262. </script>
  263. <style lang="scss" scoped>
  264. .mb-12{
  265. margin-bottom: 12px;
  266. }
  267. // 动态生成 从 0 到 100px 的样式
  268. @for $i from 0 through 100 {
  269. .mb-#{$i} {
  270. margin-bottom: #{$i}px;
  271. }
  272. .mt-#{$i} {
  273. margin-top: #{$i}px;
  274. }
  275. .ml-#{$i} {
  276. margin-left: #{$i}px;
  277. }
  278. .mr-#{$i} {
  279. margin-right: #{$i}px;
  280. }
  281. }
  282. $-radeus-12: 12px;
  283. $-bg-yellow: rgb(255, 253, 241);
  284. .invite-container {
  285. font-size: 12px;
  286. height: 100%;
  287. width: 100%;
  288. display: flex;
  289. flex-direction: column;
  290. background-image: url('~assets/image/activity/invite-user/invite-new-user/bg-img.png');
  291. background-size: 100% auto;
  292. background-position: top;
  293. background-repeat: no-repeat;
  294. background-color: #EB3043;
  295. padding: 372px 16px 16px;
  296. .share-btn {
  297. height: 56px;
  298. background: #FF505C;
  299. }
  300. .day-statistics{
  301. line-height: 32px;
  302. font-size: 14px;
  303. color: #FA393A;
  304. font-weight: 500;
  305. border-radius: $-radeus-12;
  306. background-color: $-bg-yellow;
  307. text-align: center;
  308. }
  309. .user-main{
  310. display: flex;
  311. flex-direction: column;
  312. background-color: $-bg-yellow;
  313. border-radius: $-radeus-12;
  314. .userinfo{
  315. display: flex;
  316. align-items: center;
  317. .avatar{
  318. width: 40px;
  319. height: 40px;
  320. border-radius: 50%;
  321. background-color: #FF505C;
  322. }
  323. .userinfo-text{
  324. display: flex;
  325. flex-direction: column;
  326. .userinfo-name{
  327. font-size: 14px;
  328. color: #242424;
  329. }
  330. .userinfo-id{
  331. color: #979797;
  332. }
  333. }
  334. }
  335. .possess-warp{
  336. display: flex;
  337. align-items: center;
  338. justify-content: space-between;
  339. .withdrawal-text{
  340. color: #0A132B;
  341. .withdrawal-money{
  342. color: #FA393A;
  343. font-size: 24px;
  344. font-weight: bold;
  345. }
  346. }
  347. .withdrawal-btn{
  348. width: 70px;
  349. line-height: 26px;
  350. border-radius: $-radeus-12;
  351. background-color: #FA393A;
  352. color: #fff;
  353. font-size: 14px;
  354. text-align: center;
  355. }
  356. }
  357. .userinfo-detail{
  358. display: flex;
  359. align-items: center;
  360. justify-content: space-between;
  361. .userinfo-detail-item{
  362. flex: 1;
  363. display: flex;
  364. flex-direction: column;
  365. align-items: start;
  366. background-color: rgb(255, 242, 231);
  367. border-radius: 12px;
  368. .userinfo-detail-item-content{
  369. font-size: 18px;
  370. font-weight: bold;
  371. color: #242424;
  372. }
  373. .userinfo-detail-item-title{
  374. font-weight: 400;
  375. color: #979797;
  376. }
  377. }
  378. }
  379. }
  380. .record-wrap{
  381. height: 276px;
  382. background-color: $-bg-yellow;
  383. border-radius: $-radeus-12;
  384. overflow: hidden;
  385. }
  386. }
  387. </style>