zero.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. <template>
  2. <view class="" style="padding-top: 20rpx;">
  3. <view class="flex center-box ">
  4. <!-- <view class="flex center-item" @click="navto('/pages/user/xzdl?type=2')">
  5. <view class="val">
  6. 1000
  7. </view>
  8. <view class="name">我的消费包</view>
  9. </view>
  10. <view class="line">
  11. </view> -->
  12. <view class="flex center-item" @click="navto('/pages/zero/gfz')">
  13. <view class="val" v-if="pUser.zero_level">
  14. {{pUser.zero_level.name || 0}}
  15. </view>
  16. <view class="name">我的持包值</view>
  17. </view>
  18. <view class="line">
  19. </view>
  20. <view class="flex center-item" >
  21. <view class="val">
  22. {{pUser.pass || 0}}
  23. </view>
  24. <view class="name">我的通证</view>
  25. </view>
  26. </view>
  27. <view class="flex banne">
  28. <image src="../../static/img/zjf.png" mode="" @click="navto('/pages/zero/task')"></image>
  29. <image src="../../static/img/yj.png" mode="" @click="navto('/pages/zero/chou')"></image>
  30. </view>
  31. <view class="flex nav">
  32. <view class="nav-item" v-for="(item,index) in navList" :class="{'action': current == index}"
  33. @click="changeTab(index)">
  34. {{item.tit}}
  35. </view>
  36. </view>
  37. <swiper disable-touch :current="current" class="list-wrap" :style="{'height': maxHeight}">
  38. <swiper-item :style="{'height': maxHeight}" v-for="item in navList">
  39. <scroll-view scroll-y="true" class="" :style="{'height': maxHeight}" :class="{'p2':current == 1}" @scrolltolower="getMore(item.status)">
  40. <view class="card-wrap flex" v-for="cardItem in item.list" >
  41. <image :src="cardItem.image" mode="" class="card-img"></image>
  42. <view class="flex card-info">
  43. <view class="name ">
  44. {{cardItem.name}}
  45. </view>
  46. <template v-if="current == 0">
  47. <view class="" style="padding-right: 10rpx;">
  48. 周期{{cardItem.end_day || 0}}天,每日产出数量{{cardItem.day_pass || 0}},共富值+{{cardItem.holding_value || 0}}.最多可持有{{cardItem.max_count}}个
  49. </view>
  50. <view class="price" >
  51. <image src="../../static/icon/ydjf.png" mode="" ></image>
  52. <text class="show">{{cardItem.pay_points}}</text> 阅读积分 <text > (有效期{{cardItem.max_send ||0}})</text>
  53. </view>
  54. </template>
  55. <template v-if="current == 1">
  56. <view class="" style="padding-right: 10rpx;">
  57. 每日产出数量{{cardItem.day_pass || 0}},共富值+{{cardItem.holding_value || 0}}
  58. </view>
  59. <view class="" style="padding-right: 10rpx;">
  60. 已发放次数:{{cardItem.use_pass_send}},总发放次数:{{cardItem.pass_send}}
  61. </view>
  62. <view class="">
  63. 到期时间: {{cardItem.end_time}}
  64. </view>
  65. </template>
  66. </view>
  67. <view v-if="current == 0" class="card-btn" :class="{'buyless': cardItem.activate == 0}" @click="open(cardItem)">
  68. 立即兑换
  69. </view>
  70. <view class="card-nun" v-if="cardItem.total">
  71. 进行中:{{cardItem.progress}}/{{cardItem.total}}
  72. </view>
  73. </view>
  74. <!-- <view class="px-wrap flex" v-if="item.status == 2">
  75. <view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">默认</view>
  76. <view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
  77. <text>单价</text>
  78. <view class="p-box">
  79. <text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="iconfont iconfold"></text>
  80. <text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="iconfont iconfold xia"></text>
  81. </view>
  82. </view>
  83. <view class="nav-item" :class="{ current: filterIndex === 1 }" @click="tabClick(1)">
  84. <text>数量</text>
  85. <view class="p-box">
  86. <text :class="{ active: numberOrder === 1 && filterIndex === 1 }" class="iconfont iconfold"></text>
  87. <text :class="{ active: numberOrder === 2 && filterIndex === 1 }" class="iconfont iconfold xia"></text>
  88. </view>
  89. </view>
  90. </view> -->
  91. <!-- <view class="order-wrap " v-for="orderItem in item.list" v-if="item.status == 2">
  92. <view class="flex m-info">
  93. <image src="../../static/icon/gs-av.png" mode="" class="card-img"></image>
  94. <text style=" display: inline-block;line-height: 55rpx;">{{orderItem.user.nickname}}</text>
  95. </view>
  96. <view class="price">
  97. ¥{{orderItem.total_price}}
  98. </view>
  99. <view class="num">
  100. 数量:{{orderItem.amount}}
  101. </view>
  102. <view class="num">
  103. {{ getTime(orderItem.add_time)}}
  104. </view>
  105. <view class="order-btn" @click="gobuy(orderItem)">
  106. 立即购买
  107. </view>
  108. </view> -->
  109. <uni-load-more :status="item.loadingType"></uni-load-more>
  110. </scroll-view>
  111. </swiper-item>
  112. </swiper>
  113. <uni-popup ref="popup" type="bottom" @change="popChange">
  114. <view class="" style="padding-bottom: 50px;background-color: #fff;">
  115. <view class="a-t">
  116. <image :src="buyItem.image"></image>
  117. <view class="right">
  118. <view class="good-name clamp">{{buyItem.name}}</view>
  119. <text class="price">{{ buyItem.pay_points*1* goodsNumber }}</text>
  120. </view>
  121. </view>
  122. <view class="attr-list" style="padding-bottom:40rpx;">
  123. <text>兑换数量</text>
  124. <view class="item-list">
  125. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
  126. @eventChange="numberChange"></uni-number-box>
  127. </view>
  128. </view>
  129. <button class="btn" @click.stop="createPass">确定</button>
  130. </view>
  131. </uni-popup>
  132. </view>
  133. </template>
  134. <script>
  135. import {
  136. mapState,
  137. mapMutations
  138. } from 'vuex';
  139. import uniNumberBox from '@/components/uni-number-box.vue';
  140. import {
  141. saveUrl,
  142. interceptor
  143. } from '@/utils/loginUtils.js';
  144. import {
  145. getUserInfo,
  146. userPool,
  147. goft
  148. } from '@/api/user.js';
  149. import { getCardList,createPass, getGsList,passUser,buyGs,passLst } from '@/api/zero.js'
  150. export default {
  151. components: {
  152. uniNumberBox
  153. },
  154. data() {
  155. return {
  156. pUser: {},
  157. order: 'id asc',
  158. buyItem: {},//购买卡包信息
  159. filterIndex: 0,
  160. priceOrder: 0, //1 价格从低到高 2价格从高到低
  161. numberOrder: 0, //1 销量从低到高 2销量从高到低
  162. actionPrice: 100,
  163. goodsNumber: 1,
  164. goodsNumberMax: 1,
  165. maxHeight: '',
  166. current: 0,
  167. navList: [{
  168. status: 1,
  169. tit: '消费包',
  170. list: [],
  171. loadingType: 'more',
  172. loaded: false,
  173. page: 1,
  174. limit: 10,
  175. },
  176. {
  177. status: 2,
  178. tit: '我的消费包',
  179. list: [],
  180. loadingType: 'more',
  181. loaded: false,
  182. page: 1,
  183. limit: 10,
  184. }
  185. ],
  186. loading: false,
  187. buying: false,
  188. }
  189. },
  190. onLoad() {
  191. },
  192. onShow() {
  193. this.loadBaseData()
  194. },
  195. computed: {
  196. ...mapState('user', ['userInfo', 'hasLogin'])
  197. },
  198. onReady(res) {
  199. var that = this;
  200. uni.getSystemInfo({
  201. success: resu => {
  202. const query = uni.createSelectorQuery();
  203. query.select('.list-wrap').boundingClientRect();
  204. query.exec(function(res) {
  205. that.maxHeight = resu.windowHeight - res[0].top + 'px';
  206. console.log(that.maxHeight);
  207. });
  208. },
  209. fail: res => {}
  210. });
  211. },
  212. methods: {
  213. ...mapMutations('user', ['setUserInfo']),
  214. gobuy(item) {
  215. if(this.buying) {
  216. return
  217. }
  218. this.buying = true
  219. buyGs({
  220. id: item.id
  221. }).then(res => {
  222. uni.showToast({
  223. title:'购买成功',
  224. duration:2000
  225. });
  226. this.buying = false
  227. this.getGsList('re')
  228. }).catch( err => {
  229. this.buying = false
  230. })
  231. },
  232. passUser() {
  233. passUser().then(res => {
  234. // console.log(res);
  235. this.pUser = res.data
  236. })
  237. },
  238. getTime(time) {
  239. const num =13 - (time+'').length;
  240. let l = 1;//倍数
  241. for (let i = 0; i < num; i++) {
  242. l+='0';
  243. }
  244. // 重新解析为数字
  245. l = parseInt(l)
  246. const date = new Date(parseInt(time) * l);
  247. const year = date.getFullYear();
  248. const mon = date.getMonth() + 1;
  249. const day = date.getDate();
  250. const hours = date.getHours();
  251. const minu = date.getMinutes();
  252. const sec = date.getSeconds();
  253. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  254. },
  255. getMore(status) {
  256. if(status == 2) {
  257. this.getGsList()
  258. }
  259. },
  260. popChange(e) {
  261. console.log(e)
  262. if(!e.show) {
  263. this.buyItem = {}
  264. this.goodsNumber = 1
  265. this.goodsNumberMax = 1
  266. }
  267. },
  268. getCardList() {
  269. getCardList().then(res => {
  270. console.log(res);
  271. this.navList[0].list = res.data
  272. this.navList[0].loadingType = 'noMore'
  273. })
  274. },
  275. createPass() {
  276. let that = this
  277. if(that.loading) {
  278. return
  279. }
  280. that.loading = true
  281. createPass({
  282. card_id: that.buyItem.id,
  283. num: that.goodsNumber
  284. }).then(res => {
  285. that.loading = false
  286. uni.showToast({
  287. title:'兑换成功',
  288. duration:2000
  289. });
  290. that.loadBaseData()
  291. that.$refs.popup.close()
  292. }).catch(err => {
  293. that.loading = false
  294. })
  295. },
  296. // 购买数量变化
  297. numberChange(e) {
  298. this.goodsNumber = e.number;
  299. },
  300. //筛选点击
  301. tabClick(index) {
  302. // 防止重复点击综合排序
  303. if (this.filterIndex === 0 && this.filterIndex === index) {
  304. console.log('zhe')
  305. return;
  306. }
  307. this.filterIndex = index;
  308. if(index === 0) {
  309. this.order = 'id asc'
  310. }
  311. // 判断是否为销量优先
  312. if (index === 1) {
  313. this.numberOrder = this.numberOrder === 1 ? 2 : 1;
  314. this.order = this.numberOrder === 1 ? 'amount asc': 'amount desc'
  315. }
  316. // 判断是否为价格优先
  317. if (index === 2) {
  318. this.priceOrder = this.priceOrder === 1 ? 2 : 1;
  319. this.order = this.priceOrder === 1 ? 'price asc': 'price desc'
  320. }
  321. // 初始化页数
  322. // this.page = 1;
  323. this.navList[1].list.page = 1
  324. // 初始化数组
  325. // uni.pageScrollTo({
  326. // duration: 300,
  327. // scrollTop: 0
  328. // });
  329. this.getGsList('re');
  330. uni.showLoading({
  331. title: '正在加载'
  332. });
  333. },
  334. makeCall(item) {
  335. uni.makePhoneCall({
  336. phoneNumber:item + ''
  337. })
  338. },
  339. loadBaseData(tit) {
  340. const obj = this
  341. getUserInfo({})
  342. .then(({
  343. data
  344. }) => {
  345. console.log(data,'data')
  346. obj.setUserInfo(data);
  347. obj.getCardList()
  348. obj.passUser()
  349. obj.getGsList()
  350. })
  351. .catch(e => {
  352. console.log(e);
  353. });
  354. },
  355. buy() {},
  356. changeTab(index) {
  357. this.current = index
  358. this.getList('tab')
  359. },
  360. getList(type) {
  361. if(this.current == 1) {
  362. console.log('ddddddddddddddddddd')
  363. // this.getGsList('re');
  364. this.passLst('re')
  365. }else {
  366. }
  367. },
  368. navto(url) {
  369. if (!this.hasLogin) {
  370. // 保存地址
  371. saveUrl();
  372. // 登录拦截
  373. interceptor();
  374. } else {
  375. uni.navigateTo({
  376. url,
  377. fail() {
  378. uni.switchTab({
  379. url
  380. })
  381. }
  382. })
  383. }
  384. },
  385. open(item) {
  386. let that = this
  387. if(!item.activate) {
  388. return that.$api.msg('当前不可兑换')
  389. }
  390. that.buyItem = item
  391. that.goodsNumberMax = item.max_count*1 - item.progress*1
  392. this.$refs.popup.open()
  393. },
  394. getGsList(type) {
  395. this.passLst(type)
  396. // console.log('jinriu')
  397. // let that = this
  398. // let item = that.navList[1]
  399. // if(type == 're') {
  400. // item.list = []
  401. // item.loadingType = 'more'
  402. // item.page = 1
  403. // item.loaded = false
  404. // }
  405. // if(item.loadingType == 'loading' || item.loadingType == 'noMore') {
  406. // return
  407. // }
  408. // item.loadingType = 'loading'
  409. // getGsList({
  410. // // uid: this.userI.uid
  411. // page: item.page,
  412. // limit: item.limit,
  413. // order: that.order,
  414. // status: 0
  415. // }).then(res => {
  416. // uni.hideLoading()
  417. // let arr = res.data.result.list
  418. // item.list = item.list.concat(arr)
  419. // if(arr.length == item.limit) {
  420. // item.loadingType = 'more'
  421. // }else {
  422. // item.loadingType = 'noMore'
  423. // }
  424. // item.page++
  425. // item.loaded = true
  426. // })
  427. },
  428. passLst(type) {
  429. let that = this
  430. let item = that.navList[1]
  431. if(type == 're') {
  432. item.list = []
  433. item.loadingType = 'more'
  434. item.page = 1
  435. item.loaded = false
  436. }
  437. if(item.loadingType == 'loading' || item.loadingType == 'noMore') {
  438. return
  439. }
  440. item.loadingType = 'loading'
  441. passLst({
  442. page: item.page,
  443. limit: item.limit,
  444. uid: that.userInfo.uid
  445. }).then(res => {
  446. let arr = res.data.result.list
  447. item.list = item.list.concat(arr)
  448. if(arr.length == item.limit) {
  449. item.loadingType = 'more'
  450. }else {
  451. item.loadingType = 'noMore'
  452. }
  453. item.page++
  454. item.loaded = true
  455. })
  456. }
  457. }
  458. }
  459. </script>
  460. <style lang="scss" scoped>
  461. .center-box {
  462. width: 693rpx;
  463. height: 152rpx;
  464. background: #FFFFFF;
  465. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  466. border-radius: 20rpx;
  467. margin: 0 auto;
  468. font-size: 30rpx;
  469. font-weight: bold;
  470. color: #333333;
  471. .center-item {
  472. flex-grow: 1;
  473. flex-direction: column;
  474. justify-content: center;
  475. align-items: center;
  476. .val {
  477. font-size: 38rpx;
  478. font-weight: bold;
  479. color: #333333;
  480. }
  481. .name {
  482. padding-top: 10rpx;
  483. }
  484. }
  485. .line {
  486. width: 2rpx;
  487. height: 74rpx;
  488. background: #eff1f5;
  489. }
  490. }
  491. .banne {
  492. justify-content: center;
  493. padding: 20rpx 0;
  494. image {
  495. width: 340rpx;
  496. height: 204rpx;
  497. margin: 0 8rpx;
  498. }
  499. }
  500. .nav {
  501. padding: 30rpx 0;
  502. .nav-item {
  503. flex-grow: 1;
  504. text-align: center;
  505. font-size: 33rpx;
  506. font-weight: bold;
  507. color: #333;
  508. }
  509. .action {
  510. color: #FF4C4C;
  511. }
  512. }
  513. .list-wrap {
  514. // background-color: red;
  515. .card-wrap {
  516. width: 690rpx;
  517. height: 197rpx;
  518. background: #FFFFFF;
  519. border-radius: 10rpx;
  520. margin: 0 auto 20rpx;
  521. padding: 20rpx;
  522. justify-content: flex-start;
  523. position: relative;
  524. .card-img {
  525. flex-shrink: 0;
  526. width: 158rpx;
  527. height: 158rpx;
  528. background-color: #eee;
  529. margin-right: 20rpx;
  530. }
  531. .card-info {
  532. flex-grow: 1;
  533. font-size: 24rpx;
  534. font-weight: 500;
  535. height: 100%;
  536. color: #999999;
  537. flex-direction: column;
  538. justify-content: space-between;
  539. align-items: flex-start;
  540. .name {
  541. font-size: 32rpx;
  542. font-weight: bold;
  543. color: #333333;
  544. }
  545. .price {
  546. font-size: 20rpx;
  547. font-weight: 500;
  548. color: $base-color;
  549. line-height: 35rpx;
  550. .show {
  551. font-size: 36rpx;
  552. font-weight: bold;
  553. color: #FC4141;
  554. vertical-align: bottom;
  555. padding: 0 5rpx;
  556. }
  557. image {
  558. width: 34rpx;
  559. height: 33rpx;
  560. vertical-align: bottom;
  561. }
  562. text {
  563. color: #999999;
  564. }
  565. }
  566. }
  567. .card-btn {
  568. flex-shrink: 0;
  569. width: 137rpx;
  570. height: 52rpx;
  571. background: $base-color;
  572. border-radius: 26rpx;
  573. font-size: 26rpx;
  574. font-weight: 500;
  575. color: #FFFFFF;
  576. text-align: center;
  577. line-height: 50rpx;
  578. align-self: flex-end;
  579. }
  580. .buyless {
  581. background:#999 ;
  582. }
  583. .card-nun {
  584. position: absolute;
  585. top: 20rpx;
  586. right: 20rpx;
  587. font-size: 26rpx;
  588. color: $base-color;
  589. }
  590. }
  591. .order-wrap {
  592. width: 686rpx;
  593. height: 297rpx;
  594. background: #FFFFFF;
  595. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  596. border-radius: 20rpx;
  597. margin: 0 auto 20rpx;
  598. padding: 33rpx 40rpx;
  599. position: relative;
  600. .m-info {
  601. justify-content: flex-start;
  602. image {
  603. width: 55rpx;
  604. height: 55rpx;
  605. margin-right: 13rpx;
  606. }
  607. text {
  608. font-size: 28rpx;
  609. font-weight: bold;
  610. color: #333333;
  611. }
  612. }
  613. .price {
  614. font-size: 40rpx;
  615. font-family: PingFang SC;
  616. font-weight: bold;
  617. color: #FF4C4C;
  618. padding: 40rpx 0 30rpx;
  619. }
  620. .num {
  621. font-size: 26rpx;
  622. font-weight: 500;
  623. color: #888785;
  624. }
  625. .order-btn {
  626. width: 148rpx;
  627. height: 62rpx;
  628. border: 2px solid #FF5570;
  629. border-radius: 30rpx;
  630. line-height: 62rpx;
  631. text-align: center;
  632. font-size: 28rpx;
  633. font-weight: bold;
  634. color: #FF4C4C;
  635. position: absolute;
  636. right: 40rpx;
  637. bottom: 33rpx;
  638. }
  639. }
  640. }
  641. .attr-list {
  642. display: flex;
  643. flex-direction: column;
  644. font-size: $font-base + 2rpx;
  645. color: $font-color-base;
  646. padding-top: 30rpx;
  647. padding-left: 40rpx;
  648. padding-right: 30rpx;
  649. }
  650. .item-list {
  651. padding: 20rpx 0 0;
  652. display: flex;
  653. flex-wrap: wrap;
  654. .tit {
  655. display: flex;
  656. align-items: center;
  657. justify-content: center;
  658. background: #eee;
  659. // margin-left: 10rpx;
  660. margin-right: 20rpx;
  661. margin-bottom: 20rpx;
  662. border-radius: 100rpx;
  663. min-width: 60rpx;
  664. height: 60rpx;
  665. padding: 0 20rpx;
  666. font-size: $font-base;
  667. color: $font-color-dark;
  668. }
  669. .selected {
  670. background: #fbebee;
  671. color: $uni-color-primary;
  672. }
  673. }
  674. .btn {
  675. width: 750rpx;
  676. height: 98rpx;
  677. background: $base-color;
  678. line-height: 98rpx;
  679. // background: $uni-color-primary;
  680. font-size: $font-base + 2rpx;
  681. color: #fff;
  682. }
  683. .a-t {
  684. padding: 0 30rpx;
  685. display: flex;
  686. image {
  687. width: 170rpx;
  688. height: 170rpx;
  689. flex-shrink: 0;
  690. border-radius: 8rpx;
  691. }
  692. .right {
  693. display: flex;
  694. flex-direction: column;
  695. padding-left: 24rpx;
  696. font-size: $font-sm + 2rpx;
  697. color: $font-color-base;
  698. line-height: 42rpx;
  699. .good-name {
  700. padding-top: 20rpx;
  701. max-width: 320rpx;
  702. font-size: 30rpx;
  703. font-family: PingFang SC;
  704. font-weight: bold;
  705. color: #1d2023;
  706. line-height: 42rpx;
  707. margin-bottom: 15rpx;
  708. }
  709. .price {
  710. font-size: 60rpx;
  711. font-family: PingFang SC;
  712. font-weight: bold;
  713. color: $base-color;
  714. // font-size: $font-lg;
  715. // color: $uni-color-primary;
  716. // margin-bottom: 10rpx;
  717. &::after {
  718. content: '阅读积分';
  719. font-size: 30rpx;
  720. padding-left: 10rpx;
  721. }
  722. }
  723. .selected-text {
  724. margin-right: 10rpx;
  725. }
  726. }
  727. }
  728. .px-wrap {
  729. height: 60rpx;
  730. background-color: #fff;
  731. position: fixed;
  732. width: 750rpx;
  733. top: 0;
  734. z-index: 999;
  735. .nav-item {
  736. flex: 1;
  737. display: flex;
  738. justify-content: center;
  739. align-items: center;
  740. height: 100%;
  741. font-size: 25rpx;
  742. font-weight: 500;
  743. color: #666666;
  744. position: relative;
  745. &.current {
  746. color: $base-color;
  747. }
  748. }
  749. .p-box {
  750. display: flex;
  751. flex-direction: column;
  752. .iconfont {
  753. display: flex;
  754. align-items: center;
  755. justify-content: center;
  756. width: 30rpx;
  757. height: 14rpx;
  758. line-height: 1;
  759. margin-left: 4rpx;
  760. font-size: 20rpx;
  761. color: #888;
  762. &.active {
  763. color: $base-color;
  764. }
  765. }
  766. .xia {
  767. transform: scaleY(-1);
  768. }
  769. }
  770. }
  771. .p2 {
  772. // padding-top: 80rpx;
  773. }
  774. </style>