information.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  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. // #ifdef APP-PLUS
  191. var that = this
  192. plus.push.getClientInfoAsync((info) => {
  193. var name = 'clientId'
  194. var value = info.clientid
  195. that.$store.commit('$uStore', {
  196. name,
  197. value
  198. });
  199. console.log("info.clientid",info.clientid)
  200. }, err => {
  201. });
  202. // #endif
  203. },
  204. onPageScroll(e) {
  205. this.scrollTop = e.scrollTop;
  206. },
  207. onReachBottom() { //上拉触底函数
  208. if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
  209. this.isLoadMore = true
  210. this.pages += 1
  211. this.getIndexSaleData()
  212. }
  213. },
  214. onPullDownRefresh() {
  215. this.pages = 1
  216. this.isLoadMore = false
  217. this.loadStatus = 'loading'
  218. this.loadData()
  219. },
  220. computed: {
  221. ...mapState(['hasLogin', 'userInfo'])
  222. },
  223. methods: {
  224. DotStyle(e) {
  225. this.dotStyle = e.detail.value
  226. },
  227. cardSwiper(e) {
  228. this.cardCur = e.detail.current
  229. },
  230. hangqing() {
  231. uni.navigateTo({
  232. url: `/pageB/news/news`
  233. })
  234. },
  235. tabSelect(e) {
  236. this.TabCur = e.currentTarget.dataset.id;
  237. this.category = this.TabCur
  238. this.pages = 1
  239. this.loadData()
  240. },
  241. //回到顶部
  242. goTop(e) { // 一键回到顶部
  243. console.log(e)
  244. if (wx.pageScrollTo) {
  245. wx.pageScrollTo({
  246. scrollTop: 0
  247. })
  248. } else {
  249. wx.showModal({
  250. title: '提示',
  251. content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  252. })
  253. }
  254. },
  255. async loadData() {
  256. console.log("sale loadData pages " + this.pages)
  257. const that = this
  258. // 新闻类型
  259. uni.showLoading({
  260. title: '正在加载',
  261. mask:true
  262. })
  263. that.$api.request('dict', 'getDictDataList',{
  264. dictType: "news_type"
  265. }, failres => {
  266. that.$api.msg(failres.errmsg)
  267. uni.hideLoading()
  268. }).then(res => {
  269. let data = res.data
  270. that.categoryList = data
  271. uni.hideLoading()
  272. })
  273. uni.showLoading({
  274. title: '正在加载',
  275. mask:true
  276. })
  277. var _gp=''
  278. var _mt=''
  279. if(this.TabCur==0){
  280. _gp='news'
  281. _mt='getFactoryPriceInfo'
  282. }else if(this.TabCur==1){
  283. _gp='news'
  284. _mt='getPortPriceInfo'
  285. }else if(this.TabCur==2){
  286. _gp='news'
  287. _mt='getNewsInfo'
  288. }
  289. // 新闻内容
  290. that.$api.request(_gp, _mt,{
  291. category:this.category,
  292. page: this.pages,
  293. limit:this.limit
  294. }, failres => {
  295. that.$api.msg(failres.errmsg)
  296. this.isLoadMore = false
  297. this.loadStatus = 'nomore'
  298. if(this.pages>1){this.pages=1}
  299. uni.hideLoading()
  300. }).then(res => {
  301. let data = res.data
  302. for(var i =0;i<res.data.length;i++){
  303. res.data[i].gmtUpdate=formatDate(Date.parse(res.data[i].gmtUpdate))
  304. }
  305. that.newsInfo = data
  306. uni.hideLoading()
  307. })
  308. uni.showLoading({
  309. title: '正在加载',
  310. mask:true
  311. })
  312. that.$api.request('integral', 'getIndexData', failres => {
  313. that.$api.msg(failres.errmsg)
  314. this.isLoadMore = false
  315. this.loadStatus = 'nomore'
  316. if (this.pages > 1) {
  317. this.pages = 1
  318. }
  319. uni.hideLoading()
  320. uni.stopPullDownRefresh()
  321. }).then(res => {
  322. let data = res.data
  323. //橱窗
  324. that.windowSpuList = data.windowRecommend
  325. //轮播
  326. data.advertisement.t1.forEach(item => {
  327. if (!item.color) {
  328. item.color = 'rgb(205, 215, 218)'
  329. }
  330. })
  331. that.carouselList = data.advertisement.t1
  332. that.swiperLength = data.advertisement.t1.length
  333. that.titleNViewBackground = data.advertisement.t1[0].color
  334. //分类精选
  335. if (data.advertisement.t2) {
  336. that.categoryPickList = data.advertisement.t2
  337. }
  338. //横幅
  339. if (data.advertisement.t3 && data.advertisement.t3.length > 0) {
  340. that.banner = data.advertisement.t3[0]
  341. }
  342. //热销
  343. if (data.salesTop) {
  344. that.salesTop = data.salesTop
  345. }
  346. //销售信息
  347. if (data.saleInfo) {
  348. that.saleInfo = data.saleInfo
  349. }
  350. //价格简报
  351. if (data.portInfo) {
  352. that.portInfo = data.portInfo
  353. console.log(that.portInfo)
  354. }
  355. //分类5Buttom
  356. if (data.advertisement.t4) {
  357. that.categoryButtomList = data.advertisement.t4
  358. }
  359. that.showTran = data.showTran
  360. that.list = data.message
  361. uni.setStorageSync("message", data.message);
  362. uni.setStorageSync("task", data.task);
  363. uni.setStorageSync('showTran', data.showTran);
  364. uni.hideLoading()
  365. uni.stopPullDownRefresh()
  366. })
  367. },
  368. //轮播图切换修改背景色
  369. swiperChange(e) {
  370. const index = e.detail.current;
  371. this.swiperCurrent = index;
  372. // this.titleNViewBackground = this.carouselList[index].color;
  373. },
  374. //详情
  375. navToDetailPage(item) {
  376. let id = item;
  377. uni.navigateTo({
  378. url: `/pageB/news/news_detail?id=${id}`
  379. })
  380. },
  381. naviageToPage(page) {
  382. uni.navigateTo({
  383. url: page,
  384. fail() {
  385. uni.switchTab({
  386. url: page
  387. })
  388. }
  389. })
  390. },
  391. getIndexSaleData() {
  392. // const that = this
  393. // var pages = that.pages
  394. // var limit = that.limit
  395. // uni.showLoading({
  396. // title: '正在加载'
  397. // })
  398. // that.$api.request('integral', 'getIndexSaleData', {
  399. // page: pages,
  400. // limit: limit
  401. // }, failres => {
  402. // that.$api.msg(failres.errmsg)
  403. // that.isLoadMore = false
  404. // that.loadStatus = 'nomore'
  405. // if (that.pages > 1) {
  406. // that.pages -= 1
  407. // }
  408. // uni.hideLoading()
  409. // }).then(res => {
  410. // let data = res.data
  411. // //销售信息
  412. // if (data.saleInfo.length > 0 ) {
  413. // that.saleInfo = that.saleInfo.concat(data.saleInfo)
  414. // that.isLoadMore = false
  415. // } else {
  416. // if (that.pages > 1) {
  417. // that.pages -= 1
  418. // }
  419. // that.isLoadMore = true
  420. // that.loadStatus = 'nomore'
  421. // }
  422. // if(data.saleInfo.length < that.limit){
  423. // if (that.pages > 1) {
  424. // that.pages -= 1
  425. // }
  426. // that.isLoadMore = true
  427. // that.loadStatus = 'nomore'
  428. // }
  429. // uni.hideLoading()
  430. // })
  431. const that = this
  432. var pages=that.pages
  433. var limit=that.limit
  434. uni.showLoading({
  435. title: '正在加载',
  436. mask:true
  437. })
  438. that.$api.request('news', 'getNewsInfo', {
  439. category:this.category,
  440. page: pages,
  441. limit:limit
  442. },failres => {
  443. that.$api.msg(failres.errmsg)
  444. that.isLoadMore=false
  445. that.loadStatus = 'nomore'
  446. if(that.pages>1){that.pages-=1}
  447. uni.hideLoading()
  448. }).then(res => {
  449. let data = res.data
  450. if(data.length > 0){
  451. for(var k =0;k<data.length;k++){
  452. data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
  453. }
  454. that.newsInfo = that.newsInfo.concat(data)
  455. that.isLoadMore=false
  456. }
  457. else{
  458. if(that.pages>1){that.pages-=1}
  459. that.isLoadMore=true
  460. that.loadStatus = 'nomore'
  461. }
  462. uni.hideLoading()
  463. })
  464. }
  465. },
  466. // #ifndef MP
  467. // 标题栏input搜索框点击
  468. onNavigationBarSearchInputClicked: async function(e) {
  469. uni.navigateTo({
  470. url: '/pageA/product/search'
  471. })
  472. },
  473. //点击导航栏 buttons 时触发
  474. // onNavigationBarButtonTap(e) {
  475. // const index = e.index;
  476. // if (index === 0) {
  477. // this.$api.msg('点击了扫描');
  478. // } else if (index === 1) {
  479. // // #ifdef APP-PLUS
  480. // const pages = getCurrentPages();
  481. // const page = pages[pages.length - 1];
  482. // const currentWebview = page.$getAppWebview();
  483. // currentWebview.hideTitleNViewButtonRedDot({
  484. // index
  485. // });
  486. // // #endif
  487. // uni.navigateTo({
  488. // url: '/pages/notice/notice'
  489. // })
  490. // }
  491. // }
  492. // #endif
  493. }
  494. </script>
  495. <style lang="scss" scoped>
  496. .cu-tag.badge {
  497. right: 26rpx;
  498. }
  499. .up,.down{
  500. width: 8px;
  501. height: 5px;
  502. vertical-align: middle;
  503. margin-left: 2px;
  504. }
  505. .gird-left,.gird-right{
  506. }
  507. .cu-tag.radius[class*="line"]::after {
  508. border-radius: 66rpx;
  509. }
  510. .goTop{
  511. height: 32px;
  512. width: 32px;
  513. position: fixed;
  514. bottom: 200rpx;
  515. right: 30rpx;
  516. border-radius: 50%;
  517. }
  518. .goTop image{
  519. width:32px;
  520. height:32px;
  521. }
  522. .flex{
  523. display:flex;
  524. }
  525. .text-white{
  526. color:#fff;
  527. }
  528. .cu-card{
  529. border-bottom:1rpx solid #f8f8f8;
  530. text-align: center;
  531. }
  532. .factorytitle view{
  533. border-right: 1px solid #F8F8F8;
  534. }
  535. .factorytitle view:last-child{
  536. border-right: 1px solid transparent;
  537. }
  538. .factory{
  539. font-size:26rpx;
  540. font-weight:900;
  541. }
  542. .positive{
  543. color:#E63113;
  544. font-size:26rpx;
  545. font-weight:900;
  546. }
  547. .negative{
  548. color:#229453;
  549. font-size:26rpx;
  550. font-weight:900;
  551. }
  552. .wrap{
  553. font-size:20rpx;
  554. color: rgba(0,0,0,0.5);
  555. }
  556. .align-center{
  557. align-items: center;
  558. }
  559. .flex-direction-row{
  560. flex-direction:row;
  561. }
  562. .factoryItem{
  563. padding: 20rpx 0;
  564. }
  565. /* #ifdef MP */
  566. .mp-search-box {
  567. // position:relative;
  568. left: 0;
  569. top: 30upx;
  570. z-index: 9999;
  571. width: 100%;
  572. padding: 0 80upx;
  573. background: rgba(255, 170, 0, 0.6);
  574. .ser-input {
  575. flex: 1;
  576. height: 56upx;
  577. line-height: 56upx;
  578. text-align: center;
  579. font-size: 28upx;
  580. color: $font-color-base;
  581. border-radius: 10px;
  582. background: rgba(255, 255, 255, .6);
  583. }
  584. }
  585. .desc{
  586. width:73%;
  587. margin-right:2%;
  588. }
  589. .justify-between{
  590. justify-content: space-between;
  591. }
  592. page {
  593. .cate-section {
  594. position: relative;
  595. z-index: 5;
  596. border-radius: 16upx 16upx 0 0;
  597. margin-top: -20upx;
  598. }
  599. .carousel-section {
  600. padding: 0;
  601. .titleNview-placing {
  602. padding-top: 0;
  603. height: 0;
  604. }
  605. .carousel {
  606. .carousel-item {
  607. padding: 0;
  608. }
  609. }
  610. .swiper-dots {
  611. left: 50%;
  612. bottom: 5upx;
  613. transform: translateX(-50%);
  614. }
  615. }
  616. }
  617. /* #endif */
  618. .cuIcon-notification::before{
  619. color:#f37b1;
  620. }
  621. .cu-card.article>.cu-item .content>image {
  622. height: 3.4em;
  623. margin-right: 0rpx;
  624. margin-top: 24rpx;
  625. }
  626. .screen-swiper.price-swiper{
  627. height:70rpx;
  628. min-height: 70rpx;
  629. background: #fff;
  630. margin-bottom: 10px;
  631. }
  632. .guess-section {
  633. margin-bottom: 120rpx;
  634. margin-top:20rpx;
  635. }
  636. .guess-section .price{
  637. color:#000;
  638. font-size: 34rpx;
  639. }
  640. page {
  641. background: #f5f5f5;
  642. }
  643. .m-t {
  644. margin-top: 16upx;
  645. }
  646. .header-swiper{
  647. min-height: 300rpx;
  648. }
  649. /* 头部 轮播图 */
  650. .carousel-section {
  651. position: relative;
  652. // padding-top: 10px;
  653. .titleNview-placing {
  654. height: var(--status-bar-height);
  655. padding-top: 44px;
  656. box-sizing: content-box;
  657. }
  658. .titleNview-background {
  659. position: absolute;
  660. top: 0;
  661. left: 0;
  662. width: 100%;
  663. height: 426upx;
  664. transition: .4s;
  665. }
  666. }
  667. .tab-scroll-view {
  668. width: 750rpx;
  669. height: 300rpx;
  670. flex-direction: row;
  671. white-space: nowrap;
  672. .tab-item {
  673. display: inline-block;
  674. width: 350rpx;
  675. height: 250rpx;
  676. font-size: 16px;
  677. -moz-box-shadow: 2px 2px 5px #ccc;
  678. -webkit-box-shadow: 2px 2px 5px #ccc;
  679. box-shadow: 2px 2px 5px #ccc;
  680. color: #555;
  681. margin: 10rpx;
  682. }
  683. }
  684. .carousel {
  685. width: 100%;
  686. height: 350upx;
  687. .carousel-item {
  688. width: 100%;
  689. height: 100%;
  690. // padding: 0 28upx;
  691. overflow: hidden;
  692. }
  693. image {
  694. width: 100%;
  695. height: 100%;
  696. // border-radius: 10upx;
  697. }
  698. }
  699. .swiper-dots {
  700. display: flex;
  701. position: absolute;
  702. left: 60upx;
  703. bottom: 15upx;
  704. width: 72upx;
  705. height: 36upx;
  706. 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==);
  707. background-size: 100% 100%;
  708. .num {
  709. width: 36upx;
  710. height: 36upx;
  711. border-radius: 50px;
  712. font-size: 24upx;
  713. color: #fff;
  714. text-align: center;
  715. line-height: 36upx;
  716. }
  717. .sign {
  718. position: absolute;
  719. top: 0;
  720. left: 50%;
  721. line-height: 36upx;
  722. font-size: 12upx;
  723. color: #fff;
  724. transform: translateX(-50%);
  725. }
  726. }
  727. /* 分类 */
  728. .cate-section {
  729. display: flex;
  730. justify-content: space-around;
  731. align-items: center;
  732. flex-wrap: wrap;
  733. padding: 30upx 22upx;
  734. background: #fff;
  735. .cate-item {
  736. display: flex;
  737. flex-direction: column;
  738. align-items: center;
  739. font-size: $font-sm + 2upx;
  740. color: $font-color-dark;
  741. }
  742. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  743. image {
  744. width: 68upx;
  745. height: 68upx;
  746. margin-bottom: 14upx;
  747. // border-radius: 50%;
  748. opacity: .7;
  749. // box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
  750. }
  751. .grid_icon{
  752. font-size: 48upx;
  753. margin-bottom: 18upx;
  754. color: #fa436a;
  755. }
  756. }
  757. .ad-1 {
  758. width: 100%;
  759. height: 210upx;
  760. padding: 10upx 0;
  761. background: #fff;
  762. image {
  763. width: 100%;
  764. height: 100%;
  765. }
  766. }
  767. /* 销售信息 */
  768. .introduce-section {
  769. background: #fff;
  770. padding: 20upx 30upx;
  771. padding-bottom: 100upx;
  772. .guess-item {
  773. padding-bottom: 20upx;
  774. border-bottom: 1px solid #ccc;
  775. }
  776. .title {
  777. font-size: 28upx;
  778. color: $font-color-dark;
  779. font-weight:bold;
  780. height: 50upx;
  781. line-height: 50upx;
  782. flex:2.5;
  783. }
  784. .title-tip {
  785. flex:1;
  786. }
  787. .price-box {
  788. display: flex;
  789. align-items: baseline;
  790. height: 70upx;
  791. padding: 10upx 0;
  792. font-size: 26upx;
  793. color: $uni-color-primary;
  794. }
  795. .price {
  796. font-size: $font-lg + 2upx;
  797. }
  798. .m-price {
  799. margin: 0 12upx;
  800. color: $font-color-light;
  801. text-decoration: line-through;
  802. }
  803. .coupon-tip {
  804. align-items: center;
  805. padding: 4upx 10upx;
  806. background: $uni-color-primary;
  807. font-size: $font-sm;
  808. color: #fff;
  809. border-radius: 6upx;
  810. line-height: 1;
  811. transform: translateY(-4upx);
  812. }
  813. .bot-row {
  814. display: flex;
  815. align-items: center;
  816. height: 50upx;
  817. font-size: $font-sm;
  818. color: $font-color-light;
  819. view {
  820. flex: 1;
  821. }
  822. }
  823. }
  824. </style>