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.
 
 
 
 
 
 

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