index.vue 18 KB

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