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.
 
 
 
 
 
 

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