share.vue 10 KB

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