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.
 
 
 
 
 
 

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