share.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <template>
  2. <view class="content position-relative flex-line">
  3. <image class="share" src="../../static/image/shareBg.jpg" mode="widthFix"></image>
  4. <view class="title">
  5. <text>
  6. 邀好友赚佣金
  7. </text>
  8. <text class="bg">
  9. 邀好友赚佣金
  10. </text>
  11. </view>
  12. <view class="money position-relative">
  13. <view class="showText position-relative">
  14. <view class="border">
  15. <view class="text">
  16. 邀请的好友每下一单
  17. </view>
  18. <view class="text">
  19. 都可分得下单一定佣金
  20. </view>
  21. <view class="moneybox">
  22. <text class="moneytext">
  23. 50-100
  24. </text>
  25. <text class="tip">
  26. </text>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="borderBox">
  31. <view class="borderBox1">
  32. <view class="borderBox2">
  33. <view class="bottomBox ">
  34. <!-- #ifdef MP -->
  35. <button open-type="share" class="bottom flex-center">
  36. <image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
  37. </image>
  38. <text>
  39. 立即分享
  40. </text>
  41. </button>
  42. <!-- #endif -->
  43. <!-- #ifdef APP -->
  44. <view class="bottom flex-center" @click="shareDomApp">
  45. <image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
  46. </image>
  47. <text>
  48. 立即分享
  49. </text>
  50. </view>
  51. <!-- #endif -->
  52. <!-- #ifdef H5 -->
  53. <view class="bottom flex-center" @click="shareDomH5">
  54. <image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
  55. </image>
  56. <text>
  57. 立即分享
  58. </text>
  59. </view>
  60. <!-- #endif -->
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="moneyBg"></view>
  66. </view>
  67. <view class="footer position-relative">
  68. <view class="bacolor">
  69. <view class="flex">
  70. <view class="bs">
  71. </view>
  72. <view class="bs">
  73. <view class="ll flex">
  74. <view class="ls flex-center">
  75. <view class="ii">
  76. </view>
  77. <view class="ii">
  78. </view>
  79. <view class="ii">
  80. </view>
  81. </view>
  82. <view class="ls">
  83. 如何赚钱
  84. </view>
  85. <view class="ls flex-center">
  86. <view class="ii">
  87. </view>
  88. <view class="ii">
  89. </view>
  90. <view class="ii">
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="bs">
  96. </view>
  97. </view>
  98. <view class="bottomColor">
  99. <view class="flex">
  100. <view class="item">
  101. <view class="ls">
  102. </view>
  103. </view>
  104. <view class="item">
  105. <view class="ls">
  106. </view>
  107. </view>
  108. </view>
  109. <view class="bottom flex-between-center">
  110. <view class="item">
  111. <view class="imgBox flex-center">
  112. <image class="img" src="/static/image/shareUser.png" mode="widthFix"></image>
  113. </view>
  114. </view>
  115. <view class="next">
  116. <image class="tip" src="/static/image/shareNext.png" mode="scaleToFill"></image>
  117. </view>
  118. <view class="item">
  119. <view class="imgBox flex-center">
  120. <image class="img" src="/static/image/shareGwc.png" mode="widthFix"></image>
  121. </view>
  122. </view>
  123. <view class="next">
  124. <image class="tip" src="/static/image/shareNext.png" mode="scaleToFill"></image>
  125. </view>
  126. <view class="item">
  127. <view class="imgBox flex-center">
  128. <image class="img" src="/static/image/sharehyxd.png" mode="widthFix"></image>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="bottom flex-between-center" style="align-items: flex-start;">
  133. <view class="item">
  134. 邀请好友
  135. </view>
  136. <view class="next"></view>
  137. <view class="item">
  138. 好友下单
  139. </view>
  140. <view class="next"></view>
  141. <view class="item">
  142. <view>
  143. 获得佣金
  144. </view>
  145. <view>
  146. 50-100元
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. import {
  157. mapState
  158. } from 'vuex';
  159. export default {
  160. data() {
  161. return {
  162. };
  163. },
  164. computed: {
  165. ...mapState('user', ['userInfo']),
  166. ...mapState(['baseURL', 'urlFile']),
  167. },
  168. // #ifdef MP
  169. onShareAppMessage: function(res) {
  170. console.log('点击分享');
  171. let path = '/pages/index/index?' + 'spread=' + this.userInfo.uid;
  172. let data = {
  173. path: path,
  174. title: this.userInfo.nickname + '邀请您进入绿津',
  175. };
  176. return data;
  177. },
  178. // #endif
  179. onLoad(options) {
  180. },
  181. methods: {
  182. //#ifdef APP
  183. shareDomApp() {
  184. uni.share({
  185. provider: 'weixin',
  186. type: 0,
  187. title: this.userInfo.nickname + '邀请您进入绿津',
  188. summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
  189. imageUrl: '/pages/index/index?spread=' + this.userInfo.uid,
  190. href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
  191. })
  192. },
  193. //#endif
  194. //#ifdef H5
  195. shareDomH5() {
  196. uni.share({
  197. provider: 'weixin',
  198. type: 0,
  199. title: this.userInfo.nickname + '邀请您进入绿津',
  200. summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
  201. imageUrl: '/pages/index/index?spread=' + this.userInfo.uid,
  202. href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
  203. })
  204. },
  205. //#endif
  206. }
  207. };
  208. </script>
  209. <style lang="scss">
  210. page {
  211. height: 0;
  212. min-height: 100%;
  213. }
  214. .content {
  215. min-height: 100%;
  216. background-color: #d90f3e;
  217. .share {
  218. width: 750rpx;
  219. position: absolute;
  220. top: 0;
  221. left: 0;
  222. }
  223. }
  224. .title {
  225. line-height: 1;
  226. padding-bottom: 5vh;
  227. font-weight: bold;
  228. color: #FFFFFF;
  229. font-size: 90rpx;
  230. text-align: center;
  231. text-shadow: -4rpx 4rpx #D15B40;
  232. position: relative;
  233. z-index: 1;
  234. .bg {
  235. position: absolute;
  236. top: 8rpx;
  237. left: -8rpx;
  238. width: 100%;
  239. color: #934E3D;
  240. z-index: -1;
  241. }
  242. }
  243. .money {
  244. z-index: 1;
  245. width: 580rpx;
  246. margin: 0 auto;
  247. .borderBox {
  248. position: relative;
  249. height: 300rpx;
  250. width: 100%;
  251. overflow: hidden;
  252. border-bottom-right-radius: 20rpx;
  253. border-bottom-left-radius: 20rpx;
  254. box-shadow: 0 6rpx #B70000;
  255. margin-top: -200rpx;
  256. z-index: 2;
  257. .borderBox1 {
  258. width: 2000rpx;
  259. margin-left: -710rpx;
  260. height: 2000rpx;
  261. margin-top: -1625rpx;
  262. border: 300rpx solid #FB1727;
  263. border-radius: 2000rpx;
  264. }
  265. .borderBox2 {
  266. width: 100%;
  267. height: 100%;
  268. border-radius: 2000rpx;
  269. border: 5px solid #ffc98d;
  270. box-shadow: 0px 30px 60px #FAB07E;
  271. .bottomBox {
  272. font-size: 48rpx;
  273. font-weight: bold;
  274. position: absolute;
  275. bottom: 60rpx;
  276. left: 0;
  277. width: 100%;
  278. line-height: 1;
  279. .bottom {
  280. width: 460rpx;
  281. height: 106rpx;
  282. border-radius: 99rpx;
  283. margin: 0 auto;
  284. box-shadow: 0px 0px 20rpx 0px rgba(131, 45, 52, 0.75);
  285. background-image: linear-gradient(0deg, #EEA768 25%, #FCDAB9 63%, #FFC490 100%);
  286. color: #95653A !important;
  287. .img {
  288. width: 50rpx;
  289. height: 50rpx;
  290. }
  291. }
  292. }
  293. }
  294. }
  295. .showText {
  296. background-color: #FFF1E1;
  297. border-radius: 20rpx;
  298. height: 480rpx;
  299. width: 520rpx;
  300. margin: 0 auto;
  301. padding: 10rpx;
  302. z-index: 1;
  303. line-height: 1.5;
  304. .moneybox {
  305. margin-top: 30rpx;
  306. background-image: linear-gradient(to bottom, #FAB07E 0%, #FB1727 100%);
  307. background-clip: text;
  308. color: rgba(0, 0, 0, 0);
  309. .moneytext {
  310. font-size: 95rpx;
  311. }
  312. .tip {
  313. font-size: 50rpx;
  314. }
  315. }
  316. .border {
  317. width: 100%;
  318. height: 100%;
  319. border: 2px solid rgba(148, 131, 134, 0.3);
  320. border-radius: 20rpx;
  321. color: #B67363;
  322. font-size: $font-sm;
  323. text-align: center;
  324. font-weight: bold;
  325. padding: 20rpx;
  326. }
  327. }
  328. .moneyBg {
  329. background: linear-gradient(to right, #FAB18A 0%, #ff793f 35rpx, #ff793f 551rpx, #FAB18A 100%);
  330. height: 340rpx;
  331. width: 100%;
  332. border-radius: 20rpx;
  333. margin-top: -440rpx;
  334. }
  335. }
  336. .footer {
  337. padding-top: 10vh;
  338. .bacolor {
  339. width: 710rpx;
  340. height: 320rpx;
  341. background: linear-gradient(0deg, #FE4352 56%, #FD784B 100%);
  342. border-radius: 20rpx;
  343. overflow: hidden;
  344. .flex {
  345. .bs {
  346. width: 150rpx;
  347. height: 70rpx;
  348. }
  349. .bs:nth-child(1) {
  350. background-color: #d90f3e;
  351. border-bottom-right-radius: 50rpx;
  352. }
  353. .bs:nth-child(2) {
  354. flex-shrink: 0;
  355. width: 420rpx;
  356. overflow: hidden;
  357. .ll {
  358. padding: 0 20rpx;
  359. width: 436rpx;
  360. height: 100%;
  361. margin-left: -8rpx;
  362. border-top-left-radius: 60rpx;
  363. border-top-right-radius: 60rpx;
  364. background-color: rgba(0, 0, 0, 0);
  365. box-shadow: 0 -36rpx 0 #d90f3e;
  366. .ls {
  367. .ii {
  368. margin: 0 5rpx;
  369. }
  370. }
  371. .ls:nth-child(1) {
  372. .ii {
  373. transform: rotate(45deg);
  374. height: 16rpx;
  375. width: 16rpx;
  376. }
  377. .ii:nth-child(1) {
  378. background-color: rgba(253, 217, 182, 1);
  379. }
  380. .ii:nth-child(2) {
  381. background-color: rgba(253, 217, 182, 0.8);
  382. }
  383. .ii:nth-child(3) {
  384. background-color: rgba(253, 217, 182, 0.5);
  385. }
  386. }
  387. .ls:nth-child(3) {
  388. .ii {
  389. transform: rotate(45deg);
  390. height: 16rpx;
  391. width: 16rpx;
  392. }
  393. .ii:nth-child(3) {
  394. background-color: rgba(253, 217, 182, 1);
  395. }
  396. .ii:nth-child(2) {
  397. background-color: rgba(253, 217, 182, 0.8);
  398. }
  399. .ii:nth-child(1) {
  400. background-color: rgba(253, 217, 182, 0.5);
  401. }
  402. }
  403. .ls {
  404. text-align: center;
  405. flex-grow: 1;
  406. color: #FFD6CB;
  407. font-size: 36rpx;
  408. font-weight: bold;
  409. }
  410. }
  411. }
  412. .bs:nth-child(3) {
  413. background-color: #d90f3e;
  414. border-bottom-left-radius: 50rpx;
  415. }
  416. }
  417. }
  418. .bottomColor {
  419. height: 270rpx;
  420. width: 100%;
  421. &>.flex {
  422. .item {
  423. height: 40rpx;
  424. width: 40rpx;
  425. overflow: hidden;
  426. &>.ls {
  427. height: 40rpx;
  428. width: 40rpx;
  429. box-shadow: 0 -20rpx 0 #d90f3e;
  430. }
  431. &:nth-child(1) {
  432. .ls {
  433. border-top-left-radius: 20rpx;
  434. }
  435. }
  436. &:nth-child(2) {
  437. .ls {
  438. border-top-right-radius: 20rpx;
  439. }
  440. }
  441. }
  442. }
  443. }
  444. .bottom {
  445. justify-content: space-around;
  446. .next {
  447. width: 34rpx;
  448. .tip {
  449. width: 34rpx;
  450. height: 38rpx;
  451. }
  452. }
  453. .item {
  454. width: 150rpx;
  455. .imgBox {
  456. width: 80rpx;
  457. height: 80rpx;
  458. background-color: #FFC98D;
  459. border-radius: 99rpx;
  460. margin: 0 auto;
  461. margin-bottom: 20rpx;
  462. .img {
  463. width: 50rpx;
  464. }
  465. }
  466. }
  467. }
  468. .flex-between-center {
  469. text-align: center;
  470. justify-content: space-around;
  471. color: #FFC98D;
  472. font-size: 22rpx;
  473. padding: 0 30rpx;
  474. }
  475. }
  476. </style>