index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <!-- #ifdef MP -->
  5. <view class="input-box flex" @click="clickSearch">
  6. <view class=" input-content flex">
  7. <view class="iconfont iconsearch"></view>
  8. <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
  9. </view>
  10. </view>
  11. <view class="mp-height"></view>
  12. <!-- #endif -->
  13. <!-- 头部轮播 -->
  14. <view class="carousel-section">
  15. <!-- 标题栏和状态栏占位符 -->
  16. <view class="titleNview-placing"></view>
  17. <!-- 背景色区域 -->
  18. <view class="titleNview-background" :style="{ backgroundColor: '#5DBC7C' }"></view>
  19. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  20. <!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
  21. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
  22. <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
  23. </swiper-item>
  24. </swiper>
  25. <!-- 自定义swiper指示器 -->
  26. <view class="swiper-dots">
  27. <text class="num">{{ swiperCurrent + 1 }}</text>
  28. <text class="sign">/</text>
  29. <text class="num">{{ swiperLength }}</text>
  30. </view>
  31. </view>
  32. <!-- 分类 -->
  33. <view class="cate-section">
  34. <navigator url="/pages/shoping/list">
  35. <view class="cate-item">
  36. <image class="Uimg" src="/static/icon/u5.png"></image>
  37. <text>商家联盟</text>
  38. </view>
  39. </navigator>
  40. <!-- <navigator url="/pages/product/giftBag">
  41. <view class="cate-item">
  42. <image src="/static/icon/c3.png"></image>
  43. <text>联盟礼包</text>
  44. </view>
  45. </navigator> -->
  46. <navigator url="/pages/prefecture/integral">
  47. <view class="cate-item">
  48. <image src="/static/icon/c6.png"></image>
  49. <text>积分商城</text>
  50. </view>
  51. </navigator>
  52. <!-- <navigator url="/pages/sign/index">
  53. <view class="cate-item">
  54. <image src="/static/icon/c8.png"></image>
  55. <text>每日签到</text>
  56. </view>
  57. </navigator> -->
  58. <navigator url="/pages/prefecture/consumer">
  59. <view class="cate-item">
  60. <image src="/static/icon/c8.png"></image>
  61. <text>消费券商城</text>
  62. </view>
  63. </navigator>
  64. <navigator url="/pages/received/index?state=0">
  65. <view class="cate-item">
  66. <!--v-if="userInfo.level>0"-->
  67. <image src="/static/icon/c9.png"></image>
  68. <text>收付款</text>
  69. </view>
  70. </navigator>
  71. </view>
  72. <view class="cate-section">
  73. <!-- <navigator url="/pages/groupBooking/index">
  74. <view class="cate-item">
  75. <image src="/static/icon/c5.png"></image>
  76. <text>超值拼团</text>
  77. </view>
  78. </navigator> -->
  79. <!-- <navigator url="/pages/seckill/seckill">
  80. <view class="cate-item">
  81. v-if="userInfo.level>0"
  82. <image src="/static/icon/c7.png"></image>
  83. <text>限时秒杀</text>
  84. </view>
  85. </navigator> -->
  86. <!-- <view class="cate-item"><text class="none-font-color">每日签到</text></view> -->
  87. <view class="cate-item"><text class="none-font-color">每日签到</text></view>
  88. </view>
  89. <!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
  90. <!-- 会员升级专区 -->
  91. <!-- <view class="f-header m-t">
  92. <view class="f-left-icon"></view>
  93. <view class="tit-box"><text class="tit">会员升级专区</text></view>
  94. </view> -->
  95. <!-- <view class="uservip flex" v-for="(ls,index) in userServant" @click="navToDetailPage(ls)">
  96. <image @error="onImageError('userServant', index)" lazy-load :src="ls.image" mode="aspectFill"></image>
  97. <view class="detail">
  98. <view class="title">{{ls.store_name}}</view>
  99. <view class="icon" v-if="ls.mer_id==0">自营</view>
  100. <view class="flex price-box">
  101. <view class="price">
  102. <text class="font-size-sm">¥</text>
  103. {{ls.price|moneyNum}}
  104. </view>
  105. <view class="text">售出{{ls.sales}}</view>
  106. </view>
  107. </view>
  108. </view> -->
  109. <!-- 秒杀楼层 -->
  110. <seckill v-if="userInfo.level > 0"></seckill>
  111. <!-- 团购楼层 -->
  112. <!-- <view class="f-header m-t">
  113. <view class="f-left-icon"></view>
  114. <view class="tit-box"><text class="tit">超值拼团</text></view>
  115. <text class="iconfont iconenter">更多</text>
  116. </view> -->
  117. <!-- <view class="group-section">
  118. <swiper class="g-swiper" :duration="500">
  119. <swiper-item class="g-swiper-item" v-for="(item, index) in goodsList" :key="index" v-if="index % 2 === 0" @click="navToDetailPage(item)">
  120. <view class="g-item left">
  121. <image :src="item.image" mode="aspectFill"></image>
  122. <view class="t-box">
  123. <text class="title clamp">{{ item.store_name }}</text>
  124. <view class="price-box">
  125. <text class="price">¥{{ item.price }}</text>
  126. <text class="m-price">¥188</text>
  127. </view>
  128. <view class="pro-box">
  129. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  130. <text>6人成团</text>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="g-item right">
  135. <image :src="goodsList.image" mode="aspectFill"></image>
  136. <view class="t-box">
  137. <text class="title clamp">{{ goodsList.store_name }}</text>
  138. <view class="price-box">
  139. <text class="price">¥{{ goodsList.price }}</text>
  140. <text class="m-price">¥188</text>
  141. </view>
  142. <view class="pro-box">
  143. <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
  144. <text>10人成团</text>
  145. </view>
  146. </view>
  147. </view>
  148. </swiper-item>
  149. </swiper>
  150. </view> -->
  151. <!-- 最新 商品 -->
  152. <view class="f-header m-t">
  153. <view class="f-left-icon"></view>
  154. <view class="tit-box"><text class="tit">最新商品</text></view>
  155. <navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
  156. </view>
  157. <view class="guess-section">
  158. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  159. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  160. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  161. <view class="cmy-hr"></view>
  162. <view class="price margin-c-20 flex">
  163. <view>
  164. <text class="font-size-sm ">¥</text>
  165. {{ item.price | moneyNum }}
  166. </view>
  167. <view class="font-size-sm">
  168. <text class="font-color-gray">售出{{ item.sales }}</text>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. <!-- 促销 商品 -->
  174. <!-- <view class="f-header m-t">
  175. <view class="f-left-icon"></view>
  176. <view class="tit-box"><text class="tit">促销商品</text></view>
  177. </view>
  178. <view class="guess-section">
  179. <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
  180. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  181. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  182. <view class="cmy-hr"></view>
  183. <view class="price margin-c-20 flex">
  184. <view>
  185. <text class="font-size-sm ">¥</text>
  186. {{ item.price }}
  187. </view>
  188. <view class="font-size-sm">
  189. <text class="font-color-gray">{{ item.sales }}人购买</text>
  190. </view>
  191. </view>
  192. </view>
  193. </view> -->
  194. <!-- 精品 商品 -->
  195. <!-- <view class="f-header m-t">
  196. <view class="f-left-icon"></view>
  197. <view class="tit-box"><text class="tit">联盟礼包</text></view>
  198. <text class="iconfont iconenter">更多</text>
  199. </view> -->
  200. <!-- <view class="guess-section">
  201. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  202. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  203. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  204. <view class="cmy-hr"></view>
  205. <view class="price margin-c-20 flex">
  206. <view>
  207. <text class="font-size-sm ">¥</text>
  208. {{ item.price }}
  209. </view>
  210. <view class="font-size-sm">
  211. <text class="font-color-gray">{{ item.sales }}人购买</text>
  212. </view>
  213. </view>
  214. </view>
  215. </view> -->
  216. <!-- 精品推荐 -->
  217. <view class="f-header m-t">
  218. <view class="f-left-icon"></view>
  219. <view class="tit-box"><text class="tit">精品推荐</text></view>
  220. <navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
  221. </view>
  222. <view class="guess-section">
  223. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  224. <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
  225. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  226. <view class="cmy-hr"></view>
  227. <view class="price margin-c-20 flex">
  228. <view>
  229. <text class="font-size-sm ">¥</text>
  230. {{ item.price | moneyNum }}
  231. </view>
  232. <view class="font-size-sm">
  233. <text class="font-color-gray">售出{{ item.sales }}</text>
  234. </view>
  235. </view>
  236. </view>
  237. <!-- <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  238. <view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
  239. <text class="title clamp margin-c-20">
  240. <text class="icon">自营</text>
  241. {{ item.title }}
  242. </text>
  243. <view class="hr"></view>
  244. <view class="price margin-c-20 flex">
  245. <view>
  246. <text class="font-size-sm ">¥</text>
  247. {{ item.price }}
  248. </view>
  249. <view class="font-size-sm">
  250. <view class='detail'>
  251. <text class="icon">代理价</text>
  252. <text></text>
  253. </view>
  254. <view class="detail">
  255. <text class="font-color-yellow">会员价</text>
  256. <text class="font-color-yellow">7.5折</text>
  257. </view>
  258. </view>
  259. </view>
  260. <view class="tip">兑换价¥44+44积分</view>
  261. </view> -->
  262. </view>
  263. </view>
  264. </template>
  265. <script>
  266. import seckill from './seckill';
  267. import { loadIndexs } from '@/api/index.js';
  268. import { interceptor } from '@/utils/loginUtils';
  269. import { userinfo } from '@/api/user.js';
  270. import { mapState } from 'vuex';
  271. export default {
  272. components: {
  273. seckill
  274. },
  275. filters: {
  276. moneyNum: function(value) {
  277. return +value;
  278. }
  279. },
  280. data() {
  281. return {
  282. titleNViewBackground: '',
  283. swiperCurrent: 0,
  284. swiperLength: 0,
  285. carouselList: [], //轮播列表
  286. goodsList: [], //最新商品列表
  287. bastList: [], //精品推荐列表
  288. bastBanner: [], //促销商品列表
  289. menusList: [], //头部菜单
  290. userServant: [
  291. {
  292. image: ''
  293. }
  294. ] //用户推广服务
  295. };
  296. },
  297. computed: {
  298. ...mapState(['loginInterceptor']),
  299. ...mapState('user', ['hasLogin', 'userInfo'])
  300. },
  301. onLoad(option) {
  302. let agree = uni.getStorageSync("agree")||false;
  303. // 判断是否已经同意协议
  304. if(!agree){
  305. uni.redirectTo({url:"/pages/contract/start"})
  306. }
  307. if (option.spread) {
  308. // 存储邀请人
  309. uni.setStorage({
  310. key: 'spread',
  311. data: option.spread
  312. });
  313. }
  314. },
  315. onShow() {
  316. // 判断是否强制登录
  317. if (this.loginInterceptor && !this.hasLogin) {
  318. // 登录拦截
  319. userinfo()
  320. .then(e => {})
  321. .catch(e => {
  322. console.log(e);
  323. });
  324. }
  325. this.loadData();
  326. },
  327. // #ifndef MP
  328. // 监听导航栏输入框点击事件
  329. onNavigationBarSearchInputClicked(e) {
  330. //跳转到搜索页面
  331. this.clickSearch();
  332. },
  333. //点击导航栏 buttons 时触发
  334. onNavigationBarButtonTap(e) {
  335. const index = e.index;
  336. if (index === 0) {
  337. this.$api.msg('点击了扫描');
  338. } else if (index === 1) {
  339. // #ifdef APP-PLUS
  340. const pages = getCurrentPages();
  341. const page = pages[pages.length - 1];
  342. const currentWebview = page.$getAppWebview();
  343. currentWebview.hideTitleNViewButtonRedDot({
  344. index
  345. });
  346. // #endif
  347. uni.navigateTo({
  348. url: '/pages/notice/notice'
  349. });
  350. }
  351. },
  352. // #endif
  353. methods: {
  354. // 點擊搜索框
  355. clickSearch() {
  356. uni.navigateTo({
  357. url: '/pages/product/search'
  358. });
  359. },
  360. // 监听图片加载完成
  361. onImageError(key, index) {
  362. this[key][index].image = '/static/error/errorImage.jpg';
  363. },
  364. // 请求载入数据
  365. async loadData() {
  366. loadIndexs({}).then(({ data }) => {
  367. let goods = data.info;
  368. this.carouselList = data.banner;
  369. this.swiperLength = this.carouselList.length;
  370. this.menusList = data.menus;
  371. this.goodsList = goods.firstList; //最新商品
  372. this.bastList = goods.bastList; //精品推荐
  373. this.bastBanner = goods.bastBanner; //促销单品
  374. this.userServant = goods.platoonList; //服务商品
  375. });
  376. },
  377. //轮播图切换修改背景色
  378. swiperChange(e) {
  379. const index = e.detail.current;
  380. this.swiperCurrent = index;
  381. // this.titleNViewBackground = this.carouselList[index].background;
  382. },
  383. //详情页
  384. navToDetailPage(item) {
  385. uni.navigateTo({
  386. url: '/pages/product/product?id=' + item.id
  387. });
  388. },
  389. // 轮播图跳转
  390. bannerNavToUrl(item) {
  391. // #ifdef H5
  392. if (item.wap_url.indexOf('http') > 0) {
  393. window.location.href = item.wap_url;
  394. }
  395. // #endif
  396. //测试数据没有写id,用title代替
  397. uni.navigateTo({
  398. url: item.wap_url
  399. });
  400. }
  401. }
  402. };
  403. </script>
  404. <style lang="scss">
  405. /* #ifdef MP */
  406. .mp-height {
  407. height: 44px;
  408. }
  409. .input-box {
  410. position: fixed;
  411. top: 0;
  412. left: 0;
  413. width: 100%;
  414. padding: 25rpx;
  415. background-color: #ffffff;
  416. z-index: 999;
  417. height: 44px;
  418. .iconsearch {
  419. font-size: 50rpx;
  420. }
  421. .input-content {
  422. border-radius: 99rpx;
  423. flex-grow: 1;
  424. padding: 10rpx 30rpx;
  425. background-color: rgba(231, 231, 231, 0.7);
  426. .input {
  427. flex-grow: 1;
  428. input {
  429. font-size: $font-lg;
  430. }
  431. }
  432. }
  433. .input-button {
  434. padding-left: 20rpx;
  435. font-size: $font-lg;
  436. height: 100%;
  437. }
  438. }
  439. page {
  440. .cate-section {
  441. position: relative;
  442. z-index: 5;
  443. border-radius: 16rpx 16rpx 0 0;
  444. margin-top: -20rpx;
  445. }
  446. .carousel-section {
  447. padding: 0;
  448. .titleNview-placing {
  449. padding-top: 0;
  450. height: 0;
  451. }
  452. .carousel {
  453. .carousel-item {
  454. padding: 0;
  455. }
  456. }
  457. .swiper-dots {
  458. left: 45rpx;
  459. bottom: 40rpx;
  460. }
  461. }
  462. }
  463. /* #endif */
  464. page {
  465. background: $page-color-base;
  466. }
  467. .m-t {
  468. margin-top: 16rpx;
  469. }
  470. /* 头部 轮播图 */
  471. .carousel-section {
  472. position: relative;
  473. padding-top: 10px;
  474. overflow: hidden;
  475. .titleNview-placing {
  476. height: var(--status-bar-height);
  477. padding-top: 44px;
  478. box-sizing: content-box;
  479. }
  480. .titleNview-background {
  481. position: absolute;
  482. top: 0;
  483. left: -50rpx;
  484. width: 850rpx;
  485. height: 220rpx;
  486. transition: 0.4s;
  487. border-bottom-left-radius: 100rpx;
  488. border-bottom-right-radius: 100rpx;
  489. }
  490. }
  491. .carousel {
  492. width: 100%;
  493. height: 240rpx;
  494. .carousel-item {
  495. width: 100%;
  496. height: 100%;
  497. padding: 0 28rpx;
  498. overflow: hidden;
  499. }
  500. image {
  501. width: 100%;
  502. height: 100%;
  503. border-radius: $border-radius-sm;
  504. }
  505. }
  506. .swiper-dots {
  507. display: flex;
  508. position: absolute;
  509. left: 60rpx;
  510. bottom: 15rpx;
  511. width: 72rpx;
  512. height: 36rpx;
  513. 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==);
  514. background-size: 100% 100%;
  515. .num {
  516. width: 36rpx;
  517. height: 36rpx;
  518. border-radius: 50px;
  519. font-size: 24rpx;
  520. color: #fff;
  521. text-align: center;
  522. line-height: 36rpx;
  523. }
  524. .sign {
  525. position: absolute;
  526. top: 0;
  527. left: 50%;
  528. line-height: 36rpx;
  529. font-size: 12rpx;
  530. color: #fff;
  531. transform: translateX(-50%);
  532. }
  533. }
  534. /* 分类 */
  535. .cate-section {
  536. display: flex;
  537. justify-content: space-around;
  538. align-items: center;
  539. flex-wrap: wrap;
  540. padding: 30rpx 22rpx;
  541. .cate-item {
  542. display: flex;
  543. flex-direction: column;
  544. align-items: center;
  545. font-size: $font-sm + 2rpx;
  546. color: $font-color-dark;
  547. .none-font-color {
  548. color: $page-color-base;
  549. }
  550. .Uimg {
  551. border-radius: 999px;
  552. }
  553. }
  554. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  555. image {
  556. width: 88rpx;
  557. height: 88rpx;
  558. margin-bottom: 14rpx;
  559. border-radius: 50%;
  560. opacity: 0.7;
  561. }
  562. }
  563. .ad-1 {
  564. width: 100%;
  565. height: 210upx;
  566. padding: 10upx 0;
  567. background: #fff;
  568. image {
  569. width: 100%;
  570. height: 100%;
  571. }
  572. }
  573. /*公用边框样式*/
  574. %icon {
  575. margin-right: 10rpx;
  576. display: inline-block;
  577. padding: 2rpx 10rpx;
  578. border: 1rpx solid $color-yellow;
  579. color: $color-yellow;
  580. line-height: 1;
  581. font-size: $font-base;
  582. border-radius: 10rpx;
  583. }
  584. /* 秒杀专区 */
  585. .seckill-section {
  586. padding: 4rpx 30rpx 24rpx;
  587. .s-header {
  588. display: flex;
  589. align-items: center;
  590. height: 92rpx;
  591. line-height: 1;
  592. .tit-box {
  593. @extend %font-title-box;
  594. }
  595. .tit {
  596. @extend %font-title;
  597. }
  598. .f-left-icon {
  599. @extend %f-left-icon;
  600. }
  601. .tip {
  602. font-size: $font-sm - 10rpx;
  603. color: $font-color-light;
  604. margin: 0 20rpx 0 40rpx;
  605. }
  606. .timer {
  607. display: inline-block;
  608. width: 40rpx;
  609. height: 36rpx;
  610. text-align: center;
  611. line-height: 36rpx;
  612. margin-right: 14rpx;
  613. font-size: $font-sm + 2rpx;
  614. color: #fff;
  615. border-radius: 2px;
  616. background: rgba(0, 0, 0, 0.8);
  617. }
  618. .iconenter {
  619. font-size: $font-sm;
  620. color: $font-color-light;
  621. flex: 1;
  622. text-align: right;
  623. }
  624. }
  625. .floor-list {
  626. white-space: nowrap;
  627. background-color: white;
  628. padding: 20rpx;
  629. border-radius: 5rpx;
  630. box-shadow: $box-shadow;
  631. }
  632. .scoll-wrapper {
  633. display: flex;
  634. align-items: flex-start;
  635. }
  636. .floor-item {
  637. width: 150rpx;
  638. margin-right: 20rpx;
  639. font-size: $font-sm + 2rpx;
  640. color: $font-color-dark;
  641. line-height: 1.8;
  642. image {
  643. width: 150rpx;
  644. height: 150rpx;
  645. border-radius: 6rpx;
  646. }
  647. .price {
  648. color: $color-red;
  649. }
  650. }
  651. }
  652. .f-header {
  653. display: flex;
  654. align-items: center;
  655. height: 92rpx;
  656. padding: 6rpx 30rpx 8rpx;
  657. image {
  658. flex-shrink: 0;
  659. width: 80rpx;
  660. height: 80rpx;
  661. margin-right: 20rpx;
  662. }
  663. .tit-box {
  664. @extend %font-title-box;
  665. }
  666. .tit {
  667. @extend %font-title;
  668. }
  669. .iconenter {
  670. font-size: $font-lg + 2rpx;
  671. color: $font-color-light;
  672. }
  673. .f-left-icon {
  674. @extend %f-left-icon;
  675. }
  676. .iconfont {
  677. font-size: $font-sm - 2rpx;
  678. }
  679. }
  680. /* 团购楼层 */
  681. .group-section {
  682. padding: 0rpx 30rpx 24rpx;
  683. .g-swiper {
  684. height: 650rpx;
  685. border-radius: 5rpx;
  686. box-shadow: $box-shadow;
  687. }
  688. .g-swiper-item {
  689. width: 100%;
  690. padding: 20rpx;
  691. padding-bottom: 30rpx;
  692. display: flex;
  693. background-color: white;
  694. }
  695. image {
  696. width: 100%;
  697. height: 460rpx;
  698. border-radius: 4px;
  699. }
  700. .g-item {
  701. display: flex;
  702. flex-direction: column;
  703. overflow: hidden;
  704. }
  705. .left {
  706. flex: 1.2;
  707. margin-right: 24rpx;
  708. .t-box {
  709. padding-top: 20rpx;
  710. }
  711. }
  712. .right {
  713. flex: 0.8;
  714. flex-direction: column-reverse;
  715. .t-box {
  716. padding-bottom: 20rpx;
  717. }
  718. }
  719. .t-box {
  720. height: 160rpx;
  721. font-size: $font-base + 2rpx;
  722. color: $font-color-dark;
  723. line-height: 1.6;
  724. }
  725. .price {
  726. color: $uni-color-primary;
  727. }
  728. .m-price {
  729. font-size: $font-sm + 2rpx;
  730. text-decoration: line-through;
  731. color: $font-color-light;
  732. margin-left: 8rpx;
  733. }
  734. .pro-box {
  735. display: flex;
  736. align-items: center;
  737. margin-top: 10rpx;
  738. font-size: $font-sm;
  739. color: $font-base;
  740. padding-right: 10rpx;
  741. }
  742. .progress-box {
  743. flex: 1;
  744. border-radius: $border-radius-sm;
  745. overflow: hidden;
  746. margin-right: 8rpx;
  747. }
  748. }
  749. // 会员升级礼包
  750. .uservip {
  751. border-radius: $border-radius-sm;
  752. background-color: white;
  753. box-shadow: $box-shadow;
  754. height: 300rpx;
  755. margin: 0 30rpx;
  756. image {
  757. height: 100%;
  758. width: 300rpx;
  759. }
  760. .detail {
  761. position: relative;
  762. padding: 20rpx;
  763. height: 100%;
  764. flex-grow: 1;
  765. .icon {
  766. @extend %icon;
  767. }
  768. .price-box {
  769. position: absolute;
  770. bottom: 20rpx;
  771. width: calc(100% - 40rpx);
  772. .price {
  773. font-size: $font-lg + 2rpx;
  774. font-weight: bold;
  775. color: $font-color-base;
  776. }
  777. .text {
  778. color: $color-gray;
  779. font-size: $font-sm;
  780. }
  781. }
  782. .title {
  783. font-size: $font-lg;
  784. font-weight: bold;
  785. }
  786. }
  787. }
  788. /* 猜你喜欢 */
  789. .guess-section {
  790. display: flex;
  791. flex-wrap: wrap;
  792. padding: 0 30rpx;
  793. .guess-item {
  794. overflow: hidden;
  795. display: flex;
  796. flex-direction: column;
  797. width: 48%;
  798. margin-bottom: 4%;
  799. border-radius: $border-radius-sm;
  800. background-color: white;
  801. box-shadow: $box-shadow;
  802. &:nth-child(2n + 1) {
  803. margin-right: 4%;
  804. }
  805. }
  806. .image-wrapper {
  807. width: 100%;
  808. height: 330rpx;
  809. border-radius: 3px;
  810. overflow: hidden;
  811. image {
  812. width: 100%;
  813. height: 100%;
  814. opacity: 1;
  815. }
  816. }
  817. .title {
  818. font-size: $font-base;
  819. color: $font-color-dark;
  820. font-weight: bold;
  821. line-height: 80rpx;
  822. }
  823. .price {
  824. font-size: $font-lg;
  825. color: $font-color-base;
  826. font-weight: bold;
  827. line-height: 1;
  828. line-height: 80rpx;
  829. }
  830. .icon {
  831. @extend %icon;
  832. }
  833. .detail {
  834. line-height: 1;
  835. }
  836. .tip {
  837. color: white;
  838. background-color: $color-yellow;
  839. line-height: 1.5;
  840. font-size: $font-sm;
  841. padding-left: 20rpx;
  842. }
  843. }
  844. </style>