hotFloor.vue 5.6 KB

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