index.vue 18 KB

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