index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  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. <view class="nav_list">
  26. <view class="mery" v-for="(item, index) in navList" :key="index" @click="navTo(item.url,item.name)">
  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. /**
  182. * 秒杀倒计时为0时再请求一次接口
  183. */
  184. timeup() {
  185. this.getFlash();
  186. },
  187. // 跳转页面
  188. navTo(url,name){
  189. if(name == '积分商城'){
  190. uni.switchTab({
  191. url:'/pages/intergalShop/index'
  192. })
  193. }else if(name == '酱本之源'){
  194. uni.navigateTo({
  195. url:'/pages/article/index'
  196. })
  197. }
  198. else{
  199. this.$api.msg('功能暂未开放');
  200. // uni.navigateTo({
  201. // url
  202. // })
  203. }
  204. },
  205. // 跳转到商品列表
  206. navToList(fid) {
  207. uni.navigateTo({
  208. url: `/pages/product/list?fid=${fid}&sid=0`
  209. });
  210. },
  211. capture() {
  212. var pages = getCurrentPages();
  213. var page = pages[pages.length - 1]; ;
  214. var bitmap=null;
  215. var currentWebview = page.$getAppWebview();
  216. bitmap = new plus.nativeObj.Bitmap('amway_img');
  217. // 将webview内容绘制到Bitmap对象中
  218. currentWebview.draw(bitmap,function(){
  219. console.log('截屏绘制图片成功');
  220. bitmap.save( "_doc/a.jpg"
  221. ,{}
  222. ,function(i){
  223. console.log('保存图片成功:'+JSON.stringify(i));
  224. uni.saveImageToPhotosAlbum({
  225. filePath: i.target,
  226. success: function () {
  227. bitmap.clear(); //销毁Bitmap图片
  228. uni.showToast({
  229. title: '保存图片成功',
  230. mask: false,
  231. duration: 1500
  232. });
  233. }
  234. });
  235. }
  236. ,function(e){
  237. console.log('保存图片失败:'+JSON.stringify(e));
  238. });
  239. },function(e){
  240. console.log('截屏绘制图片失败:'+JSON.stringify(e));
  241. });
  242. //currentWebview.append(amway_bit);
  243. },
  244. async getNavList () {
  245. const data = await this.$api.request('/nav/index');
  246. this.navList = data;
  247. }
  248. },
  249. // #ifndef MP
  250. // 标题栏input搜索框点击
  251. onNavigationBarSearchInputClicked: async function(e) {
  252. this.$api.msg('点击了搜索框');
  253. },
  254. //点击导航栏 buttons 时触发
  255. onNavigationBarButtonTap(e) {
  256. const index = e.index;
  257. if (index === 0) {
  258. this.$api.msg('点击了扫描');
  259. } else if (index === 1) {
  260. // #ifdef APP-PLUS
  261. const pages = getCurrentPages();
  262. const page = pages[pages.length - 1];
  263. const currentWebview = page.$getAppWebview();
  264. currentWebview.hideTitleNViewButtonRedDot({
  265. index
  266. });
  267. // #endif
  268. uni.navigateTo({
  269. url: '/pages/notice/notice'
  270. });
  271. }
  272. }
  273. // #endif
  274. };
  275. </script>
  276. <style lang="scss">
  277. /* #ifdef MP */
  278. .mp-search-box {
  279. position: absolute;
  280. left: 0;
  281. top: 30upx;
  282. z-index: 9999;
  283. width: 100%;
  284. padding: 0 80upx;
  285. .ser-input {
  286. flex: 1;
  287. height: 56upx;
  288. line-height: 56upx;
  289. text-align: center;
  290. font-size: 28upx;
  291. color: $font-color-base;
  292. border-radius: 20px;
  293. background: rgba(255, 255, 255, 0.6);
  294. }
  295. }
  296. /* #endif */
  297. page {
  298. .cate-section {
  299. position: relative;
  300. z-index: 5;
  301. margin-top: 0upx;
  302. background: #F4F5F7;
  303. }
  304. .carousel-section {
  305. padding: 0;
  306. .titleNview-placing {
  307. padding-top: 0;
  308. height: 0;
  309. }
  310. .carousel {
  311. .carousel-item {
  312. padding: 0;
  313. }
  314. }
  315. .swiper-dots {
  316. left: 45upx;
  317. bottom: 40upx;
  318. }
  319. }
  320. }
  321. page {
  322. background: #f5f5f5;
  323. }
  324. .m-t {
  325. margin-top: 16upx;
  326. }
  327. /* 头部 轮播图 */
  328. .carousel-section {
  329. position: relative;
  330. padding-top: 10px;
  331. .titleNview-placing {
  332. height: var(--status-bar-height);
  333. padding-top: 44px;
  334. box-sizing: content-box;
  335. }
  336. .titleNview-background {
  337. position: absolute;
  338. top: 0;
  339. left: 0;
  340. width: 100%;
  341. height: 360upx;
  342. transition: 0.4s;
  343. }
  344. }
  345. .carousel {
  346. width: 100%;
  347. height: 350upx;
  348. .carousel-item {
  349. width: 100%;
  350. height: 100%;
  351. padding: 0 28upx;
  352. overflow: hidden;
  353. }
  354. image {
  355. width: 100%;
  356. height: 100%;
  357. border-radius: 10upx;
  358. padding: 0rpx;
  359. }
  360. }
  361. .swiper-dots {
  362. display: flex;
  363. position: absolute;
  364. left: 60upx;
  365. bottom: 15upx;
  366. width: 72upx;
  367. height: 36upx;
  368. 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==);
  369. background-size: 100% 100%;
  370. .num {
  371. width: 36upx;
  372. height: 36upx;
  373. border-radius: 50px;
  374. font-size: 24upx;
  375. color: #fff;
  376. text-align: center;
  377. line-height: 36upx;
  378. }
  379. .sign {
  380. position: absolute;
  381. top: 0;
  382. left: 50%;
  383. line-height: 36upx;
  384. font-size: 12upx;
  385. color: #fff;
  386. transform: translateX(-50%);
  387. }
  388. }
  389. /* 分类 */
  390. .cate-section {
  391. display: flex;
  392. justify-content: space-around;
  393. align-items: center;
  394. flex-wrap: wrap;
  395. padding: 30upx 22upx;
  396. background: #fff;
  397. .cate-item {
  398. display: flex;
  399. flex-direction: column;
  400. align-items: center;
  401. font-size: $font-sm + 2upx;
  402. color: $font-color-dark;
  403. }
  404. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  405. image {
  406. width: 88upx;
  407. height: 88upx;
  408. margin-bottom: 14upx;
  409. border-radius: 50%;
  410. opacity: 0.7;
  411. box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  412. }
  413. }
  414. .ad-1 {
  415. width: 100%;
  416. height: 210upx;
  417. padding: 10upx 0;
  418. background: #fff;
  419. image {
  420. width: 100%;
  421. height: 100%;
  422. }
  423. }
  424. /* 秒杀专区 */
  425. .seckill-section {
  426. padding: 4upx 30upx 24upx;
  427. background: #fff;
  428. .s-header {
  429. display: flex;
  430. align-items: center;
  431. height: 92upx;
  432. line-height: 1;
  433. .s-img {
  434. width: 140upx;
  435. height: 30upx;
  436. }
  437. .tip {
  438. font-size: $font-base;
  439. color: $font-color-light;
  440. margin: 0 20upx 0 40upx;
  441. }
  442. .timer {
  443. display: inline-block;
  444. width: 40upx;
  445. height: 36upx;
  446. text-align: center;
  447. line-height: 36upx;
  448. margin-right: 14upx;
  449. font-size: $font-sm + 2upx;
  450. color: #fff;
  451. border-radius: 2px;
  452. background: rgba(0, 0, 0, 0.8);
  453. }
  454. .icon-you {
  455. font-size: $font-lg;
  456. color: $font-color-light;
  457. flex: 1;
  458. text-align: right;
  459. }
  460. }
  461. .floor-list {
  462. white-space: nowrap;
  463. }
  464. .scoll-wrapper {
  465. display: flex;
  466. align-items: flex-start;
  467. }
  468. .floor-item {
  469. width: 150upx;
  470. margin-right: 20upx;
  471. font-size: $font-sm + 2upx;
  472. color: $font-color-dark;
  473. line-height: 1.8;
  474. image {
  475. width: 150upx;
  476. height: 150upx;
  477. border-radius: 6upx;
  478. }
  479. .price {
  480. color: $uni-color-primary;
  481. }
  482. }
  483. }
  484. .f-header {
  485. display: flex;
  486. align-items: center;
  487. height: 140upx;
  488. padding: 6upx 30upx 8upx;
  489. background: #fff;
  490. image {
  491. flex-shrink: 0;
  492. width: 80upx;
  493. height: 80upx;
  494. margin-right: 20upx;
  495. }
  496. .tit-box {
  497. flex: 1;
  498. display: flex;
  499. flex-direction: column;
  500. }
  501. .tit {
  502. font-size: $font-lg + 2upx;
  503. color: #font-color-dark;
  504. line-height: 1.3;
  505. }
  506. .tit2 {
  507. font-size: $font-sm;
  508. color: $font-color-light;
  509. }
  510. .icon-you {
  511. font-size: $font-lg + 2upx;
  512. color: $font-color-light;
  513. }
  514. }
  515. /* 团购楼层 */
  516. .group-section {
  517. background: #fff;
  518. .g-swiper {
  519. height: 650upx;
  520. padding-bottom: 30upx;
  521. }
  522. .g-swiper-item {
  523. width: 100%;
  524. padding: 0 30upx;
  525. display: flex;
  526. }
  527. image {
  528. width: 100%;
  529. height: 460upx;
  530. border-radius: 4px;
  531. }
  532. .g-item {
  533. display: flex;
  534. flex-direction: column;
  535. overflow: hidden;
  536. }
  537. .left {
  538. flex: 1.2;
  539. margin-right: 24upx;
  540. .t-box {
  541. padding-top: 20upx;
  542. }
  543. }
  544. .right {
  545. flex: 0.8;
  546. flex-direction: column-reverse;
  547. .t-box {
  548. padding-bottom: 20upx;
  549. }
  550. }
  551. .t-box {
  552. height: 160upx;
  553. font-size: $font-base + 2upx;
  554. color: $font-color-dark;
  555. line-height: 1.6;
  556. }
  557. .price {
  558. color: $uni-color-primary;
  559. }
  560. .m-price {
  561. font-size: $font-sm + 2upx;
  562. text-decoration: line-through;
  563. color: $font-color-light;
  564. margin-left: 8upx;
  565. }
  566. .pro-box {
  567. display: flex;
  568. align-items: center;
  569. margin-top: 10upx;
  570. font-size: $font-sm;
  571. color: $font-base;
  572. padding-right: 10upx;
  573. }
  574. .progress-box {
  575. flex: 1;
  576. border-radius: 10px;
  577. overflow: hidden;
  578. margin-right: 8upx;
  579. }
  580. }
  581. /* 分类推荐楼层 */
  582. .hot-floor {
  583. width: 100%;
  584. overflow: hidden;
  585. margin-bottom: 20upx;
  586. .floor-img-box {
  587. width: 100%;
  588. height: 320upx;
  589. position: relative;
  590. &:after {
  591. content: '';
  592. position: absolute;
  593. left: 0;
  594. top: 0;
  595. width: 100%;
  596. height: 100%;
  597. background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
  598. }
  599. }
  600. .floor-img {
  601. width: 100%;
  602. height: 100%;
  603. }
  604. .floor-list {
  605. white-space: nowrap;
  606. padding: 20upx;
  607. padding-right: 50upx;
  608. border-radius: 6upx;
  609. margin-top: -140upx;
  610. margin-left: 30upx;
  611. background: #fff;
  612. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  613. position: relative;
  614. z-index: 1;
  615. }
  616. .scoll-wrapper {
  617. display: flex;
  618. align-items: flex-start;
  619. }
  620. .floor-item {
  621. width: 180upx;
  622. margin-right: 20upx;
  623. font-size: $font-sm + 2upx;
  624. color: $font-color-dark;
  625. line-height: 1.8;
  626. image {
  627. width: 180upx;
  628. height: 180upx;
  629. border-radius: 6upx;
  630. }
  631. .price {
  632. color: $uni-color-primary;
  633. }
  634. }
  635. .more {
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. flex-direction: column;
  640. flex-shrink: 0;
  641. width: 180upx;
  642. height: 180upx;
  643. border-radius: 6upx;
  644. background: #f3f3f3;
  645. font-size: $font-base;
  646. color: $font-color-light;
  647. text:first-child {
  648. margin-bottom: 4upx;
  649. }
  650. }
  651. }
  652. /* 猜你喜欢 */
  653. .content1{
  654. margin: 0 26rpx;
  655. }
  656. .guess-section {
  657. display: flex;
  658. flex-wrap: wrap;
  659. padding: 0 10upx;
  660. .guess-item {
  661. display: flex;
  662. flex-direction: column;
  663. width: 48%;
  664. padding-bottom: 40upx;
  665. background: #fff;
  666. margin-bottom: 25rpx;
  667. &:nth-child(2n + 1) {
  668. margin-right: 4%;
  669. }
  670. border-radius: 3px;
  671. overflow: hidden;
  672. }
  673. .image-wrapper {
  674. width: 100%;
  675. height: 330upx;
  676. border-radius: 3px;
  677. overflow: hidden;
  678. image {
  679. width: 100%;
  680. height: 100%;
  681. opacity: 1;
  682. }
  683. }
  684. .title {
  685. font-size: 30rpx;
  686. color: #010101;
  687. padding: 0 24rpx;
  688. box-sizing: border-box;
  689. overflow : hidden;
  690. text-overflow: ellipsis;
  691. display: -webkit-box;
  692. -webkit-line-clamp: 2;
  693. -webkit-box-orient: vertical;
  694. -webkit-line-clamp:2;
  695. // line-height: 80upx;
  696. }
  697. .price {
  698. font-size: $font-lg;
  699. color: $uni-color-primary;
  700. line-height: 1;
  701. padding: 0 24rpx;
  702. box-sizing: border-box;
  703. margin-top: 18rpx;
  704. .sales{
  705. color: #999999;
  706. font-size: 24upx;
  707. }
  708. .symbol{
  709. font-size: 24upx;
  710. }
  711. }
  712. }
  713. .nav_list {
  714. .mery {
  715. margin-bottom: 25rpx;
  716. padding: 40rpx 0;
  717. float: left;
  718. width: 20%;
  719. background: #ffffff;
  720. box-sizing: border-box;
  721. image {
  722. margin: 0 auto;
  723. display: block;
  724. width: 60%;
  725. }
  726. text {
  727. display: block;
  728. width: 100%;
  729. text-align: center;
  730. font-size: 26rpx;
  731. margin-top: 16rpx;
  732. }
  733. }
  734. }
  735. </style>