information.vue 27 KB

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