information.vue 27 KB

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