information.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <template name="sale">
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <!-- #ifdef MP -->
  5. <!-- <view class="mp-search-box">
  6. <input @click="naviageToPage('/pages/product/search')" class="ser-input" type="text" value="输入关键字搜索" disabled />
  7. </view> -->
  8. <!-- #endif -->
  9. <!-- 头部轮播 -->
  10. <view class="carousel-section">
  11. <swiper class="screen-swiper header-swiper" ::class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true"
  12. :autoplay="true" interval="3000" duration="500" @change="swiperChange" indicator-color="#8799a3"
  13. indicator-active-color="#0081ff">
  14. <swiper-item class="swiper-item" v-for="(item,index) in carouselList" :key="index" :class="cardCur==index?'text-white':''" @click="naviageToPage(item.url)">
  15. <image :src="item.imgUrl"></image>
  16. <!-- <view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
  17. </swiper-item>
  18. </swiper>
  19. <!-- <view class="swiper-dots">
  20. <text class="num">{{swiperCurrent+1}}</text>
  21. <text class="sign">/</text>
  22. <text class="num">{{swiperLength}}</text>
  23. </view> -->
  24. </view>
  25. <swiper-up :list="portInfo"></swiper-up>
  26. <scroll-view style='margin-top:12px;padding:0 20px;' scroll-x class="nav">
  27. <view class="flex text-center">
  28. <view style='position:relative;' class="cu-item flex-sub" :class="item.value==TabCur?'text-white':''" v-for="item in categoryList"@tap="tabSelect" :data-id="item.value">
  29. <image v-if='item.value==TabCur' style='width:100%;height:100%;position: absolute;z-index:1;left:0;' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/bg.png'></image>
  30. <text style='position:relative;z-index:2;'>{{item.label}}</text>
  31. </view>
  32. </view>
  33. </scroll-view>
  34. <view class="guess-section" v-if='TabCur==0'>
  35. <view class="cu-card article no-card" style='width: 100%;'>
  36. <view class="cu-item shadow factoryItem factorytitle flex justify-between align-center">
  37. <view style='flex:1;'>工厂</view>
  38. <view style='flex:1;'>价格</view>
  39. <view style='flex:1;'>较昨日</view>
  40. </view>
  41. </view>
  42. <view
  43. v-for="(item, index) in newsInfo" :key="index"
  44. class="guess-item">
  45. <view class="cu-card article no-card" >
  46. <view class="cu-item shadow factoryItem flex justify-between align-center">
  47. <view style='flex:1;'>
  48. <view class='factory'>{{item.factory}}</view>
  49. <view class='wrap'>{{item.city}} {{item.factoryType}}</view>
  50. </view>
  51. <view style='flex:1;' class='price'>{{item.price}}</view>
  52. <view style='flex:1;' class='positive' v-if='item.comparePrice>0'>{{item.comparePrice}}<image class='up' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/up.png'></image></view>
  53. <view style='flex:1;' class='negative' v-if='item.comparePrice<0'>{{-item.comparePrice}}<image class='down' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/decline.png'></image></view>
  54. <view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view v-show="isLoadMore">
  59. <uni-load-more :status="loadStatus" ></uni-load-more>
  60. </view>
  61. </view>
  62. <view class="guess-section" v-if='TabCur==1'>
  63. <view class="cu-card article no-card" style='width: 100%;'>
  64. <view class="cu-item shadow factoryItem flex justify-between align-center">
  65. <view style='flex:1;'>港口</view>
  66. <view style='flex:1;'>价格</view>
  67. <view style='flex:1;'>较昨日</view>
  68. </view>
  69. </view>
  70. <view
  71. v-for="(item, index) in newsInfo" :key="index"
  72. class="guess-item"
  73. >
  74. <view class="cu-card article no-card" >
  75. <view class="cu-item shadow factoryItem flex justify-between align-center">
  76. <view style='flex:1;'><view class='factory'>{{item.port}}</view><view class='wrap'>{{item.goodsName}}</view></view>
  77. <view style='flex:1;' >
  78. <view class='price'>{{item.price}}</view>
  79. <view class='wrap'>
  80. <text class="cu-tag radius line-blue text-water">{{item.waterContent}}</text>
  81. <text class="cu-tag radius line-blue text-bluk">{{item.bulkDensity}}</text>
  82. </view>
  83. </view>
  84. <view style='flex:1;' class='positive' v-if='item.comparePrice>0'>{{item.comparePrice}}<image class='up' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/up.png'></image></view>
  85. <view style='flex:1;' class='negative' v-if='item.comparePrice<0'>{{-item.comparePrice}}<image class='down' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/decline.png'></image></view>
  86. <view style='flex:1;font-weight:900;' v-if='item.comparePrice==0'>-</view>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-show="isLoadMore">
  91. <uni-load-more :status="loadStatus" ></uni-load-more>
  92. </view>
  93. </view>
  94. <view class="guess-section" v-if='TabCur==2'>
  95. <view
  96. v-for="(item, index) in newsInfo" :key="index"
  97. class="guess-item"
  98. @click="navToDetailPage(item.id)"
  99. >
  100. <view class="content" style='padding:15rpx 30rpx;display: grid;grid-template-columns: 70% 30%; grid-column-gap: 10px;'>
  101. <!-- <view class="desc">
  102. <view class="title">
  103. <view class="text-cut" style="text-align: left;">{{item.title}}</view>
  104. </view>
  105. <view style="margin-bottom: 30upx;text-align:left;">
  106. <view class="cu-tag line-green light radius">{{item.gmtUpdate}}</view>
  107. <view class="cu-tag line-blue light radius">{{item.from}}</view>
  108. </view>
  109. </view>
  110. <image style='width:200rpx;height:120rpx;flex:1;' :src="item.titleImg"
  111. mode="aspectFill"></image> -->
  112. <view class="gird-left">
  113. <view class="title">
  114. <view class="text-cut" style="text-align: left;">{{item.title}}</view>
  115. </view>
  116. <view style="margin-bottom: 30upx;text-align:left;margin-top: 10px;">
  117. <view style='color:#2FBA23;' class="cu-tag line-green light radius">{{item.gmtUpdate}}</view>
  118. <view style='color:#0C6EBA;' class="cu-tag line-blue light radius">{{item.from}}</view>
  119. </view>
  120. </view>
  121. <view class="gird-right">
  122. <image style='width:200rpx;height:120rpx;flex:1;border-radius: 3px;' :src="item.titleImg"
  123. mode="aspectFill"></image>
  124. </view>
  125. </view>
  126. </view>
  127. <view v-show="isLoadMore">
  128. <uni-load-more :status="loadStatus" ></uni-load-more>
  129. </view>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import { formatDate } from '@/common/date.js';
  135. import dragButton from "@/components/drag-button/drag-button.vue";
  136. import swiperUp from "@/components/swiperup.vue";
  137. import {
  138. mapState
  139. } from 'vuex';
  140. export default {
  141. components: {
  142. dragButton,
  143. swiperUp
  144. },
  145. name: "sale",
  146. data() {
  147. return {
  148. titleNViewBackground: '',
  149. swiperCurrent: 0,
  150. swiperLength: 0,
  151. carouselList: [],
  152. windowSpuList: [],
  153. categoryPickList: [],
  154. categoryButtomList: [],
  155. salesTop: [],
  156. saleInfo: [],
  157. portInfo: [],
  158. banner: undefined,
  159. isVip: false,
  160. pages: 1, //页数
  161. limit: 10, //每次取条目数
  162. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  163. isLoadMore: false, //是否加载中
  164. showTran:true,
  165. list: [],
  166. scrollTop: 0,
  167. cardCur: 0,
  168. dotStyle: false,
  169. newsInfo: [],
  170. categoryList:[],
  171. pages:1,//页数
  172. limit:10 ,//每次取条目数
  173. loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  174. TabCur: 0,
  175. category:0,
  176. current: 0
  177. };
  178. },
  179. onReady() {
  180. },
  181. onShow() {
  182. uni.showTabBar()
  183. this.pages = 1
  184. this.isLoadMore = false
  185. this.loadStatus = 'more'
  186. const that = this
  187. this.loadData()
  188. },
  189. onLoad(options) {
  190. },
  191. onPageScroll(e) {
  192. this.scrollTop = e.scrollTop;
  193. },
  194. onReachBottom() { //上拉触底函数
  195. if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
  196. this.isLoadMore = true
  197. this.pages += 1
  198. this.getIndexSaleData()
  199. }
  200. },
  201. onPullDownRefresh() {
  202. this.pages = 1
  203. this.isLoadMore = false
  204. this.loadStatus = 'loading'
  205. this.loadData()
  206. },
  207. computed: {
  208. ...mapState(['hasLogin', 'userInfo'])
  209. },
  210. methods: {
  211. DotStyle(e) {
  212. this.dotStyle = e.detail.value
  213. },
  214. cardSwiper(e) {
  215. this.cardCur = e.detail.current
  216. },
  217. hangqing() {
  218. uni.navigateTo({
  219. url: `/pageB/news/news`
  220. })
  221. },
  222. tabSelect(e) {
  223. this.TabCur = e.currentTarget.dataset.id;
  224. this.category = this.TabCur
  225. this.pages = 1
  226. this.loadData()
  227. },
  228. //回到顶部
  229. goTop(e) { // 一键回到顶部
  230. console.log(e)
  231. if (wx.pageScrollTo) {
  232. wx.pageScrollTo({
  233. scrollTop: 0
  234. })
  235. } else {
  236. wx.showModal({
  237. title: '提示',
  238. content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  239. })
  240. }
  241. },
  242. async loadData() {
  243. console.log("sale loadData pages " + this.pages)
  244. const that = this
  245. // 新闻类型
  246. uni.showLoading({
  247. title: '正在加载',
  248. mask:true
  249. })
  250. that.$api.request('dict', 'getDictDataList',{
  251. dictType: "news_type"
  252. }, failres => {
  253. that.$api.msg(failres.errmsg)
  254. uni.hideLoading()
  255. }).then(res => {
  256. let data = res.data
  257. that.categoryList = data
  258. uni.hideLoading()
  259. })
  260. uni.showLoading({
  261. title: '正在加载',
  262. mask:true
  263. })
  264. var _gp=''
  265. var _mt=''
  266. if(this.TabCur==0){
  267. _gp='news'
  268. _mt='getFactoryPriceInfo'
  269. }else if(this.TabCur==1){
  270. _gp='news'
  271. _mt='getPortPriceInfo'
  272. }else if(this.TabCur==2){
  273. _gp='news'
  274. _mt='getNewsInfo'
  275. }
  276. // 新闻内容
  277. that.$api.request(_gp, _mt,{
  278. category:this.category,
  279. page: this.pages,
  280. limit:this.limit
  281. }, failres => {
  282. that.$api.msg(failres.errmsg)
  283. this.isLoadMore = false
  284. this.loadStatus = 'nomore'
  285. if(this.pages>1){this.pages=1}
  286. uni.hideLoading()
  287. }).then(res => {
  288. let data = res.data
  289. for(var i =0;i<res.data.length;i++){
  290. res.data[i].gmtUpdate=formatDate(Date.parse(res.data[i].gmtUpdate))
  291. }
  292. that.newsInfo = data
  293. uni.hideLoading()
  294. })
  295. uni.showLoading({
  296. title: '正在加载',
  297. mask:true
  298. })
  299. that.$api.request('integral', 'getIndexData', failres => {
  300. that.$api.msg(failres.errmsg)
  301. this.isLoadMore = false
  302. this.loadStatus = 'nomore'
  303. if (this.pages > 1) {
  304. this.pages = 1
  305. }
  306. uni.hideLoading()
  307. uni.stopPullDownRefresh()
  308. }).then(res => {
  309. let data = res.data
  310. //橱窗
  311. that.windowSpuList = data.windowRecommend
  312. //轮播
  313. data.advertisement.t1.forEach(item => {
  314. if (!item.color) {
  315. item.color = 'rgb(205, 215, 218)'
  316. }
  317. })
  318. that.carouselList = data.advertisement.t1
  319. that.swiperLength = data.advertisement.t1.length
  320. that.titleNViewBackground = data.advertisement.t1[0].color
  321. //分类精选
  322. if (data.advertisement.t2) {
  323. that.categoryPickList = data.advertisement.t2
  324. }
  325. //横幅
  326. if (data.advertisement.t3 && data.advertisement.t3.length > 0) {
  327. that.banner = data.advertisement.t3[0]
  328. }
  329. //热销
  330. if (data.salesTop) {
  331. that.salesTop = data.salesTop
  332. }
  333. //销售信息
  334. if (data.saleInfo) {
  335. that.saleInfo = data.saleInfo
  336. }
  337. //价格简报
  338. if (data.portInfo) {
  339. that.portInfo = data.portInfo
  340. console.log(that.portInfo)
  341. }
  342. //分类5Buttom
  343. if (data.advertisement.t4) {
  344. that.categoryButtomList = data.advertisement.t4
  345. }
  346. that.showTran = data.showTran
  347. that.list = data.message
  348. uni.setStorageSync("message", data.message);
  349. uni.setStorageSync("task", data.task);
  350. uni.setStorageSync('showTran', data.showTran);
  351. uni.hideLoading()
  352. uni.stopPullDownRefresh()
  353. })
  354. },
  355. //轮播图切换修改背景色
  356. swiperChange(e) {
  357. const index = e.detail.current;
  358. this.swiperCurrent = index;
  359. // this.titleNViewBackground = this.carouselList[index].color;
  360. },
  361. //详情
  362. navToDetailPage(item) {
  363. let id = item;
  364. uni.navigateTo({
  365. url: `/pageB/news/news_detail?id=${id}`
  366. })
  367. },
  368. naviageToPage(page) {
  369. uni.navigateTo({
  370. url: page,
  371. fail() {
  372. uni.switchTab({
  373. url: page
  374. })
  375. }
  376. })
  377. },
  378. getIndexSaleData() {
  379. // const that = this
  380. // var pages = that.pages
  381. // var limit = that.limit
  382. // uni.showLoading({
  383. // title: '正在加载'
  384. // })
  385. // that.$api.request('integral', 'getIndexSaleData', {
  386. // page: pages,
  387. // limit: limit
  388. // }, failres => {
  389. // that.$api.msg(failres.errmsg)
  390. // that.isLoadMore = false
  391. // that.loadStatus = 'nomore'
  392. // if (that.pages > 1) {
  393. // that.pages -= 1
  394. // }
  395. // uni.hideLoading()
  396. // }).then(res => {
  397. // let data = res.data
  398. // //销售信息
  399. // if (data.saleInfo.length > 0 ) {
  400. // that.saleInfo = that.saleInfo.concat(data.saleInfo)
  401. // that.isLoadMore = false
  402. // } else {
  403. // if (that.pages > 1) {
  404. // that.pages -= 1
  405. // }
  406. // that.isLoadMore = true
  407. // that.loadStatus = 'nomore'
  408. // }
  409. // if(data.saleInfo.length < that.limit){
  410. // if (that.pages > 1) {
  411. // that.pages -= 1
  412. // }
  413. // that.isLoadMore = true
  414. // that.loadStatus = 'nomore'
  415. // }
  416. // uni.hideLoading()
  417. // })
  418. const that = this
  419. var pages=that.pages
  420. var limit=that.limit
  421. uni.showLoading({
  422. title: '正在加载',
  423. mask:true
  424. })
  425. that.$api.request('news', 'getNewsInfo', {
  426. category:this.category,
  427. page: pages,
  428. limit:limit
  429. },failres => {
  430. that.$api.msg(failres.errmsg)
  431. that.isLoadMore=false
  432. that.loadStatus = 'nomore'
  433. if(that.pages>1){that.pages-=1}
  434. uni.hideLoading()
  435. }).then(res => {
  436. let data = res.data
  437. if(data.length > 0){
  438. for(var k =0;k<data.length;k++){
  439. data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
  440. }
  441. that.newsInfo = that.newsInfo.concat(data)
  442. that.isLoadMore=false
  443. }
  444. else{
  445. if(that.pages>1){that.pages-=1}
  446. that.isLoadMore=true
  447. that.loadStatus = 'nomore'
  448. }
  449. uni.hideLoading()
  450. })
  451. }
  452. },
  453. // #ifndef MP
  454. // 标题栏input搜索框点击
  455. onNavigationBarSearchInputClicked: async function(e) {
  456. uni.navigateTo({
  457. url: '/pageA/product/search'
  458. })
  459. },
  460. //点击导航栏 buttons 时触发
  461. // onNavigationBarButtonTap(e) {
  462. // const index = e.index;
  463. // if (index === 0) {
  464. // this.$api.msg('点击了扫描');
  465. // } else if (index === 1) {
  466. // // #ifdef APP-PLUS
  467. // const pages = getCurrentPages();
  468. // const page = pages[pages.length - 1];
  469. // const currentWebview = page.$getAppWebview();
  470. // currentWebview.hideTitleNViewButtonRedDot({
  471. // index
  472. // });
  473. // // #endif
  474. // uni.navigateTo({
  475. // url: '/pages/notice/notice'
  476. // })
  477. // }
  478. // }
  479. // #endif
  480. }
  481. </script>
  482. <style lang="scss" scoped>
  483. .cu-tag.badge {
  484. right: 26rpx;
  485. }
  486. .up,.down{
  487. width: 8px;
  488. height: 5px;
  489. vertical-align: middle;
  490. margin-left: 2px;
  491. }
  492. .gird-left,.gird-right{
  493. }
  494. .cu-tag.radius[class*="line"]::after {
  495. border-radius: 66rpx;
  496. }
  497. .goTop{
  498. height: 32px;
  499. width: 32px;
  500. position: fixed;
  501. bottom: 200rpx;
  502. right: 30rpx;
  503. border-radius: 50%;
  504. }
  505. .goTop image{
  506. width:32px;
  507. height:32px;
  508. }
  509. .flex{
  510. display:flex;
  511. }
  512. .text-white{
  513. color:#fff;
  514. }
  515. .cu-card{
  516. border-bottom:1rpx solid #f8f8f8;
  517. text-align: center;
  518. }
  519. .factorytitle view{
  520. border-right: 1px solid #F8F8F8;
  521. }
  522. .factorytitle view:last-child{
  523. border-right: 1px solid transparent;
  524. }
  525. .factory{
  526. font-size:26rpx;
  527. font-weight:900;
  528. }
  529. .positive{
  530. color:#E63113;
  531. font-size:26rpx;
  532. font-weight:900;
  533. }
  534. .negative{
  535. color:#229453;
  536. font-size:26rpx;
  537. font-weight:900;
  538. }
  539. .wrap{
  540. font-size:20rpx;
  541. color: rgba(0,0,0,0.5);
  542. }
  543. .align-center{
  544. align-items: center;
  545. }
  546. .flex-direction-row{
  547. flex-direction:row;
  548. }
  549. .factoryItem{
  550. padding: 20rpx 0;
  551. }
  552. /* #ifdef MP */
  553. .mp-search-box {
  554. // position:relative;
  555. left: 0;
  556. top: 30upx;
  557. z-index: 9999;
  558. width: 100%;
  559. padding: 0 80upx;
  560. background: rgba(255, 170, 0, 0.6);
  561. .ser-input {
  562. flex: 1;
  563. height: 56upx;
  564. line-height: 56upx;
  565. text-align: center;
  566. font-size: 28upx;
  567. color: $font-color-base;
  568. border-radius: 10px;
  569. background: rgba(255, 255, 255, .6);
  570. }
  571. }
  572. .desc{
  573. width:73%;
  574. margin-right:2%;
  575. }
  576. .justify-between{
  577. justify-content: space-between;
  578. }
  579. page {
  580. .cate-section {
  581. position: relative;
  582. z-index: 5;
  583. border-radius: 16upx 16upx 0 0;
  584. margin-top: -20upx;
  585. }
  586. .carousel-section {
  587. padding: 0;
  588. .titleNview-placing {
  589. padding-top: 0;
  590. height: 0;
  591. }
  592. .carousel {
  593. .carousel-item {
  594. padding: 0;
  595. }
  596. }
  597. .swiper-dots {
  598. left: 50%;
  599. bottom: 5upx;
  600. transform: translateX(-50%);
  601. }
  602. }
  603. }
  604. /* #endif */
  605. .cuIcon-notification::before{
  606. color:#f37b1;
  607. }
  608. .cu-card.article>.cu-item .content>image {
  609. height: 3.4em;
  610. margin-right: 0rpx;
  611. margin-top: 24rpx;
  612. }
  613. .screen-swiper.price-swiper{
  614. height:70rpx;
  615. min-height: 70rpx;
  616. background: #fff;
  617. margin-bottom: 10px;
  618. }
  619. .guess-section {
  620. margin-bottom: 120rpx;
  621. margin-top:20rpx;
  622. }
  623. .guess-section .price{
  624. color:#000;
  625. font-size: 34rpx;
  626. }
  627. page {
  628. background: #f5f5f5;
  629. }
  630. .m-t {
  631. margin-top: 16upx;
  632. }
  633. .header-swiper{
  634. min-height: 300rpx;
  635. }
  636. /* 头部 轮播图 */
  637. .carousel-section {
  638. position: relative;
  639. // padding-top: 10px;
  640. .titleNview-placing {
  641. height: var(--status-bar-height);
  642. padding-top: 44px;
  643. box-sizing: content-box;
  644. }
  645. .titleNview-background {
  646. position: absolute;
  647. top: 0;
  648. left: 0;
  649. width: 100%;
  650. height: 426upx;
  651. transition: .4s;
  652. }
  653. }
  654. .tab-scroll-view {
  655. width: 750rpx;
  656. height: 300rpx;
  657. flex-direction: row;
  658. white-space: nowrap;
  659. .tab-item {
  660. display: inline-block;
  661. width: 350rpx;
  662. height: 250rpx;
  663. font-size: 16px;
  664. -moz-box-shadow: 2px 2px 5px #ccc;
  665. -webkit-box-shadow: 2px 2px 5px #ccc;
  666. box-shadow: 2px 2px 5px #ccc;
  667. color: #555;
  668. margin: 10rpx;
  669. }
  670. }
  671. .carousel {
  672. width: 100%;
  673. height: 350upx;
  674. .carousel-item {
  675. width: 100%;
  676. height: 100%;
  677. // padding: 0 28upx;
  678. overflow: hidden;
  679. }
  680. image {
  681. width: 100%;
  682. height: 100%;
  683. // border-radius: 10upx;
  684. }
  685. }
  686. .swiper-dots {
  687. display: flex;
  688. position: absolute;
  689. left: 60upx;
  690. bottom: 15upx;
  691. width: 72upx;
  692. height: 36upx;
  693. 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==);
  694. background-size: 100% 100%;
  695. .num {
  696. width: 36upx;
  697. height: 36upx;
  698. border-radius: 50px;
  699. font-size: 24upx;
  700. color: #fff;
  701. text-align: center;
  702. line-height: 36upx;
  703. }
  704. .sign {
  705. position: absolute;
  706. top: 0;
  707. left: 50%;
  708. line-height: 36upx;
  709. font-size: 12upx;
  710. color: #fff;
  711. transform: translateX(-50%);
  712. }
  713. }
  714. /* 分类 */
  715. .cate-section {
  716. display: flex;
  717. justify-content: space-around;
  718. align-items: center;
  719. flex-wrap: wrap;
  720. padding: 30upx 22upx;
  721. background: #fff;
  722. .cate-item {
  723. display: flex;
  724. flex-direction: column;
  725. align-items: center;
  726. font-size: $font-sm + 2upx;
  727. color: $font-color-dark;
  728. }
  729. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  730. image {
  731. width: 68upx;
  732. height: 68upx;
  733. margin-bottom: 14upx;
  734. // border-radius: 50%;
  735. opacity: .7;
  736. // box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  737. }
  738. .grid_icon{
  739. font-size: 48upx;
  740. margin-bottom: 18upx;
  741. color: #fa436a;
  742. }
  743. }
  744. .ad-1 {
  745. width: 100%;
  746. height: 210upx;
  747. padding: 10upx 0;
  748. background: #fff;
  749. image {
  750. width: 100%;
  751. height: 100%;
  752. }
  753. }
  754. /* 销售信息 */
  755. .introduce-section {
  756. background: #fff;
  757. padding: 20upx 30upx;
  758. padding-bottom: 100upx;
  759. .guess-item {
  760. padding-bottom: 20upx;
  761. border-bottom: 1px solid #ccc;
  762. }
  763. .title {
  764. font-size: 28upx;
  765. color: $font-color-dark;
  766. font-weight:bold;
  767. height: 50upx;
  768. line-height: 50upx;
  769. flex:2.5;
  770. }
  771. .title-tip {
  772. flex:1;
  773. }
  774. .price-box {
  775. display: flex;
  776. align-items: baseline;
  777. height: 70upx;
  778. padding: 10upx 0;
  779. font-size: 26upx;
  780. color: $uni-color-primary;
  781. }
  782. .price {
  783. font-size: $font-lg + 2upx;
  784. }
  785. .m-price {
  786. margin: 0 12upx;
  787. color: $font-color-light;
  788. text-decoration: line-through;
  789. }
  790. .coupon-tip {
  791. align-items: center;
  792. padding: 4upx 10upx;
  793. background: $uni-color-primary;
  794. font-size: $font-sm;
  795. color: #fff;
  796. border-radius: 6upx;
  797. line-height: 1;
  798. transform: translateY(-4upx);
  799. }
  800. .bot-row {
  801. display: flex;
  802. align-items: center;
  803. height: 50upx;
  804. font-size: $font-sm;
  805. color: $font-color-light;
  806. view {
  807. flex: 1;
  808. }
  809. }
  810. }
  811. </style>