information.vue 24 KB

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