index.vue 21 KB

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