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.
 
 
 
 
 
 

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