You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

888 lines
21 KiB

  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <!-- #ifdef MP -->
  5. <!-- <view class="mp-search-box"><input class="ser-input" type="text" value="输入关键字搜索" disabled /></view> -->
  6. <!-- #endif -->
  7. <!-- 头部轮播 -->
  8. <view class="carousel-section">
  9. <!-- 标题栏和状态栏占位符 -->
  10. <view class="titleNview-placing"></view>
  11. <!-- 背景色区域 -->
  12. <view class="titleNview-background" :style="{ backgroundColor: titleNViewBackground }"></view>
  13. <swiper class="carousel" circular @change="swiperChange">
  14. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="navToDetailPage({ product_id: item.product_id })">
  15. <image mode="aspectFill" :src="item.image" />
  16. </swiper-item>
  17. </swiper>
  18. <!-- 自定义swiper指示器 -->
  19. <view class="swiper-dots">
  20. <text class="num">{{ swiperCurrent + 1 }}</text>
  21. <text class="sign">/</text>
  22. <text class="num">{{ swiperLength }}</text>
  23. </view>
  24. </view>
  25. <!-- 分类 -->
  26. <view class="cate-section">
  27. <view class="cate-item" v-for="(item, index) in menu" :key="index" @click="navToList(item.id)">
  28. <image :src="item.image"></image>
  29. <text>{{item.name}}</text>
  30. </view>
  31. </view>
  32. <!-- 秒杀楼层 -->
  33. <view class="seckill-section m-t" v-if="flashSale && flashSale.product.length > 0">
  34. <view class="s-header" @click="navTo('/pages/flash/list')">
  35. <text class="miaosha">Promotion</text>
  36. <!-- <text class="tip">{{(new Date(flashSale.starttime*1000)).getHours()}}点场</text> -->
  37. <text class="tip" v-if="flashSale.countdown">下一场倒计时</text>
  38. <text class="tip" v-else>{{flashSale.title}}</text>
  39. <uni-countdown ref="countd" v-if="flashSale.countdown" @timeup="timeup" :show-day="flashSale.countdown.day ? true : false"
  40. :day="day" :hour="hour" :minute="minute" :second="second" color="#FFFFFF" background-color="#00B26A" border-color="#00B26A"></uni-countdown>
  41. <text class="yticon icon-you"></text>
  42. </view>
  43. <view class="floor-list-whitelist">
  44. <view v-for="(item, index) in flashSale.product" :key="index" class="floor-item" @click="navToDetailPage({ product_id: item.flash_product_id }, flashSale.flash_id)">
  45. <view style="width:100%;text-align: center;">
  46. <image :src="item.image" mode="aspectFill"></image>
  47. </view>
  48. <text class="title clamp">{{item.title }}</text>
  49. <text class="price">¥{{item.sales_price }}</text>
  50. </view>
  51. </view>
  52. <!-- <scroll-view class="floor-list" scroll-x>
  53. <view class="scoll-wrapper">
  54. <view v-for="(item, index) in flashSale.product" :key="index" class="floor-item" @click="navToDetailPage({ product_id: item.flash_product_id }, flashSale.flash_id)">
  55. <image :src="item.image" mode="aspectFill"></image>
  56. <text class="title clamp">{{item.title }}</text>
  57. <text class="price">¥{{item.sales_price }}</text>
  58. </view>
  59. </view>
  60. </scroll-view> -->
  61. </view>
  62. <!-- 团购楼层 -->
  63. <!-- <view class="f-header m-t">
  64. <image src="/static/temp/h1.png"></image>
  65. <view class="tit-box">
  66. <text class="tit">精品团购</text>
  67. <text class="tit2">Boutique Group Buying</text>
  68. </view>
  69. <text class="yticon icon-you"></text>
  70. </view> -->
  71. <!-- <view class="group-section">
  72. <swiper class="g-swiper" :duration="500">
  73. <swiper-item class="g-swiper-item" v-for="(item, index) in goodsList" :key="index" v-if="index % 2 === 0" @click="navToDetailPage(item)">
  74. <view class="g-item left">
  75. <image :src="item.image" mode="aspectFill"></image>
  76. <view class="t-box">
  77. <text class="title clamp">{{ item.title }}</text>
  78. <view class="price-box">
  79. <text class="price">¥{{ item.price }}</text>
  80. <text class="m-price">¥188</text>
  81. </view>
  82. <view class="pro-box">
  83. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  84. <text>6人成团</text>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="g-item right">
  89. <image :src="goodsList[index + 1].image" mode="aspectFill"></image>
  90. <view class="t-box">
  91. <text class="title clamp">{{ goodsList[index + 1].title }}</text>
  92. <view class="price-box">
  93. <text class="price">¥{{ goodsList[index + 1].price }}</text>
  94. <text class="m-price">¥188</text>
  95. </view>
  96. <view class="pro-box">
  97. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  98. <text>10人成团</text>
  99. </view>
  100. </view>
  101. </view>
  102. </swiper-item>
  103. </swiper>
  104. </view> -->
  105. <!-- 分类推荐楼层 -->
  106. <!-- <view class="f-header m-t">
  107. <image src="/static/temp/h1.png"></image>
  108. <view class="tit-box">
  109. <text class="tit">分类精选</text>
  110. <text class="tit2">Competitive Products For You</text>
  111. </view>
  112. <text class="yticon icon-you"></text>
  113. </view> -->
  114. <!-- <view class="hot-floor">
  115. <view class="floor-img-box">
  116. <image
  117. class="floor-img"
  118. src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553409398864&di=4a12763adccf229133fb85193b7cc08f&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201703%2F19%2F20170319150032_MNwmn.jpeg"
  119. mode="scaleToFill"
  120. ></image>
  121. </view>
  122. <scroll-view class="floor-list" scroll-x>
  123. <view class="scoll-wrapper">
  124. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  125. <image :src="item.image" mode="aspectFill"></image>
  126. <text class="title clamp">{{ item.title }}</text>
  127. <text class="price">¥{{ item.price }}</text>
  128. </view>
  129. <view class="more">
  130. <text>查看全部</text>
  131. <text>More+</text>
  132. </view>
  133. </view>
  134. </scroll-view>
  135. </view> -->
  136. <!-- <view class="hot-floor">
  137. <view class="floor-img-box">
  138. <image
  139. class="floor-img"
  140. src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553409984228&di=dee176242038c2d545b7690b303d65ea&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F5ef4da9f17faaf4612f0d5046f4161e556e9bbcfdb5b-rHjf00_fw658"
  141. mode="scaleToFill"
  142. ></image>
  143. </view>
  144. <scroll-view class="floor-list" scroll-x>
  145. <view class="scoll-wrapper">
  146. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  147. <image :src="item.image3" mode="aspectFill"></image>
  148. <text class="title clamp">{{ item.title }}</text>
  149. <text class="price">¥{{ item.price }}</text>
  150. </view>
  151. <view class="more">
  152. <text>查看全部</text>
  153. <text>More+</text>
  154. </view>
  155. </view>
  156. </scroll-view>
  157. </view> -->
  158. <!-- <view class="hot-floor">
  159. <view class="floor-img-box">
  160. <image
  161. class="floor-img"
  162. src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553409794730&di=12b840ec4f5748ef06880b85ff63e34e&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01dc03589ed568a8012060c82ac03c.jpg%40900w_1l_2o_100sh.jpg"
  163. mode="scaleToFill"
  164. ></image>
  165. </view>
  166. <scroll-view class="floor-list" scroll-x>
  167. <view class="scoll-wrapper">
  168. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  169. <image :src="item.image2" mode="aspectFill"></image>
  170. <text class="title clamp">{{ item.title }}</text>
  171. <text class="price">¥{{ item.price }}</text>
  172. </view>
  173. <view class="more">
  174. <text>查看全部</text>
  175. <text>More+</text>
  176. </view>
  177. </view>
  178. </scroll-view>
  179. </view> -->
  180. <!-- 猜你喜欢 -->
  181. <!-- <view class="f-header m-t">
  182. <image src="/static/temp/h1.png"></image>
  183. <view class="tit-box">
  184. <text class="tit">猜你喜欢</text>
  185. <text class="tit2">Guess You Like It</text>
  186. </view>
  187. <text class="yticon icon-you"></text>
  188. </view>
  189. <view class="guess-section">
  190. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  191. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  192. <text class="title clamp">{{ item.title }}</text>
  193. <text class="price"><text class="symbol">¥</text> {{ item.sales_price }} <text class="sales"> {{' '+item.sales}}人付款</text></text>
  194. </view>
  195. </view> -->
  196. </view>
  197. </template>
  198. <script>
  199. var _self = this;
  200. import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
  201. export default {
  202. components: {
  203. uniCountdown
  204. },
  205. data() {
  206. return {
  207. titleNViewBackground: '',
  208. swiperCurrent: 0,
  209. swiperLength: 0,
  210. carouselList: [],
  211. goodsList: [],
  212. menu: [],
  213. flashSale: '',
  214. page: 1,
  215. pageSize: 16,
  216. day: 0,
  217. hour: 0,
  218. minute: 0,
  219. second: 0
  220. };
  221. },
  222. computed: {
  223. },
  224. onLoad() {
  225. this.loadData();
  226. },
  227. onShow() {
  228. // this.loadData();
  229. },
  230. onReachBottom() {
  231. this.getProduct();
  232. },
  233. onPullDownRefresh() {
  234. if (this.$refs && this.$refs.countd) {
  235. this.$refs.countd.syncFlag = false;
  236. }
  237. this.goodsList = [];
  238. this.page = 1;
  239. this.loadData();
  240. },
  241. onShareAppMessage(e) {
  242. },
  243. methods: {
  244. /**
  245. * 请求静态数据只是为了代码不那么乱
  246. * 分次请求未作整合
  247. */
  248. async loadData() {
  249. let that = this;
  250. let login = await this.$api.checkLogin();
  251. if (login) {
  252. //获取广告图
  253. that.$api.request('/ads/index', 'GET').then((res) => {
  254. console.log(res)
  255. let carouselList = res;
  256. that.titleNViewBackground = carouselList[0].background;
  257. that.swiperLength = carouselList.length;
  258. that.carouselList = carouselList;
  259. });
  260. //获取菜单栏
  261. // uni.request({
  262. // url: that.$unishow + '/category/menu',
  263. // success(res) {
  264. // that.menu = res.data.data;
  265. // }
  266. // });
  267. uni.stopPullDownRefresh();
  268. this.getFlash();
  269. this.getProduct();
  270. }
  271. },
  272. // 获取产品列表
  273. async getProduct() {
  274. let login = await this.$api.checkLogin();
  275. if (login) {
  276. let goodsList = await this.$api.request('/product/lists', 'GET', {
  277. page: this.page,
  278. pagesize: this.pageSize
  279. });
  280. if (goodsList) {
  281. if (goodsList.length > 0) {
  282. goodsList.forEach(item => {
  283. this.goodsList.push(item);
  284. });
  285. this.page++;
  286. } else {
  287. // this.$api.msg('没有更多数据');
  288. }
  289. }
  290. }
  291. },
  292. // 获取限时秒杀数据
  293. async getFlash() {
  294. let data = await this.$api.request('/flash/index');
  295. if (data) {
  296. this.flashSale = data;
  297. this.day = data.countdown.day;
  298. this.hour = data.countdown.hour;
  299. this.minute = data.countdown.minute;
  300. this.second = data.countdown.second;
  301. //this.$refs.countd.update();
  302. }
  303. //console.log(this.$refs)
  304. },
  305. //轮播图切换修改背景色
  306. swiperChange(e) {
  307. const index = e.detail.current;
  308. this.swiperCurrent = index;
  309. this.titleNViewBackground = this.carouselList[index].background;
  310. },
  311. // 商品详情页
  312. navToDetailPage(item, flash_id = 0) {
  313. let id = item.product_id;
  314. uni.navigateTo({
  315. url: `/pages/product/product?id=${id}&flash=${flash_id}`
  316. });
  317. },
  318. /**
  319. * 秒杀倒计时为0时再请求一次接口
  320. */
  321. timeup() {
  322. this.getFlash();
  323. },
  324. // 跳转页面
  325. navTo(url) {
  326. uni.navigateTo({
  327. url
  328. })
  329. },
  330. // 跳转到商品列表
  331. navToList(fid) {
  332. uni.navigateTo({
  333. url: `/pages/product/list?fid=${fid}&sid=0`
  334. });
  335. }
  336. },
  337. // #ifndef MP
  338. // 标题栏input搜索框点击
  339. onNavigationBarSearchInputClicked: async function(e) {
  340. this.$api.msg('点击了搜索框');
  341. },
  342. //点击导航栏 buttons 时触发
  343. onNavigationBarButtonTap(e) {
  344. const index = e.index;
  345. if (index === 0) {
  346. this.$api.msg('点击了扫描');
  347. } else if (index === 1) {
  348. // #ifdef APP-PLUS
  349. const pages = getCurrentPages();
  350. const page = pages[pages.length - 1];
  351. const currentWebview = page.$getAppWebview();
  352. currentWebview.hideTitleNViewButtonRedDot({
  353. index
  354. });
  355. // #endif
  356. uni.navigateTo({
  357. url: '/pages/notice/notice'
  358. });
  359. }
  360. }
  361. // #endif
  362. };
  363. </script>
  364. <style lang="scss">
  365. /* #ifdef MP */
  366. .mp-search-box {
  367. position: absolute;
  368. left: 0;
  369. top: 30upx;
  370. z-index: 9999;
  371. width: 100%;
  372. padding: 0 80upx;
  373. .ser-input {
  374. flex: 1;
  375. height: 56upx;
  376. line-height: 56upx;
  377. text-align: center;
  378. font-size: 28upx;
  379. color: $font-color-base;
  380. border-radius: 20px;
  381. background: rgba(255, 255, 255, 0.6);
  382. }
  383. }
  384. /* #endif */
  385. page {
  386. .cate-section {
  387. position: relative;
  388. z-index: 5;
  389. border-radius: 16upx 16upx 0 0;
  390. margin-top: 20upx;
  391. }
  392. .carousel-section {
  393. padding: 0;
  394. .titleNview-placing {
  395. padding-top: 0;
  396. height: 0;
  397. }
  398. .carousel {
  399. .carousel-item {
  400. padding: 0;
  401. }
  402. }
  403. .swiper-dots {
  404. left: 45upx;
  405. bottom: 40upx;
  406. }
  407. }
  408. }
  409. page {
  410. background: #f5f5f5;
  411. }
  412. .m-t {
  413. margin-top: 16upx;
  414. }
  415. /* 头部 轮播图 */
  416. .carousel-section {
  417. position: relative;
  418. padding-top: 10px;
  419. .titleNview-placing {
  420. height: var(--status-bar-height);
  421. padding-top: 44px;
  422. box-sizing: content-box;
  423. }
  424. .titleNview-background {
  425. position: absolute;
  426. top: 0;
  427. left: 0;
  428. width: 100%;
  429. height: 426upx;
  430. transition: 0.4s;
  431. }
  432. }
  433. .carousel {
  434. width: 100%;
  435. height: 350upx;
  436. .carousel-item {
  437. width: 100%;
  438. height: 100%;
  439. padding: 0 28upx;
  440. overflow: hidden;
  441. }
  442. image {
  443. width: 100%;
  444. height: 100%;
  445. border-radius: 10upx;
  446. padding: 20rpx;
  447. }
  448. }
  449. .swiper-dots {
  450. display: flex;
  451. position: absolute;
  452. left: 60upx;
  453. bottom: 15upx;
  454. width: 72upx;
  455. height: 36upx;
  456. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  457. background-size: 100% 100%;
  458. .num {
  459. width: 36upx;
  460. height: 36upx;
  461. border-radius: 50px;
  462. font-size: 24upx;
  463. color: #fff;
  464. text-align: center;
  465. line-height: 36upx;
  466. }
  467. .sign {
  468. position: absolute;
  469. top: 0;
  470. left: 50%;
  471. line-height: 36upx;
  472. font-size: 12upx;
  473. color: #fff;
  474. transform: translateX(-50%);
  475. }
  476. }
  477. /* 分类 */
  478. .cate-section {
  479. display: flex;
  480. justify-content: space-around;
  481. align-items: center;
  482. flex-wrap: wrap;
  483. padding: 30upx 22upx;
  484. background: #fff;
  485. .cate-item {
  486. display: flex;
  487. flex-direction: column;
  488. align-items: center;
  489. font-size: $font-sm + 2upx;
  490. color: $font-color-dark;
  491. }
  492. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  493. image {
  494. width: 88upx;
  495. height: 88upx;
  496. margin-bottom: 14upx;
  497. border-radius: 50%;
  498. opacity: 0.7;
  499. box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  500. }
  501. }
  502. .ad-1 {
  503. width: 100%;
  504. height: 210upx;
  505. padding: 10upx 0;
  506. background: #fff;
  507. image {
  508. width: 100%;
  509. height: 100%;
  510. }
  511. }
  512. /* 秒杀专区 */
  513. .seckill-section {
  514. padding: 4upx 30upx 24upx;
  515. background: #fff;
  516. .miaosha {
  517. font-size: 35rpx;
  518. font-weight: 1000;
  519. color: $uni-color-primary;
  520. ;
  521. }
  522. .s-header {
  523. display: flex;
  524. align-items: center;
  525. height: 92upx;
  526. line-height: 1;
  527. .s-img {
  528. width: 140upx;
  529. height: 30upx;
  530. }
  531. .tip {
  532. font-size: $font-base;
  533. color: $font-color-light;
  534. margin: 0 20upx 0 40upx;
  535. }
  536. .timer {
  537. display: inline-block;
  538. width: 40upx;
  539. height: 36upx;
  540. text-align: center;
  541. line-height: 36upx;
  542. margin-right: 14upx;
  543. font-size: $font-sm + 2upx;
  544. color: #fff;
  545. border-radius: 2px;
  546. background: rgba(0, 0, 0, 0.8);
  547. }
  548. .icon-you {
  549. font-size: $font-lg;
  550. color: $font-color-light;
  551. flex: 1;
  552. text-align: right;
  553. }
  554. }
  555. .floor-list-whitelist {
  556. display: flex;
  557. // justify-content: space-between;
  558. flex-direction: row;
  559. flex-wrap: wrap;
  560. }
  561. .floor-list {
  562. white-space: nowrap;
  563. }
  564. .scoll-wrapper {
  565. display: flex;
  566. align-items: flex-start;
  567. }
  568. .floor-item {
  569. width: calc(100%/3);
  570. padding-right: 20upx;
  571. margin-top: 20upx;
  572. font-size: $font-sm + 2upx;
  573. color: $font-color-dark;
  574. line-height: 1.8;
  575. image {
  576. width: 150upx;
  577. height: 150upx;
  578. border-radius: 6upx;
  579. }
  580. .price {
  581. color: $uni-color-primary;
  582. }
  583. }
  584. }
  585. .f-header {
  586. display: flex;
  587. align-items: center;
  588. height: 140upx;
  589. padding: 6upx 30upx 8upx;
  590. background: #fff;
  591. image {
  592. flex-shrink: 0;
  593. width: 80upx;
  594. height: 80upx;
  595. margin-right: 20upx;
  596. }
  597. .tit-box {
  598. flex: 1;
  599. display: flex;
  600. flex-direction: column;
  601. }
  602. .tit {
  603. font-size: $font-lg + 2upx;
  604. color: #font-color-dark;
  605. line-height: 1.3;
  606. }
  607. .tit2 {
  608. font-size: $font-sm;
  609. color: $font-color-light;
  610. }
  611. .icon-you {
  612. font-size: $font-lg + 2upx;
  613. color: $font-color-light;
  614. }
  615. }
  616. /* 团购楼层 */
  617. .group-section {
  618. background: #fff;
  619. .g-swiper {
  620. height: 650upx;
  621. padding-bottom: 30upx;
  622. }
  623. .g-swiper-item {
  624. width: 100%;
  625. padding: 0 30upx;
  626. display: flex;
  627. }
  628. image {
  629. width: 100%;
  630. height: 460upx;
  631. border-radius: 4px;
  632. }
  633. .g-item {
  634. display: flex;
  635. flex-direction: column;
  636. overflow: hidden;
  637. }
  638. .left {
  639. flex: 1.2;
  640. margin-right: 24upx;
  641. .t-box {
  642. padding-top: 20upx;
  643. }
  644. }
  645. .right {
  646. flex: 0.8;
  647. flex-direction: column-reverse;
  648. .t-box {
  649. padding-bottom: 20upx;
  650. }
  651. }
  652. .t-box {
  653. height: 160upx;
  654. font-size: $font-base + 2upx;
  655. color: $font-color-dark;
  656. line-height: 1.6;
  657. }
  658. .price {
  659. color: $uni-color-primary;
  660. }
  661. .m-price {
  662. font-size: $font-sm + 2upx;
  663. text-decoration: line-through;
  664. color: $font-color-light;
  665. margin-left: 8upx;
  666. }
  667. .pro-box {
  668. display: flex;
  669. align-items: center;
  670. margin-top: 10upx;
  671. font-size: $font-sm;
  672. color: $font-base;
  673. padding-right: 10upx;
  674. }
  675. .progress-box {
  676. flex: 1;
  677. border-radius: 10px;
  678. overflow: hidden;
  679. margin-right: 8upx;
  680. }
  681. }
  682. /* 分类推荐楼层 */
  683. .hot-floor {
  684. width: 100%;
  685. overflow: hidden;
  686. margin-bottom: 20upx;
  687. .floor-img-box {
  688. width: 100%;
  689. height: 320upx;
  690. position: relative;
  691. &:after {
  692. content: '';
  693. position: absolute;
  694. left: 0;
  695. top: 0;
  696. width: 100%;
  697. height: 100%;
  698. background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
  699. }
  700. }
  701. .floor-img {
  702. width: 100%;
  703. height: 100%;
  704. }
  705. .floor-list {
  706. white-space: nowrap;
  707. padding: 20upx;
  708. padding-right: 50upx;
  709. border-radius: 6upx;
  710. margin-top: -140upx;
  711. margin-left: 30upx;
  712. background: #fff;
  713. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  714. position: relative;
  715. z-index: 1;
  716. }
  717. .scoll-wrapper {
  718. display: flex;
  719. align-items: flex-start;
  720. }
  721. .floor-item {
  722. margin-right: 20upx;
  723. font-size: $font-sm + 2upx;
  724. color: $font-color-dark;
  725. line-height: 1.8;
  726. image {
  727. width: 180upx;
  728. height: 180upx;
  729. border-radius: 6upx;
  730. }
  731. .price {
  732. color: $uni-color-primary;
  733. }
  734. }
  735. .more {
  736. display: flex;
  737. align-items: center;
  738. justify-content: center;
  739. flex-direction: column;
  740. flex-shrink: 0;
  741. width: 180upx;
  742. height: 180upx;
  743. border-radius: 6upx;
  744. background: #f3f3f3;
  745. font-size: $font-base;
  746. color: $font-color-light;
  747. text:first-child {
  748. margin-bottom: 4upx;
  749. }
  750. }
  751. }
  752. /* 猜你喜欢 */
  753. .guess-section {
  754. display: flex;
  755. flex-wrap: wrap;
  756. padding: 0 30upx;
  757. background: #fff;
  758. .guess-item {
  759. display: flex;
  760. flex-direction: column;
  761. width: 48%;
  762. padding-bottom: 40upx;
  763. &:nth-child(2n + 1) {
  764. margin-right: 4%;
  765. }
  766. }
  767. .image-wrapper {
  768. width: 100%;
  769. height: 330upx;
  770. border-radius: 3px;
  771. overflow: hidden;
  772. image {
  773. width: 100%;
  774. height: 100%;
  775. opacity: 1;
  776. }
  777. }
  778. .title {
  779. font-size: 12px;
  780. color: $font-color-dark;
  781. line-height: 80upx;
  782. }
  783. .price {
  784. font-size: $font-lg;
  785. color: $uni-color-primary;
  786. line-height: 1;
  787. .sales {
  788. color: #999999;
  789. font-size: 24upx;
  790. }
  791. .symbol {
  792. font-size: 24upx;
  793. }
  794. }
  795. }
  796. </style>