index.vue 2.7 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(option) {
  33. console.log(option)
  34. },
  35. onShareAppMessage() {
  36. console.log(111);
  37. return {
  38. title: '分销小助手',
  39. path:'/pages/index/index?inviteId=' + '111'
  40. }
  41. },
  42. methods: {
  43. goDetail(){
  44. uni.navigateTo({
  45. url: '/pages/index/detailPage/index',
  46. success: res => {},
  47. fail: () => {},
  48. complete: () => {}
  49. });
  50. },
  51. copyCode(){
  52. uni.setClipboardData({
  53. data:'xxx',
  54. success() {
  55. uni.showToast({
  56. icon:'none',
  57. title:'复制成功'
  58. })
  59. }
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style>
  66. .content {
  67. display: flex;
  68. flex-direction: column;
  69. align-items: center;
  70. justify-content: center;
  71. }
  72. .logo {
  73. height: 200px;
  74. width: 100%;
  75. }
  76. .logo-footer {
  77. height: 500px;
  78. width: 100%;
  79. }
  80. .detail-title {
  81. padding: 10px;
  82. margin-bottom: 2%;
  83. width: 100%;
  84. height: 150rpx;
  85. display: flex;
  86. flex-direction: column;
  87. justify-content: space-around;
  88. align-items: center;
  89. background: #fff;
  90. font-size: 30rpx;
  91. }
  92. .price-style {
  93. margin-right: 75%;
  94. color: red;
  95. }
  96. .share-box {
  97. display: flex;
  98. flex-direction: column;
  99. justify-content: center;
  100. align-items: center;
  101. width: 80%;
  102. height: 300upx;
  103. border: 1px dashed red;
  104. background: #fff;
  105. font-size: 28rpx;
  106. padding: 5px;
  107. }
  108. .share-box button {
  109. width: 300rpx;
  110. height: 70rpx;
  111. line-height: 70rpx;
  112. margin-top: 2%;
  113. background-color: #27BCEF;
  114. color: #fff;
  115. }
  116. .title {
  117. font-size: 36upx;
  118. color: #8f8f94;
  119. }
  120. .product-title {
  121. margin-top: 2%;
  122. margin-bottom: 2%;
  123. font-size: 32rpx;
  124. }
  125. </style>