index.vue 23 KB

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