information.vue 24 KB

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