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