information.vue 27 KB

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