index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <template>
  2. <view class="core">
  3. <!-- nav -->
  4. <u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
  5. <view class="u-nav-slot" slot="left">
  6. <view class="u-nav-slot__input flex">
  7. <u--input v-model="goodsTitle" @confirm="toGoodsList()" confirmType="search" placeholder="搜索商品" border="none" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" />
  8. <!-- <view class="u-nav-slot__input__btn" @click="toGoodsList()">搜索</view> -->
  9. </view>
  10. </view>
  11. </u-navbar>
  12. <!-- 固定顶部搜索、分类 -->
  13. <view class="fixed-top">
  14. <view class="fixed-top-classify">
  15. <u-tabs @change="changeClassify" :scrollable="true" :list="classifyList" lineWidth="20" lineHeight="2"
  16. lineColor="#FF8D0B" :activeStyle="{
  17. color: '#333',
  18. transform: 'scale(1.1)'
  19. }" :inactiveStyle="{
  20. color: '#999',
  21. transform: 'scale(1.1)'
  22. }" itemStyle="padding-left: 15px; padding-right: 15px; height: 44px; text-align: center;">
  23. </u-tabs>
  24. </view>
  25. <!-- 盲豆筛选 -->
  26. <view class="fixed-top-screen" v-if="scrollTop > 50">
  27. <view class="fixed-top-screen-content flex">
  28. <view class="fixed-top-screen-content__item flex">
  29. <view class="title">我的盲豆:</view>
  30. <view class="num">{{ initData.coinNum ? `${ initData.coinNum }` : '--' }}</view>
  31. </view>
  32. <view class="fixed-top-screen-content__item flex" @click="changeScreen(1)">
  33. <view class="title">价格</view>
  34. <view class="select flex" v-if="screenIndex == 1">
  35. <image src="../../static/core/core_up.png" mode="" v-if="priceShow" />
  36. <image src="../../static/core/core_down.png" mode="" v-else />
  37. </view>
  38. <view class="select flex" v-else>
  39. <image src="../../static/core/core_null.png" mode="" />
  40. </view>
  41. </view>
  42. <view class="fixed-top-screen-content__item flex" @click="changeScreen(2)">
  43. <view class="title" v-if="!coinActionInfo.min && !coinActionInfo.max">盲豆区间</view>
  44. <view class="title flex" v-else>
  45. <view v-if="coinActionInfo.min">{{ coinActionInfo.min }}</view>
  46. <view v-if="coinActionInfo.max">-{{ coinActionInfo.max }}</view>
  47. <view>{{ coinActionInfo.desc }}</view>
  48. </view>
  49. <u-icon name="arrow-up" size="13" color="#fff" v-if="screenShow"></u-icon>
  50. <u-icon name="arrow-down" size="13" color="#fff" v-else></u-icon>
  51. </view>
  52. <view class="fixed-top-screen-content__coin" v-if="screenShow">
  53. <view class="fixed-top-screen-content__coin__list">
  54. <view class="item flex" :class="{ 'action': coinActionIndex == index }" v-for="(item, index) in coinList" :key="index" @click="selectCoin(item, index)">
  55. <text v-if="item.min">{{ item.min }}</text>
  56. <text v-if="item.max">-{{ item.max }}</text>
  57. <text>{{ item.desc }}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="core-none"></view>
  65. <!-- 轮播 -->
  66. <view class="core-swiper" v-if="swiperList.length">
  67. <swiper class="core-swiper-centent" circular :indicator-dots="true" :autoplay="true" :interval="3000" indicator-active-color="#fff">
  68. <swiper-item class="swiper-item" v-for="(item, index) in swiperList" :key="index" @click="toPage(item)">
  69. <image :src="item.picUrl" mode=""></image>
  70. </swiper-item>
  71. </swiper>
  72. </view>
  73. <!-- 二级分类 -->
  74. <view class="core-category">
  75. <swiper class="core-category-swiper" :autoplay="false">
  76. <swiper-item class="swiper-item" v-for="(item, index) in classifyIndex == 0 ? classifyListFilter : classifyList[classifyIndex].list" :key="index">
  77. <view class="swiper-item__content" v-for="(items, indexs) in item" :key="indexs">
  78. <image :src="items.picUrl" mode="aspectFit" @click="toCategoryGoods(index, indexs)"></image>
  79. <view class="name">{{ items.name }}</view>
  80. </view>
  81. </swiper-item>
  82. </swiper>
  83. </view>
  84. <!-- 标签商品 -->
  85. <view class="tag-goods" v-for="(item, index) in exclusiveSingle" :key="index">
  86. <image class="tag-goods-imgBg" src="../../static/core/core_bg.png" mode=""></image>
  87. <view class="tag-goods-content">
  88. <view class="tag-goods-content-nav flex">
  89. <view class="tag-goods-content-nav__left flex">
  90. <image src="../../static/core/core_tag.png" mode=""></image>
  91. <view class="title">{{ item.name }}</view>
  92. <image src="../../static/core/core_tag.png" mode=""></image>
  93. </view>
  94. <view class="tag-goods-content-nav__right flex" @click="toTagGoods(item)">
  95. <view class="title">更多</view>
  96. <image src="../../static/core/core_right.png" mode=""></image>
  97. </view>
  98. </view>
  99. <view class="tag-goods-content-list">
  100. <view class="tag-goods-content-list-item flex" v-for="(items, indexs) in item.data" :key="indexs" @click="toGoodsDetail(items)">
  101. <view class="image flex">
  102. <image :src="items.picUrl" mode="aspectFit"></image>
  103. </view>
  104. <view class="title">{{ items.exchangePrice }}盲豆</view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 商品列表 -->
  110. <view class="core-goods">
  111. <view class="core-goods-list flex">
  112. <view class="core-goods-list-item flex" v-for="(item, index) in list" :key="index" @click="toGoodsDetail(item)">
  113. <view class="image-wrap flex">
  114. <image :src="item.picUrl" mode="aspectFit"></image>
  115. </view>
  116. <view class="content">
  117. <view class="content-title ells-one">{{ item.title }}</view>
  118. <view class="content-coin flex">
  119. <view class="content-coin__left flex">
  120. <image src="../../static/public/goods_coin.png" mode=""></image>
  121. <view class="num"><text>×</text>{{ item.exchangePrice }}</view>
  122. </view>
  123. <view class="content-coin__right" v-if="item.originPrice">{{ item.originPrice }}</view>
  124. </view>
  125. <view class="content-price">¥{{ $numberFormat(item.value) }}</view>
  126. </view>
  127. </view>
  128. <view class="core-goods-list-item"></view>
  129. </view>
  130. <view class="flex empty" v-if="!list.length">
  131. <view class="center">
  132. <image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode=""></image>
  133. <view class="center-font">还没有商品</view>
  134. </view>
  135. </view>
  136. </view>
  137. <custom-tab-bar :activeValue="'core'" />
  138. </view>
  139. </template>
  140. <script>
  141. import env from '../../config/env.js'
  142. import $http from '@/utils/request.js'
  143. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  144. export default {
  145. components: {
  146. CustomTabBar,
  147. },
  148. data() {
  149. return {
  150. pageNum: 1,
  151. total: 0,
  152. list: [],
  153. exclusiveSingle: [],
  154. categoryId: '',
  155. classifyList: [], // 分类列表
  156. classifyIndex: 0, // 分类选中下标
  157. classifyListFilter: [],
  158. swiperList: [], // 轮播图
  159. goodsTitle: '',
  160. scrollTop: 0,
  161. screenIndex: 0,
  162. priceShow: false,
  163. priceSort: null,
  164. priceStep: 0,
  165. screenShow: false,
  166. initData: {},
  167. coinNum:{
  168. startPrice: null,
  169. endPrice: null
  170. },
  171. coinActionIndex: 0,
  172. coinActionInfo: {},
  173. coinList:[
  174. {
  175. min: null,
  176. max: null,
  177. desc: '全部'
  178. },
  179. {
  180. min: 1,
  181. max: 100,
  182. desc: ''
  183. },
  184. {
  185. min: 101,
  186. max: 200,
  187. desc: ''
  188. },
  189. {
  190. min: 201,
  191. max: 500,
  192. desc: ''
  193. },
  194. {
  195. min: 501,
  196. max: 1000,
  197. desc: ''
  198. },
  199. {
  200. min: 1001,
  201. max: 5000,
  202. desc: ''
  203. },
  204. {
  205. min: 5000,
  206. max: null,
  207. desc: '以上'
  208. },
  209. ],
  210. };
  211. },
  212. onLoad() {
  213. this.pageList()
  214. this.getExclusive()
  215. this.getClassify()
  216. this.getSwiper()
  217. },
  218. onShow() {
  219. if(uni.getStorageSync('token')) {
  220. this.getBean()
  221. }
  222. },
  223. onPageScroll: function(e) {
  224. this.scrollTop = e.scrollTop
  225. },
  226. methods: {
  227. pageList() {
  228. this.pageNum = 1
  229. this.total = 0
  230. this.list = []
  231. this.getList()
  232. },
  233. // 获取分类
  234. getClassify() {
  235. $http.post('/api/v1/mp/user/exchange/category/listTree', {}).then(res => {
  236. if(res.code == 0){
  237. let interval = 10
  238. this.classifyList = res && res.rows
  239. this.classifyList.forEach(item => {
  240. item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/340'
  241. item.goodsCategoryList.forEach(ele => {
  242. ele.picUrl = env.filePublic + ele.picUrl.split(',')[0] + '?imageView2/2/w/340'
  243. })
  244. item.list = []
  245. if(item.goodsCategoryList.length > interval) {
  246. let num = Math.ceil(item.goodsCategoryList.length / interval)
  247. let arr = []
  248. let a = 0
  249. let stop = interval
  250. for(let i = 1; i <= num; i++) {
  251. arr = item.goodsCategoryList.slice(a, stop)
  252. a = i * interval
  253. stop = stop + interval
  254. }
  255. } else {
  256. item.list.push(item.goodsCategoryList)
  257. }
  258. })
  259. if(this.classifyList.length > interval) {
  260. let num = Math.ceil(this.classifyList.length / interval)
  261. let arr = []
  262. let a = 0
  263. let stop = interval
  264. for(let i = 1; i <= num; i++) {
  265. arr = this.classifyList.slice(a, stop)
  266. a = i * interval
  267. stop = stop + interval
  268. this.classifyListFilter.push(arr)
  269. }
  270. } else {
  271. this.classifyListFilter =[ [ ...this.classifyList ] ]
  272. }
  273. this.classifyList.unshift({ name: '全部', categoryId: '' })
  274. }
  275. })
  276. },
  277. //轮播图
  278. getSwiper() {
  279. $http.post(`/api/v1/mp/user/exchange/banner/list`, {
  280. noToken: true,
  281. location: "top"
  282. }).then(res => {
  283. res.data.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0])
  284. this.swiperList = res.data
  285. })
  286. },
  287. // 标签商品
  288. async getExclusive() {
  289. let resData = await $http.post(`/api/v1/mp/user/exchange/activity/list`, {
  290. noToken: true
  291. })
  292. let goodsList = []
  293. for (let item of resData.data) {
  294. let resDatas = await $http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=1&pageSize=10`, {
  295. noToken: true,
  296. tagIds: item.tagId
  297. })
  298. goodsList.push({
  299. data: resDatas.rows,
  300. name: item.name,
  301. tagId: item.tagId
  302. })
  303. }
  304. goodsList.forEach(item => {
  305. item.data.forEach(items => {
  306. items.picUrl = env.filePublic + items.picUrl.split(',')[0] + '?imageView2/2/w/340'
  307. })
  308. })
  309. this.exclusiveSingle = goodsList
  310. },
  311. // 商品列表
  312. getList() {
  313. uni.showLoading({
  314. title: '加载中'
  315. });
  316. let data = {
  317. categoryId: this.categoryId,
  318. priceSort: this.priceSort,
  319. ...this.coinNum,
  320. noToken: true
  321. }
  322. $http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=${this.pageNum}&pageSize=20`,data).then(
  323. res => {
  324. uni.hideLoading();
  325. if (res.code == 0) {
  326. res.rows.forEach(item => {
  327. let picUrlArr = item.picUrl.split(',')
  328. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
  329. })
  330. this.total = res.total
  331. this.list = this.list.concat(res.rows)
  332. }
  333. }).catch(() => {
  334. uni.hideLoading();
  335. })
  336. },
  337. getBean() {
  338. uni.showLoading({
  339. title: '加载中'
  340. });
  341. $http.post('/api/v1/mp/user/mine/init', {}).then(res => {
  342. uni.hideLoading();
  343. if (res.code == 0) {
  344. this.initData = res.data
  345. }
  346. }).catch(() => {
  347. uni.hideLoading();
  348. })
  349. },
  350. // 切换分类
  351. changeClassify(e) {
  352. this.categoryId = e.categoryId
  353. this.classifyIndex = e.index
  354. this.screenIndex = 0
  355. this.priceStep = 0
  356. this.priceShow = false
  357. this.priceSort = null
  358. this.coinActionIndex = 0
  359. this.screenShow = false
  360. this.coinNum.endPrice = null
  361. this.coinNum.startPrice = null
  362. this.coinActionInfo = {}
  363. this.pageList()
  364. },
  365. // 盲豆筛选切换
  366. changeScreen(num) {
  367. this.screenIndex = num
  368. if(num == 1) {
  369. if(this.priceStep == 0) {
  370. this.priceStep ++
  371. this.priceShow = true
  372. this.priceSort = 1
  373. } else if (this.priceStep == 1) {
  374. this.priceStep ++
  375. this.priceShow = false
  376. this.priceSort = 2
  377. } else if(this.priceStep == 2) {
  378. this.priceStep = 0
  379. this.priceShow = false
  380. this.priceSort = null
  381. this.screenIndex = 0
  382. }
  383. this.pageList()
  384. } else if (num == 2) {
  385. this.priceStep = 0
  386. this.screenShow = !this.screenShow
  387. this.priceShow = false
  388. this.priceSort = null
  389. }
  390. },
  391. selectCoin(item, index) {
  392. this.coinActionIndex = index
  393. this.coinActionInfo = item
  394. this.screenShow = !this.screenShow
  395. this.coinNum.endPrice = item.max
  396. this.coinNum.startPrice = item.min
  397. this.pageList()
  398. },
  399. // 跳转点击事件
  400. toPage(item) {
  401. if (item.type == "link") {
  402. uni.navigateTo({
  403. url: `/packageOperate/webview/index?url=${ item.linkUrl }`,
  404. })
  405. } else if (item.type == "tag") {
  406. uni.navigateTo({
  407. url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.goodsTags ? item.goodsTags : '' }`
  408. })
  409. }
  410. },
  411. // 商品详情
  412. toGoodsDetail(item) {
  413. uni.navigateTo({
  414. url: `/packageGoods/goods/detail?id=${ item.goodsId }`
  415. })
  416. },
  417. // 商品列表
  418. toGoodsList() {
  419. uni.navigateTo({
  420. url: `/packageGoods/goods/list?title=${ this.goodsTitle }`
  421. })
  422. },
  423. // 商品标签
  424. toTagGoods(item) {
  425. uni.navigateTo({
  426. url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.tagId ? item.tagId : '' }`
  427. })
  428. },
  429. // 商品分类
  430. toCategoryGoods(index, indexs) {
  431. let list = this.classifyIndex == 0 ? this.classifyListFilter : this.classifyList[this.classifyIndex].list
  432. let item = list[index][indexs]
  433. uni.navigateTo({
  434. url: `/packageGoods/goods/list?name=${ item.name }&categoryId=${ item.categoryId ? item.categoryId : '' }`
  435. })
  436. },
  437. },
  438. onReachBottom() {
  439. // 判断是否有数据
  440. if (this.total > this.pageNum * 20) {
  441. setTimeout(() => {
  442. ++this.pageNum
  443. this.getList()
  444. }, 500)
  445. } else {
  446. uni.$u.toast('已经到底了')
  447. }
  448. },
  449. onShareAppMessage(res) {
  450. return {
  451. title: '盲票,玩的就是有趣',
  452. path: '/pages/index/index',
  453. // imageUrl:'../../static/icon/lucky_bg.png',
  454. }
  455. }
  456. }
  457. </script>
  458. <style lang="scss" scoped>
  459. .core {
  460. background-color: #fff;
  461. &-none {
  462. height: 120rpx;
  463. }
  464. }
  465. // 搜索
  466. .u-nav-slot {
  467. text {
  468. font-size: 32rpx;
  469. }
  470. &__input {
  471. position: relative;
  472. height: 70rpx;
  473. width: 518rpx;
  474. padding-left: 30rpx;
  475. background: #F4F5F6;
  476. border-radius: 35rpx;
  477. &__btn {
  478. z-index: 200;
  479. width: 140rpx;
  480. height: 70rpx;
  481. line-height: 70rpx;
  482. font-size: 30rpx;
  483. text-align: center;
  484. font-weight: bold;
  485. color: #fff;
  486. background-color: #FF8D0B;
  487. border-radius: 35rpx;
  488. }
  489. }
  490. }
  491. // 固定搜索、分类
  492. .fixed-top {
  493. position: fixed;
  494. z-index: 100;
  495. width: 100%;
  496. background-color: #fff;
  497. // 搜索
  498. &-search {
  499. justify-content: space-between;
  500. padding: 14rpx 30rpx 34rpx;
  501. &__input {
  502. position: relative;
  503. flex: 1;
  504. height: 84rpx;
  505. padding-left: 46rpx;
  506. background: #F4F5F6;
  507. border-radius: 20rpx;
  508. &__btn {
  509. position: absolute;
  510. right: 0;
  511. width: 110rpx;
  512. height: 76rpx;
  513. line-height: 76rpx;
  514. font-size: 34rpx;
  515. text-align: center;
  516. font-weight: bold;
  517. color: #FFC062;
  518. background-color: #333333;
  519. border-radius: 18rpx;
  520. }
  521. }
  522. image {
  523. width: 52rpx;
  524. height: 52rpx;
  525. margin-left: 50rpx;
  526. }
  527. }
  528. // 分类
  529. &-classify {
  530. padding-bottom: 20rpx;
  531. }
  532. // 盲豆筛选
  533. &-screen {
  534. height: 64rpx;
  535. &-content {
  536. position: relative;
  537. justify-content: space-between;
  538. padding: 0 34rpx;
  539. color: #fff;
  540. height: 100%;
  541. background: #F9822C;
  542. &__item {
  543. .title {
  544. margin-right: 14rpx;
  545. }
  546. .select {
  547. flex-direction: column;
  548. image {
  549. width: 18rpx;
  550. height: 26rpx;
  551. }
  552. }
  553. }
  554. &__coin {
  555. position: absolute;
  556. right: 0;
  557. bottom: -390rpx;
  558. width: 200rpx;
  559. height: 390rpx;
  560. background: #FFFFFF;
  561. box-shadow: 0px 0px 2px 0px rgba(100, 100, 100, 0.1);
  562. &__list {
  563. padding-top: 20rpx;
  564. color: #666;
  565. .item {
  566. margin-bottom: 30rpx;
  567. font-size: 26rpx;
  568. line-height: 26rpx;
  569. }
  570. .action {
  571. color: #F9822C;
  572. }
  573. }
  574. }
  575. }
  576. }
  577. }
  578. // 轮播
  579. .core-swiper {
  580. margin: 0 34rpx 20rpx;
  581. border-radius: 16rpx;
  582. &-centent {
  583. height: 300rpx;
  584. .swiper-item {
  585. width: 100%;
  586. height: 100%;
  587. image {
  588. width: 100%;
  589. height: 100%;
  590. border-radius: 16rpx;
  591. }
  592. }
  593. }
  594. }
  595. // 二级分类
  596. .core-category {
  597. width: 100%;
  598. height: 360rpx;
  599. margin-bottom: 34rpx;
  600. padding: 0 34rpx;
  601. &-swiper {
  602. width: 100%;
  603. height: 100%;
  604. .swiper-item {
  605. width: 100%;
  606. height: 100%;
  607. display: flex;
  608. flex-wrap: wrap;
  609. &__content {
  610. display: flex;
  611. align-items: center;
  612. flex-direction: column;
  613. justify-content: space-between;
  614. width: 20%;
  615. height: 50%;
  616. image {
  617. width: 90%;
  618. height: 70%;
  619. }
  620. }
  621. }
  622. }
  623. }
  624. // 标签商品
  625. .tag-goods {
  626. display: flex;
  627. align-items: center;
  628. position: relative;
  629. margin: 0 34rpx 34rpx;
  630. height: 350rpx;
  631. &-imgBg {
  632. position: absolute;
  633. top: 0;
  634. width: 100%;
  635. height: 350rpx;
  636. }
  637. &-content {
  638. width: 100%;
  639. position: absolute;
  640. top: 0;
  641. z-index: 5;
  642. padding: 26rpx 22rpx;
  643. &-nav {
  644. justify-content: space-between;
  645. height: 40rpx;
  646. margin-bottom: 10rpx;
  647. &__left {
  648. image {
  649. width: 40rpx;
  650. height: 30rpx;
  651. }
  652. .title {
  653. font-family: YouSheBiaoTiHei;
  654. font-weight: 400;
  655. font-size: 40rpx;
  656. color: #FFFFFF;
  657. padding: 0 36rpx;
  658. }
  659. }
  660. &__right {
  661. .title {
  662. font-family: YouSheBiaoTiHei;
  663. font-weight: 400;
  664. color: #FFFFFF;
  665. margin-right: 12rpx;
  666. }
  667. image {
  668. width: 22rpx;
  669. height: 20rpx;
  670. }
  671. }
  672. }
  673. &-list {
  674. display: flex;
  675. height: 260rpx;
  676. overflow-x: auto;
  677. &-item {
  678. flex-direction: column;
  679. margin-right: 14rpx;
  680. .image {
  681. width: 180rpx;
  682. height: 180rpx;
  683. background: #FFFFFF;
  684. box-shadow: 0px 0px 4px 0px rgba(100, 100, 100, 0.13);
  685. border-radius: 4rpx;
  686. margin-bottom: 24rpx;
  687. image {
  688. width: 100%;
  689. height: 100%;
  690. }
  691. }
  692. .title {
  693. text-align: center;
  694. line-height: 28rpx;
  695. color: #FFFFFF;
  696. }
  697. }
  698. }
  699. }
  700. }
  701. // 商品列表
  702. .core-goods {
  703. padding: 0 34rpx;
  704. &-list {
  705. width: 100%;
  706. justify-content: space-between;
  707. flex-wrap: wrap;
  708. &-item {
  709. flex-direction: column;
  710. justify-content: flex-start;
  711. width: 48%;
  712. padding-bottom: 32rpx;
  713. background: #FFFFFF;
  714. box-shadow: 0px 0px 3px 0px rgba(100, 100, 100, 0.1);
  715. border-radius: 16rpx;
  716. margin-bottom: 30rpx;
  717. .image-wrap {
  718. width: 100%;
  719. height: 320rpx;
  720. margin-bottom: 16rpx;
  721. image {
  722. width: 100%;
  723. height: 100%;
  724. border-radius: 16rpx 16rpx 0 0;
  725. }
  726. }
  727. .content {
  728. width: 100%;
  729. padding: 0 22rpx;
  730. &-title {
  731. height: 28rpx;
  732. font-size: 28rpx;
  733. line-height: 28rpx;
  734. font-weight: bold;
  735. margin-bottom: 30rpx;
  736. }
  737. &-coin {
  738. height: 34rpx;
  739. font-size: 24rpx;
  740. justify-content: space-between;
  741. margin-bottom: 24rpx;
  742. &__left {
  743. margin-right: 24rpx;
  744. font-size: 28rpx;
  745. font-weight: bold;
  746. text {
  747. font-weight: normal;
  748. }
  749. image {
  750. width: 34rpx;
  751. height: 34rpx;
  752. }
  753. }
  754. &__right {
  755. color: #666666;
  756. text-decoration: line-through;
  757. }
  758. }
  759. &-price {
  760. font-size: 24rpx;
  761. line-height: 24rpx;
  762. color: #666666;
  763. }
  764. }
  765. }
  766. &-item:last-child {
  767. box-shadow: none;
  768. }
  769. }
  770. .empty {
  771. .center {
  772. text-align: center;
  773. &-img {
  774. width: 228rpx;
  775. height: 320rpx;
  776. }
  777. &-font {
  778. font-size: 30rpx;
  779. font-weight: 400;
  780. color: #999999;
  781. margin-bottom: 200rpx;
  782. }
  783. }
  784. }
  785. }
  786. </style>