hotFloor.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <template>
  2. <view>
  3. <view class="section_hot clearfix" v-for="(page, index) in list" :key="index">
  4. <view class="tui-group-title">
  5. <view class="tui-group-name">{{ page.title }}</view>
  6. <view class="tui-group-doc">{{ page.detail }}</view>
  7. <view class="tui-group-r" @click="NavtoHotPage"></view>
  8. </view>
  9. <template>
  10. <templateL :pageData="page" :userIdentity="userIdentity" :autoplay="autoplay"></templateL>
  11. </template>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import templateL from './template-page/templateL.vue'
  17. export default {
  18. name: 'pageFloor',
  19. components: {
  20. templateL
  21. },
  22. props: {
  23. list: {
  24. type: Array
  25. },
  26. userIdentity: {
  27. type: Number
  28. },
  29. autoplay: {
  30. type: Boolean,
  31. default: true
  32. },
  33. },
  34. data() {
  35. return {
  36. }
  37. },
  38. created() {
  39. },
  40. watch: {
  41. list: {
  42. handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
  43. this.list = el
  44. },
  45. deep: true
  46. }
  47. },
  48. methods: {
  49. NavtoHotPage(){//跳新品橱窗页
  50. this.$api.navigateTo('/pages/goods/good-hot')
  51. },
  52. NavToDetailPage(page) {
  53. //跳转
  54. this.$api.navigateTo(
  55. `/pages/goods/good-floorMore?pageType=${this.pageType}&floorId=${page.id}&title=${
  56. page.title
  57. }`
  58. )
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .section_hot {
  65. width: 100%;
  66. height: 1224rpx;
  67. background: url(https://static.caimei365.com/app/img/hot/hot-bg@1x.png);
  68. background-size: cover;
  69. box-sizing: border-box;
  70. padding: 0 24rpx;
  71. float: left;
  72. border-radius: 16rpx 16rpx 0 0;
  73. margin-top: 20rpx;
  74. }
  75. .tui-group-title {
  76. width: 100%;
  77. display: flex;
  78. justify-content: flex-start;
  79. align-items: center;
  80. height: 100rpx;
  81. box-sizing: border-box;
  82. position: relative;
  83. .tui-group-name {
  84. font-size: $font-size-36;
  85. font-weight: bold;
  86. color: #333333;
  87. }
  88. .tui-group-doc {
  89. height: 100rpx;
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. margin-left: 20rpx;
  94. font-size: $font-size-24;
  95. line-height: 100rpx;
  96. color: #666666;
  97. }
  98. .tui-group-r {
  99. width: 120rpx;
  100. height: 45rpx;
  101. background: url(https://static.caimei365.com/app/img/hot/hot-bt@2x.png);
  102. background-size: cover;
  103. position: absolute;
  104. right: 16rpx;
  105. top: 16px;
  106. }
  107. }
  108. .section_page_main {
  109. width: 100%;
  110. height: auto;
  111. box-sizing: border-box;
  112. .recommend-list {
  113. width: 100%;
  114. height: 1100rpx;
  115. position: relative;
  116. padding-bottom: 20rpx;
  117. .tui-banner-swiper {
  118. width: 100%;
  119. margin: 0 auto;
  120. height: 1100rpx;
  121. overflow: hidden;
  122. transform: translateY(0);
  123. .floor-item {
  124. width: 339rpx;
  125. height: 516rpx;
  126. margin-right: 20rpx;
  127. font-size: $font-size-24;
  128. color: $text-color;
  129. background: #ffffff;
  130. line-height: 36rpx;
  131. border-radius: 16rpx;
  132. margin-bottom: 20rpx;
  133. float: left;
  134. box-sizing: border-box;
  135. position: relative;
  136. &:nth-child(2n) {
  137. margin-right: 0;
  138. }
  139. .item-img {
  140. width: 339rpx;
  141. height: 339rpx;
  142. border-radius: 16rpx 16rpx 0 0;
  143. display: block;
  144. margin-bottom: 8rpx;
  145. }
  146. .floor-item_tag {
  147. width: 100%;
  148. height: 32rpx;
  149. float: left;
  150. margin: 20rpx 0;
  151. padding: 0 20rpx;
  152. box-sizing: border-box;
  153. text {
  154. display: inline-block;
  155. padding: 0 8rpx;
  156. border: 1px solid #e3ebf7;
  157. border-radius: 8rpx;
  158. color: #9aa5b5;
  159. font-size: $font-size-22;
  160. line-height: 32rpx;
  161. text-align: center;
  162. float: left;
  163. }
  164. }
  165. .floor-item-content {
  166. width: 100%;
  167. padding: 0 20rpx;
  168. box-sizing: border-box;
  169. }
  170. .floor-item-act {
  171. display: block;
  172. width: 100%;
  173. height: 32rpx;
  174. text-align: center;
  175. box-sizing: border-box;
  176. }
  177. .title-none {
  178. font-size: $font-size-26;
  179. color: #ff2a2a;
  180. line-height: 54rpx;
  181. }
  182. .title {
  183. width: 100%;
  184. height: 70rpx;
  185. display: flex;
  186. line-height: 35rpx;
  187. flex-direction: column;
  188. margin: 8rpx 0;
  189. padding: 0;
  190. position: relative;
  191. .mclap {
  192. width: 100%;
  193. line-height: 35rpx;
  194. text-overflow: ellipsis;
  195. display: -webkit-box;
  196. word-break: break-all;
  197. -webkit-box-orient: vertical;
  198. -webkit-line-clamp: 2;
  199. overflow: hidden;
  200. font-size: 26rpx;
  201. &.indent {
  202. text-indent: 95rpx;
  203. }
  204. }
  205. .mclap-tag {
  206. display: block;
  207. width: 84rpx;
  208. height: 32rpx;
  209. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  210. border-radius: 4rpx 48rpx 4px 4px;
  211. line-height: 32rpx;
  212. font-size: $font-size-22;
  213. color: #ffffff;
  214. text-align: center;
  215. position: absolute;
  216. left: 0;
  217. top: 0;
  218. }
  219. }
  220. .no-price {
  221. height: 54rpx;
  222. line-height: 54rpx;
  223. display: flex;
  224. box-sizing: border-box;
  225. .p-no {
  226. font-size: $font-size-28;
  227. color: $text-color;
  228. display: block;
  229. float: left;
  230. }
  231. .p-stars {
  232. float: left;
  233. }
  234. }
  235. .price {
  236. color: #ff2a2a;
  237. line-height: 54rpx;
  238. &.none {
  239. text-decoration: line-through;
  240. color: #999999;
  241. }
  242. .sm {
  243. font-size: $font-size-24;
  244. }
  245. .big {
  246. font-size: $font-size-28;
  247. }
  248. }
  249. }
  250. }
  251. }
  252. .swiper__recommenddots-box {
  253. position: absolute;
  254. bottom: 0;
  255. left: 0;
  256. right: 0;
  257. /* #ifndef APP-NVUE */
  258. display: flex;
  259. /* #endif */
  260. flex: 1;
  261. flex-direction: row;
  262. justify-content: center;
  263. align-items: center;
  264. height: 60rpx;
  265. .swiper__dots-item {
  266. width: 8rpx;
  267. height: 8rpx;
  268. border-radius: 100%;
  269. margin-left: 6px;
  270. background-color: #FFFFFF;
  271. }
  272. .swiper__dots-long {
  273. width: 32rpx;
  274. height: 8rpx;
  275. border-radius: 4rpx;
  276. background-color: #FFFFFF;
  277. transition: all 0.4s;
  278. }
  279. }
  280. }
  281. </style>