videoContent.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <!-- 最底下的文字部分 -->
  3. <view class="content">
  4. <view class="cart">
  5. <text class="cartName">@{{list.authorName}}</text>
  6. </view>
  7. <view class="words mb20" :style="'width: '+ (windowWidth - 120) +'px;'">
  8. <BaseTextMore v-if="list.content" :content="list.content" fontColor="rgba(255,255,255,0.9)"
  9. actionFontColor="#fff" :font-size="28" :rows="2" expand-text="展开" collapse-text="收起">
  10. </BaseTextMore>
  11. <view class="topicList acea-row" v-if="list.topicList && list.topicList.length">
  12. <view @click="goTopic(item.id)" v-for="item in list.topicList" :key="item.id">
  13. <text class="icon">#</text><text class="text">{{item.name}}</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="product mb20">
  18. <scroll-view scroll-x="true" style="white-space: nowrap; display: flex;"
  19. scroll-with-animation show-scrollbar="true">
  20. <view class="product-item" v-for="(goods,idx) in list.productList" :key="idx">
  21. <view class="item-count acea-row" @click="goDetail(goods)">
  22. <view class="picture">
  23. <image :src="goods.productImage"></image>
  24. </view>
  25. <!-- -->
  26. <view class="product-text">
  27. <view class="h-70">
  28. <view class="name line1 line-heightOne">{{goods.productName}}</view>
  29. <view v-show="goods.isPay===1" class="buy">作者买过</view>
  30. </view>
  31. <view class="product-price">
  32. <view class="price">{{$store.getters.priceUnit}}<text>{{goods.price}}</text></view>
  33. <view class="buy-btn"><view class="line-heightOne">购买</view></view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </scroll-view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. mapGetters
  45. } from "vuex";
  46. import {goProductDetail} from "../../../libs/order";
  47. import BaseTextMore from "./BaseTextMore";
  48. export default {
  49. name: "videoContent",
  50. components: {
  51. BaseTextMore
  52. },
  53. computed: {
  54. ...mapGetters(['userInfo', 'isLogin', 'uid', 'globalData']),
  55. windowWidth() {
  56. const vars = this.$getCssVarStyle();
  57. return vars['--screen-width'] || '100%';
  58. },
  59. },
  60. props: {
  61. list: {
  62. type: Object,
  63. default: function() {
  64. return {};
  65. }
  66. },
  67. noteId: {
  68. type: [String, Number],
  69. default: ''
  70. }
  71. },
  72. mounted() {
  73. },
  74. methods: {
  75. // 去详情页
  76. goDetail(item) {
  77. goProductDetail(item.productId, 0, '');
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .content {
  84. width: 590rpx;
  85. position: absolute;
  86. bottom: 80rpx;
  87. /* justify-content: center; */
  88. padding: 15rpx 0;
  89. flex-direction: column;
  90. justify-content: flex-start;
  91. color: #ffffff;
  92. left: 24rpx;
  93. .time {
  94. font-size: 24rpx;
  95. color: rgba(255, 255, 255, 0.5);
  96. margin-left: 12rpx;
  97. }
  98. .cart {
  99. height: 48rpx;
  100. flex-direction: row;
  101. .cartName {
  102. font-size: 28rpx;
  103. color: #fff;
  104. }
  105. }
  106. }
  107. .product {
  108. display: block;
  109. margin-top: 27rpx;
  110. .product-item {
  111. display: inline-block;
  112. width: 444rpx;
  113. height: 136rpx;
  114. background: rgba(0, 0, 0, .55);
  115. border-radius: 16rpx;
  116. padding: 16rpx 15rpx;
  117. margin-right: 30rpx;
  118. }
  119. ::v-deep uni-swiper,
  120. ::v-deep swiper {
  121. display: block;
  122. width: 500rpx !important;
  123. height: 136rpx !important;
  124. .swiper-count {
  125. display: block;
  126. width: 444rpx !important;
  127. height: 136rpx !important;
  128. background: rgba(0, 0, 0, .55);
  129. border-radius: 12rpx;
  130. padding: 16rpx 15rpx;
  131. }
  132. .swiper-item {
  133. display: block;
  134. }
  135. }
  136. .item-count {
  137. width: 414rpx;
  138. flex-direction: row;
  139. justify-content: space-between;
  140. border-radius: 12rpx;
  141. .picture {
  142. width: 104rpx;
  143. height: 104rpx;
  144. border-radius: 16rpx;
  145. image {
  146. width: 104rpx;
  147. height: 104rpx;
  148. border-radius: 10rpx;
  149. }
  150. }
  151. .product-text {
  152. width: 296rpx;
  153. justify-content: space-between;
  154. .buy {
  155. padding: 4rpx 7rpx;
  156. background: #5D5747;
  157. border-radius: 3px 3px 3px 3px;
  158. font-size: 16rpx;
  159. display: inline-block;
  160. }
  161. .name {
  162. width: 266rpx;
  163. font-size: 26rpx;
  164. }
  165. .product-price {
  166. display: flex;
  167. flex-direction: row;
  168. justify-content: space-between;
  169. align-items: center;
  170. .price {
  171. display: flex;
  172. flex-direction: row;
  173. align-items: flex-end;
  174. font-size: 24rpx;
  175. text {
  176. font-size: 26rpx;
  177. }
  178. }
  179. .buy-btn {
  180. width: 89rpx;
  181. height: 36rpx;
  182. display: flex;
  183. align-items: center;
  184. justify-content: center;
  185. color: #fff;
  186. border-radius: 26rpx;
  187. background: #E93323;
  188. font-size: 20rpx;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. </style>