discounts.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="c-list">
  3. <view class="c-row b-b">
  4. <text class="tit">配送</text>
  5. <view class="bz-list con" v-if="!mark">立即下单 ,预计最快第二天8.30-9:30送达</view>
  6. <view class="bz-list con reding" v-else>{{mark}}</view>
  7. </view>
  8. <view v-if="showCoupon" class="c-row b-b" @click="Getcoupon">
  9. <text class="tit">优惠券</text>
  10. <text class="con t-r red">领取优惠券</text>
  11. <text class="iconfont iconenter"></text>
  12. </view>
  13. <view class="c-row b-b">
  14. <text class="tit">简介</text>
  15. <view class="bz-list con">
  16. <text>{{ Info }}</text>
  17. <!-- <text>{{ copy2 }}</text> -->
  18. </view>
  19. <view class="copy-btn" @click="copy">一键复制</view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. showCoupon: {
  27. type: Boolean,
  28. default: false
  29. },
  30. mark: {
  31. default: ''
  32. },
  33. Info: {
  34. default: ''
  35. },
  36. },
  37. data() {
  38. return {
  39. copy1: '食材质检 ·',
  40. copy2: '无接触配送到门口'
  41. };
  42. },
  43. methods: {
  44. Getcoupon() {
  45. this.$emit('clickCoupon')
  46. },
  47. copy() {
  48. // let copyText = this.copy1 + ' ' + this.copy2;
  49. console.log(this.Info)
  50. uni.setClipboardData({
  51. //去找上面的数据
  52. data: this.Info,
  53. success: function(res) {
  54. uni.showToast({
  55. title: '复制成功',
  56. });
  57. },
  58. fail: function(res) {
  59. }
  60. });
  61. }
  62. }
  63. };
  64. </script>
  65. <style lang="scss">
  66. .c-list {
  67. font-size: $font-sm + 2rpx;
  68. color: $font-color-base;
  69. background: #fff;
  70. .title {
  71. color: #333333;
  72. font-size: 32rpx;
  73. font-weight: bold;
  74. }
  75. .c-row {
  76. display: flex;
  77. align-items: center;
  78. padding: 20rpx 30rpx;
  79. position: relative;
  80. }
  81. .tit {
  82. width: 140rpx;
  83. }
  84. .con {
  85. flex: 1;
  86. color: $font-color-dark;
  87. .selected-text {
  88. margin-right: 10rpx;
  89. }
  90. }
  91. .reding {
  92. color: #FF0815 !important;
  93. }
  94. .bz-list {
  95. height: 40rpx;
  96. font-size: $font-sm + 2rpx;
  97. color: $font-color-dark;
  98. overflow: hidden;
  99. text-overflow: ellipsis;
  100. white-space: nowrap;
  101. text {
  102. display: inline-block;
  103. margin-right: 30rpx;
  104. overflow: hidden;
  105. text-overflow: ellipsis;
  106. white-space: nowrap;
  107. width: 100%;
  108. }
  109. }
  110. .copy-btn {
  111. background-color: #F3F3F2;
  112. padding: 8rpx 20rpx;
  113. border-radius: 10rpx;
  114. color: #040406;
  115. }
  116. .red {
  117. color: #fb6d24;
  118. }
  119. }
  120. /* 商品详情中限制图片大小 */
  121. .rich-img {
  122. width: 100% !important;
  123. height: auto;
  124. }
  125. </style>