index.vue 20 KB

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