home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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. clearTimeout(this.timer);
  207. },
  208. onHide() {
  209. uni.$off('scancodedate')
  210. clearTimeout(this.timer);
  211. },
  212. data() {
  213. return {
  214. roleId: null,
  215. timer: null,
  216. qrContent: null,
  217. barType: null,
  218. cid:'',
  219. // 扫码后的设备信息
  220. equipmentInfo: '',
  221. qrContent: '',
  222. barType: '',
  223. messageCount: 0,
  224. workOrder: {
  225. maintenanceNum: 0,
  226. patrolInspection: 0,
  227. quantityNum: 0,
  228. repairsNum: 0,
  229. total: 0
  230. }, // 工单统计数据
  231. activeIndex: 0,
  232. tabList: [{
  233. name: '热销品排行榜',
  234. index: 0,
  235. }, {
  236. name: '滞销品排行榜',
  237. index: 1,
  238. }],
  239. tableData: [],
  240. homeData: {
  241. totalFinishedProducts: '',
  242. totalRawMaterials: '',
  243. goodsCount: '',
  244. yearAmount: '',
  245. receivableAmount: '',
  246. payableAmount: '',
  247. yearProduceAmount: '',
  248. monthProduceAmount: '',
  249. pendingAmount: ''
  250. },
  251. hotProductList: [],
  252. }
  253. },
  254. created() {
  255. this.getCount()
  256. uni.getStorage({
  257. key: 'userInfo',
  258. success: res => {
  259. // console.log(res);
  260. this.roleId = res.data.roleId[0]
  261. }
  262. })
  263. },
  264. methods: {
  265. handleMessage() {
  266. uni.navigateTo({
  267. url: '/pages/home/wt/message/message'
  268. })
  269. },
  270. async getCount() {
  271. // const res = await getTodoList({}, false)
  272. // this.workList[0].badge = res.count
  273. const messageCount = await getUnreadNotifyMessageCountAPI()
  274. this.messageCount = Number(messageCount)
  275. },
  276. init() {
  277. this.getStatistics()
  278. // this.$refs.navigationRef && this.$refs.navigationRef.getCount()
  279. this.$refs.equipmentRef && this.$refs.equipmentRef.getData()
  280. this.$refs.mochaRef && this.$refs.mochaRef.getData()
  281. this.$refs.mouldRef &&
  282. (this.$refs.mouldRef.getBoatInventoryCountList(),
  283. this.$refs.mouldRef.getModeInventoryCountList())
  284. this.$refs.sparePartRef && this.$refs.sparePartRef.getData()
  285. this.timer = setTimeout(() => {
  286. console.log('timer~~~home')
  287. this.init()
  288. }, 12000)
  289. },
  290. // 获取工单统计数
  291. getStatistics() {
  292. statistics().then(res => {
  293. this.workOrder = res
  294. })
  295. },
  296. // 相机扫码
  297. HandlScanCode() {
  298. uni.scanCode({
  299. success: (res) => {
  300. const scanResult = res.result;
  301. if(scanResult && scanResult.includes("/pages/warehouse/hwQrcode/index")) {
  302. uni.navigateTo({
  303. url: `${scanResult}`,
  304. });
  305. return
  306. }
  307. this.Scancodedate(res.result)
  308. }
  309. })
  310. //_this.Scancodedate('res')
  311. },
  312. // 根据条码请求设备数据
  313. getData() {
  314. let par = {
  315. barType: this.barType,
  316. qrContent: this.qrContent
  317. }
  318. this.equipmentInfo = {}
  319. return postJ(this.apiUrl + '/scan/getAssetInfo', par)
  320. .then(res => {
  321. console.log(res.data)
  322. this.equipmentInfo = res.data
  323. })
  324. .catch(err => {
  325. console.log(err, 'err-----------------')
  326. uni.showToast({
  327. title: '系统错误!',
  328. icon: 'none',
  329. duration: 2000
  330. })
  331. })
  332. },
  333. // 扫码枪扫码
  334. cbScancodedate(data) {
  335. this.Scancodedate(data.code)
  336. },
  337. async Scancodedate(code) {
  338. this.qrContent = code.trim()
  339. // this.qrContent = 'w01000002100001@_@0' //code.trim()
  340. //this.qrContent = '005/w01000001120041/锤锤专用02-不拆包-批量/规格01//成型/成型工序@_@0'
  341. this.barType = this.setBarType(this.qrContent)
  342. await this.getData()
  343. if (this.equipmentInfo.assetCode) {
  344. if (this.equipmentInfo.assetType != 1) {
  345. uni.showToast({
  346. title: '请扫描生产设备码!',
  347. icon: 'none',
  348. duration: 2000
  349. })
  350. return
  351. }
  352. let par = {
  353. info: encodeURIComponent(JSON.stringify(this.equipmentInfo)),
  354. qrContent: this.qrContent
  355. }
  356. par = this.URLSearchParams(par)
  357. console.log('qrwewett')
  358. uni.navigateTo({
  359. url: '/pages/equipment_ledger/index?' + par
  360. })
  361. }
  362. },
  363. // 设置barType
  364. setBarType(val) {
  365. let index = val.indexOf('@_@')
  366. let result = 0
  367. if (index !== -1) {
  368. let item = val.substr(index + 3, 1)
  369. if (item) {
  370. result = Number(item)
  371. }
  372. }
  373. return result
  374. },
  375. // 切换排行版tab
  376. handleTabChange(item) {
  377. this.activeIndex = item.index
  378. this.tableData
  379. // console.log(item);
  380. },
  381. async getHomeData() {
  382. uni.showLoading({
  383. title: '加载中'
  384. })
  385. const res1 = await getCount()
  386. const res2 = await getGoodsPage()
  387. const res3 = await getYearAmount()
  388. const res4 = await getReceivableAmount()
  389. const res5 = await getPayableAmount()
  390. // 年度
  391. const res6 = await getProduceAmount({
  392. createTimeStart: getDateNew('year') + '-01',
  393. createTimeEnd: getDateNew('year') + '-12',
  394. factoryId: null
  395. })
  396. // 本月
  397. const res7 = await getProduceAmount({
  398. createTimeStart: getDateNew('month'),
  399. createTimeEnd: getDateNew('month'),
  400. factoryId: null
  401. })
  402. const res9 = await getHotProduct()
  403. this.homeData.totalFinishedProducts = res1?.totalFinishedProducts ?? 0
  404. this.homeData.totalRawMaterials = res1?.totalRawMaterials ?? 0
  405. this.homeData.goodsCount = res2?.count ?? 0
  406. this.homeData.yearAmount = yuanToWan(res3 ?? 0)
  407. this.homeData.receivableAmount = yuanToWan(res4 ?? 0)
  408. this.homeData.payableAmount = yuanToWan(res5 ?? 0)
  409. this.homeData.yearProduceAmount = res6?.reduce((pre, cur) => {
  410. return pre + cur?.formedNum
  411. }, 0) ?? 0
  412. this.homeData.monthProduceAmount = res7?.reduce((pre, cur) => {
  413. return pre + cur?.formedNum
  414. }, 0) ?? 0
  415. this.homeData.pendingAmount = res6?.reduce((pre, cur) => {
  416. return pre + cur?.pendingProductionCount
  417. }, 0) ?? 0
  418. this.hotProductList = res9
  419. this.tableData = this.hotProductList.slice(0, 4)
  420. uni.hideLoading()
  421. },
  422. /**
  423. * 初始化推送功能(仅App端执行)
  424. */
  425. initPush() {
  426. // 1. 申请Android通知权限(Android 13+ 需要动态申请POST_NOTIFICATIONS)
  427. this.requestNotificationPermission()
  428. // 2. 获取设备推送标识(cid),用于服务端定向推送
  429. this.getPushClientId()
  430. // 3. 监听推送消息的到达和点击事件
  431. this.setupPushListeners()
  432. },
  433. /**
  434. * 申请Android通知权限
  435. * 参考文档:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  436. */
  437. requestNotificationPermission() {
  438. // #ifdef APP-PLUS
  439. if (plus.os.name === 'Android') {
  440. // Android 13(API 33)及以上需要申请 POST_NOTIFICATIONS 权限
  441. plus.android.requestPermissions(
  442. ['android.permission.POST_NOTIFICATIONS'],
  443. function(e) {
  444. console.log('通知权限申请结果:', e)
  445. },
  446. function(e) {
  447. console.error('通知权限申请失败:', e)
  448. }
  449. )
  450. }
  451. // 检测当前通知授权状态,若被拒绝则引导用户去设置页面开启
  452. const notificationAuthorized = uni.getAppAuthorizeSetting().notificationAuthorized
  453. if (notificationAuthorized === 'denied') {
  454. uni.showModal({
  455. title: '提示',
  456. content: '请开启通知权限,以便接收重要消息提醒',
  457. success: (res) => {
  458. if (res.confirm) {
  459. // 跳转到应用设置页面
  460. uni.openAppAuthorizeSetting()
  461. }
  462. }
  463. })
  464. }
  465. // #endif
  466. },
  467. /**
  468. * 获取设备推送标识(cid/clientid)
  469. * 该标识用于服务端向指定设备推送消息,需要在服务端存储并与用户账号关联
  470. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  471. */
  472. getPushClientId() {
  473. uni.getPushClientId({
  474. success: (res) => {
  475. console.log('获取cid成功:', res.cid)
  476. // TODO: 将 cid 发送到你的后端服务器,与当前登录用户关联
  477. this.sendCidToServer(res.cid)
  478. },
  479. fail: (err) => {
  480. console.error('获取cid失败:', err)
  481. // 获取失败时,延迟重试
  482. setTimeout(() => {
  483. this.getPushClientId()
  484. }, 2000)
  485. }
  486. })
  487. },
  488. /**
  489. * 将设备cid发送到后端服务器
  490. * @param {string} cid 设备推送标识
  491. */
  492. sendCidToServer(cid) {
  493. // 示例:使用 uni.request 发送到你的后端接口
  494. // uni.request({
  495. // url: 'https://your-server.com/api/push/register',
  496. // method: 'POST',
  497. // data: { cid: cid },
  498. // success: (res) => {
  499. // console.log('cid上报成功')
  500. // }
  501. // })
  502. this.cid=cid
  503. console.log('TODO: 将cid发送到后端,cid:', cid)
  504. },
  505. /**
  506. * 监听推送消息(接收和点击事件)
  507. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  508. */
  509. setupPushListeners() {
  510. // 监听透传消息(应用在前台或后台接收,自定义处理)
  511. uni.onPushMessage((res) => {
  512. console.log('收到推送消息:', JSON.stringify(res))
  513. // 消息类型:click 表示用户点击通知栏消息,receive 表示收到消息(未点击)
  514. if (res.type === 'receive') {
  515. // 收到消息,根据业务需求处理
  516. this.handlePushReceive(res.data)
  517. } else if (res.type === 'click') {
  518. // 用户点击通知栏消息
  519. this.handlePushClick(res.data)
  520. }
  521. })
  522. },
  523. /**
  524. * 处理收到推送消息(未点击)
  525. * @param {object} payload 推送携带的自定义数据
  526. */
  527. handlePushReceive(payload) {
  528. console.log('收到推送数据:', payload)
  529. // 示例:根据业务类型处理
  530. // if (payload.type === 'chat') {
  531. // // 聊天消息:更新聊天记录
  532. // this.updateChatList(payload)
  533. // } else if (payload.type === 'order') {
  534. // // 订单消息:更新订单状态
  535. // this.refreshOrderStatus(payload)
  536. // }
  537. // 如果需要在应用内弹框提示,可自行实现
  538. uni.showToast({
  539. title: payload?.title || '收到新消息',
  540. icon: 'none',
  541. duration: 2000
  542. })
  543. },
  544. /**
  545. * 处理用户点击通知栏消息
  546. * @param {object} payload 推送携带的自定义数据
  547. */
  548. handlePushClick(payload) {
  549. console.log('点击推送消息:', payload)
  550. // 根据 payload 中的数据跳转到指定页面
  551. // 例如:payload = { page: '/pages/message/detail', id: '123' }
  552. if (payload?.page) {
  553. uni.navigateTo({
  554. url: payload.page + (payload.id ? '?id=' + payload.id : ''),
  555. fail: (err) => {
  556. console.error('跳转失败:', err)
  557. // 跳转失败则跳转到首页
  558. uni.switchTab({
  559. url: '/pages/index/index'
  560. })
  561. }
  562. })
  563. } else if (payload?.url) {
  564. // 支持外部链接跳转
  565. uni.navigateTo({
  566. url: '/pages/webview/index?url=' + encodeURIComponent(payload.url)
  567. })
  568. } else {
  569. // 默认跳转到消息中心页面
  570. uni.navigateTo({
  571. url: '/pages/message/index'
  572. })
  573. }
  574. }
  575. }
  576. }
  577. </script>
  578. <style>
  579. page {
  580. background-color: #f0f0f0;
  581. }
  582. </style>
  583. <style lang="scss" scoped>
  584. // /deep/.uni-page-wrapper{
  585. // background-color: pink;
  586. // }
  587. /deep/.uni-table {
  588. min-width: auto !important;
  589. border-radius: 0;
  590. }
  591. page {
  592. background-color: #f0f0f0;
  593. }
  594. .container {
  595. background-color: $page-bg;
  596. padding: 20rpx;
  597. .data-middle {
  598. display: flex;
  599. flex-wrap: wrap;
  600. justify-content: space-between;
  601. .cell {
  602. display: flex;
  603. width: 30%;
  604. padding: 20rpx 0;
  605. margin-bottom: 20rpx;
  606. flex-direction: column;
  607. background-color: rgb(22, 146, 50);
  608. justify-content: center;
  609. align-items: center;
  610. border-radius: 10rpx;
  611. color: #fff;
  612. .num {
  613. font-size: 28rpx;
  614. }
  615. .label {
  616. font-size: 20rpx;
  617. }
  618. }
  619. }
  620. .data-rank {
  621. width: 100%;
  622. padding: 10rpx 20rpx 0 20rpx;
  623. margin-bottom: 20rpx;
  624. background-color: #fff;
  625. border-radius: 20rpx 20rpx 0 0rpx;
  626. .tab-top {
  627. display: flex;
  628. margin-bottom: 20rpx;
  629. .tab-item {
  630. margin-right: 20rpx;
  631. .active {
  632. border-bottom: 2px solid rgb(22, 146, 50);
  633. }
  634. }
  635. }
  636. .table-title {
  637. width: 100%;
  638. display: flex;
  639. color: #333;
  640. flex-wrap: nowrap;
  641. justify-content: space-between;
  642. .code {
  643. width: 40%;
  644. word-break: normal
  645. }
  646. .name {
  647. width: 40%;
  648. word-break: normal
  649. }
  650. .total {
  651. width: 15%;
  652. word-break: normal
  653. }
  654. }
  655. .table-content {
  656. font-size: 28rpx;
  657. display: flex;
  658. padding: 10rpx 0;
  659. width: 100%;
  660. color: #333;
  661. flex-wrap: nowrap;
  662. justify-content: space-between;
  663. border-bottom: 1px solid #eee;
  664. .code {
  665. display: flex;
  666. width: 40%;
  667. .index {
  668. width: 20rpx;
  669. margin-right: 20rpx;
  670. }
  671. .value {
  672. word-break: break-all;
  673. flex: 1;
  674. }
  675. }
  676. .name {
  677. width: 40%;
  678. white-space: nowarp;
  679. over-flow: hidden;
  680. text-overflow: ellipsip;
  681. word-break: break-all;
  682. }
  683. .total {
  684. text-align: center;
  685. width: 15%;
  686. white-space: nowarp;
  687. over-flow: hidden;
  688. text-overflow: ellipsip;
  689. word-break: break-all;
  690. }
  691. }
  692. }
  693. .data-rank .table-content:last-child {
  694. border-bottom: none;
  695. }
  696. .data-bottom {
  697. display: flex;
  698. flex-wrap: wrap;
  699. justify-content: space-between;
  700. .cell {
  701. display: flex;
  702. width: 30%;
  703. padding: 20rpx 0;
  704. margin-bottom: 20rpx;
  705. flex-direction: column;
  706. background-color: #fff;
  707. justify-content: center;
  708. align-items: center;
  709. border-radius: 10rpx;
  710. color: #000;
  711. .num {
  712. font-size: 28rpx;
  713. }
  714. .label {
  715. font-size: 20rpx;
  716. }
  717. }
  718. }
  719. }
  720. </style>