hotFloor.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. border-radius: 50rpx 50rpx 0 0;
  79. }
  80. .tui-group-name {
  81. width: 100%;
  82. height: 165rpx;
  83. box-sizing: border-box;
  84. padding: 40rpx 0 20rpx 0;
  85. position: relative;
  86. border-radius: 16rpx 16rpx 0 0;
  87. .tui-group-r {
  88. width: 144rpx;
  89. height: 54rpx;
  90. background: url(https://static.caimei365.com/app/img/hot/hot-bt@2x.png);
  91. background-size: cover;
  92. position: absolute;
  93. right: 16rpx;
  94. top: 69rpx;
  95. }
  96. }
  97. .tui-group-title {
  98. width: 100%;
  99. height: 50rpx;
  100. line-height: 50rpx;
  101. float: left;
  102. .tui-group-l {
  103. float: left;
  104. font-size: 38rpx;
  105. font-weight: bold;
  106. text-align: left;
  107. color: #ffffff;
  108. }
  109. }
  110. .tui-sub__desc {
  111. width: 100%;
  112. float: left;
  113. line-height: 50rpx;
  114. color: #ffffff;
  115. font-size: $font-size-28;
  116. }
  117. .section_page_main {
  118. width: 100%;
  119. height: auto;
  120. box-sizing: border-box;
  121. .recommend-list {
  122. width: 100%;
  123. height: 1100rpx;
  124. position: relative;
  125. padding-bottom: 20rpx;
  126. .tui-banner-swiper {
  127. width: 100%;
  128. margin: 0 auto;
  129. height: 1100rpx;
  130. overflow: hidden;
  131. transform: translateY(0);
  132. .floor-item {
  133. width: 339rpx;
  134. height: 516rpx;
  135. margin-right: 20rpx;
  136. font-size: $font-size-24;
  137. color: $text-color;
  138. background: #ffffff;
  139. line-height: 36rpx;
  140. border-radius: 16rpx;
  141. margin-bottom: 20rpx;
  142. float: left;
  143. box-sizing: border-box;
  144. position: relative;
  145. &:nth-child(2n) {
  146. margin-right: 0;
  147. }
  148. .item-img {
  149. width: 339rpx;
  150. height: 339rpx;
  151. border-radius: 16rpx 16rpx 0 0;
  152. display: block;
  153. margin-bottom: 8rpx;
  154. }
  155. .floor-item_tag {
  156. width: 100%;
  157. height: 32rpx;
  158. float: left;
  159. margin: 20rpx 0;
  160. padding: 0 20rpx;
  161. box-sizing: border-box;
  162. text {
  163. display: inline-block;
  164. padding: 0 8rpx;
  165. border: 1px solid #e3ebf7;
  166. border-radius: 8rpx;
  167. color: #9aa5b5;
  168. font-size: $font-size-22;
  169. line-height: 32rpx;
  170. text-align: center;
  171. float: left;
  172. }
  173. }
  174. .floor-item-content {
  175. width: 100%;
  176. padding: 0 20rpx;
  177. box-sizing: border-box;
  178. }
  179. .floor-item-act {
  180. display: block;
  181. width: 100%;
  182. height: 32rpx;
  183. text-align: center;
  184. box-sizing: border-box;
  185. }
  186. .title-none {
  187. font-size: $font-size-26;
  188. color: #ff2a2a;
  189. line-height: 54rpx;
  190. }
  191. .title {
  192. width: 100%;
  193. height: 70rpx;
  194. display: flex;
  195. line-height: 35rpx;
  196. flex-direction: column;
  197. margin: 8rpx 0;
  198. padding: 0;
  199. position: relative;
  200. .mclap {
  201. width: 100%;
  202. line-height: 35rpx;
  203. text-overflow: ellipsis;
  204. display: -webkit-box;
  205. word-break: break-all;
  206. -webkit-box-orient: vertical;
  207. -webkit-line-clamp: 2;
  208. overflow: hidden;
  209. font-size: 26rpx;
  210. &.indent {
  211. text-indent: 95rpx;
  212. }
  213. }
  214. .mclap-tag {
  215. display: block;
  216. width: 84rpx;
  217. height: 32rpx;
  218. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  219. border-radius: 4rpx 48rpx 4px 4px;
  220. line-height: 32rpx;
  221. font-size: $font-size-22;
  222. color: #ffffff;
  223. text-align: center;
  224. position: absolute;
  225. left: 0;
  226. top: 0;
  227. }
  228. }
  229. .no-price {
  230. height: 54rpx;
  231. line-height: 54rpx;
  232. display: flex;
  233. box-sizing: border-box;
  234. .p-no {
  235. font-size: $font-size-28;
  236. color: $text-color;
  237. display: block;
  238. float: left;
  239. }
  240. .p-stars {
  241. float: left;
  242. }
  243. }
  244. .price {
  245. color: #ff2a2a;
  246. line-height: 54rpx;
  247. &.none {
  248. text-decoration: line-through;
  249. color: #999999;
  250. }
  251. .sm {
  252. font-size: $font-size-24;
  253. }
  254. .big {
  255. font-size: $font-size-28;
  256. }
  257. }
  258. }
  259. }
  260. }
  261. .swiper__recommenddots-box {
  262. position: absolute;
  263. bottom: 0;
  264. left: 0;
  265. right: 0;
  266. /* #ifndef APP-NVUE */
  267. display: flex;
  268. /* #endif */
  269. flex: 1;
  270. flex-direction: row;
  271. justify-content: center;
  272. align-items: center;
  273. height: 60rpx;
  274. .swiper__dots-item {
  275. width: 8rpx;
  276. height: 8rpx;
  277. border-radius: 100%;
  278. margin-left: 6px;
  279. background-color: #FFFFFF;
  280. }
  281. .swiper__dots-long {
  282. width: 32rpx;
  283. height: 8rpx;
  284. border-radius: 4rpx;
  285. background-color: #FFFFFF;
  286. transition: all 0.4s;
  287. }
  288. }
  289. }
  290. </style>