index.vue 20 KB

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