index.vue 22 KB

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