index.vue 21 KB

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