funeng.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  1. <template>
  2. <view class="container">
  3. <scroll-view scroll-x="true" class="class-box flex b-t" :scroll-left="scrollLeft" :scroll-with-animation="true">
  4. <view @click="tabClick(idx)" class="item" :style="{ width: topNavWidth }" v-for="(item, idx) in navList"
  5. :key="idx">
  6. <view class="status" :class="{ action: idx == tabCurrentIndex }">{{ item.title }}</view>
  7. </view>
  8. </scroll-view>
  9. <swiper :interval="3000" :duration="500" class="nav-swiper" :current="tabCurrentIndex"
  10. :style="{'height':height}" @change="changeTab" disable-touch>
  11. <swiper-item v-for="navItem in navList">
  12. <scroll-view scroll-y="true" :style="{'height':height}" @scrolltolower="getArtList()">
  13. <!-- 轮播图and搜索 start-->
  14. <!-- <view class="top-swiper" v-if="tabCurrentIndex == 0">
  15. <swiper :autoplay="true" :interval="3000" :duration="1000" class="banner-swiper">
  16. <swiper-item>
  17. <image src="../../static/error/emptyCart.png" mode="" class="swiper-img"></image>
  18. </swiper-item>
  19. <swiper-item>
  20. <image src="../../static/img/bargainBg.jpg" mode="" class="swiper-img"></image>
  21. </swiper-item>
  22. </swiper>
  23. <view class="input-box flex" @click="clickSearch">
  24. <view class=" input-content flex">
  25. <view class="iconfont iconsearch"></view>
  26. <view class="input"><input type="text" disabled placeholder="有什么新鲜事" /></view>
  27. </view>
  28. </view>
  29. </view> -->
  30. <!-- 轮播图and搜索 end-->
  31. <!-- 置顶新闻 start-->
  32. <!-- <view class="zd-wrap flex" v-if="zdArt.title && tabCurrentIndex == 0">
  33. <view class="zd-tit clamp2">
  34. <text class="zd-tip">|置顶|</text>{{zdArt.title}}
  35. </view>
  36. <view class="art-time">
  37. <image src="../../static/icon/hot.png" mode="" class="hot" v-if="zdArt.is_hot == 1"></image>{{zdArt.add_time}}
  38. </view>
  39. </view> -->
  40. <!-- 置顶新闻 end-->
  41. <!-- 文章列表 start-->
  42. <view class="art-list">
  43. <template v-for="item in navItem.list">
  44. <!-- 文章图片为一 -->
  45. <view class="art-item-one flex art-item" v-if="item.image_input.length == 1"
  46. @click="goToDetail(item.id)">
  47. <view class="art-left flex">
  48. <view class="art-tit clamp2">
  49. {{item.title}}
  50. </view>
  51. <view class="art-time">
  52. <image src="../../static/icon/hot.png" mode="" class="hot"
  53. v-if="item.is_hot == 1"></image><text
  54. class="store-name">{{item.name | storeName}}</text>
  55. <!-- <text class="pl">{{item.comment}}评论</text> -->
  56. <text class="creat-time">{{item.add_time | showTime}}</text>
  57. </view>
  58. </view>
  59. <view class="art-right">
  60. <image :src="item.image_input" mode=""></image>
  61. </view>
  62. </view>
  63. <!-- 文章图片为零 -->
  64. <view class="art-item-zero flex art-item" v-if="item.image_input.length == 0"
  65. @click="goToDetail(item.id)">
  66. <view class="art-tit clamp2">
  67. {{item.title}}
  68. </view>
  69. <view class="art-time">
  70. <image src="../../static/icon/hot.png" mode="" class="hot"></image><text
  71. class="store-name">{{item.name | storeName}}</text>
  72. <!-- <text class="pl">{{item.comment}}评论</text> -->
  73. <text class="creat-time">{{item.add_time | showTime}}</text>
  74. </view>
  75. </view>
  76. <!-- 文章图片大于一 -->
  77. <view class="art-item-three art-item flex" v-if="item.image_input.length > 1"
  78. @click="goToDetail(item.id)">
  79. <view class="art-tit clamp2">
  80. {{item.title}}
  81. </view>
  82. <view class="art-img-list">
  83. <image :src="imgitem" mode="" v-for="imgitem in item.image_input"></image>
  84. </view>
  85. <view class="art-time">
  86. <image src="../../static/icon/hot.png" mode="" class="hot"></image><text
  87. class="store-name">{{item.name | storeName}}</text>
  88. <!-- <text class="pl">{{item.comment}}评论</text> -->
  89. <text class="creat-time">{{item.add_time | showTime}}</text>
  90. </view>
  91. </view>
  92. </template>
  93. </view>
  94. <uni-load-more :status="navItem.loadingType"></uni-load-more>
  95. <!-- 文章列表 start-->
  96. </scroll-view>
  97. </swiper-item>
  98. </swiper>
  99. </view>
  100. </template>
  101. <script>
  102. import {
  103. loadIndexs
  104. } from '@/api/index.js';
  105. import {
  106. getUserInfo
  107. } from '@/api/user.js';
  108. import {
  109. interceptor
  110. } from '@/utils/loginUtils';
  111. import {
  112. mapState
  113. } from 'vuex';
  114. import {
  115. getArtTypeList,
  116. getArtList,
  117. getQyType,
  118. getQyArtList
  119. } from '@/api/art.js'
  120. import {
  121. timeComputed
  122. } from '@/utils/rocessor.js';
  123. export default {
  124. data() {
  125. return {
  126. topNavWidth: '25%', //设置导航默认宽度
  127. height: '',
  128. tabCurrentIndex: 0,
  129. navList: [],
  130. checkid: 0,
  131. titleNViewBackground: '',
  132. swiperCurrent: 0,
  133. swiperLength: 0,
  134. carouselList: [], //轮播列表
  135. goodsList: [], //最新商品列表
  136. bastList: [], //精品推荐列表
  137. bastBanner: [], //促销商品列表
  138. menusList: [], //头部菜单
  139. page: 1,
  140. limit: 10,
  141. userServant: [{
  142. image: ''
  143. }], //用户推广服务
  144. actTime: new Date(),
  145. zdArt: {},
  146. itemWidht: ''
  147. };
  148. },
  149. computed: {
  150. ...mapState(['loginInterceptor']),
  151. ...mapState('user', ['hasLogin', 'userInfo']),
  152. scrollLeft() {
  153. if (this.tabCurrentIndex > 1) {
  154. return this.itemWidht * (this.tabCurrentIndex - 1.5);
  155. } else {
  156. return 0;
  157. }
  158. }
  159. },
  160. onLoad: function(option) {
  161. // #ifndef MP
  162. if (option.spread) {
  163. // 存储其他邀请人
  164. uni.setStorageSync('spread', option.spread);
  165. }
  166. // #endif
  167. // #ifdef MP
  168. if (option.scene) {
  169. // 存储小程序邀请人
  170. uni.setStorage({
  171. key: 'spread_code',
  172. data: option.scene
  173. });
  174. }
  175. // #endif
  176. // 获取文章分类
  177. // this.getArtTypeList()
  178. // 获取置顶
  179. // this.getArtList('zhiding')
  180. // 获取推荐文章列表
  181. // this.getArtList()
  182. },
  183. onShow: function() {
  184. // 判断是否强制登录
  185. if (this.loginInterceptor && !this.hasLogin) {
  186. // 登录拦截
  187. interceptor();
  188. }
  189. if (this.navList.length == 0) {
  190. this.getArtTypeList()
  191. }
  192. },
  193. // 计算页面剩余高度
  194. onReady(res) {
  195. var obj = this;
  196. uni.getSystemInfo({
  197. success: resu => {
  198. const query = uni.createSelectorQuery();
  199. query.select('.nav-swiper').boundingClientRect();
  200. query.exec(function(res) {
  201. obj.height = resu.windowHeight - res[0].top + 'px';
  202. });
  203. },
  204. fail: res => {}
  205. });
  206. },
  207. filters: {
  208. showTime(dateTime) {
  209. //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
  210. dateTime = dateTime * 1000
  211. var minute = 1000 * 60 //把分,时,天,周,半个月,一个月用毫秒表示
  212. var hour = minute * 60
  213. var day = hour * 24
  214. var week = day * 7
  215. var halfamonth = day * 15
  216. var month = day * 30
  217. var now = new Date().getTime() //获取当前时间毫秒
  218. var dateTimeStamp = new Date(dateTime)
  219. var diffValue = now - dateTimeStamp //时间差
  220. if (diffValue < 0) {
  221. return
  222. }
  223. var minC = diffValue / minute //计算时间差的分,时,天,周,月
  224. var hourC = diffValue / hour
  225. var dayC = diffValue / day
  226. var weekC = diffValue / week
  227. var monthC = diffValue / month
  228. var result = ''
  229. console.log(monthC, weekC, dayC, hourC, minC)
  230. if (monthC >= 1 && monthC <= 3) {
  231. result = ' ' + parseInt(monthC) + '月前'
  232. } else if (weekC >= 1 && weekC <= 4) {
  233. result = ' ' + parseInt(weekC) + '周前'
  234. } else if (dayC >= 1 && dayC <= 7) {
  235. result = ' ' + parseInt(dayC) + '天前'
  236. } else if (hourC >= 1 && hourC <= 24) {
  237. result = ' ' + parseInt(hourC) + '小时前'
  238. } else if (minC >= 1 && minC <= 60) {
  239. result = ' ' + parseInt(minC) + '分钟前'
  240. } else if (diffValue >= 0 && diffValue <= minute) {
  241. result = '刚刚'
  242. } else {
  243. var datetime = new Date()
  244. datetime.setTime(dateTimeStamp)
  245. var Nyear = datetime.getFullYear()
  246. var Nmonth =
  247. datetime.getMonth() + 1 < 10 ?
  248. '0' + (datetime.getMonth() + 1) :
  249. datetime.getMonth() + 1
  250. var Ndate =
  251. datetime.getDate() < 10 ?
  252. '0' + datetime.getDate() :
  253. datetime.getDate()
  254. var Nhour =
  255. datetime.getHours() < 10 ?
  256. '0' + datetime.getHours() :
  257. datetime.getHours()
  258. var Nminute =
  259. datetime.getMinutes() < 10 ?
  260. '0' + datetime.getMinutes() :
  261. datetime.getMinutes()
  262. var Nsecond =
  263. datetime.getSeconds() < 10 ?
  264. '0' + datetime.getSeconds() :
  265. datetime.getSeconds()
  266. result = Nyear + '-' + Nmonth + '-' + Ndate
  267. }
  268. return result
  269. },
  270. storeName(val) {
  271. let str = ''
  272. if (val) {
  273. if (val.length <= 6) {
  274. str = val
  275. } else {
  276. str = val.slice(0, 6) + '...'
  277. }
  278. }
  279. return str
  280. }
  281. },
  282. methods: {
  283. // 获取项目宽度
  284. numClassWidht() {
  285. uni.createSelectorQuery()
  286. .select('.container')
  287. .fields({
  288. size: true
  289. },
  290. data => {
  291. // 设置项目宽度
  292. this.itemWidht = Math.floor((data.width / 750) * 187.5);
  293. }
  294. )
  295. .exec();
  296. },
  297. //swiper 切换
  298. changeTab(e) {
  299. console.log(e, 'eeeeeeeeeeeeeeeeee')
  300. if (e.target.current > (this.navList.length - 1)) {
  301. e.target.current = 0
  302. }
  303. this.tabCurrentIndex = e.target.current;
  304. this.getArtList('tab')
  305. },
  306. // 头部点击切换
  307. tabClick(index) {
  308. this.tabCurrentIndex = index
  309. },
  310. openSubscribe: function(e) {
  311. let page = e;
  312. // #ifndef MP
  313. uni.navigateTo({
  314. url: page
  315. });
  316. // #endif
  317. // #ifdef MP
  318. uni.showLoading({
  319. title: '正在加载'
  320. });
  321. openBargainSubscribe()
  322. .then(res => {
  323. uni.hideLoading();
  324. uni.navigateTo({
  325. url: page
  326. });
  327. })
  328. .catch(err => {
  329. uni.hideLoading();
  330. });
  331. // #endif
  332. },
  333. // 监听切换事件
  334. listChange(e) {
  335. this.checkid = e.detail.current;
  336. },
  337. // 點擊搜索框
  338. clickSearch() {
  339. uni.navigateTo({
  340. url: '/pages/product/search'
  341. });
  342. },
  343. // 监听图片加载完成
  344. onImageError(key, index) {
  345. this[key][index].image = '/static/error/errorImage.jpg';
  346. },
  347. // 轮播图跳转
  348. bannerNavToUrl(item) {
  349. // #ifdef H5
  350. if (item.wap_url.indexOf('http') > 0) {
  351. window.location.href = item.wap_url;
  352. }
  353. // #endif
  354. //测试数据没有写id,用title代替
  355. uni.navigateTo({
  356. url: item.wap_url
  357. });
  358. },
  359. // 获取企业分类
  360. getArtTypeList() {
  361. let obj = this
  362. getQyType({
  363. is_type: 1
  364. }).then(res => {
  365. console.log(res)
  366. // 获取头部nav
  367. let arr = res.data.map(e => {
  368. e.loadingType = 'more'
  369. e.page = 1
  370. e.limit = 10
  371. e.loaded = false
  372. e.list = []
  373. return e
  374. })
  375. obj.navList = arr
  376. console.log(obj.navList, 'obj.navList')
  377. obj.$nextTick(() => {
  378. obj.numClassWidht();
  379. });
  380. console.log(obj.navList, '++++++++++++++++')
  381. this.getArtList()
  382. })
  383. },
  384. // 获取文章列表
  385. getArtList(type) {
  386. let obj = this
  387. let index = obj.tabCurrentIndex
  388. let navitem = obj.navList[index]
  389. console.log('res++++++')
  390. console.log(navitem.loadingType, 'navitem.loadingType')
  391. // nav 点击切换拦截
  392. if (type == 'tab') {
  393. if (navitem.loaded) {
  394. return
  395. }
  396. }
  397. if (navitem.loadingType == 'loading' || navitem.loadingType == 'noMore') {
  398. return
  399. }
  400. navitem.loadingType = 'loading'
  401. getQyArtList({
  402. page: navitem.page,
  403. rows: navitem.limit,
  404. id: navitem.id
  405. }).then(res => {
  406. console.log(res, '其他')
  407. navitem.list = navitem.list.concat(res.data.list)
  408. console.log(navitem.list, 'navitem.list')
  409. navitem.page++
  410. if (res.data.list.length == navitem.limit) {
  411. navitem.loadingType = 'more'
  412. } else {
  413. navitem.loadingType = 'noMore'
  414. }
  415. navitem.loaded = true
  416. })
  417. },
  418. goToDetail(id) {
  419. uni.navigateTo({
  420. url: '/pages/user/article?id=' + id
  421. })
  422. }
  423. }
  424. };
  425. </script>
  426. <style lang="scss">
  427. .Mask {
  428. width: 100%;
  429. height: 100vh;
  430. position: fixed;
  431. z-index: 99999;
  432. background-color: rgba(0, 0, 0, 0.7);
  433. top: 0;
  434. image {
  435. width: 100%;
  436. height: 100vh;
  437. }
  438. }
  439. // 热销商品
  440. .hot-goods {
  441. margin: 0 25rpx;
  442. padding: 5rpx 25rpx 30rpx 25rpx;
  443. background-color: #fff;
  444. border-radius: 10rpx;
  445. .hot-headers {
  446. margin: 25rpx 0;
  447. width: 100%;
  448. display: flex;
  449. .img {
  450. width: 32rpx;
  451. height: 32rpx;
  452. margin-right: 10rpx;
  453. }
  454. .hot-title {
  455. font-size: 30rpx;
  456. margin-right: 15rpx;
  457. }
  458. .more {
  459. line-height: 1;
  460. padding: 5rpx 10rpx 5rpx 15rpx;
  461. text-align: center;
  462. font-size: 20rpx;
  463. border-radius: 15rpx;
  464. color: #ffffff;
  465. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  466. image {
  467. width: 20rpx;
  468. height: 20rpx;
  469. }
  470. }
  471. }
  472. .hot-lists {
  473. line-height: 1;
  474. display: flex;
  475. .hot-produce {
  476. width: 100%;
  477. height: 260rpx;
  478. border-top: 1px solid #f0f0f0;
  479. display: flex;
  480. padding-top: 28rpx;
  481. .produce-image {
  482. width: 200rpx;
  483. height: 200rpx;
  484. image {
  485. width: 200rpx;
  486. height: 200rpx;
  487. border: 1px solid #f0f0f0;
  488. }
  489. }
  490. .produce-content {
  491. // flex-direction: column;
  492. margin-left: 30rpx;
  493. height: 200rpx;
  494. position: relative;
  495. width: calc(100% - 200rpx - 30rpx);
  496. .produce-name {
  497. font-size: 28rpx;
  498. font-weight: bold;
  499. line-height: 35rpx;
  500. color: #343434;
  501. }
  502. .produce-info {
  503. font-size: 20rpx;
  504. margin-top: 25rpx;
  505. }
  506. .produce-price {
  507. display: flex;
  508. align-items: flex-end;
  509. color: #ff383e;
  510. font-size: 24rpx;
  511. margin-top: 70rpx;
  512. font-weight: bold;
  513. text {
  514. font-size: 36rpx;
  515. }
  516. .produce-price-1 {
  517. font-size: 22rpx;
  518. font-weight: 500;
  519. text-decoration: line-through;
  520. color: rgba(170, 170, 170, 1);
  521. margin-left: 20rpx;
  522. }
  523. }
  524. .produce-price1 {
  525. height: 100%;
  526. letter-spacing: 3rpx;
  527. color: #ff383e;
  528. font-size: 24rpx;
  529. font-weight: bold;
  530. .produce-center {
  531. width: 100%;
  532. position: absolute;
  533. bottom: 0;
  534. display: flex;
  535. justify-content: space-between;
  536. align-items: center;
  537. .kanjia_word {
  538. .word-1 {
  539. font-size: 22rpx;
  540. color: #666666;
  541. }
  542. .word-2 {
  543. font-size: 28rpx;
  544. color: #ff383e;
  545. margin-top: 10rpx;
  546. }
  547. }
  548. .kanjia_button {
  549. height: 50rpx;
  550. width: 150rpx;
  551. border-radius: 25rpx;
  552. font-size: 26rpx;
  553. font-weight: 500;
  554. color: #ff383e;
  555. border: 1px solid rgba(255, 56, 62, 1);
  556. }
  557. }
  558. }
  559. }
  560. }
  561. }
  562. }
  563. // .mp-height {
  564. // height: 44px;
  565. // }
  566. // page {
  567. // .cate-section {
  568. // position: relative;
  569. // z-index: 5;
  570. // border-radius: 16rpx 16rpx 0 0;
  571. // margin-top: -20rpx;
  572. // }
  573. // .carousel-section {
  574. // padding: 0;
  575. // .titleNview-placing {
  576. // padding-top: 0;
  577. // height: 0;
  578. // }
  579. // .carousel {
  580. // .carousel-item {
  581. // padding: 0;
  582. // }
  583. // }
  584. // .swiper-dots {
  585. // left: 45rpx;
  586. // bottom: 40rpx;
  587. // }
  588. // }
  589. // }
  590. page {
  591. background: #f7f8f7;
  592. }
  593. .m-t {
  594. margin-top: 16rpx;
  595. }
  596. /* 头部 轮播图 */
  597. .carousel-section {
  598. position: relative;
  599. padding-top: 10px;
  600. overflow: hidden;
  601. .titleNview-placing {
  602. height: var(--status-bar-height);
  603. padding-top: 44px;
  604. box-sizing: content-box;
  605. }
  606. .titleNview-background {
  607. position: absolute;
  608. top: 0;
  609. left: 0;
  610. width: 100%;
  611. height: 426rpx;
  612. transition: 0.4s;
  613. }
  614. .carousel {
  615. width: 100%;
  616. height: 240rpx;
  617. .carousel-item {
  618. width: 100%;
  619. height: 100%;
  620. padding: 0 28rpx;
  621. overflow: hidden;
  622. }
  623. image {
  624. width: 100%;
  625. height: 100%;
  626. border-radius: $border-radius-sm;
  627. }
  628. }
  629. }
  630. .swiper-dots {
  631. display: flex;
  632. position: absolute;
  633. left: 60rpx;
  634. bottom: 15rpx;
  635. width: 72rpx;
  636. height: 36rpx;
  637. 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==);
  638. background-size: 100% 100%;
  639. .num {
  640. width: 36rpx;
  641. height: 36rpx;
  642. border-radius: 50px;
  643. font-size: 24rpx;
  644. color: #fff;
  645. text-align: center;
  646. line-height: 36rpx;
  647. }
  648. .sign {
  649. position: absolute;
  650. top: 0;
  651. left: 50%;
  652. line-height: 36rpx;
  653. font-size: 12rpx;
  654. color: #fff;
  655. transform: translateX(-50%);
  656. }
  657. }
  658. /* 分类 */
  659. .cate-section {
  660. display: flex;
  661. justify-content: space-around;
  662. align-items: center;
  663. flex-wrap: wrap;
  664. padding: 30rpx 22rpx;
  665. .cate-item {
  666. display: flex;
  667. flex-direction: column;
  668. align-items: center;
  669. font-size: $font-sm + 2rpx;
  670. color: $font-color-dark;
  671. }
  672. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  673. image {
  674. width: 88rpx;
  675. height: 88rpx;
  676. margin-bottom: 14rpx;
  677. border-radius: 50%;
  678. opacity: 0.7;
  679. }
  680. }
  681. // 中间广告图片
  682. .ad-1 {
  683. width: 100%;
  684. height: 210rpx;
  685. padding: 10rpx 0;
  686. background: #fff;
  687. image {
  688. width: 100%;
  689. height: 100%;
  690. }
  691. }
  692. /*公用边框样式*/
  693. %icon {
  694. margin-right: 10rpx;
  695. display: inline-block;
  696. padding: 2rpx 10rpx;
  697. border: 1rpx solid $color-yellow;
  698. color: $color-yellow;
  699. line-height: 1;
  700. font-size: $font-base;
  701. border-radius: 10rpx;
  702. }
  703. .f-header {
  704. display: flex;
  705. align-items: center;
  706. height: 92rpx;
  707. padding: 6rpx 30rpx 8rpx;
  708. image {
  709. flex-shrink: 0;
  710. width: 80rpx;
  711. height: 80rpx;
  712. margin-right: 20rpx;
  713. }
  714. .tit-box {
  715. @extend %font-title-box;
  716. }
  717. .tit {
  718. @extend %font-title;
  719. }
  720. .iconenter {
  721. font-size: $font-lg + 2rpx;
  722. color: $font-color-light;
  723. }
  724. .f-left-icon {
  725. @extend %f-left-icon;
  726. }
  727. .iconfont {
  728. font-size: $font-sm - 2rpx;
  729. }
  730. }
  731. // 会员升级礼包
  732. .uservip {
  733. border-radius: $border-radius-sm;
  734. background-color: white;
  735. box-shadow: $box-shadow;
  736. height: 300rpx;
  737. margin: 0 30rpx;
  738. image {
  739. height: 100%;
  740. width: 300rpx;
  741. }
  742. .detail {
  743. position: relative;
  744. padding: 20rpx;
  745. height: 100%;
  746. .icon {
  747. @extend %icon;
  748. }
  749. .price-box {
  750. position: absolute;
  751. bottom: 20rpx;
  752. width: calc(100% - 40rpx);
  753. .price {
  754. font-size: $font-lg + 2rpx;
  755. font-weight: bold;
  756. color: $font-color-base;
  757. }
  758. .text {
  759. color: $color-gray;
  760. font-size: $font-sm;
  761. }
  762. }
  763. .title {
  764. font-size: $font-lg;
  765. font-weight: bold;
  766. }
  767. }
  768. }
  769. /* 猜你喜欢 */
  770. .guess-section {
  771. display: flex;
  772. flex-wrap: wrap;
  773. padding: 0 30rpx;
  774. .guess-item {
  775. overflow: hidden;
  776. display: flex;
  777. flex-direction: column;
  778. width: 48%;
  779. margin-bottom: 4%;
  780. border-radius: $border-radius-sm;
  781. background-color: white;
  782. box-shadow: $box-shadow;
  783. &:nth-child(2n + 1) {
  784. margin-right: 4%;
  785. }
  786. }
  787. .image-wrapper {
  788. width: 100%;
  789. height: 330rpx;
  790. border-radius: 3px;
  791. overflow: hidden;
  792. image {
  793. width: 100%;
  794. height: 100%;
  795. opacity: 1;
  796. }
  797. }
  798. .title {
  799. font-size: $font-base;
  800. color: $font-color-dark;
  801. font-weight: bold;
  802. line-height: 80rpx;
  803. }
  804. .price {
  805. font-size: $font-lg;
  806. color: $font-color-base;
  807. font-weight: bold;
  808. line-height: 1;
  809. line-height: 80rpx;
  810. }
  811. .icon {
  812. @extend %icon;
  813. }
  814. .detail {
  815. line-height: 1;
  816. }
  817. .tip {
  818. color: white;
  819. background-color: $color-yellow;
  820. line-height: 1.5;
  821. font-size: $font-sm;
  822. padding-left: 20rpx;
  823. }
  824. }
  825. // 推荐
  826. .recommend {
  827. width: 95%;
  828. height: 155rpx;
  829. margin: 0rpx auto;
  830. padding-top: 30rpx;
  831. font-size: 26rpx;
  832. text-align: center;
  833. color: #333333;
  834. align-items: flex-start;
  835. .recommend_list {
  836. width: 33%;
  837. }
  838. .re_title {
  839. font-size: 32rpx;
  840. font-weight: bold;
  841. }
  842. .re_name {
  843. color: #999999;
  844. padding-top: 10rpx;
  845. }
  846. .selected_icon {
  847. width: 25rpx;
  848. height: 10rpx;
  849. margin: 0px auto;
  850. display: none;
  851. image {
  852. width: 100%;
  853. height: 100%;
  854. }
  855. }
  856. .active {
  857. display: block;
  858. }
  859. .active_color {
  860. color: #dc4d46 !important;
  861. }
  862. }
  863. // 列表
  864. .list-box-h {
  865. height: 1550rpx;
  866. }
  867. // 优惠券
  868. .coupon-list {
  869. display: inline-block;
  870. }
  871. .row {
  872. border-radius: 15rpx;
  873. margin: 25rpx;
  874. height: 155rpx;
  875. // width: 552rpx;
  876. overflow: hidden;
  877. background-color: #ffffff;
  878. padding-right: 25rpx;
  879. .list-interval {
  880. border: 1px dashed $border-color-light;
  881. height: 100%;
  882. .top,
  883. .bottom {
  884. border-radius: 100rpx;
  885. width: 30rpx;
  886. height: 30rpx;
  887. position: absolute;
  888. background-color: $page-color-base;
  889. right: -15rpx;
  890. }
  891. .top {
  892. top: -18rpx;
  893. }
  894. .bottom {
  895. bottom: -18rpx;
  896. }
  897. }
  898. .list-money {
  899. height: 100%;
  900. min-width: 155rpx;
  901. text-align: center;
  902. image {
  903. height: 100%;
  904. width: 20rpx;
  905. }
  906. .list-money-text {
  907. flex-grow: 1;
  908. padding: 0 25rpx;
  909. .tit {
  910. text-align: center;
  911. padding: 15rpx 0rpx;
  912. font-size: 55rpx;
  913. color: $color-red;
  914. font-weight: bold;
  915. &.noAction {
  916. color: $font-color-light;
  917. }
  918. }
  919. .price {
  920. padding-bottom: 25rpx;
  921. color: $font-color-light;
  922. }
  923. }
  924. }
  925. .row_list_right {
  926. // flex-grow: 1;
  927. min-width: 200rpx;
  928. padding-left: 25rpx;
  929. line-height: 1;
  930. .right_time {
  931. padding: 10rpx 0rpx;
  932. color: $font-color-light;
  933. font-size: $font-sm;
  934. }
  935. .right_top {
  936. margin: 15rpx 0;
  937. .right_name {
  938. font-size: $font-base;
  939. color: #bc253a;
  940. font-weight: bold;
  941. }
  942. .right_title {
  943. font-size: $font-base;
  944. color: $font-base;
  945. font-weight: bold;
  946. &.noAction {
  947. color: $font-color-light;
  948. }
  949. }
  950. }
  951. }
  952. .right_use {
  953. margin: 15rpx 0;
  954. padding: 10rpx;
  955. width: 160rpx;
  956. text-align: center;
  957. color: #fff;
  958. background-color: #bc253a;
  959. border-radius: 50rpx;
  960. font-size: $font-sm;
  961. &.noAction {
  962. background-color: $font-color-light;
  963. }
  964. }
  965. .iconlocation {
  966. font-size: 36rpx;
  967. color: $font-color-light;
  968. }
  969. }
  970. .navbar {
  971. display: flex;
  972. height: 40px;
  973. padding: 0 5px;
  974. background: #fff;
  975. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  976. position: relative;
  977. z-index: 10;
  978. .nav-item {
  979. flex: 1;
  980. display: flex;
  981. justify-content: center;
  982. align-items: center;
  983. height: 100%;
  984. font-size: 15px;
  985. color: $font-color-dark;
  986. position: relative;
  987. &.current {
  988. color: #000;
  989. font-weight: bold;
  990. &:after {
  991. content: '';
  992. position: absolute;
  993. left: 50%;
  994. bottom: 0;
  995. transform: translateX(-50%);
  996. width: 44px;
  997. height: 0;
  998. border-bottom: 2px solid #E60012;
  999. }
  1000. }
  1001. }
  1002. }
  1003. .nav-swiper {
  1004. // background-color: #bfa;
  1005. }
  1006. .top-swiper {
  1007. position: relative;
  1008. .banner-swiper {
  1009. width: 750rpx;
  1010. height: 390rpx;
  1011. .swiper-img {
  1012. display: block;
  1013. width: 750rpx;
  1014. height: 390rpx;
  1015. }
  1016. swiper-item {
  1017. width: 750rpx;
  1018. height: 390rpx;
  1019. }
  1020. }
  1021. .input-box {
  1022. // position: fixed;
  1023. // top: 0;
  1024. // left: 0;
  1025. position: absolute;
  1026. top: 0;
  1027. left: 0;
  1028. width: 100%;
  1029. padding: 25rpx;
  1030. // background-color: #ffffff;
  1031. z-index: 999;
  1032. height: 44px;
  1033. .iconsearch {
  1034. font-size: 50rpx;
  1035. }
  1036. .input-content {
  1037. border-radius: 99rpx;
  1038. flex-grow: 1;
  1039. padding: 10rpx 30rpx;
  1040. background-color: rgba(255, 255, 255, 0.7);
  1041. .input {
  1042. flex-grow: 1;
  1043. input {
  1044. font-size: $font-lg;
  1045. }
  1046. }
  1047. }
  1048. .input-button {
  1049. padding-left: 20rpx;
  1050. font-size: $font-lg;
  1051. height: 100%;
  1052. }
  1053. }
  1054. }
  1055. .zd-wrap {
  1056. width: 750rpx;
  1057. height: 203rpx;
  1058. background: #FFFFFF;
  1059. margin: 20rpx auto;
  1060. padding: 30rpx 28rpx;
  1061. flex-direction: column;
  1062. justify-content: space-between;
  1063. align-items: flex-start;
  1064. .zd-tip {
  1065. color: #FF0018;
  1066. }
  1067. }
  1068. .hot {
  1069. width: 22rpx;
  1070. height: 22rpx;
  1071. margin-right: 10rpx;
  1072. }
  1073. .art-time {
  1074. display: inline-block;
  1075. font-size: 24rpx;
  1076. font-weight: 500;
  1077. color: #7F8699;
  1078. text {
  1079. margin-right: 10rpx;
  1080. }
  1081. }
  1082. .art-list {
  1083. background-color: #fff;
  1084. width: 750rpx;
  1085. font-size: 31rpx;
  1086. font-weight: 500;
  1087. color: #323232;
  1088. // font-weight: bold;
  1089. }
  1090. .art-item {
  1091. width: 691rpx;
  1092. border-bottom: #E1E1E1 1px solid;
  1093. margin: auto;
  1094. }
  1095. .art-item-zero {
  1096. height: 153rpx;
  1097. flex-direction: column;
  1098. justify-content: space-between;
  1099. align-items: flex-start;
  1100. padding: 20rpx 0;
  1101. border-bottom: #E1E1E1 1px solid;
  1102. }
  1103. .art-item-one {
  1104. height: 195rpx;
  1105. margin: auto;
  1106. padding: 30rpx 0 20rpx;
  1107. .art-left {
  1108. height: 100%;
  1109. flex-direction: column;
  1110. justify-content: space-between;
  1111. align-items: flex-start;
  1112. padding-right: 40rpx;
  1113. }
  1114. .art-right {
  1115. width: 227rpx;
  1116. height: 145rpx;
  1117. border-radius: 10rpx;
  1118. flex-shrink: 0;
  1119. image {
  1120. width: 100%;
  1121. height: 100%;
  1122. border-radius: 10rpx;
  1123. }
  1124. }
  1125. }
  1126. .art-item-three {
  1127. height: 345rpx;
  1128. flex-direction: column;
  1129. justify-content: space-between;
  1130. align-items: flex-start;
  1131. padding: 30rpx 0;
  1132. .art-img-list {
  1133. width: 100%;
  1134. height: 145rpx;
  1135. // background-color: #bfa;
  1136. // border-radius: 10px;
  1137. image {
  1138. width: 220rpx;
  1139. height: 145rpx;
  1140. border-radius: 10rpx;
  1141. margin-right: 15rpx;
  1142. &:last-child {
  1143. margin-right: 0;
  1144. }
  1145. }
  1146. }
  1147. }
  1148. // 头部时间段样式
  1149. .class-box {
  1150. white-space: nowrap;
  1151. height: 40px;
  1152. position: relative;
  1153. background-color: #fff;
  1154. .item {
  1155. text-align: center;
  1156. display: inline-block;
  1157. color: $font-color-base;
  1158. height: 100%;
  1159. background-color: #ffffff;
  1160. line-height: 1;
  1161. .status {
  1162. font-size: 30rpx;
  1163. margin: 0 auto;
  1164. width: 60px;
  1165. height: 100%;
  1166. line-height: 40px;
  1167. &.action {
  1168. color: #000;
  1169. font-weight: bold;
  1170. position: relative;
  1171. &:after {
  1172. content: '';
  1173. position: absolute;
  1174. left: 50%;
  1175. bottom: 5px;
  1176. transform: translateX(-50%);
  1177. width: 33px;
  1178. height: 0;
  1179. border-bottom: 2px solid #E60012;
  1180. }
  1181. }
  1182. }
  1183. }
  1184. }
  1185. </style>