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.
 
 
 
 
 
 

886 regels
21 KiB

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