index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="content">
  3. <image class="logo" src="/static/bed3.png"></image>
  4. <view class="detail-title">
  5. <text style="margin-left: 5%;
  6. margin-right: 3%;">甜蜜瑞士系列床垫 卧室独立袋弹簧 护脊静音软硬适中双面使用床垫</text>
  7. <text class="price-style">¥11999</text>
  8. </view>
  9. <view class="share-box">
  10. <view>分销商分享给好友,好友购买产品成功后即可获</view>
  11. <view>得分享奖励</view>
  12. <view>单笔最高可赚¥200.00</view>
  13. <view>快去分享吧</view>
  14. <button type="default" open-type="share">分享</button>
  15. </view>
  16. <view class="share-box" style="height: 200upx;margin-top: 2%;" @longpress="copyCode">
  17. <view>长按复制框内整段文字,打开 [手淘] 即可购买</view>
  18. <view>¥kSfsDfrtrEjt¥</view>
  19. <button type="default" @click="copyCode">一键复制</button>
  20. </view>
  21. <view class="product-title">产品详情</view>
  22. <image class="logo-footer" src="/static/detail-bg2.png"></image>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. title: 'Hello'
  30. }
  31. },
  32. onLoad() {
  33. },
  34. onShareAppMessage() {
  35. console.log(111);
  36. return {
  37. title: '分销小助手',
  38. path:'/pages/index/index?inviteId=' + '111'
  39. }
  40. },
  41. methods: {
  42. goDetail(){
  43. uni.navigateTo({
  44. url: '/pages/index/detailPage/index',
  45. success: res => {},
  46. fail: () => {},
  47. complete: () => {}
  48. });
  49. },
  50. copyCode(){
  51. uni.setClipboardData({
  52. data:'xxx',
  53. success() {
  54. uni.showToast({
  55. icon:'none',
  56. title:'复制成功'
  57. })
  58. }
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style>
  65. .content {
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. justify-content: center;
  70. }
  71. .logo {
  72. height: 200px;
  73. width: 100%;
  74. }
  75. .logo-footer {
  76. height: 500px;
  77. width: 100%;
  78. }
  79. .detail-title {
  80. padding: 10px;
  81. margin-bottom: 2%;
  82. width: 100%;
  83. height: 150rpx;
  84. display: flex;
  85. flex-direction: column;
  86. justify-content: space-around;
  87. align-items: center;
  88. background: #fff;
  89. font-size: 30rpx;
  90. }
  91. .price-style {
  92. margin-right: 75%;
  93. color: red;
  94. }
  95. .share-box {
  96. display: flex;
  97. flex-direction: column;
  98. justify-content: center;
  99. align-items: center;
  100. width: 80%;
  101. height: 300upx;
  102. border: 1px dashed red;
  103. background: #fff;
  104. font-size: 28rpx;
  105. padding: 5px;
  106. }
  107. .share-box button {
  108. width: 300rpx;
  109. height: 70rpx;
  110. line-height: 70rpx;
  111. margin-top: 2%;
  112. background-color: #27BCEF;
  113. color: #fff;
  114. }
  115. .title {
  116. font-size: 36upx;
  117. color: #8f8f94;
  118. }
  119. .product-title {
  120. margin-top: 2%;
  121. margin-bottom: 2%;
  122. font-size: 32rpx;
  123. }
  124. </style>