invite-new-user.vue 11 KB

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