home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. <template>
  2. <view class="ss">
  3. <!-- 头 -->
  4. <uni-nav-bar fixed="true" statusBar="true" right-icon="scan" title="首页"
  5. @clickRight="HandlScanCode">
  6. <template v-slot:left>
  7. <uni-badge size="small" :text="messageCount" absolute="righttop" type="error">
  8. <uni-icons type="notification" size="24" @click="handleMessage"></uni-icons>
  9. </uni-badge>
  10. </template>
  11. </uni-nav-bar>
  12. <!-- <uni-nav-bar fixed="true" statusBar="true" title="工作台"></uni-nav-bar> -->
  13. <view class="container">
  14. <navigation :workOrder="workOrder" ref="navigationRef"></navigation>
  15. <!-- 设备主管 -->
  16. <equipment v-if="roleId == 102" ref="equipmentRef"></equipment>
  17. <!-- 运维 -->
  18. <Mocha v-if="roleId == 157" ref="mochaRef"></Mocha>
  19. <!-- 模具舟皿 -->
  20. <mould v-if="roleId == 155" ref="mouldRef"></mould>
  21. <!-- 备品备件 -->
  22. <sparePart v-if="roleId == 150" ref="sparePartRef"></sparePart>
  23. <!-- -->
  24. <view v-if="$isAuthorities('pda:home:manage')">
  25. <homeNew ref="homeNewRef"></homeNew>
  26. </view>
  27. <view v-else>
  28. <view class="data-middle">
  29. <view class="cell">
  30. <view class="num">
  31. {{homeData.totalFinishedProducts}}
  32. </view>
  33. <view class="label">
  34. 成品库存总量
  35. </view>
  36. </view>
  37. <view class="cell">
  38. <view class="num">
  39. {{homeData.totalRawMaterials}}
  40. </view>
  41. <view class="label">
  42. 物料库存总量
  43. </view>
  44. </view>
  45. <view class="cell">
  46. <view class="num">
  47. {{homeData.goodsCount}}
  48. </view>
  49. <view class="label">
  50. 商品列表
  51. </view>
  52. </view>
  53. <view class="cell">
  54. <view class="num">
  55. {{homeData.yearAmount}}
  56. </view>
  57. <view class="label">
  58. 年度合同金额(万元)
  59. </view>
  60. </view>
  61. <view class="cell">
  62. <view class="num">
  63. {{homeData.receivableAmount}}
  64. </view>
  65. <view class="label">
  66. 应收金额(万元)
  67. </view>
  68. </view>
  69. <view class="cell">
  70. <view class="num">
  71. {{homeData.payableAmount}}
  72. </view>
  73. <view class="label">
  74. 应付金额(万元)
  75. </view>
  76. </view>
  77. </view>
  78. <view class="data-rank">
  79. <view class="tab-top">
  80. <view class="tab-item" v-for="(item,index) in tabList" :key="index">
  81. <view :class="{active: activeIndex == item.index}" @click="handleTabChange(item)">
  82. {{item.name}}
  83. </view>
  84. </view>
  85. </view>
  86. <!-- <uni-table class="table" ref="table" emptyText="暂无更多数据">
  87. <uni-tr class="table-title">
  88. <uni-th align="center" width="100">产品编码</uni-th>
  89. <uni-th align="center">名称</uni-th>
  90. <uni-th align="center" width="100">销量</uni-th>
  91. </uni-tr>
  92. <uni-tr v-for="(item, index) in tableData" :key="index">
  93. <uni-td>{{index+1}}.{{item.productCode}}</uni-td>
  94. <uni-td>{{item.productName}}</uni-td>
  95. <uni-td align="center">{{item.totalSaleCount}}</uni-td>
  96. </uni-tr>
  97. </uni-table> -->
  98. <view class="table-title" style="text-align: center;">
  99. <view class="code">产品编码</view>
  100. <view class="name">名称</view>
  101. <view class="total">销量</view>
  102. </view>
  103. <view class="table-content" v-for="(item,index) in tableData">
  104. <view class="code">
  105. <view class="index">{{index+1}}.</view>
  106. <view class="value">{{item.productCode}}</view>
  107. </view>
  108. <view class="name">{{item.productName}}</view>
  109. <view class="total">{{item.totalSaleCount}}</view>
  110. </view>
  111. </view>
  112. <view class="data-bottom">
  113. <view class="cell">
  114. <view class="num">
  115. {{this.homeData.yearProduceAmount}}
  116. </view>
  117. <view class="label">
  118. 年度生产总量
  119. </view>
  120. </view>
  121. <view class="cell">
  122. <view class="num">
  123. {{this.homeData.monthProduceAmount}}
  124. </view>
  125. <view class="label">
  126. 月生产总量
  127. </view>
  128. </view>
  129. <view class="cell">
  130. <view class="num">
  131. {{homeData.pendingAmount}}
  132. </view>
  133. <view class="label">
  134. 待生产总量
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. import navigation from './components/navigation.vue'
  144. import equipment from './pages/equipment/equipment.vue'
  145. import Mocha from './pages/Mocha/Mocha.vue'
  146. import mould from './pages/mould/mould.vue'
  147. import sparePart from './pages/sparePart/sparePart.vue'
  148. import ScanCode from '@/components/ScanCode.vue'
  149. import homeNew from './homeNew.vue'
  150. import {
  151. getUnreadNotifyMessageCountAPI
  152. } from '@/api/wt/index.js'
  153. import {
  154. getDateNew,
  155. yuanToWan
  156. } from '@/utils/utils.js'
  157. import {
  158. postJ,
  159. post,
  160. get
  161. } from '@/utils/api'
  162. import {
  163. statistics
  164. } from '@/api/myTicket'
  165. import {
  166. getCount,
  167. getYearAmount,
  168. getPayableAmount,
  169. getReceivableAmount,
  170. getGoodsPage,
  171. getProduceAmount,
  172. // getPendingAmount,
  173. getHotProduct
  174. }
  175. from '@/api/home'
  176. export default {
  177. components: {
  178. navigation,
  179. equipment,
  180. Mocha,
  181. mould,
  182. sparePart,
  183. ScanCode,
  184. homeNew
  185. },
  186. onShow() {
  187. this.init()
  188. // tab 切换回来时刷新 manage 图表数据
  189. this.$refs.homeNewRef?.refreshManage()
  190. let _this = this
  191. uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器
  192. uni.$on('scancodedate', function(data) {
  193. console.log(data, '-----scancodedate')
  194. _this.cbScancodedate(data)
  195. })
  196. // this.getStatistics()
  197. // this.Scancodedate()
  198. },
  199. onLoad() {
  200. this.getHomeData()
  201. // this.initPush()
  202. // this.getStatistics()
  203. },
  204. onUnload() {
  205. uni.$off('scancodedate')
  206. },
  207. onHide() {
  208. uni.$off('scancodedate')
  209. },
  210. data() {
  211. return {
  212. roleId: null,
  213. timer: null,
  214. qrContent: null,
  215. barType: null,
  216. cid:'',
  217. // 扫码后的设备信息
  218. equipmentInfo: '',
  219. qrContent: '',
  220. barType: '',
  221. messageCount: 0,
  222. workOrder: {
  223. maintenanceNum: 0,
  224. patrolInspection: 0,
  225. quantityNum: 0,
  226. repairsNum: 0,
  227. total: 0
  228. }, // 工单统计数据
  229. activeIndex: 0,
  230. tabList: [{
  231. name: '热销品排行榜',
  232. index: 0,
  233. }, {
  234. name: '滞销品排行榜',
  235. index: 1,
  236. }],
  237. tableData: [],
  238. homeData: {
  239. totalFinishedProducts: '',
  240. totalRawMaterials: '',
  241. goodsCount: '',
  242. yearAmount: '',
  243. receivableAmount: '',
  244. payableAmount: '',
  245. yearProduceAmount: '',
  246. monthProduceAmount: '',
  247. pendingAmount: ''
  248. },
  249. hotProductList: [],
  250. }
  251. },
  252. created() {
  253. this.getCount()
  254. uni.getStorage({
  255. key: 'userInfo',
  256. success: res => {
  257. // console.log(res);
  258. this.roleId = res.data.roleId[0]
  259. }
  260. })
  261. },
  262. onHide() {
  263. clearTimeout(this.timer);
  264. },
  265. onUnload() {
  266. clearTimeout(this.timer);
  267. },
  268. methods: {
  269. handleMessage() {
  270. uni.navigateTo({
  271. url: '/pages/home/wt/message/message'
  272. })
  273. },
  274. async getCount() {
  275. // const res = await getTodoList({}, false)
  276. // this.workList[0].badge = res.count
  277. const messageCount = await getUnreadNotifyMessageCountAPI()
  278. this.messageCount = Number(messageCount)
  279. },
  280. init() {
  281. this.getStatistics()
  282. // this.$refs.navigationRef && this.$refs.navigationRef.getCount()
  283. this.$refs.equipmentRef && this.$refs.equipmentRef.getData()
  284. this.$refs.mochaRef && this.$refs.mochaRef.getData()
  285. this.$refs.mouldRef &&
  286. (this.$refs.mouldRef.getBoatInventoryCountList(),
  287. this.$refs.mouldRef.getModeInventoryCountList())
  288. this.$refs.sparePartRef && this.$refs.sparePartRef.getData()
  289. this.timer = setTimeout(() => {
  290. this.init()
  291. }, 12000)
  292. },
  293. // 获取工单统计数
  294. getStatistics() {
  295. statistics().then(res => {
  296. this.workOrder = res
  297. })
  298. },
  299. // 相机扫码
  300. HandlScanCode() {
  301. uni.scanCode({
  302. success: (res) => {
  303. const scanResult = res.result;
  304. if(scanResult && scanResult.includes("/pages/warehouse/hwQrcode/index")) {
  305. uni.navigateTo({
  306. url: `${scanResult}`,
  307. });
  308. return
  309. }
  310. this.Scancodedate(res.result)
  311. }
  312. })
  313. //_this.Scancodedate('res')
  314. },
  315. // 根据条码请求设备数据
  316. getData() {
  317. let par = {
  318. barType: this.barType,
  319. qrContent: this.qrContent
  320. }
  321. this.equipmentInfo = {}
  322. return postJ(this.apiUrl + '/scan/getAssetInfo', par)
  323. .then(res => {
  324. console.log(res.data)
  325. this.equipmentInfo = res.data
  326. })
  327. .catch(err => {
  328. console.log(err, 'err-----------------')
  329. uni.showToast({
  330. title: '系统错误!',
  331. icon: 'none',
  332. duration: 2000
  333. })
  334. })
  335. },
  336. // 扫码枪扫码
  337. cbScancodedate(data) {
  338. this.Scancodedate(data.code)
  339. },
  340. async Scancodedate(code) {
  341. this.qrContent = code.trim()
  342. // this.qrContent = 'w01000002100001@_@0' //code.trim()
  343. //this.qrContent = '005/w01000001120041/锤锤专用02-不拆包-批量/规格01//成型/成型工序@_@0'
  344. this.barType = this.setBarType(this.qrContent)
  345. await this.getData()
  346. if (this.equipmentInfo.assetCode) {
  347. if (this.equipmentInfo.assetType != 1) {
  348. uni.showToast({
  349. title: '请扫描生产设备码!',
  350. icon: 'none',
  351. duration: 2000
  352. })
  353. return
  354. }
  355. let par = {
  356. info: encodeURIComponent(JSON.stringify(this.equipmentInfo)),
  357. qrContent: this.qrContent
  358. }
  359. par = this.URLSearchParams(par)
  360. console.log('qrwewett')
  361. uni.navigateTo({
  362. url: '/pages/equipment_ledger/index?' + par
  363. })
  364. }
  365. },
  366. // 设置barType
  367. setBarType(val) {
  368. let index = val.indexOf('@_@')
  369. let result = 0
  370. if (index !== -1) {
  371. let item = val.substr(index + 3, 1)
  372. if (item) {
  373. result = Number(item)
  374. }
  375. }
  376. return result
  377. },
  378. // 切换排行版tab
  379. handleTabChange(item) {
  380. this.activeIndex = item.index
  381. this.tableData
  382. // console.log(item);
  383. },
  384. async getHomeData() {
  385. uni.showLoading({
  386. title: '加载中'
  387. })
  388. const res1 = await getCount()
  389. const res2 = await getGoodsPage()
  390. const res3 = await getYearAmount()
  391. const res4 = await getReceivableAmount()
  392. const res5 = await getPayableAmount()
  393. // 年度
  394. const res6 = await getProduceAmount({
  395. createTimeStart: getDateNew('year') + '-01',
  396. createTimeEnd: getDateNew('year') + '-12',
  397. factoryId: null
  398. })
  399. // 本月
  400. const res7 = await getProduceAmount({
  401. createTimeStart: getDateNew('month'),
  402. createTimeEnd: getDateNew('month'),
  403. factoryId: null
  404. })
  405. const res9 = await getHotProduct()
  406. this.homeData.totalFinishedProducts = res1?.totalFinishedProducts ?? 0
  407. this.homeData.totalRawMaterials = res1?.totalRawMaterials ?? 0
  408. this.homeData.goodsCount = res2?.count ?? 0
  409. this.homeData.yearAmount = yuanToWan(res3 ?? 0)
  410. this.homeData.receivableAmount = yuanToWan(res4 ?? 0)
  411. this.homeData.payableAmount = yuanToWan(res5 ?? 0)
  412. this.homeData.yearProduceAmount = res6?.reduce((pre, cur) => {
  413. return pre + cur?.formedNum
  414. }, 0) ?? 0
  415. this.homeData.monthProduceAmount = res7?.reduce((pre, cur) => {
  416. return pre + cur?.formedNum
  417. }, 0) ?? 0
  418. this.homeData.pendingAmount = res6?.reduce((pre, cur) => {
  419. return pre + cur?.pendingProductionCount
  420. }, 0) ?? 0
  421. this.hotProductList = res9
  422. this.tableData = this.hotProductList.slice(0, 4)
  423. uni.hideLoading()
  424. },
  425. /**
  426. * 初始化推送功能(仅App端执行)
  427. */
  428. initPush() {
  429. // 1. 申请Android通知权限(Android 13+ 需要动态申请POST_NOTIFICATIONS)
  430. this.requestNotificationPermission()
  431. // 2. 获取设备推送标识(cid),用于服务端定向推送
  432. this.getPushClientId()
  433. // 3. 监听推送消息的到达和点击事件
  434. this.setupPushListeners()
  435. },
  436. /**
  437. * 申请Android通知权限
  438. * 参考文档:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  439. */
  440. requestNotificationPermission() {
  441. // #ifdef APP-PLUS
  442. if (plus.os.name === 'Android') {
  443. // Android 13(API 33)及以上需要申请 POST_NOTIFICATIONS 权限
  444. plus.android.requestPermissions(
  445. ['android.permission.POST_NOTIFICATIONS'],
  446. function(e) {
  447. console.log('通知权限申请结果:', e)
  448. },
  449. function(e) {
  450. console.error('通知权限申请失败:', e)
  451. }
  452. )
  453. }
  454. // 检测当前通知授权状态,若被拒绝则引导用户去设置页面开启
  455. const notificationAuthorized = uni.getAppAuthorizeSetting().notificationAuthorized
  456. if (notificationAuthorized === 'denied') {
  457. uni.showModal({
  458. title: '提示',
  459. content: '请开启通知权限,以便接收重要消息提醒',
  460. success: (res) => {
  461. if (res.confirm) {
  462. // 跳转到应用设置页面
  463. uni.openAppAuthorizeSetting()
  464. }
  465. }
  466. })
  467. }
  468. // #endif
  469. },
  470. /**
  471. * 获取设备推送标识(cid/clientid)
  472. * 该标识用于服务端向指定设备推送消息,需要在服务端存储并与用户账号关联
  473. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  474. */
  475. getPushClientId() {
  476. uni.getPushClientId({
  477. success: (res) => {
  478. console.log('获取cid成功:', res.cid)
  479. // TODO: 将 cid 发送到你的后端服务器,与当前登录用户关联
  480. this.sendCidToServer(res.cid)
  481. },
  482. fail: (err) => {
  483. console.error('获取cid失败:', err)
  484. // 获取失败时,延迟重试
  485. setTimeout(() => {
  486. this.getPushClientId()
  487. }, 2000)
  488. }
  489. })
  490. },
  491. /**
  492. * 将设备cid发送到后端服务器
  493. * @param {string} cid 设备推送标识
  494. */
  495. sendCidToServer(cid) {
  496. // 示例:使用 uni.request 发送到你的后端接口
  497. // uni.request({
  498. // url: 'https://your-server.com/api/push/register',
  499. // method: 'POST',
  500. // data: { cid: cid },
  501. // success: (res) => {
  502. // console.log('cid上报成功')
  503. // }
  504. // })
  505. this.cid=cid
  506. console.log('TODO: 将cid发送到后端,cid:', cid)
  507. },
  508. /**
  509. * 监听推送消息(接收和点击事件)
  510. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  511. */
  512. setupPushListeners() {
  513. // 监听透传消息(应用在前台或后台接收,自定义处理)
  514. uni.onPushMessage((res) => {
  515. console.log('收到推送消息:', JSON.stringify(res))
  516. // 消息类型:click 表示用户点击通知栏消息,receive 表示收到消息(未点击)
  517. if (res.type === 'receive') {
  518. // 收到消息,根据业务需求处理
  519. this.handlePushReceive(res.data)
  520. } else if (res.type === 'click') {
  521. // 用户点击通知栏消息
  522. this.handlePushClick(res.data)
  523. }
  524. })
  525. },
  526. /**
  527. * 处理收到推送消息(未点击)
  528. * @param {object} payload 推送携带的自定义数据
  529. */
  530. handlePushReceive(payload) {
  531. console.log('收到推送数据:', payload)
  532. // 示例:根据业务类型处理
  533. // if (payload.type === 'chat') {
  534. // // 聊天消息:更新聊天记录
  535. // this.updateChatList(payload)
  536. // } else if (payload.type === 'order') {
  537. // // 订单消息:更新订单状态
  538. // this.refreshOrderStatus(payload)
  539. // }
  540. // 如果需要在应用内弹框提示,可自行实现
  541. uni.showToast({
  542. title: payload?.title || '收到新消息',
  543. icon: 'none',
  544. duration: 2000
  545. })
  546. },
  547. /**
  548. * 处理用户点击通知栏消息
  549. * @param {object} payload 推送携带的自定义数据
  550. */
  551. handlePushClick(payload) {
  552. console.log('点击推送消息:', payload)
  553. // 根据 payload 中的数据跳转到指定页面
  554. // 例如:payload = { page: '/pages/message/detail', id: '123' }
  555. if (payload?.page) {
  556. uni.navigateTo({
  557. url: payload.page + (payload.id ? '?id=' + payload.id : ''),
  558. fail: (err) => {
  559. console.error('跳转失败:', err)
  560. // 跳转失败则跳转到首页
  561. uni.switchTab({
  562. url: '/pages/index/index'
  563. })
  564. }
  565. })
  566. } else if (payload?.url) {
  567. // 支持外部链接跳转
  568. uni.navigateTo({
  569. url: '/pages/webview/index?url=' + encodeURIComponent(payload.url)
  570. })
  571. } else {
  572. // 默认跳转到消息中心页面
  573. uni.navigateTo({
  574. url: '/pages/message/index'
  575. })
  576. }
  577. }
  578. }
  579. }
  580. </script>
  581. <style>
  582. page {
  583. background-color: #f0f0f0;
  584. }
  585. </style>
  586. <style lang="scss" scoped>
  587. // /deep/.uni-page-wrapper{
  588. // background-color: pink;
  589. // }
  590. /deep/.uni-table {
  591. min-width: auto !important;
  592. border-radius: 0;
  593. }
  594. page {
  595. background-color: #f0f0f0;
  596. }
  597. .container {
  598. background-color: $page-bg;
  599. padding: 20rpx;
  600. .data-middle {
  601. display: flex;
  602. flex-wrap: wrap;
  603. justify-content: space-between;
  604. .cell {
  605. display: flex;
  606. width: 30%;
  607. padding: 20rpx 0;
  608. margin-bottom: 20rpx;
  609. flex-direction: column;
  610. background-color: rgb(22, 146, 50);
  611. justify-content: center;
  612. align-items: center;
  613. border-radius: 10rpx;
  614. color: #fff;
  615. .num {
  616. font-size: 28rpx;
  617. }
  618. .label {
  619. font-size: 20rpx;
  620. }
  621. }
  622. }
  623. .data-rank {
  624. width: 100%;
  625. padding: 10rpx 20rpx 0 20rpx;
  626. margin-bottom: 20rpx;
  627. background-color: #fff;
  628. border-radius: 20rpx 20rpx 0 0rpx;
  629. .tab-top {
  630. display: flex;
  631. margin-bottom: 20rpx;
  632. .tab-item {
  633. margin-right: 20rpx;
  634. .active {
  635. border-bottom: 2px solid rgb(22, 146, 50);
  636. }
  637. }
  638. }
  639. .table-title {
  640. width: 100%;
  641. display: flex;
  642. color: #333;
  643. flex-wrap: nowrap;
  644. justify-content: space-between;
  645. .code {
  646. width: 40%;
  647. word-break: normal
  648. }
  649. .name {
  650. width: 40%;
  651. word-break: normal
  652. }
  653. .total {
  654. width: 15%;
  655. word-break: normal
  656. }
  657. }
  658. .table-content {
  659. font-size: 28rpx;
  660. display: flex;
  661. padding: 10rpx 0;
  662. width: 100%;
  663. color: #333;
  664. flex-wrap: nowrap;
  665. justify-content: space-between;
  666. border-bottom: 1px solid #eee;
  667. .code {
  668. display: flex;
  669. width: 40%;
  670. .index {
  671. width: 20rpx;
  672. margin-right: 20rpx;
  673. }
  674. .value {
  675. word-break: break-all;
  676. flex: 1;
  677. }
  678. }
  679. .name {
  680. width: 40%;
  681. white-space: nowarp;
  682. over-flow: hidden;
  683. text-overflow: ellipsip;
  684. word-break: break-all;
  685. }
  686. .total {
  687. text-align: center;
  688. width: 15%;
  689. white-space: nowarp;
  690. over-flow: hidden;
  691. text-overflow: ellipsip;
  692. word-break: break-all;
  693. }
  694. }
  695. }
  696. .data-rank .table-content:last-child {
  697. border-bottom: none;
  698. }
  699. .data-bottom {
  700. display: flex;
  701. flex-wrap: wrap;
  702. justify-content: space-between;
  703. .cell {
  704. display: flex;
  705. width: 30%;
  706. padding: 20rpx 0;
  707. margin-bottom: 20rpx;
  708. flex-direction: column;
  709. background-color: #fff;
  710. justify-content: center;
  711. align-items: center;
  712. border-radius: 10rpx;
  713. color: #000;
  714. .num {
  715. font-size: 28rpx;
  716. }
  717. .label {
  718. font-size: 20rpx;
  719. }
  720. }
  721. }
  722. }
  723. </style>