share.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. *-+
  2. <template>
  3. <view class="content">
  4. <top></top>
  5. <view class="top-tit">邀请好友 变成壕友</view>
  6. <view class="center-wrap">
  7. <image src="../../static/img/tj-bg.png" mode="" class="tj-bg"></image>
  8. <view class="center-tit">邀请地址</view>
  9. <view class="tj-jl flex" @click="opneYj">
  10. <text>业</text>
  11. <text>绩</text>
  12. </view>
  13. <view class="tj-lj-tit">【链接地址】</view>
  14. <view class="tj-lj flex">
  15. <view class="lj-tit">邀请链接:</view>
  16. <view class="lj-info clamp">{{ address | addFile }}</view>
  17. <view class="lj-copy" @click="copy(address)">复制链接</view>
  18. </view>
  19. <view class="tj-lj1 flex">
  20. <view class="lj-tit">绑定关系:</view>
  21. <view class="lj-info clamp" v-if="!userInfo.spread"><input type="text" v-model="recommend" value="" /></view>
  22. <view class="lj-info clamp" v-if="userInfo.spread">{{ userInfo.spread.address | addFile }}</view>
  23. <view class="lj-copy" v-if="!userInfo.spread" @click="spare()">绑定推荐关系</view>
  24. </view>
  25. </view>
  26. <<<<<<< HEAD
  27. <view class="tj-look" @click="getReferrer()">
  28. 查看推荐
  29. </view>
  30. =======
  31. <view class="tj-look" @click="button()">查看推荐</view>
  32. >>>>>>> 5fe50ff5c260e745ba7833a119b93bf915605eb5
  33. <uni-popup ref="yeji" type="center">
  34. <view class="yj-wrap">
  35. <view class="yj-tit">收益明细</view>
  36. <image src="../../static/img/yj-bg.png" mode="" class="yj-logo"></image>
  37. <view class="yj-hj flex">
  38. <view class="yj-hj-item">
  39. <view class="hj-item-val">0</view>
  40. <view class="hj-item-name">KGC总业绩</view>
  41. </view>
  42. <view class="yj-hj-item">
  43. <view class="hj-item-val">0</view>
  44. <view class="hj-item-name">FL总业绩</view>
  45. </view>
  46. </view>
  47. <view class="yj-nav flex">
  48. <view class="nav-item" v-for="(navitem, index) in navList" :class="{ active: index == tabIndex }" @click="navClick(index)">{{ navitem.name }}</view>
  49. </view>
  50. <view class="yj-info-wrap">
  51. <view class="yj-info-tit flex">
  52. <view class="">时间</view>
  53. <view class="">金额(KGC)</view>
  54. </view>
  55. <swiper class="yj-info-scroll" :current="tabIndex" duration="300">
  56. <swiper-item v-for="item in navList">
  57. <scroll-view scroll-y="true" class="yj-info-scroll" @scrolltolower="loadMore">
  58. <view v-for="itemt in item.list" class="">
  59. <view class="flex yj-info">
  60. <view class="">{{ itemt.time }}</view>
  61. <view class="">{{ itemt.val }}</view>
  62. </view>
  63. </view>
  64. <uni-load-more :status="item.loadingType"></uni-load-more>
  65. </scroll-view>
  66. </swiper-item>
  67. </swiper>
  68. </view>
  69. </view>
  70. </uni-popup>
  71. <uni-popup ref="yeji1" type="center">
  72. <view class="yj-wrap">
  73. <view class="yj-tit">我的推荐</view>
  74. <image src="../../static/img/yj-bg.png" mode="" class="yj-logo"></image>
  75. <view class="yj-info-wrap">
  76. <view class="yj-info-tit flex">
  77. <view class="">钱包地址</view>
  78. <view class="">时间</view>
  79. </view>
  80. <swiper class="yj-info-scroll" :current="tabIndex" duration="300">
  81. <swiper-item v-for="item in navList">
  82. <scroll-view scroll-y="true" class="yj-info-scroll" @scrolltolower="loadMore">
  83. <view v-for="itemt in item.list" class="">
  84. <view class="flex yj-info">
  85. <view class="">{{ itemt.time }}</view>
  86. <view class="">{{ itemt.val }}</view>
  87. </view>
  88. </view>
  89. <uni-load-more :status="item.loadingType"></uni-load-more>
  90. </scroll-view>
  91. </swiper-item>
  92. </swiper>
  93. </view>
  94. </view>
  95. </uni-popup>
  96. </view>
  97. </template>
  98. <script>
  99. <<<<<<< HEAD
  100. import top from '@/components/top/top.vue';
  101. import {
  102. spreadList
  103. } from '@/api/index.js'
  104. export default {
  105. comments: {
  106. top,
  107. },
  108. data() {
  109. return {
  110. navList: [{
  111. name: '直推业绩',
  112. page: 1,
  113. limit: 8,
  114. list: [],
  115. loaded: false,
  116. loadingType: 'more'
  117. },
  118. {
  119. name: '间推业绩',
  120. page: 1,
  121. limit: 8,
  122. list: [],
  123. loaded: false,
  124. loadingType: 'more'
  125. }
  126. ],
  127. tabIndex: 0,
  128. }
  129. },
  130. methods: {
  131. //查看推荐人
  132. getReferrer() {
  133. spreadList({}).then(
  134. ({
  135. data
  136. }) => {
  137. console.log(data, '1111111');
  138. }
  139. )
  140. },
  141. qrR() {
  142. },
  143. opneYj() {
  144. this.$refs.yeji.open()
  145. },
  146. button() {
  147. this.$refs.yeji1.open()
  148. },
  149. // 点击切换
  150. navClick(index) {
  151. this.tabIndex = index
  152. },
  153. // 下滑到底加载更多
  154. loadMore() {
  155. let obj = this
  156. let index = obj.tabIndex
  157. let navItem = obj.navList[index]
  158. if (navItem.loadingType == 'noMore' || navItem.loadingType == 'loading') {
  159. return
  160. =======
  161. import top from '@/components/top/top.vue';
  162. import { mapState, mapMutations } from 'vuex';
  163. import uniCopy from '@/components/js_sdk/xb-copy/uni-copy.js';
  164. export default {
  165. comments: {
  166. top
  167. },
  168. computed: {
  169. ...mapState('user', ['address', 'hasLogin', 'userInfo'])
  170. },
  171. filters: {
  172. addFile(provider) {
  173. if (provider.length >= 19) {
  174. var subStr1 = provider.substr(0, 14);
  175. var subStr2 = provider.substr(provider.length - 6, 6);
  176. var subStr = subStr1 + '...' + subStr2;
  177. provider = subStr;
  178. }
  179. return provider;
  180. }
  181. },
  182. data() {
  183. return {
  184. navList: [
  185. {
  186. name: '直推业绩',
  187. page: 1,
  188. limit: 8,
  189. list: [],
  190. loaded: false,
  191. loadingType: 'more'
  192. },
  193. {
  194. name: '间推业绩',
  195. page: 1,
  196. limit: 8,
  197. list: [],
  198. loaded: false,
  199. loadingType: 'more'
  200. >>>>>>> 5fe50ff5c260e745ba7833a119b93bf915605eb5
  201. }
  202. ],
  203. tabIndex: 0
  204. };
  205. },
  206. methods: {
  207. copy(value) {
  208. let obj = this;
  209. let content = value; //需要复制的内容
  210. console.log('复制的内容:', content);
  211. // content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
  212. const result = uniCopy(content);
  213. if (result === false) {
  214. uni.showToast({
  215. title: '不支持'
  216. });
  217. } else {
  218. uni.showToast({
  219. title: '复制成功',
  220. icon: 'none'
  221. });
  222. }
  223. },
  224. qrR() {},
  225. opneYj() {
  226. this.$refs.yeji.open();
  227. },
  228. button() {
  229. this.$refs.yeji1.open();
  230. },
  231. // 点击切换
  232. navClick(index) {
  233. this.tabIndex = index;
  234. },
  235. // 下滑到底加载更多
  236. loadMore() {
  237. let obj = this;
  238. let index = obj.tabIndex;
  239. let navItem = obj.navList[index];
  240. if (navItem.loadingType == 'noMore' || navItem.loadingType == 'loading') {
  241. return;
  242. }
  243. navItem.loadingType = 'loading';
  244. console.log('jiaz');
  245. }
  246. }
  247. };
  248. </script>
  249. <style lang="scss" scoped>
  250. page {
  251. background-color: #00050f;
  252. }
  253. .top-tit {
  254. text-align: center;
  255. font-size: 160rpx;
  256. font-family: zihun164hao-fangyuehei;
  257. font-weight: 400;
  258. font-style: italic;
  259. color: #08ede7;
  260. line-height: 168rpx;
  261. margin-bottom: 62rpx;
  262. }
  263. .box-top {
  264. display: flex;
  265. padding: 36rpx 41rpx 72rpx 41rpx;
  266. .bg3 {
  267. width: 56rpx;
  268. height: 62rpx;
  269. image {
  270. width: 100%;
  271. height: 100%;
  272. }
  273. }
  274. .two {
  275. margin-left: 36rpx;
  276. image {
  277. width: 100%;
  278. height: 100%;
  279. }
  280. }
  281. }
  282. .center-wrap {
  283. width: 680rpx;
  284. height: 891rpx;
  285. margin: auto;
  286. position: relative;
  287. .tj-bg {
  288. position: absolute;
  289. width: 680rpx;
  290. height: 891rpx;
  291. }
  292. .center-tit {
  293. width: 680rpx;
  294. height: 102rpx;
  295. line-height: 102rpx;
  296. text-align: center;
  297. font-size: 44rpx;
  298. font-family: zihun100hao-fangfangxianfengti;
  299. font-weight: 900;
  300. color: #08ede7;
  301. position: absolute;
  302. top: 0;
  303. }
  304. .tj-jl {
  305. text-align: center;
  306. width: 61rpx;
  307. height: 110rpx;
  308. background: #08ede7;
  309. border-radius: 10rpx 0px 0px 10rpx;
  310. position: absolute;
  311. right: 0;
  312. top: 170rpx;
  313. font-size: 32rpx;
  314. font-family: PingFang SC;
  315. font-weight: bold;
  316. color: #001337;
  317. // line-height: 40rpx;
  318. flex-direction: column;
  319. justify-content: center;
  320. }
  321. .tj-qr {
  322. width: 383rpx;
  323. height: 383rpx;
  324. background: #ffffff;
  325. border: 5rpx solid #08ede7;
  326. position: absolute;
  327. right: 0;
  328. left: 0;
  329. top: 204rpx;
  330. margin: auto;
  331. }
  332. .tj-lj-tit {
  333. width: 680rpx;
  334. text-align: center;
  335. font-size: 31rpx;
  336. font-family: PingFang SC;
  337. font-weight: bold;
  338. color: #ffffff;
  339. line-height: 103px;
  340. position: absolute;
  341. top: 560rpx;
  342. }
  343. .tj-lj1 {
  344. width: 636rpx;
  345. height: 67rpx;
  346. background: #233b75;
  347. border: 2rpx solid #08ede7;
  348. border-radius: 10rpx;
  349. position: absolute;
  350. bottom: 30rpx;
  351. right: 0;
  352. left: 0;
  353. margin: auto;
  354. }
  355. .tj-lj {
  356. width: 636rpx;
  357. height: 67rpx;
  358. background: #233b75;
  359. border: 2rpx solid #08ede7;
  360. border-radius: 10rpx;
  361. position: absolute;
  362. bottom: 124rpx;
  363. right: 0;
  364. left: 0;
  365. margin: auto;
  366. }
  367. .lj-tit {
  368. width: 148rpx;
  369. flex-shrink: 0;
  370. text-align: right;
  371. font-size: 28rpx;
  372. font-family: PingFang SC;
  373. font-weight: bold;
  374. color: #ffffff;
  375. line-height: 67rpx;
  376. }
  377. .lj-info {
  378. width: 148rpx;
  379. flex-grow: 1;
  380. text-align: left;
  381. font-size: 28rpx;
  382. font-family: PingFang SC;
  383. font-weight: bold;
  384. color: #ffffff;
  385. line-height: 67rpx;
  386. }
  387. .lj-copy {
  388. flex-shrink: 0;
  389. width: 148rpx;
  390. font-size: 28rpx;
  391. font-family: PingFang SC;
  392. font-weight: bold;
  393. color: #08ede7;
  394. line-height: 67rpx;
  395. // opacity: 0.75;
  396. }
  397. }
  398. .tj-look {
  399. width: 450rpx;
  400. height: 75rpx;
  401. background: linear-gradient(0deg, #ff7206, #ffdd7e);
  402. box-shadow: 0px 2rpx 8rpx 0px rgba(207, 126, 57, 0.7);
  403. border-radius: 38rpx;
  404. margin: 55rpx auto 0;
  405. font-size: 36rpx;
  406. font-family: zihun164hao-fangyuehei;
  407. font-weight: bold;
  408. color: #ffffff;
  409. line-height: 75rpx;
  410. text-align: center;
  411. }
  412. .yj-wrap {
  413. width: 680rpx;
  414. height: 854rpx;
  415. background: linear-gradient(180deg, #254fab 0%, #230a8e 100%);
  416. border-radius: 20rpx;
  417. .yj-logo {
  418. display: block;
  419. width: 326rpx;
  420. height: 16rpx;
  421. margin: auto;
  422. border-radius: 20px;
  423. }
  424. .yj-tit {
  425. width: 100%;
  426. padding-top: 60rpx;
  427. padding-bottom: 15rpx;
  428. text-align: center;
  429. font-size: 46rpx;
  430. font-family: zihun100hao-fangfangxianfengti;
  431. font-weight: bold;
  432. color: #ffffff;
  433. // line-height: 38px;
  434. }
  435. .yj-hj {
  436. width: 653rpx;
  437. height: 147rpx;
  438. background: #233b75;
  439. border: 2rpx solid #08ede7;
  440. border-radius: 10rpx;
  441. margin: 40rpx auto;
  442. .yj-hj-item {
  443. width: 50%;
  444. text-align: center;
  445. font-size: 28rpx;
  446. font-family: PingFang SC;
  447. font-weight: bold;
  448. color: #ffffff;
  449. line-height: 38rpx;
  450. // opacity: 0.7;
  451. .hj-item-val {
  452. font-size: 41rpx;
  453. padding-bottom: 10rpx;
  454. font-family: PingFang SC;
  455. font-weight: bold;
  456. color: #08ede7;
  457. line-height: 38rpx;
  458. }
  459. }
  460. }
  461. .yj-nav {
  462. width: 582rpx;
  463. border-bottom: 2rpx solid #fff;
  464. margin: auto;
  465. font-size: 28rpx;
  466. font-family: PingFang SC;
  467. font-weight: bold;
  468. color: #97a1d2;
  469. line-height: 38rpx;
  470. .nav-item {
  471. padding: 20rpx 40rpx;
  472. }
  473. .active {
  474. color: #fff;
  475. }
  476. }
  477. }
  478. .yj-info-wrap {
  479. height: 362rpx;
  480. width: 582rpx;
  481. margin: auto;
  482. // background-color: #fff;
  483. .yj-info-tit {
  484. font-size: 28rpx;
  485. font-family: PingFang SC;
  486. font-weight: bold;
  487. color: #ffffff;
  488. line-height: 38rpx;
  489. justify-content: space-between;
  490. padding: 10rpx 0;
  491. }
  492. .yj-info-scroll {
  493. // touch-action: none;
  494. width: 582rpx;
  495. height: 320rpx;
  496. // background-color: red;
  497. .yj-info {
  498. font-size: 28rpx;
  499. font-family: PingFang SC;
  500. font-weight: bold;
  501. color: #ffffff;
  502. line-height: 38rpx;
  503. }
  504. }
  505. }
  506. </style>