球星卡微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

785 lines
20 KiB

3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
  1. <template>
  2. <view>
  3. <!-- tabs选项卡 -->
  4. <view class="lf-flex">
  5. <view style="width: 84%;">
  6. <u-tabs
  7. :current="tabIndex"
  8. :list="tabList"
  9. :lineWidth="34"
  10. :scrollable="false"
  11. :itemWidth="100 / tabList.length +'%'"
  12. lineColor="#E7A23F"
  13. @change="switchTab"
  14. >
  15. </u-tabs>
  16. </view>
  17. <view class="filter-icon">
  18. <image src="@/static/icon/filter.png" @click="showFilter = !showFilter"></image>
  19. </view>
  20. </view>
  21. <!-- 筛选 -->
  22. <view class="filter-box" v-if="showFilter">
  23. <view class="flex-col group_6" >
  24. <view class="flex-col section_5">
  25. <view class="flex-col">
  26. <text class="text_7">按收货确认时间</text>
  27. <view class="flex-col group_8">
  28. <view class="lf-flex lf-flex-wrap">
  29. <view class="filter-date-item" :class="{active: filterGather.date == item.value}" @click="selectReceivingTime(item)" v-for="(item, index) in receivingTimeList" :key="index">{{ item.label }}</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="flex-col group_13">
  34. <text class="text_18">按送评信息</text>
  35. <view class="flex-col items-start text-wrapper_4">
  36. <u-input v-model="filterGather.name" placeholder="输入送评人姓名或手机号" class="text-wrapper_4-input"></u-input>
  37. </view>
  38. </view>
  39. <view class="flex-col group_13">
  40. <text class="text_18">按送评信息</text>
  41. <view class="flex-col items-start text-wrapper_4">
  42. <u-input v-model="filterGather.order_num" placeholder="输入评级编号" class="text-wrapper_4-input" ></u-input>
  43. </view>
  44. </view>
  45. <view class="flex-row group_14">
  46. <view class="flex-col items-center text-wrapper_5" @click="reset">
  47. <text>重置</text>
  48. </view>
  49. <view class="flex-col items-center text-wrapper_6" @click="confirm">
  50. <text>确认</text>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="flex-col items-center group_15" @click="showFilter = false">
  55. <view class="section_7"> </view>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 页面主体滚动区域 -->
  60. <swiper :current="tabIndex" :style="{height: swiperContentHeight}" @change="swiperChange">
  61. <swiper-item v-for="(tabItem, idx) in tabList" :key="idx" :item-id="tabItem.ident">
  62. <scroll-view
  63. :style="{height: swiperContentHeight, 'padding-top': '30rpx'}"
  64. :scroll-y="true"
  65. :refresher-enabled="true"
  66. :refresher-triggered="tabItem.isRefresher"
  67. @scrolltolower="scrolltolower"
  68. @refresherrefresh="refresherrefresh"
  69. >
  70. <view class="item-box" v-for="(item, index) in tabItem.data" :key="index" @click="$url('/packages/sonpingDetail/sonpingDetail?id='+ item.id)">
  71. <view class="flex-col section_5">
  72. <view class="justify-between">
  73. <view class="flex-row group_8">
  74. <image :src="showOrderStatusIcon(item.status)" class="image_7" />
  75. <text class="text_7">{{ ['在线送评','确认收货','定价','发货','已确认'][item.status-1] }}</text>
  76. </view>
  77. <text class="text_8" :style="{color: item.status_text_color}">{{ item.status_text }}</text>
  78. </view>
  79. <view class="justify-between group_9">
  80. <view class="flex-row">
  81. <text>{{ item.owner }}</text>
  82. <text class="text_10">{{ item.tel }}</text>
  83. </view>
  84. <text>{{ item.num }}</text>
  85. </view>
  86. <view class="justify-between group_11">
  87. <!-- <text class="text_12">更多</text> -->
  88. <text class="text_12"></text>
  89. <view class="flex-row" v-if="item.status == 1">
  90. <view class="flex-col items-center text-wrapper" @click.stop="orderCancel(item)">
  91. <text>取消</text>
  92. </view>
  93. <view v-if="!item.express_numb && !item.express_type" class="flex-col items-center text-wrapper_1" @click.stop="orderSend(item)">
  94. <text>寄送藏品</text>
  95. </view>
  96. </view>
  97. <view class="flex-row" v-else-if="item.status == 2">
  98. <view class="flex-col items-center text-wrapper" @click.stop="clickIndex = index, $url('/packages/address/address?is_select=1')">
  99. <text>更改地址</text>
  100. </view>
  101. </view>
  102. <view class="flex-row" v-else-if="item.status == 3">
  103. <view class="flex-col items-center text-wrapper_1" style="border-color: #EA2B2B; color: #EA2B2B;" @click.stop="orderPay(item)">
  104. <text>付款</text>
  105. </view>
  106. </view>
  107. <view class="flex-row" v-else-if="item.status == 4">
  108. <view class="flex-col items-center text-wrapper_1" @click.stop="orderConfirm(item)">
  109. <text>确认收货</text>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 当前tab下没有数据且无分页数据时显示系统剪辑中 -->
  116. <view class="nomore-box" v-if="tabItem.data.length <= 0 && !tabItem.isPage">
  117. <image src="@/static/images/nomore.png"></image>
  118. <view>暂无订单记录</view>
  119. </view>
  120. <!-- 加载中和暂无更多显示 -->
  121. <u-loadmore :status="tabItem.status" margin-bottom="20" marginTop="20" v-else></u-loadmore>
  122. <!-- 底部修饰解决部分机型底部被挡住且padding和margin都不生效的BUG -->
  123. <view class="additional"></view>
  124. </scroll-view>
  125. </swiper-item>
  126. </swiper>
  127. <!-- 轻提示 -->
  128. <u-toast ref="uToast"></u-toast>
  129. </view>
  130. </template>
  131. <script>
  132. import { orderList, cancelOrder, confirmOrder, doPay, changOrderAddress } from '@/service/order.js';
  133. import orderStatus1 from '@/static/icon/order_status1.png';
  134. import orderStatus2 from '@/static/icon/order_status2.png';
  135. import orderStatus3 from '@/static/icon/order_status3.png';
  136. import orderStatus4 from '@/static/icon/order_status4.png';
  137. import orderStatus5 from '@/static/icon/order_status5.png';
  138. export default {
  139. data(){
  140. let publicKey = {
  141. page: 1,
  142. pageSize: 10,
  143. isPage: true,
  144. status: 'loading', // loading加载,nomore没有更多了
  145. isRefresher: false, // 下拉刷新状态,默认没有开启下拉
  146. }
  147. return {
  148. showFilter: false,
  149. tabList: [{
  150. name: '全部',
  151. ident: 'all',
  152. type: 0,
  153. data: [],
  154. badge: {isDot: false},
  155. requestFunction: 'getList',
  156. ...publicKey
  157. },{
  158. name: '待确认',
  159. ident: 'waitconfirm',
  160. type: 1,
  161. data: [],
  162. badge: {isDot: false},
  163. requestFunction: 'getList',
  164. ...publicKey
  165. },{
  166. name: '评级中',
  167. ident: 'gradeing',
  168. type: 2,
  169. data: [],
  170. badge: {isDot: false},
  171. requestFunction: 'getList',
  172. ...publicKey
  173. },{
  174. name: '待付款',
  175. ident: 'waitpay',
  176. type: 3,
  177. data: [],
  178. badge: {isDot: false},
  179. requestFunction: 'getList',
  180. ...publicKey
  181. },{
  182. name: '待收货',
  183. ident: 'waitreceiv',
  184. type: 4,
  185. data: [],
  186. badge: {isDot: false},
  187. requestFunction: 'getList',
  188. ...publicKey
  189. }],
  190. tabIndex: 0,
  191. receivingTimeList: [{
  192. label: '1个月内',
  193. value: '1'
  194. },{
  195. label: '3个月内',
  196. value: '2'
  197. },{
  198. label: '6个月内',
  199. value: '3'
  200. },{
  201. label: '今年',
  202. value: '4'
  203. },{
  204. label: '2021年',
  205. value: '5'
  206. },{
  207. label: '2020年',
  208. value: '6'
  209. },{
  210. label: '2019年',
  211. value: '7'
  212. }],
  213. filterGather: {
  214. date: '',
  215. name: '',
  216. label: '',
  217. order_num: ''
  218. },
  219. clickButton: false,
  220. address: {},
  221. clickIndex: 0
  222. }
  223. },
  224. computed: {
  225. // 传入对应tab的ident值,在当前tabIndex下是否匹配,匹配上返回true,否则返回false,调用matchTabIdent(par1, par2, ...)
  226. matchTabIdent(){
  227. let that = this;
  228. return function(){
  229. let identList = Array.from(arguments);
  230. let hasKey = identList.some(item => that.tabList[that.tabIndex].ident === item);
  231. return hasKey;
  232. }
  233. },
  234. // 计算获得swiper内容区域剩余高度
  235. swiperContentHeight(){
  236. return `calc(100vh - 80rpx - 10rpx)`;
  237. },
  238. showOrderStatusIcon(){
  239. return function(status){
  240. return [orderStatus1, orderStatus2, orderStatus3, orderStatus4, orderStatus5][status-1]
  241. }
  242. }
  243. },
  244. watch: {
  245. address(){
  246. this.orderAddressChange();
  247. }
  248. },
  249. onLoad(options){
  250. this.tabIndex = Number(options.current || this.tabIndex);
  251. this[ this.tabList[this.tabIndex].requestFunction ](); // 获取当前tab下的数据列表
  252. },
  253. methods: {
  254. // 获取数据
  255. getList(options = {}){
  256. let tabItem = this.tabList[this.tabIndex];
  257. let filterGather = this.filterGather;
  258. let data = {
  259. type: tabItem.type,
  260. page: tabItem.page,
  261. pageSize: tabItem.pageSize
  262. };
  263. if(filterGather.date){
  264. data.confirm_type = filterGather.date;
  265. }
  266. if(filterGather.name){
  267. data.name_phone = filterGather.name;
  268. }
  269. if(filterGather.label){
  270. data.label = filterGather.label;
  271. }
  272. if(filterGather.order_num){
  273. data.order_num = filterGather.order_num;
  274. }
  275. orderList(data).then(res => {
  276. let datas = res.data.datas;
  277. let isPage = this.$isRight(datas.next_page_url);
  278. if(!isPage){
  279. tabItem.isPage = isPage;
  280. tabItem.status = 'nomore';
  281. }
  282. if(tabItem.page == 1){
  283. tabItem.data = datas.data;
  284. }else{
  285. tabItem.data.push(...datas.data);
  286. }
  287. if(options.refresher){
  288. this.$refs.uToast.show({
  289. message: '刷新成功',
  290. type: 'success'
  291. });
  292. tabItem.isRefresher = false;
  293. }
  294. })
  295. },
  296. // 筛选
  297. confirm(){
  298. this.tabIndex = 0;
  299. let tabItem = this.tabList[this.tabIndex];
  300. tabItem.page = 1;
  301. tabItem.isPage = true;
  302. tabItem.status = 'loading';
  303. tabItem.data = [];
  304. this[tabItem.requestFunction]();
  305. this.showFilter = false;
  306. },
  307. // 重置筛选条件
  308. reset(){
  309. this.filterGather = this.$options.data().filterGather;
  310. this.$refs.uToast.show({
  311. message: '内容已重置',
  312. type: 'success'
  313. });
  314. },
  315. // 选择确认收货时间
  316. selectReceivingTime(item){
  317. if(this.filterGather.date == item.value){
  318. this.filterGather.date = "";
  319. }else{
  320. this.filterGather.date = item.value;
  321. }
  322. },
  323. // 取消订单
  324. orderCancel(item){
  325. uni.showModal({
  326. title: '提示',
  327. content: '真要取消该订单吗?',
  328. success: async result => {
  329. if(result.confirm){
  330. await cancelOrder(item.order_id);
  331. this.$refs.uToast.show({
  332. message: '取消成功',
  333. type: 'success'
  334. });
  335. this.confirm();
  336. }
  337. }
  338. })
  339. },
  340. // 寄送藏品
  341. orderSend(item){
  342. let base_data = encodeURIComponent(JSON.stringify(item));
  343. this.$url('/pages/write/distribution?base_data='+ base_data);
  344. },
  345. // 更改地址
  346. async orderAddressChange(){
  347. let order_id = this.tabList[this.tabIndex].data[this.clickIndex].order_id;
  348. await changOrderAddress({order_id: order_id, addr_id: this.address.id});
  349. this.$refs.uToast.show({
  350. message: '地址修改成功',
  351. type: 'success'
  352. });
  353. },
  354. // 订单付款
  355. orderPay(item){
  356. if(this.clickButton) return;
  357. this.clickButton = true;
  358. doPay(item.order_id).then(res => {
  359. console.log("----------------", res);
  360. let datas = res.data.datas;
  361. uni.requestPayment({
  362. provider: 'wxpay',
  363. timeStamp: datas.timeStamp,
  364. nonceStr: datas.nonceStr,
  365. package: datas.package,
  366. signType: datas.signType,
  367. paySign: datas.paySign,
  368. success: res => {
  369. this.clickButton = false;
  370. this.$refs.uToast.show({
  371. message: '支付成功',
  372. type: 'success'
  373. });
  374. this.confirm();
  375. },
  376. fail: err => {
  377. uni.showModal({
  378. title: '',
  379. content: 'fail:' + JSON.stringify(err) + '支付失败',
  380. showCancel: false
  381. })
  382. this.clickButton = false;
  383. }
  384. })
  385. }).catch(err => this.clickButton = false)
  386. },
  387. // 确认收货
  388. async orderConfirm(item){
  389. uni.showModal({
  390. title:"确认收货",
  391. content:'确认收到货物并签收?',
  392. success:async (e) => {
  393. if(e.confirm){
  394. await confirmOrder(item.id);
  395. this.$refs.uToast.show({
  396. message: '确认收货成功',
  397. type: 'success'
  398. });
  399. this.confirm();
  400. }
  401. }
  402. });
  403. },
  404. // 切换tab
  405. switchTab(item){
  406. this.tabIndex = item.index;
  407. // 判断所切换到的tab下是否有数据并且isPage为true,如果没有再请求,否则啥也不干
  408. let tabItem = this.tabList[this.tabIndex];
  409. if(tabItem.data.length === 0 && tabItem.isPage){
  410. this[ tabItem.requestFunction ]();
  411. }
  412. },
  413. // swiper滑动响应事件
  414. swiperChange(event){
  415. // 事件触发类型为触摸时才做处理,否则是因为switchTab方法执行导致的事件回调
  416. if(event.detail.source === 'touch'){
  417. this.tabIndex = event.detail.current;
  418. // 判断所切换到的tab下是否有数据并且isPage为true,如果没有再请求,否则啥也不干
  419. let tabItem = this.tabList[this.tabIndex];
  420. if(tabItem.data.length === 0 && tabItem.isPage){
  421. this[ tabItem.requestFunction ]();
  422. }
  423. }
  424. },
  425. // 下拉刷新,重新获取页面数据,将状态置回初始值再请求
  426. refresherrefresh(){
  427. let tabItem = this.tabList[this.tabIndex];
  428. tabItem.isRefresher = true;
  429. tabItem.page = 1;
  430. tabItem.isPage = true;
  431. tabItem.status = 'loading';
  432. tabItem.data = [];
  433. this[tabItem.requestFunction]({refresher: true});
  434. },
  435. // 滚动到底部
  436. scrolltolower(){
  437. let tabItem = this.tabList[this.tabIndex];
  438. if(tabItem.isPage){
  439. tabItem.page++;
  440. this[tabItem.requestFunction]();
  441. }
  442. }
  443. }
  444. }
  445. </script>
  446. <style>
  447. /* 修复ios页面左右漂浮BUG */
  448. page{
  449. overflow: hidden;
  450. }
  451. </style>
  452. <style scoped lang="scss">
  453. .filter-icon{
  454. width: 16%;
  455. height: 34rpx;
  456. display: flex;
  457. justify-content: center;
  458. align-items: center;
  459. border-left: 2rpx solid #F6F6F6;
  460. image{
  461. width: 36rpx;
  462. height: 32rpx;
  463. }
  464. }
  465. .filter-box{
  466. position: absolute;
  467. z-index: 9999;
  468. width: 750rpx;
  469. .text-wrapper_1 {
  470. margin-left: 16rpx;
  471. flex: 1 1 160rpx;
  472. color: rgb(51, 51, 51);
  473. font-size: 28rpx;
  474. font-weight: 500;
  475. line-height: 40rpx;
  476. white-space: nowrap;
  477. padding: 14rpx 0;
  478. background-color: rgb(246, 246, 246);
  479. border-radius: 10rpx;
  480. height: 68rpx;
  481. }
  482. .left-text-wrapper {
  483. padding: 14rpx 0;
  484. background-color: rgb(246, 246, 246);
  485. border-radius: 10rpx;
  486. width: 160rpx;
  487. height: 68rpx;
  488. }
  489. .group_6 {
  490. padding-top: 2rpx;
  491. }
  492. .section_5 {
  493. padding: 40rpx 32rpx 50rpx;
  494. background-color: rgb(255, 255, 255);
  495. }
  496. .group_15 {
  497. padding: 506rpx 0 16rpx;
  498. position: relative;
  499. }
  500. .group_11 {
  501. margin-top: 50rpx;
  502. }
  503. .group_13 {
  504. margin-top: 50rpx;
  505. }
  506. .group_14 {
  507. margin-top: 50rpx;
  508. }
  509. .section_7 {
  510. background-color: rgba(0, 0, 0, 0.5);
  511. width: 750rpx;
  512. height: 528rpx;
  513. top: 0;
  514. right: 0;
  515. bottom: 0;
  516. left: 0;
  517. position: absolute;
  518. }
  519. .text_7 {
  520. color: rgb(51, 51, 51);
  521. font-size: 32rpx;
  522. font-weight: 500;
  523. line-height: 44rpx;
  524. white-space: nowrap;
  525. }
  526. .group_8 {
  527. margin-top: 20rpx;
  528. }
  529. .text_15 {
  530. color: rgb(51, 51, 51);
  531. font-size: 32rpx;
  532. font-weight: 500;
  533. line-height: 44rpx;
  534. white-space: nowrap;
  535. }
  536. .group_12 {
  537. margin-top: 20rpx;
  538. color: rgb(195, 195, 195);
  539. font-size: 28rpx;
  540. font-weight: 500;
  541. line-height: 40rpx;
  542. white-space: nowrap;
  543. }
  544. .text_18 {
  545. color: rgb(51, 51, 51);
  546. font-size: 32rpx;
  547. font-weight: 500;
  548. line-height: 44rpx;
  549. white-space: nowrap;
  550. }
  551. .text-wrapper_4 {
  552. margin-top: 18rpx;
  553. // padding: 12rpx 0;
  554. color: rgb(195, 195, 195);
  555. font-size: 28rpx;
  556. font-weight: 500;
  557. line-height: 40rpx;
  558. white-space: nowrap;
  559. border-radius: 10rpx;
  560. border: solid 2rpx rgb(195, 195, 195);
  561. /deep/.u-input{
  562. width: 100%;
  563. }
  564. }
  565. .text-wrapper_5 {
  566. padding: 24rpx 0;
  567. flex: 1 1 330rpx;
  568. color: rgb(195, 195, 195);
  569. font-size: 32rpx;
  570. font-weight: 600;
  571. line-height: 44rpx;
  572. white-space: nowrap;
  573. border-radius: 10rpx;
  574. height: 96rpx;
  575. border: solid 2rpx rgb(195, 195, 195);
  576. }
  577. .text-wrapper_6 {
  578. margin-left: 26rpx;
  579. padding: 26rpx 0;
  580. flex: 1 1 330rpx;
  581. color: rgb(255, 255, 255);
  582. font-size: 32rpx;
  583. font-weight: 600;
  584. line-height: 44rpx;
  585. white-space: nowrap;
  586. background-color: rgb(231, 162, 63);
  587. border-radius: 10rpx;
  588. height: 96rpx;
  589. }
  590. .group_10 {
  591. margin-top: 20rpx;
  592. color: rgb(51, 51, 51);
  593. font-size: 28rpx;
  594. font-weight: 500;
  595. line-height: 40rpx;
  596. white-space: nowrap;
  597. }
  598. .text-wrapper_2 {
  599. // padding: 12rpx 0;
  600. flex: 1 1 auto;
  601. border-radius: 10rpx;
  602. height: 68rpx;
  603. border: solid 2rpx rgb(195, 195, 195);
  604. }
  605. .text-wrapper_3 {
  606. margin-left: 28rpx;
  607. // padding: 12rpx 0;
  608. border-radius: 10rpx;
  609. width: 308rpx;
  610. height: 68rpx;
  611. border: solid 2rpx rgb(195, 195, 195);
  612. }
  613. .text_19 {
  614. margin-left: 18rpx;
  615. }
  616. .text-wrapper {
  617. padding: 14rpx 0;
  618. flex: 1 1 160rpx;
  619. color: rgb(255, 255, 255);
  620. font-size: 28rpx;
  621. font-weight: 500;
  622. line-height: 40rpx;
  623. white-space: nowrap;
  624. background-color: rgb(231, 162, 63);
  625. border-radius: 10rpx;
  626. height: 68rpx;
  627. }
  628. .view_3 {
  629. margin-left: 14rpx;
  630. }
  631. .view_6 {
  632. margin-left: 16rpx;
  633. }
  634. .view_7 {
  635. margin-left: 14rpx;
  636. }
  637. .text_17 {
  638. margin-left: 18rpx;
  639. }
  640. }
  641. .item-box{
  642. width: 686rpx;
  643. // height: 300rpx;
  644. margin: 0 auto;
  645. background-color: #f6f6f6;
  646. &:nth-child(n+2){
  647. margin-top: 20rpx;
  648. }
  649. .section_5 {
  650. padding: 40rpx 32rpx 0;
  651. background-color: rgb(255, 255, 255);
  652. }
  653. .group_9 {
  654. margin-top: 30rpx;
  655. color: rgb(51, 51, 51);
  656. font-size: 32rpx;
  657. font-weight: 500;
  658. line-height: 44rpx;
  659. white-space: nowrap;
  660. }
  661. .group_11 {
  662. margin-top: 26rpx;
  663. padding: 32rpx 0 28rpx;
  664. border-top: solid 2rpx rgb(239, 239, 239);
  665. }
  666. .group_8 {
  667. color: rgb(153, 153, 153);
  668. font-size: 28rpx;
  669. line-height: 40rpx;
  670. white-space: nowrap;
  671. }
  672. .text_8 {
  673. color: rgb(43, 102, 234);
  674. font-size: 28rpx;
  675. font-weight: 500;
  676. line-height: 40rpx;
  677. white-space: nowrap;
  678. }
  679. .text_12 {
  680. align-self: center;
  681. color: rgb(153, 153, 153);
  682. font-size: 28rpx;
  683. line-height: 40rpx;
  684. white-space: nowrap;
  685. }
  686. .image_7 {
  687. width: 40rpx;
  688. height: 40rpx;
  689. }
  690. .text_7 {
  691. margin-left: 12rpx;
  692. }
  693. .text_10 {
  694. margin-left: 21rpx;
  695. }
  696. .text-wrapper {
  697. padding: 10rpx 0;
  698. color: rgb(153, 153, 153);
  699. font-size: 28rpx;
  700. font-weight: 500;
  701. line-height: 40rpx;
  702. white-space: nowrap;
  703. border-radius: 32rpx;
  704. width: 160rpx;
  705. height: 64rpx;
  706. border: solid 2rpx rgb(153, 153, 153);
  707. }
  708. .text-wrapper_1 {
  709. margin-left: 18rpx;
  710. padding: 10rpx 0;
  711. color: rgb(231, 162, 63);
  712. font-size: 28rpx;
  713. font-weight: 500;
  714. line-height: 40rpx;
  715. white-space: nowrap;
  716. border-radius: 32rpx;
  717. width: 160rpx;
  718. height: 64rpx;
  719. border: solid 2rpx rgb(231, 162, 63);
  720. }
  721. }
  722. .nomore-box{
  723. width: 686rpx;
  724. height: 500rpx;
  725. margin: 0 auto;
  726. display: flex;
  727. flex-direction: column;
  728. justify-content: center;
  729. align-items: center;
  730. image{
  731. width: 434rpx;
  732. height: 260rpx;
  733. }
  734. view{
  735. text-align: center;
  736. color: #777777;
  737. margin-top: 40rpx;
  738. }
  739. }
  740. // 解决scroll-view底部padding和margin都不生效贴边的BUG
  741. .additional{
  742. height: calc( env(safe-area-inset-bottom) + 20rpx );
  743. height: calc( constant(safe-area-inset-bottom) + 20rpx );
  744. }
  745. .filter-date-item{
  746. width: 160rpx;
  747. height: 68rpx;
  748. background: #F6F6F6;
  749. border-radius: 10rpx;
  750. font-size: 28rpx;
  751. color: #333333;
  752. margin-right: 16rpx;
  753. display: flex;
  754. justify-content: center;
  755. align-items: center;
  756. &:nth-child(4n){
  757. margin-right: 0rpx;
  758. }
  759. &:nth-child(n+5){
  760. margin-top: 16rpx;
  761. }
  762. &.active{
  763. color: #FFFFFF;
  764. background-color: #E7A23F;
  765. }
  766. }
  767. </style>