index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  1. <template>
  2. <view class="container">
  3. <!-- 头部轮播 -->
  4. <view class="carousel-section">
  5. <!-- 背景色区域 -->
  6. <view class="bg">
  7. <image src="../../static/img/index.png" mode=""></image>
  8. </view>
  9. <!-- 标题栏和状态栏占位符 -->
  10. <view class="titleNview-placing"></view>
  11. <!-- 搜素栏 -->
  12. <view class="search flex">
  13. <!-- <image src="../../static/icon/address.png" class="address"></image>
  14. <view class="shop-name clamp" @click.stop="canChange == 1 ? nav('/pages/shoping/list') : ''">{{ storeInfo.name }}</view> -->
  15. <view class="input-box flex" @click.stop="clickSearch">
  16. <view class=" input-content flex">
  17. <view class="iconfont iconsearch"></view>
  18. <view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
  19. </view>
  20. </view>
  21. </view>
  22. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange"
  23. :indicator-dots="true" indicator-active-color="#FFFFFF">
  24. <!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
  25. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
  26. <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
  27. <!-- <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image> -->
  28. </swiper-item>
  29. </swiper>
  30. </view>
  31. <!-- 分类 -->
  32. <view class="cate-section">
  33. <view class="cate-item" @click="navTo('/pages/product/classify?type=5')">
  34. <image class="Uimg" src="../../static/icon/in1.png"></image>
  35. <text>套餐商品</text>
  36. </view>
  37. <view class="cate-item"
  38. @click="navTo(canChange == 1 ? '/pages/shoping/list?type=5' : '/pages/shoping/list')">
  39. <image src="../../static/icon/in2.png"></image>
  40. <text>附近门店</text>
  41. </view>
  42. <view class="cate-item" @click="navTo('/pages/shoping/list?type=7')">
  43. <image src="../../static/icon/in3.png"></image>
  44. <text>百业联盟</text>
  45. </view>
  46. <view class="cate-item" @click="navTo('/pages/prefecture/integral')">
  47. <image src="../../static/icon/in4.png"></image>
  48. <text>积分商城</text>
  49. </view>
  50. <view class="cate-item" @click="navTo('/pages/prefecture/voucher')">
  51. <image src="../../static/icon/in5.png"></image>
  52. <text>消费券商城</text>
  53. </view>
  54. <view class="cate-item" @click="navTo('/pages/shoping/shopService','2')">
  55. <image src="../../static/icon/in6.png"></image>
  56. <text>养发馆</text>
  57. </view>
  58. <view class="cate-item" @click="navTo('/pages/product/supermarket')">
  59. <image src="../../static/icon/in7.png"></image>
  60. <text>超市</text>
  61. </view>
  62. <view class="cate-item" @click="navTo('/pages/product/classify?type=7')">
  63. <image src="../../static/icon/in8.png"></image>
  64. <text>百业商品</text>
  65. </view>
  66. <view class="cate-item" @click="navTo('/pages/sign/prize')">
  67. <image src="../../static/icon/in9.png"></image>
  68. <text>签到</text>
  69. </view>
  70. <view class="cate-item" @click="navTo('/pages/received/index?state=0')">
  71. <image src="../../static/icon/in10.png"></image>
  72. <text>收付款</text>
  73. </view>
  74. </view>
  75. <view class="cate-two flex">
  76. <view class="catet-item" @click="navTo('/pages/sign/index','2')">
  77. <image class="catet-icon" src="../../static/icon/in11.png" mode="heightFix"></image>
  78. <view class="catet-font">
  79. 民间偏方
  80. </view>
  81. </view>
  82. <view class="catet-item" @click="navTo('/pages/sign/index','2')">
  83. <image class="catet-icon" src="../../static/icon/in12.png" mode="heightFix"></image>
  84. <view class="catet-font">
  85. 成人用品
  86. </view>
  87. </view>
  88. <view class="catet-item" @click="navTo('/pages/shareQrCode/index')">
  89. <image class="catet-icon" src="../../static/icon/in13.png" mode="heightFix"></image>
  90. <view class="catet-font">
  91. 推广二维码
  92. </view>
  93. </view>
  94. </view>
  95. <view class="seckill-box flex">
  96. <view class="seckill-left" @click="navTo('/pages/seckill/seckill')">
  97. <view class="seckill-title">
  98. 限时秒杀
  99. </view>
  100. <view class="seckill-time">
  101. <uni-countdown color="#ffffff" background-color="#ff8712" borderColor="rgba(0, 0, 0, 0.3)"
  102. splitorColor="#ff8712" :show-day="false" :hour="indexList[0].stopTimeH"
  103. :minute="indexList[0].stopTimeM" :second="indexList[0].stopTimeS"></uni-countdown>
  104. </view>
  105. <view class="seckill-tip">
  106. 抢购中
  107. </view>
  108. <view class="seckill-btn">
  109. <image class="seckillbtn-icon" src="../../static/icon/sd.png" mode=""></image>
  110. <view class="seckillbtn-font">
  111. 立即抢购
  112. </view>
  113. <image class="seckill-bk" src="../../static/icon/bjt.png" mode=""></image>
  114. </view>
  115. </view>
  116. <view class="xian">
  117. </view>
  118. <view class="seckill-main flex">
  119. <view class="seckill-item" v-for="(item,index) in indexList[0].dataList" @click="navProduct(item)">
  120. <image class="seckill-icon" :src="item.image" mode=""></image>
  121. <view class="seckill-font clamp">{{item.title}}</view>
  122. <view class="price-box">
  123. <view class="price">¥{{item.price*1}}</view>
  124. <!-- <view class="sale">已售20</view> -->
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 精选好货 -->
  130. <view class="bastgood-box">
  131. <view class="bast-bg">
  132. <view class="base"></view>
  133. <view class="bast-name">爆款推荐</view>
  134. <view class="base"></view>
  135. </view>
  136. <view class="guess">
  137. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  138. <image :src="item.image"></image>
  139. <view class="guess-box">
  140. <view class="title clamp">{{ item.store_name }}</view>
  141. <view class="guessbtm-box flex">
  142. <view class="price">¥{{ item.price }} <text class="yuan">¥{{ item.ot_price }}</text> </view>
  143. <image @click.stop="toggleSpec(item.id)" class="btn" src="../../static/icon/cart.png"
  144. mode=""></image>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. </template>
  152. <script>
  153. import {
  154. openMap
  155. } from '@/utils/rocessor.js';
  156. import {
  157. loadIndexs,
  158. store_list,
  159. getStore
  160. } from '@/api/index.js';
  161. import {
  162. interceptor
  163. } from '@/utils/loginUtils';
  164. import {
  165. userinfo
  166. } from '@/api/user.js';
  167. import {
  168. mapState,
  169. mapMutations
  170. } from 'vuex';
  171. import {
  172. getProducts,
  173. cartAdd,
  174. } from '@/api/product.js';
  175. // #ifdef H5
  176. import {
  177. weixindata,
  178. shareLoad
  179. } from '@/utils/wxAuthorized';
  180. // #endif
  181. import {
  182. getList,
  183. getClass
  184. } from '@/api/seckill.js';
  185. export default {
  186. filters: {
  187. moneyNum: function(value) {
  188. return +value;
  189. }
  190. },
  191. data() {
  192. return {
  193. indexList: [{
  194. stopTimeH: 1,
  195. stopTimeM: 1,
  196. stopTimeS: 1
  197. }],
  198. titleNViewBackground: '',
  199. swiperCurrent: 0,
  200. swiperLength: 0,
  201. longitude: 121.436289, //经度
  202. latitude: 28.651485, //纬度
  203. carouselList: [], //轮播列表
  204. goodsList: [], //积分商品列表
  205. bastList: [], //消费券商品列表
  206. integralList: [], //积分商品列表
  207. bastBanner: [], //促销商品列表
  208. menusList: [], //头部菜单
  209. userServant: [{
  210. image: ''
  211. }] //用户推广服务
  212. };
  213. },
  214. computed: {
  215. ...mapState(['loginInterceptor', 'storeInfo', 'canChange', 'baseURL']),
  216. ...mapState('user', ['hasLogin', 'userInfo'])
  217. },
  218. onLoad(option) {
  219. let agree = uni.getStorageSync('agree') || false;
  220. //#ifdef APP-PLUS
  221. // 判断是否已经同意协议
  222. if (!agree) {
  223. uni.redirectTo({
  224. url: '/pages/contract/start'
  225. });
  226. }
  227. //#endif
  228. if (option.spread) {
  229. // 存储邀请人
  230. uni.setStorage({
  231. key: 'spread',
  232. data: option.spread
  233. });
  234. }
  235. let canChange = uni.getStorageSync('canChange') || '';
  236. if (option.store_id) {
  237. getStore({
  238. id: option.store_id
  239. }).then(({
  240. data
  241. }) => {
  242. this.setStoreInfo(data);
  243. console.log(data);
  244. });
  245. this.setCanChange();
  246. uni.setStorageSync('canChange', option.store_id);
  247. } else {
  248. if (canChange == '') {
  249. this.getaddress();
  250. } else {
  251. console.log('进入缓存');
  252. getStore({
  253. id: canChange
  254. }).then(({
  255. data
  256. }) => {
  257. this.setStoreInfo(data);
  258. });
  259. this.setCanChange();
  260. }
  261. }
  262. },
  263. onShow() {
  264. // 判断是否强制登录
  265. if (this.loginInterceptor && !this.hasLogin) {
  266. // 登录拦截
  267. userinfo()
  268. .then(e => {
  269. // #ifdef H5
  270. this.IndexShare();
  271. // #endif
  272. })
  273. .catch(e => {
  274. console.log(e);
  275. });
  276. }
  277. if (this.hasLogin) {
  278. // #ifdef H5
  279. this.IndexShare();
  280. // #endif
  281. }
  282. this.loadData();
  283. this.getSeckillinfo()
  284. },
  285. // #ifndef MP
  286. // 监听导航栏输入框点击事件
  287. onNavigationBarSearchInputClicked(e) {
  288. //跳转到搜索页面
  289. this.clickSearch();
  290. },
  291. //点击导航栏 buttons 时触发
  292. onNavigationBarButtonTap(e) {
  293. const index = e.index;
  294. if (index === 0) {
  295. this.$api.msg('点击了扫描');
  296. } else if (index === 1) {
  297. // #ifdef APP-PLUS
  298. const pages = getCurrentPages();
  299. const page = pages[pages.length - 1];
  300. const currentWebview = page.$getAppWebview();
  301. currentWebview.hideTitleNViewButtonRedDot({
  302. index
  303. });
  304. // #endif
  305. uni.navigateTo({
  306. url: '/pages/notice/notice'
  307. });
  308. }
  309. },
  310. // #endif
  311. methods: {
  312. ...mapMutations(['setLat', 'setLon', 'setStoreInfo', 'setCanChange']),
  313. // #ifdef H5
  314. IndexShare() {
  315. let obj = this;
  316. let pages = getCurrentPages();
  317. // 获取当前页面
  318. let page = pages[pages.length - 1];
  319. let path = '/pages/index/index' + '?';
  320. // 保存传值
  321. for (let i in page.options) {
  322. path += i + '=' + page.options[i] + '&';
  323. }
  324. console.log(obj.Path);
  325. // 保存邀请人
  326. path += 'spread=' + this.userInfo.uid;
  327. let data = {
  328. link: this.baseURL + path,
  329. title: this.userInfo.nickname + '邀请您进入满园春',
  330. desc: '欢迎加入满园春',
  331. imgUrl: this.baseURL + '/static/img/logo.png'
  332. };
  333. console.log(data, '分享数据');
  334. shareLoad(data);
  335. },
  336. // #endif
  337. //获取定位信息
  338. getaddress() {
  339. console.log('dizhi+++++++++++');
  340. let obj = this;
  341. uni.getLocation({
  342. type: 'gcj02',
  343. success: res => {
  344. console.log(res);
  345. console.log('66666666666666666666');
  346. obj.setLat(res.latitude);
  347. obj.setLon(res.longitude);
  348. obj.getStore(res.latitude, res.longitude);
  349. },
  350. fail: err => {
  351. console.log(err, 'shi+++++++++++++++');
  352. openMap().then(e => {
  353. this.getaddress();
  354. });
  355. }
  356. });
  357. },
  358. // 點擊搜索框
  359. clickSearch() {
  360. uni.navigateTo({
  361. url: '/pages/product/search'
  362. });
  363. },
  364. navTo(url, type = 1) {
  365. if (type == 2) {
  366. return this.$api.msg('敬请期待')
  367. }
  368. if (!this.hasLogin) {
  369. url = '/pages/public/login';
  370. // #ifdef H5
  371. let weichatBrowser = uni.getStorageSync('weichatBrowser');
  372. // 判断是否为微信浏览器
  373. if (weichatBrowser) {
  374. url = '/pages/public/wxLogin';
  375. }
  376. // #endif
  377. // #ifdef MP-WEIXIN
  378. url = '/pages/public/wxLogin';
  379. // #endif
  380. }
  381. uni.navigateTo({
  382. url
  383. });
  384. },
  385. // 监听图片加载完成
  386. onImageError(key, index) {
  387. this[key][index].image = '/static/error/errorImage.jpg';
  388. },
  389. getStore(latitude, longitude) {
  390. let obj = this;
  391. store_list({
  392. latitude: latitude,
  393. longitude: longitude,
  394. page: 1,
  395. limit: 1
  396. }).then(({
  397. data
  398. }) => {
  399. console.log(data, 'storeInfo++++');
  400. obj.setStoreInfo(data.list[0]);
  401. });
  402. },
  403. // 加入购物车
  404. toggleSpec(str) {
  405. cartAdd({
  406. cartNum: 1, //商品数量
  407. uniqueId: '', //商品标签
  408. new: 0, //商品是否新增加到购物车1为不加入0为加入
  409. mer_id: 0,
  410. is_consumer: 0,
  411. productId: str
  412. }).then(e => {
  413. uni.showToast({
  414. title: '成功加入购物车',
  415. type: 'top',
  416. duration: 2000
  417. });
  418. })
  419. },
  420. // 请求载入数据
  421. async loadData() {
  422. const obj = this;
  423. loadIndexs({}).then(({
  424. data
  425. }) => {
  426. let goods = data.info;
  427. this.carouselList = data.banner;
  428. this.swiperLength = this.carouselList.length;
  429. this.menusList = data.menus;
  430. this.goodsList = goods.bastList; //最新商品
  431. this.integralList = goods.integralList;
  432. });
  433. },
  434. navProduct(ls) {
  435. uni.navigateTo({
  436. url: '/pages/product/product?id=' + ls.id + '&type=1' + '&stoptime=' + this.indexList[0].stop
  437. });
  438. },
  439. getSeckillinfo() {
  440. const obj = this;
  441. getClass({}).then(({
  442. data
  443. }) => {
  444. let list = data.seckillTime.filter(e => {
  445. return e.status == 1
  446. })
  447. this.indexList = list.map(e => {
  448. e.dataList = [];
  449. obj.timeComputed(e.stop * 1000, e)
  450. getList({
  451. page: 1,
  452. limit: 3
  453. }, e.id).then(ar => {
  454. e.dataList = ar.data;
  455. })
  456. return e;
  457. })
  458. console.log(this.indexList, '123456');
  459. })
  460. },
  461. timeComputed(da, ar) {
  462. let obj = ar;
  463. // 设置到期时间
  464. let time = new Date(da);
  465. // 获取当前时间
  466. let actTime = new Date();
  467. // 获取到期时间具体值
  468. let tH = time.getHours();
  469. let tM = time.getMinutes();
  470. let tS = time.getSeconds();
  471. // 获取当前时间具体值
  472. let aH = actTime.getHours();
  473. let aM = actTime.getMinutes();
  474. let aS = actTime.getSeconds();
  475. // 计算时间,保存需要多少时间到期
  476. obj.stopTimeH = tH - aH;
  477. obj.stopTimeM = tM - aM;
  478. obj.stopTimeS = tS - aS;
  479. },
  480. //轮播图切换修改背景色
  481. swiperChange(e) {
  482. const index = e.detail.current;
  483. this.swiperCurrent = index;
  484. // this.titleNViewBackground = this.carouselList[index].background;
  485. },
  486. //详情页
  487. navToDetailPage(item) {
  488. uni.navigateTo({
  489. url: '/pages/product/product?id=' + item.id
  490. });
  491. },
  492. //积分详情页
  493. navToDetailPagejf(item) {
  494. uni.navigateTo({
  495. url: '/pages/product/product?id=' + item.id
  496. });
  497. },
  498. //消费券详情页
  499. navToDetailvoucher(item) {
  500. uni.navigateTo({
  501. url: '/pages/prefecture/detail?id=' + item.id
  502. });
  503. },
  504. // 轮播图跳转
  505. bannerNavToUrl(item) {
  506. // #ifdef H5
  507. if (item.wap_url.indexOf('http') > 0) {
  508. window.location.href = item.wap_url;
  509. }
  510. // #endif
  511. //测试数据没有写id,用title代替
  512. uni.navigateTo({
  513. url: item.wap_url
  514. });
  515. },
  516. nav(url) {
  517. console.log(url, '111111111');
  518. uni.navigateTo({
  519. url
  520. });
  521. }
  522. }
  523. };
  524. </script>
  525. <style lang="scss">
  526. page {
  527. background: #f5f5f5;
  528. }
  529. .m-t {
  530. margin-top: 16rpx;
  531. }
  532. /* 头部 轮播图 */
  533. .carousel-section {
  534. position: relative;
  535. padding-top: 10px;
  536. overflow: hidden;
  537. .bg {
  538. position: absolute;
  539. top: 0;
  540. left: 0;
  541. width: 750rpx;
  542. height: 460rpx;
  543. image {
  544. width: 100%;
  545. height: 100%;
  546. }
  547. }
  548. .titleNview-placing {
  549. height: var(--status-bar-height);
  550. box-sizing: content-box;
  551. }
  552. .search {
  553. justify-content: center;
  554. padding: 10rpx 24rpx 20rpx;
  555. align-items: center;
  556. .address {
  557. width: 32rpx;
  558. height: 38rpx;
  559. }
  560. .shop-name {
  561. height: 38rpx;
  562. position: relative;
  563. z-index: 100;
  564. width: 206rpx;
  565. font-size: 30rpx;
  566. font-family: PingFang SC;
  567. font-weight: 500;
  568. color: #ffffff;
  569. padding-left: 10rpx;
  570. }
  571. .input-box {
  572. position: relative;
  573. z-index: 99;
  574. width: 700rpx;
  575. height: 60rpx;
  576. background: rgba(39, 170, 116, 0.4);
  577. box-shadow: 0px 9rpx 21rpx 0px rgba(4, 114, 69, 0.22);
  578. border-radius: 30px;
  579. margin: 0 auto;
  580. .input-content {
  581. justify-content: center;
  582. position: relative;
  583. z-index: 11;
  584. border-radius: 99rpx;
  585. flex-grow: 1;
  586. padding: 5rpx 30rpx;
  587. background: #a2e0c7;
  588. .iconsearch {
  589. font-size: 50rpx;
  590. color: #ffffff;
  591. }
  592. .input {
  593. margin-left: 19rpx;
  594. color: #ffffff;
  595. input {
  596. font-size: 26rpx;
  597. color: #ffffff;
  598. }
  599. }
  600. }
  601. .input-button {
  602. padding-left: 20rpx;
  603. font-size: $font-base;
  604. height: 100%;
  605. }
  606. }
  607. }
  608. }
  609. .carousel {
  610. width: 100%;
  611. height: 320rpx;
  612. background-color: #fff;
  613. .carousel-item {
  614. width: 100%;
  615. height: 100%;
  616. padding: 0 28rpx;
  617. overflow: hidden;
  618. }
  619. image {
  620. width: 100%;
  621. height: 100%;
  622. border-radius: $border-radius-sm;
  623. }
  624. }
  625. .swiper-dots {
  626. display: flex;
  627. position: absolute;
  628. left: 60rpx;
  629. bottom: 15rpx;
  630. width: 72rpx;
  631. height: 36rpx;
  632. 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==);
  633. background-size: 100% 100%;
  634. .num {
  635. width: 36rpx;
  636. height: 36rpx;
  637. border-radius: 50px;
  638. font-size: 24rpx;
  639. color: #fff;
  640. text-align: center;
  641. line-height: 36rpx;
  642. }
  643. .sign {
  644. position: absolute;
  645. top: 0;
  646. left: 50%;
  647. line-height: 36rpx;
  648. font-size: 12rpx;
  649. color: #fff;
  650. transform: translateX(-50%);
  651. }
  652. }
  653. /* 分类 */
  654. .cate-section {
  655. display: flex;
  656. justify-content: space-around;
  657. align-items: center;
  658. flex-wrap: wrap;
  659. padding: 16rpx 22rpx 48rpx;
  660. background: #fff;
  661. .cate-item {
  662. padding-top: 32rpx;
  663. width: 20%;
  664. display: flex;
  665. flex-direction: column;
  666. align-items: center;
  667. font-size: 24rpx;
  668. font-family: PingFang SC;
  669. font-weight: bold;
  670. color: #333333;
  671. .none-font-color {
  672. color: $page-color-base;
  673. }
  674. .Uimg {
  675. border-radius: 999px;
  676. }
  677. }
  678. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  679. image {
  680. width: 88rpx;
  681. height: 88rpx;
  682. margin-bottom: 14rpx;
  683. border-radius: 50%;
  684. opacity: 0.7;
  685. }
  686. }
  687. .cate-two {
  688. padding: 20rpx 22rpx;
  689. background: #ffffff;
  690. .catet-item {
  691. display: flex;
  692. align-items: center;
  693. padding: 12rpx 20rpx;
  694. background: #f7f8fa;
  695. .catet-icon {
  696. height: 40rpx;
  697. }
  698. .catet-font {
  699. font-size: 28rpx;
  700. font-family: PingFang SC;
  701. font-weight: 500;
  702. color: #333333;
  703. margin-left: 10rpx;
  704. }
  705. }
  706. }
  707. .seckill-box {
  708. justify-content: start;
  709. padding: 28rpx 20rpx;
  710. background: #ffffff;
  711. .seckill-left {
  712. padding: 0 10rpx;
  713. width: 200rpx;
  714. display: flex;
  715. flex-direction: column;
  716. align-items: center;
  717. justify-content: center;
  718. .seckill-title {
  719. font-size: 30rpx;
  720. font-family: Source Han Sans CN;
  721. font-weight: 500;
  722. color: #333333;
  723. }
  724. .seckill-time {
  725. margin-top: 16rpx;
  726. }
  727. .seckill-tip {
  728. margin-top: 16rpx;
  729. font-size: 20rpx;
  730. font-family: PingFang SC;
  731. font-weight: 500;
  732. color: #8A9498;
  733. }
  734. .seckill-btn {
  735. margin-top: 20rpx;
  736. display: flex;
  737. justify-content: center;
  738. align-items: center;
  739. width: 150rpx;
  740. height: 36rpx;
  741. background: #52C696;
  742. border-radius: 18rpx;
  743. .seckillbtn-icon {
  744. width: 20rpx;
  745. height: 26rpx;
  746. }
  747. .seckillbtn-font {
  748. font-size: 20rpx;
  749. font-family: PingFang SC;
  750. font-weight: 400;
  751. color: #FFFFFF;
  752. }
  753. .seckill-bk {
  754. width: 10rpx;
  755. height: 18rpx;
  756. }
  757. }
  758. }
  759. .xian {
  760. margin: 0 10rpx;
  761. width: 1rpx;
  762. height: 232rpx;
  763. background: #DCDCDC;
  764. }
  765. .seckill-main {
  766. width: 100%;
  767. }
  768. .seckill-item {
  769. width: 33%;
  770. display: flex;
  771. flex-direction: column;
  772. align-items: center;
  773. .seckill-icon {
  774. width: 146rpx;
  775. height: 146rpx;
  776. background: #F4F4F4;
  777. border-radius: 12rpx;
  778. }
  779. .seckill-font {
  780. margin-top: 16rpx;
  781. width: 146rpx;
  782. font-size: 21rpx;
  783. font-family: PingFang SC;
  784. font-weight: bold;
  785. color: #414141;
  786. line-height: 34rpx;
  787. }
  788. .price-box {
  789. width: 100%;
  790. align-items: flex-end;
  791. .price {
  792. font-size: 28rpx;
  793. font-family: PingFang SC;
  794. font-weight: bold;
  795. color: #FF6B2E;
  796. }
  797. .sale {
  798. font-size: 24rpx;
  799. font-family: PingFang SC;
  800. font-weight: 500;
  801. color: #999999;
  802. }
  803. }
  804. }
  805. }
  806. .ad-1 {
  807. width: 100%;
  808. height: 210upx;
  809. padding: 10upx 0;
  810. background: #fff;
  811. image {
  812. width: 100%;
  813. height: 100%;
  814. }
  815. }
  816. /*公用边框样式*/
  817. %icon {
  818. margin-right: 10rpx;
  819. display: inline-block;
  820. padding: 2rpx 10rpx;
  821. border: 1rpx solid $color-yellow;
  822. color: $color-yellow;
  823. line-height: 1;
  824. font-size: $font-base;
  825. border-radius: 10rpx;
  826. }
  827. .bastgood-box {
  828. margin-top: 20rpx;
  829. background-color: #ffffff;
  830. padding: 40rpx 0;
  831. .bast-bg {
  832. display: flex;
  833. justify-content: center;
  834. align-items: center;
  835. .base {
  836. width: 120rpx;
  837. height: 1rpx;
  838. background: #989898;
  839. }
  840. .bast-name {
  841. margin: 0 70rpx;
  842. font-size: 30rpx;
  843. font-family: PingFang SC;
  844. font-weight: 500;
  845. color: #393939;
  846. line-height: 28rpx;
  847. }
  848. }
  849. .guess {
  850. display: flex;
  851. justify-content: space-between;
  852. flex-wrap: wrap;
  853. padding: 20rpx;
  854. }
  855. .guess-item {
  856. margin-top: 20rpx;
  857. width: 345rpx;
  858. background: #FFFFFF;
  859. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  860. border-radius: 10rpx;
  861. image {
  862. width: 345rpx;
  863. height: 345rpx;
  864. border-radius: 10rpx;
  865. }
  866. .guess-box {
  867. padding: 28rpx 20rpx;
  868. width: 345rpx;
  869. .title {
  870. font-size: 30rpx;
  871. font-family: PingFang SC;
  872. font-weight: bold;
  873. color: #333333;
  874. }
  875. .price {
  876. font-size: 36rpx;
  877. font-family: PingFang SC;
  878. font-weight: bold;
  879. color: #FF6B2E;
  880. .yuan {
  881. display: inline-block;
  882. margin-left: 10rpx;
  883. font-size: 26rpx;
  884. font-family: PingFang SC;
  885. font-weight: 500;
  886. text-decoration: line-through;
  887. color: #989898;
  888. }
  889. }
  890. .btn {
  891. width: 44rpx;
  892. height: 44rpx;
  893. background: #00ca95;
  894. border-radius: 50rpx;
  895. }
  896. }
  897. }
  898. }
  899. </style>