m-share-sbcf.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="flex_c row">
  3. <view class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
  4. <view class="text" :class="isMy ? 'text_r' : 'text_l'">
  5. <view class="flex_c_c article">
  6. <view class="flex_r fa_c article-infr">
  7. <view class="article-infr-img">
  8. <image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
  9. </view>
  10. <view class="text_22 color__ article-infr-text">
  11. {{ value.payload.title }}
  12. </view>
  13. </view>
  14. <view class="text_30 nowrap_ article-title">
  15. {{ value.payload.short_title }}
  16. </view>
  17. <view class="article-img">
  18. <image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
  19. </view>
  20. <view class="m-line">
  21. <m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
  22. </view>
  23. <view class="flex_r fa_c article-b">
  24. <view class="article-b-icon"></view>
  25. <view class="text_20 color__ article-b-text">联盟商家</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. props: {
  35. isMy: {
  36. type: [Boolean, Number],
  37. default: false
  38. },
  39. value: {
  40. type: Object,
  41. default: {}
  42. }
  43. },
  44. data() {
  45. return {};
  46. },
  47. computed: {},
  48. methods: {
  49. onClick() {
  50. this.$emit('onClick');
  51. }
  52. }
  53. };
  54. </script>
  55. <style scoped lang="scss">
  56. .row {
  57. }
  58. .row_ {
  59. flex-direction: row-reverse;
  60. }
  61. .text_box {
  62. flex-direction: row-reverse;
  63. }
  64. .text {
  65. position: relative;
  66. z-index: 99;
  67. box-sizing: border-box;
  68. }
  69. .text_r {
  70. position: relative;
  71. }
  72. .text_l {
  73. position: relative;
  74. }
  75. .text_r::after {
  76. position: absolute;
  77. z-index: -1;
  78. content: '';
  79. top: 26rpx;
  80. right: -8rpx;
  81. width: 18rpx;
  82. height: 18rpx;
  83. border-radius: 2px;
  84. transform: rotate(45deg);
  85. background-color: #fff;
  86. }
  87. .text_l::after {
  88. position: absolute;
  89. z-index: -1;
  90. content: '';
  91. top: 26rpx;
  92. left: -8rpx;
  93. width: 18rpx;
  94. height: 18rpx;
  95. border-radius: 2px;
  96. transform: rotate(45deg);
  97. background-color: #fff;
  98. }
  99. .article {
  100. box-sizing: border-box;
  101. padding: 14rpx 20rpx 4rpx 20rpx;
  102. width: 490rpx;
  103. border-radius: 10rpx;
  104. overflow: hidden;
  105. background-color: #fff;
  106. border: 0.5px solid #fff;
  107. .article-infr {
  108. width: 100%;
  109. height: 46rpx;
  110. margin-bottom: 10rpx;
  111. .article-infr-img {
  112. width: 40rpx;
  113. height: 40rpx;
  114. margin-right: 10rpx;
  115. border-radius: 50%;
  116. overflow: hidden;
  117. background-color: #f1f1f1;
  118. }
  119. .article-infr-text {
  120. }
  121. }
  122. .article-title {
  123. box-sizing: border-box;
  124. width: 100%;
  125. margin-bottom: 14rpx;
  126. }
  127. .article-img {
  128. width: 450rpx;
  129. height: 450rpx;
  130. background-color: #f1f1f1;
  131. }
  132. .m-line {
  133. width: 100%;
  134. height: 1px;
  135. margin-top: 20rpx;
  136. }
  137. .article-b {
  138. width: 100%;
  139. margin-top: 4rpx;
  140. .article-b-icon {
  141. width: 26rpx;
  142. height: 26rpx;
  143. background-color: #f1f1f1;
  144. border-radius: 50%;
  145. overflow: hidden;
  146. margin-right: 10rpx;
  147. }
  148. .article-b-text {
  149. }
  150. }
  151. }
  152. </style>