hotFloor.vue 5.6 KB

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