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.
 
 
 
 
 
 

793 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. async loadData() {
  234. let that = this;
  235. let login = await this.$api.checkLogin();
  236. if (login) {
  237. //获取广告图
  238. uni.request({
  239. url: that.$unishow + '/ads/index',
  240. success(res) {
  241. let carouselList = res.data.data;
  242. that.titleNViewBackground = carouselList[0].background;
  243. that.swiperLength = carouselList.length;
  244. that.carouselList = carouselList;
  245. }
  246. });
  247. //获取菜单栏
  248. uni.request({
  249. url: that.$unishow + '/category/menu',
  250. success(res) {
  251. that.menu = res.data.data;
  252. }
  253. });
  254. uni.stopPullDownRefresh();
  255. this.getFlash();
  256. this.getProduct();
  257. }
  258. },
  259. // 获取产品列表
  260. async getProduct() {
  261. let login = await this.$api.checkLogin();
  262. if (login) {
  263. let goodsList = await this.$api.request('/product/lists', 'GET', {page:this.page, pagesize:this.pageSize});
  264. if (goodsList) {
  265. if (goodsList.length > 0) {
  266. goodsList.forEach(item=>{
  267. this.goodsList.push(item);
  268. });
  269. this.page++;
  270. } else {
  271. this.$api.msg('没有更多数据');
  272. }
  273. }
  274. }
  275. },
  276. // 获取限时秒杀数据
  277. async getFlash() {
  278. let data = await this.$api.request('/flash/index');
  279. if (data) {
  280. this.flashSale = data;
  281. this.day = data.countdown.day;
  282. this.hour = data.countdown.hour;
  283. this.minute = data.countdown.minute;
  284. this.second = data.countdown.second;
  285. //this.$refs.countd.update();
  286. }
  287. //console.log(this.$refs)
  288. },
  289. //轮播图切换修改背景色
  290. swiperChange(e) {
  291. const index = e.detail.current;
  292. this.swiperCurrent = index;
  293. this.titleNViewBackground = this.carouselList[index].background;
  294. },
  295. // 商品详情页
  296. navToDetailPage(item, flash_id = 0) {
  297. let id = item.product_id;
  298. uni.navigateTo({
  299. url: `/pages/product/product?id=${id}&flash=${flash_id}`
  300. });
  301. },
  302. /**
  303. * 秒杀倒计时为0时再请求一次接口
  304. */
  305. timeup() {
  306. this.getFlash();
  307. },
  308. // 跳转页面
  309. navTo(url){
  310. uni.navigateTo({
  311. url
  312. })
  313. },
  314. // 跳转到商品列表
  315. navToList(fid) {
  316. uni.navigateTo({
  317. url: `/pages/product/list?fid=${fid}&sid=0`
  318. });
  319. }
  320. },
  321. // #ifndef MP
  322. // 标题栏input搜索框点击
  323. onNavigationBarSearchInputClicked: async function(e) {
  324. this.$api.msg('点击了搜索框');
  325. },
  326. //点击导航栏 buttons 时触发
  327. onNavigationBarButtonTap(e) {
  328. const index = e.index;
  329. if (index === 0) {
  330. this.$api.msg('点击了扫描');
  331. } else if (index === 1) {
  332. // #ifdef APP-PLUS
  333. const pages = getCurrentPages();
  334. const page = pages[pages.length - 1];
  335. const currentWebview = page.$getAppWebview();
  336. currentWebview.hideTitleNViewButtonRedDot({
  337. index
  338. });
  339. // #endif
  340. uni.navigateTo({
  341. url: '/pages/notice/notice'
  342. });
  343. }
  344. }
  345. // #endif
  346. };
  347. </script>
  348. <style lang="scss">
  349. /* #ifdef MP */
  350. .mp-search-box {
  351. position: absolute;
  352. left: 0;
  353. top: 30upx;
  354. z-index: 9999;
  355. width: 100%;
  356. padding: 0 80upx;
  357. .ser-input {
  358. flex: 1;
  359. height: 56upx;
  360. line-height: 56upx;
  361. text-align: center;
  362. font-size: 28upx;
  363. color: $font-color-base;
  364. border-radius: 20px;
  365. background: rgba(255, 255, 255, 0.6);
  366. }
  367. }
  368. /* #endif */
  369. page {
  370. .cate-section {
  371. position: relative;
  372. z-index: 5;
  373. border-radius: 16upx 16upx 0 0;
  374. margin-top: -20upx;
  375. }
  376. .carousel-section {
  377. padding: 0;
  378. .titleNview-placing {
  379. padding-top: 0;
  380. height: 0;
  381. }
  382. .carousel {
  383. .carousel-item {
  384. padding: 0;
  385. }
  386. }
  387. .swiper-dots {
  388. left: 45upx;
  389. bottom: 40upx;
  390. }
  391. }
  392. }
  393. page {
  394. background: #f5f5f5;
  395. }
  396. .m-t {
  397. margin-top: 16upx;
  398. }
  399. /* 头部 轮播图 */
  400. .carousel-section {
  401. position: relative;
  402. padding-top: 10px;
  403. .titleNview-placing {
  404. height: var(--status-bar-height);
  405. padding-top: 44px;
  406. box-sizing: content-box;
  407. }
  408. .titleNview-background {
  409. position: absolute;
  410. top: 0;
  411. left: 0;
  412. width: 100%;
  413. height: 426upx;
  414. transition: 0.4s;
  415. }
  416. }
  417. .carousel {
  418. width: 100%;
  419. height: 350upx;
  420. .carousel-item {
  421. width: 100%;
  422. height: 100%;
  423. padding: 0 28upx;
  424. overflow: hidden;
  425. }
  426. image {
  427. width: 100%;
  428. height: 100%;
  429. border-radius: 10upx;
  430. padding: 20rpx;
  431. }
  432. }
  433. .swiper-dots {
  434. display: flex;
  435. position: absolute;
  436. left: 60upx;
  437. bottom: 15upx;
  438. width: 72upx;
  439. height: 36upx;
  440. 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==);
  441. background-size: 100% 100%;
  442. .num {
  443. width: 36upx;
  444. height: 36upx;
  445. border-radius: 50px;
  446. font-size: 24upx;
  447. color: #fff;
  448. text-align: center;
  449. line-height: 36upx;
  450. }
  451. .sign {
  452. position: absolute;
  453. top: 0;
  454. left: 50%;
  455. line-height: 36upx;
  456. font-size: 12upx;
  457. color: #fff;
  458. transform: translateX(-50%);
  459. }
  460. }
  461. /* 分类 */
  462. .cate-section {
  463. display: flex;
  464. justify-content: space-around;
  465. align-items: center;
  466. flex-wrap: wrap;
  467. padding: 30upx 22upx;
  468. background: #fff;
  469. .cate-item {
  470. display: flex;
  471. flex-direction: column;
  472. align-items: center;
  473. font-size: $font-sm + 2upx;
  474. color: $font-color-dark;
  475. }
  476. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  477. image {
  478. width: 88upx;
  479. height: 88upx;
  480. margin-bottom: 14upx;
  481. border-radius: 50%;
  482. opacity: 0.7;
  483. box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  484. }
  485. }
  486. .ad-1 {
  487. width: 100%;
  488. height: 210upx;
  489. padding: 10upx 0;
  490. background: #fff;
  491. image {
  492. width: 100%;
  493. height: 100%;
  494. }
  495. }
  496. /* 秒杀专区 */
  497. .seckill-section {
  498. padding: 4upx 30upx 24upx;
  499. background: #fff;
  500. .s-header {
  501. display: flex;
  502. align-items: center;
  503. height: 92upx;
  504. line-height: 1;
  505. .s-img {
  506. width: 140upx;
  507. height: 30upx;
  508. }
  509. .tip {
  510. font-size: $font-base;
  511. color: $font-color-light;
  512. margin: 0 20upx 0 40upx;
  513. }
  514. .timer {
  515. display: inline-block;
  516. width: 40upx;
  517. height: 36upx;
  518. text-align: center;
  519. line-height: 36upx;
  520. margin-right: 14upx;
  521. font-size: $font-sm + 2upx;
  522. color: #fff;
  523. border-radius: 2px;
  524. background: rgba(0, 0, 0, 0.8);
  525. }
  526. .icon-you {
  527. font-size: $font-lg;
  528. color: $font-color-light;
  529. flex: 1;
  530. text-align: right;
  531. }
  532. }
  533. .floor-list {
  534. white-space: nowrap;
  535. }
  536. .scoll-wrapper {
  537. display: flex;
  538. align-items: flex-start;
  539. }
  540. .floor-item {
  541. width: 150upx;
  542. margin-right: 20upx;
  543. font-size: $font-sm + 2upx;
  544. color: $font-color-dark;
  545. line-height: 1.8;
  546. image {
  547. width: 150upx;
  548. height: 150upx;
  549. border-radius: 6upx;
  550. }
  551. .price {
  552. color: $uni-color-primary;
  553. }
  554. }
  555. }
  556. .f-header {
  557. display: flex;
  558. align-items: center;
  559. height: 140upx;
  560. padding: 6upx 30upx 8upx;
  561. background: #fff;
  562. image {
  563. flex-shrink: 0;
  564. width: 80upx;
  565. height: 80upx;
  566. margin-right: 20upx;
  567. }
  568. .tit-box {
  569. flex: 1;
  570. display: flex;
  571. flex-direction: column;
  572. }
  573. .tit {
  574. font-size: $font-lg + 2upx;
  575. color: #font-color-dark;
  576. line-height: 1.3;
  577. }
  578. .tit2 {
  579. font-size: $font-sm;
  580. color: $font-color-light;
  581. }
  582. .icon-you {
  583. font-size: $font-lg + 2upx;
  584. color: $font-color-light;
  585. }
  586. }
  587. /* 团购楼层 */
  588. .group-section {
  589. background: #fff;
  590. .g-swiper {
  591. height: 650upx;
  592. padding-bottom: 30upx;
  593. }
  594. .g-swiper-item {
  595. width: 100%;
  596. padding: 0 30upx;
  597. display: flex;
  598. }
  599. image {
  600. width: 100%;
  601. height: 460upx;
  602. border-radius: 4px;
  603. }
  604. .g-item {
  605. display: flex;
  606. flex-direction: column;
  607. overflow: hidden;
  608. }
  609. .left {
  610. flex: 1.2;
  611. margin-right: 24upx;
  612. .t-box {
  613. padding-top: 20upx;
  614. }
  615. }
  616. .right {
  617. flex: 0.8;
  618. flex-direction: column-reverse;
  619. .t-box {
  620. padding-bottom: 20upx;
  621. }
  622. }
  623. .t-box {
  624. height: 160upx;
  625. font-size: $font-base + 2upx;
  626. color: $font-color-dark;
  627. line-height: 1.6;
  628. }
  629. .price {
  630. color: $uni-color-primary;
  631. }
  632. .m-price {
  633. font-size: $font-sm + 2upx;
  634. text-decoration: line-through;
  635. color: $font-color-light;
  636. margin-left: 8upx;
  637. }
  638. .pro-box {
  639. display: flex;
  640. align-items: center;
  641. margin-top: 10upx;
  642. font-size: $font-sm;
  643. color: $font-base;
  644. padding-right: 10upx;
  645. }
  646. .progress-box {
  647. flex: 1;
  648. border-radius: 10px;
  649. overflow: hidden;
  650. margin-right: 8upx;
  651. }
  652. }
  653. /* 分类推荐楼层 */
  654. .hot-floor {
  655. width: 100%;
  656. overflow: hidden;
  657. margin-bottom: 20upx;
  658. .floor-img-box {
  659. width: 100%;
  660. height: 320upx;
  661. position: relative;
  662. &:after {
  663. content: '';
  664. position: absolute;
  665. left: 0;
  666. top: 0;
  667. width: 100%;
  668. height: 100%;
  669. background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
  670. }
  671. }
  672. .floor-img {
  673. width: 100%;
  674. height: 100%;
  675. }
  676. .floor-list {
  677. white-space: nowrap;
  678. padding: 20upx;
  679. padding-right: 50upx;
  680. border-radius: 6upx;
  681. margin-top: -140upx;
  682. margin-left: 30upx;
  683. background: #fff;
  684. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  685. position: relative;
  686. z-index: 1;
  687. }
  688. .scoll-wrapper {
  689. display: flex;
  690. align-items: flex-start;
  691. }
  692. .floor-item {
  693. width: 180upx;
  694. margin-right: 20upx;
  695. font-size: $font-sm + 2upx;
  696. color: $font-color-dark;
  697. line-height: 1.8;
  698. image {
  699. width: 180upx;
  700. height: 180upx;
  701. border-radius: 6upx;
  702. }
  703. .price {
  704. color: $uni-color-primary;
  705. }
  706. }
  707. .more {
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. flex-direction: column;
  712. flex-shrink: 0;
  713. width: 180upx;
  714. height: 180upx;
  715. border-radius: 6upx;
  716. background: #f3f3f3;
  717. font-size: $font-base;
  718. color: $font-color-light;
  719. text:first-child {
  720. margin-bottom: 4upx;
  721. }
  722. }
  723. }
  724. /* 猜你喜欢 */
  725. .guess-section {
  726. display: flex;
  727. flex-wrap: wrap;
  728. padding: 0 30upx;
  729. background: #fff;
  730. .guess-item {
  731. display: flex;
  732. flex-direction: column;
  733. width: 48%;
  734. padding-bottom: 40upx;
  735. &:nth-child(2n + 1) {
  736. margin-right: 4%;
  737. }
  738. }
  739. .image-wrapper {
  740. width: 100%;
  741. height: 330upx;
  742. border-radius: 3px;
  743. overflow: hidden;
  744. image {
  745. width: 100%;
  746. height: 100%;
  747. opacity: 1;
  748. }
  749. }
  750. .title {
  751. font-size: $font-lg;
  752. color: $font-color-dark;
  753. line-height: 80upx;
  754. }
  755. .price {
  756. font-size: $font-lg;
  757. color: $uni-color-primary;
  758. line-height: 1;
  759. .sales{
  760. color: #999999;
  761. font-size: 24upx;
  762. }
  763. .symbol{
  764. font-size: 24upx;
  765. }
  766. }
  767. }
  768. </style>