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.

index.vue 22 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  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" 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. <view style="width:100%;text-align: center;">
  46. <image :src="item.image" mode="aspectFill"></image>
  47. </view>
  48. <text class="title clamp">{{item.title }}</text>
  49. <text class="price">¥{{item.sales_price }}</text>
  50. </view>
  51. </view>
  52. <!-- <scroll-view class="floor-list" scroll-x>
  53. <view class="scoll-wrapper">
  54. <view v-for="(item, index) in flashSale.product" :key="index" class="floor-item" @click="navToDetailPage({ product_id: item.flash_product_id }, flashSale.flash_id)">
  55. <image :src="item.image" mode="aspectFill"></image>
  56. <text class="title clamp">{{item.title }}</text>
  57. <text class="price">¥{{item.sales_price }}</text>
  58. </view>
  59. </view>
  60. </scroll-view> -->
  61. </view>
  62. <!-- 团购楼层 -->
  63. <!-- <view class="f-header m-t">
  64. <image src="/static/temp/h1.png"></image>
  65. <view class="tit-box">
  66. <text class="tit">精品团购</text>
  67. <text class="tit2">Boutique Group Buying</text>
  68. </view>
  69. <text class="yticon icon-you"></text>
  70. </view> -->
  71. <!-- <view class="group-section">
  72. <swiper class="g-swiper" :duration="500">
  73. <swiper-item class="g-swiper-item" v-for="(item, index) in goodsList" :key="index" v-if="index % 2 === 0" @click="navToDetailPage(item)">
  74. <view class="g-item left">
  75. <image :src="item.image" mode="aspectFill"></image>
  76. <view class="t-box">
  77. <text class="title clamp">{{ item.title }}</text>
  78. <view class="price-box">
  79. <text class="price">¥{{ item.price }}</text>
  80. <text class="m-price">¥188</text>
  81. </view>
  82. <view class="pro-box">
  83. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  84. <text>6人成团</text>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="g-item right">
  89. <image :src="goodsList[index + 1].image" mode="aspectFill"></image>
  90. <view class="t-box">
  91. <text class="title clamp">{{ goodsList[index + 1].title }}</text>
  92. <view class="price-box">
  93. <text class="price">¥{{ goodsList[index + 1].price }}</text>
  94. <text class="m-price">¥188</text>
  95. </view>
  96. <view class="pro-box">
  97. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  98. <text>10人成团</text>
  99. </view>
  100. </view>
  101. </view>
  102. </swiper-item>
  103. </swiper>
  104. </view> -->
  105. <!-- 分类推荐楼层 -->
  106. <!-- <view class="f-header m-t">
  107. <image src="/static/temp/h1.png"></image>
  108. <view class="tit-box">
  109. <text class="tit">分类精选</text>
  110. <text class="tit2">Competitive Products For You</text>
  111. </view>
  112. <text class="yticon icon-you"></text>
  113. </view> -->
  114. <!-- <view class="hot-floor">
  115. <view class="floor-img-box">
  116. <image
  117. class="floor-img"
  118. 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"
  119. mode="scaleToFill"
  120. ></image>
  121. </view>
  122. <scroll-view class="floor-list" scroll-x>
  123. <view class="scoll-wrapper">
  124. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  125. <image :src="item.image" mode="aspectFill"></image>
  126. <text class="title clamp">{{ item.title }}</text>
  127. <text class="price">¥{{ item.price }}</text>
  128. </view>
  129. <view class="more">
  130. <text>查看全部</text>
  131. <text>More+</text>
  132. </view>
  133. </view>
  134. </scroll-view>
  135. </view> -->
  136. <!-- <view class="hot-floor">
  137. <view class="floor-img-box">
  138. <image
  139. class="floor-img"
  140. 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"
  141. mode="scaleToFill"
  142. ></image>
  143. </view>
  144. <scroll-view class="floor-list" scroll-x>
  145. <view class="scoll-wrapper">
  146. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  147. <image :src="item.image3" mode="aspectFill"></image>
  148. <text class="title clamp">{{ item.title }}</text>
  149. <text class="price">¥{{ item.price }}</text>
  150. </view>
  151. <view class="more">
  152. <text>查看全部</text>
  153. <text>More+</text>
  154. </view>
  155. </view>
  156. </scroll-view>
  157. </view> -->
  158. <!-- <view class="hot-floor">
  159. <view class="floor-img-box">
  160. <image
  161. class="floor-img"
  162. 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"
  163. mode="scaleToFill"
  164. ></image>
  165. </view>
  166. <scroll-view class="floor-list" scroll-x>
  167. <view class="scoll-wrapper">
  168. <view v-for="(item, index) in goodsList" :key="index" class="floor-item" @click="navToDetailPage(item)">
  169. <image :src="item.image2" mode="aspectFill"></image>
  170. <text class="title clamp">{{ item.title }}</text>
  171. <text class="price">¥{{ item.price }}</text>
  172. </view>
  173. <view class="more">
  174. <text>查看全部</text>
  175. <text>More+</text>
  176. </view>
  177. </view>
  178. </scroll-view>
  179. </view> -->
  180. <!-- 猜你喜欢 -->
  181. <!-- <view class="f-header m-t">
  182. <image src="/static/temp/h1.png"></image>
  183. <view class="tit-box">
  184. <text class="tit">猜你喜欢</text>
  185. <text class="tit2">Guess You Like It</text>
  186. </view>
  187. <text class="yticon icon-you"></text>
  188. </view>
  189. <view class="guess-section">
  190. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  191. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  192. <text class="title clamp">{{ item.title }}</text>
  193. <text class="price"><text class="symbol">¥</text> {{ item.sales_price }} <text class="sales"> {{' '+item.sales}}人付款</text></text>
  194. </view>
  195. </view> -->
  196. </view>
  197. </template>
  198. <script>
  199. var _self = this;
  200. import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
  201. export default {
  202. components: {
  203. uniCountdown
  204. },
  205. data() {
  206. return {
  207. titleNViewBackground: '',
  208. swiperCurrent: 0,
  209. swiperLength: 0,
  210. carouselList: [],
  211. goodsList: [],
  212. menu: [],
  213. flashSale: '',
  214. page: 1,
  215. pageSize: 16,
  216. day: 0,
  217. hour: 0,
  218. minute: 0,
  219. second: 0
  220. };
  221. },
  222. computed: {
  223. },
  224. onLoad() {
  225. this.loadData();
  226. },
  227. onShow() {
  228. // this.loadData();
  229. },
  230. onReachBottom() {
  231. this.getProduct();
  232. },
  233. onPullDownRefresh() {
  234. if (this.$refs && this.$refs.countd) {
  235. this.$refs.countd.syncFlag = false;
  236. }
  237. this.goodsList = [];
  238. this.page = 1;
  239. this.loadData();
  240. },
  241. onShareAppMessage(e) {
  242. },
  243. methods: {
  244. /**
  245. * 请求静态数据只是为了代码不那么乱
  246. * 分次请求未作整合
  247. */
  248. async loadData() {
  249. let that = this;
  250. let login = await this.$api.checkLogin();
  251. if (login) {
  252. //获取广告图
  253. that.$api.request('/ads/index', 'GET').then((res) => {
  254. console.log(res)
  255. let carouselList = res;
  256. that.titleNViewBackground = carouselList[0].background;
  257. that.swiperLength = carouselList.length;
  258. that.carouselList = carouselList;
  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: 50vw;
  430. max-height: 400px;
  431. transition: 0.4s;
  432. }
  433. }
  434. .carousel {
  435. width: 100%;
  436. height: 50vw;
  437. max-height: 400px;
  438. .carousel-item {
  439. width: 100%;
  440. height: 100%;
  441. padding: 0 28upx;
  442. overflow: hidden;
  443. }
  444. image {
  445. width: 100%;
  446. height: 100%;
  447. border-radius: 10upx;
  448. padding: 20rpx;
  449. }
  450. }
  451. .swiper-dots {
  452. display: flex;
  453. position: absolute;
  454. left: 60upx;
  455. bottom: 15upx;
  456. width: 72upx;
  457. height: 36upx;
  458. 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==);
  459. background-size: 100% 100%;
  460. .num {
  461. width: 36upx;
  462. height: 36upx;
  463. border-radius: 50px;
  464. font-size: 24upx;
  465. color: #fff;
  466. text-align: center;
  467. line-height: 36upx;
  468. }
  469. .sign {
  470. position: absolute;
  471. top: 0;
  472. left: 50%;
  473. line-height: 36upx;
  474. font-size: 12upx;
  475. color: #fff;
  476. transform: translateX(-50%);
  477. }
  478. }
  479. /* 分类 */
  480. .cate-section {
  481. display: flex;
  482. justify-content: space-around;
  483. align-items: center;
  484. flex-wrap: wrap;
  485. padding: 30upx 22upx;
  486. background: #fff;
  487. .cate-item {
  488. display: flex;
  489. flex-direction: column;
  490. align-items: center;
  491. font-size: $font-sm + 2upx;
  492. color: $font-color-dark;
  493. }
  494. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  495. image {
  496. width: 88upx;
  497. height: 88upx;
  498. margin-bottom: 14upx;
  499. border-radius: 50%;
  500. opacity: 0.7;
  501. box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  502. }
  503. }
  504. .ad-1 {
  505. width: 100%;
  506. height: 210upx;
  507. padding: 10upx 0;
  508. background: #fff;
  509. image {
  510. width: 100%;
  511. height: 100%;
  512. }
  513. }
  514. /* 秒杀专区 */
  515. .seckill-section {
  516. padding: 4upx 30upx 24upx;
  517. background: #fff;
  518. .miaosha {
  519. font-size: 35rpx;
  520. font-weight: 1000;
  521. color: $uni-color-primary;
  522. ;
  523. }
  524. .s-header {
  525. display: flex;
  526. align-items: center;
  527. height: 92upx;
  528. line-height: 1;
  529. .s-img {
  530. width: 140upx;
  531. height: 30upx;
  532. }
  533. .tip {
  534. font-size: $font-base;
  535. color: $font-color-light;
  536. margin: 0 20upx 0 40upx;
  537. }
  538. .timer {
  539. display: inline-block;
  540. width: 40upx;
  541. height: 36upx;
  542. text-align: center;
  543. line-height: 36upx;
  544. margin-right: 14upx;
  545. font-size: $font-sm + 2upx;
  546. color: #fff;
  547. border-radius: 2px;
  548. background: rgba(0, 0, 0, 0.8);
  549. }
  550. .icon-you {
  551. font-size: $font-lg;
  552. color: $font-color-light;
  553. flex: 1;
  554. text-align: right;
  555. }
  556. }
  557. .floor-list-whitelist {
  558. display: flex;
  559. // justify-content: space-between;
  560. flex-direction: row;
  561. flex-wrap: wrap;
  562. }
  563. .floor-list {
  564. white-space: nowrap;
  565. }
  566. .scoll-wrapper {
  567. display: flex;
  568. align-items: flex-start;
  569. }
  570. .floor-item {
  571. width: calc(100%/3);
  572. padding-right: 20upx;
  573. margin-top: 20upx;
  574. font-size: $font-sm + 2upx;
  575. color: $font-color-dark;
  576. line-height: 1.8;
  577. image {
  578. width: 150upx;
  579. height: 150upx;
  580. border-radius: 6upx;
  581. }
  582. .price {
  583. color: $uni-color-primary;
  584. }
  585. }
  586. }
  587. .f-header {
  588. display: flex;
  589. align-items: center;
  590. height: 140upx;
  591. padding: 6upx 30upx 8upx;
  592. background: #fff;
  593. image {
  594. flex-shrink: 0;
  595. width: 80upx;
  596. height: 80upx;
  597. margin-right: 20upx;
  598. }
  599. .tit-box {
  600. flex: 1;
  601. display: flex;
  602. flex-direction: column;
  603. }
  604. .tit {
  605. font-size: $font-lg + 2upx;
  606. color: #font-color-dark;
  607. line-height: 1.3;
  608. }
  609. .tit2 {
  610. font-size: $font-sm;
  611. color: $font-color-light;
  612. }
  613. .icon-you {
  614. font-size: $font-lg + 2upx;
  615. color: $font-color-light;
  616. }
  617. }
  618. /* 团购楼层 */
  619. .group-section {
  620. background: #fff;
  621. .g-swiper {
  622. height: 650upx;
  623. padding-bottom: 30upx;
  624. }
  625. .g-swiper-item {
  626. width: 100%;
  627. padding: 0 30upx;
  628. display: flex;
  629. }
  630. image {
  631. width: 100%;
  632. height: 460upx;
  633. border-radius: 4px;
  634. }
  635. .g-item {
  636. display: flex;
  637. flex-direction: column;
  638. overflow: hidden;
  639. }
  640. .left {
  641. flex: 1.2;
  642. margin-right: 24upx;
  643. .t-box {
  644. padding-top: 20upx;
  645. }
  646. }
  647. .right {
  648. flex: 0.8;
  649. flex-direction: column-reverse;
  650. .t-box {
  651. padding-bottom: 20upx;
  652. }
  653. }
  654. .t-box {
  655. height: 160upx;
  656. font-size: $font-base + 2upx;
  657. color: $font-color-dark;
  658. line-height: 1.6;
  659. }
  660. .price {
  661. color: $uni-color-primary;
  662. }
  663. .m-price {
  664. font-size: $font-sm + 2upx;
  665. text-decoration: line-through;
  666. color: $font-color-light;
  667. margin-left: 8upx;
  668. }
  669. .pro-box {
  670. display: flex;
  671. align-items: center;
  672. margin-top: 10upx;
  673. font-size: $font-sm;
  674. color: $font-base;
  675. padding-right: 10upx;
  676. }
  677. .progress-box {
  678. flex: 1;
  679. border-radius: 10px;
  680. overflow: hidden;
  681. margin-right: 8upx;
  682. }
  683. }
  684. /* 分类推荐楼层 */
  685. .hot-floor {
  686. width: 100%;
  687. overflow: hidden;
  688. margin-bottom: 20upx;
  689. .floor-img-box {
  690. width: 100%;
  691. height: 320upx;
  692. position: relative;
  693. &:after {
  694. content: '';
  695. position: absolute;
  696. left: 0;
  697. top: 0;
  698. width: 100%;
  699. height: 100%;
  700. background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
  701. }
  702. }
  703. .floor-img {
  704. width: 100%;
  705. height: 100%;
  706. }
  707. .floor-list {
  708. white-space: nowrap;
  709. padding: 20upx;
  710. padding-right: 50upx;
  711. border-radius: 6upx;
  712. margin-top: -140upx;
  713. margin-left: 30upx;
  714. background: #fff;
  715. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  716. position: relative;
  717. z-index: 1;
  718. }
  719. .scoll-wrapper {
  720. display: flex;
  721. align-items: flex-start;
  722. }
  723. .floor-item {
  724. margin-right: 20upx;
  725. font-size: $font-sm + 2upx;
  726. color: $font-color-dark;
  727. line-height: 1.8;
  728. image {
  729. width: 180upx;
  730. height: 180upx;
  731. border-radius: 6upx;
  732. }
  733. .price {
  734. color: $uni-color-primary;
  735. }
  736. }
  737. .more {
  738. display: flex;
  739. align-items: center;
  740. justify-content: center;
  741. flex-direction: column;
  742. flex-shrink: 0;
  743. width: 180upx;
  744. height: 180upx;
  745. border-radius: 6upx;
  746. background: #f3f3f3;
  747. font-size: $font-base;
  748. color: $font-color-light;
  749. text:first-child {
  750. margin-bottom: 4upx;
  751. }
  752. }
  753. }
  754. /* 猜你喜欢 */
  755. .guess-section {
  756. display: flex;
  757. flex-wrap: wrap;
  758. padding: 0 30upx;
  759. background: #fff;
  760. .guess-item {
  761. display: flex;
  762. flex-direction: column;
  763. width: 48%;
  764. padding-bottom: 40upx;
  765. &:nth-child(2n + 1) {
  766. margin-right: 4%;
  767. }
  768. }
  769. .image-wrapper {
  770. width: 100%;
  771. height: 330upx;
  772. border-radius: 3px;
  773. overflow: hidden;
  774. image {
  775. width: 100%;
  776. height: 100%;
  777. opacity: 1;
  778. }
  779. }
  780. .title {
  781. font-size: 12px;
  782. color: $font-color-dark;
  783. line-height: 80upx;
  784. }
  785. .price {
  786. font-size: $font-lg;
  787. color: $uni-color-primary;
  788. line-height: 1;
  789. .sales {
  790. color: #999999;
  791. font-size: 24upx;
  792. }
  793. .symbol {
  794. font-size: 24upx;
  795. }
  796. }
  797. }
  798. </style>