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.
 
 
 
 
 
 

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