index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. <template>
  2. <view v-if="isLogin">
  3. <!-- 背景图 -->
  4. <view class="index-bg">
  5. <image src="../../static/pages/images/self/indexBg.png"></image>
  6. </view>
  7. <!-- 数据 -->
  8. <view class="data-box">
  9. <view>
  10. <view class="ljsy">{{statisticData.totalProfit?statisticData.totalProfit:0}}</view>
  11. <view class="ljsy-label">累计收益(元)</view>
  12. </view>
  13. <view class="jy ddflex">
  14. <view>
  15. <view class="jy-data">{{statisticData.todayOrderCount?statisticData.todayOrderCount:0}}</view>
  16. <view class="jy-label">今日订单数</view>
  17. </view>
  18. <view class="jy-line"></view>
  19. <view>
  20. <view class="jy-data"><text style="font-size: 22rpx;font-weight: 400;">¥</text>{{statisticData.todayTurnover?statisticData.todayTurnover:0}}</view>
  21. <view class="jy-label">今日营业额</view>
  22. </view>
  23. <view class="jy-line"></view>
  24. <view>
  25. <view class="jy-data"><text style="font-size: 22rpx;font-weight: 400;">¥</text>{{statisticData.todayProfit?statisticData.todayProfit:0}}</view>
  26. <view class="jy-label">今日收益额</view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 总数 -->
  31. <view class="total-box ddflex">
  32. <view class="fflex" v-if="!userInfo.storeId">
  33. <view class="total-label">商家总数</view>
  34. <view class="total-data">{{statisticData.merchantCount?statisticData.merchantCount:0}}</view>
  35. </view>
  36. <view v-if="!userInfo.storeId" class="total-data-line"></view>
  37. <view class="fflex" v-if="!userInfo.storeId">
  38. <view class="total-label">门店总数</view>
  39. <view class="total-data">{{statisticData.storeCount?statisticData.storeCount:0}}</view>
  40. </view>
  41. <view v-if="!userInfo.storeId" class="total-data-line"></view>
  42. <view class="fflex">
  43. <view class="total-label">设备总数</view>
  44. <view class="total-data">{{statisticData.batteryCount?statisticData.batteryCount:0}}</view>
  45. </view>
  46. <view class="total-data-line"></view>
  47. <view class="fflex">
  48. <view class="total-label">订单总数</view>
  49. <view class="total-data">{{statisticData.totalOrderCount?statisticData.totalOrderCount:0}}</view>
  50. </view>
  51. </view>
  52. <!-- nav -->
  53. <view v-if="!userInfo.storeId" class="nav-box ddflex">
  54. <view class="nav-item">
  55. <image class="nav-item-icon" src="../../static/pages/images/wdsj.png" @click="jumpUrl('/pages/myStore/myStore')"></image>
  56. <view class="nav-item-title">我的商家</view>
  57. </view>
  58. <view class="nav-item" @click="jumpUrl('/pages/myMerchant/myMerchant')">
  59. <image class="nav-item-icon" src="../../static/pages/images/wdmd.png"></image>
  60. <view class="nav-item-title">我的门店</view>
  61. </view>
  62. <view class="nav-item" v-if="!userInfo.storeId&&!userInfo.merchantId" @click="jumpUrl('/mine/myUser/myUser')">
  63. <image class="nav-item-icon" src="../../static/pages/images/wdyh.png"></image>
  64. <view class="nav-item-title">我的用户</view>
  65. </view>
  66. <view class="nav-item" @click="jumpUrl('/pages/operationData/operationData')">
  67. <image class="nav-item-icon" src="../../static/pages/images/yysj.png"></image>
  68. <view class="nav-item-title">运营数据</view>
  69. </view>
  70. </view>
  71. <view v-if="userInfo.storeId" class="nav-box ddflex" style="padding: 10rpx 30rpx;justify-content: space-between;" @click="jumpUrl('/pages/operationData/operationData')">
  72. <view class="nav-item ddflex">
  73. <image class="nav-item-icon" src="../../static/pages/images/yysj.png"></image>
  74. <view class="nav-item-title">运营数据</view>
  75. </view>
  76. <image style="width: 36rpx;height:36rpx;" src="../../static/pages/images/ssicon.png"></image>
  77. </view>
  78. <!-- 图表统计 -->
  79. <view class="echart-box">
  80. <view class="echart-box-header ddflex">
  81. <view class="echart-box-title">交易趋势</view>
  82. <view class="echart-box-timeType ddflex">
  83. <view :class="'echart-box-timeType-item '+(timeType==1?'echart-box-timeType-item-acitve':'')"
  84. @click="timeTypeChange(1)">今日</view>
  85. <view :class="'echart-box-timeType-item '+(timeType==2?'echart-box-timeType-item-acitve':'')"
  86. @click="timeTypeChange(2)">近7日</view>
  87. <view :class="'echart-box-timeType-item '+(timeType==3?'echart-box-timeType-item-acitve':'')"
  88. @click="timeTypeChange(3)">近30日</view>
  89. </view>
  90. </view>
  91. <view style="height:500rpx">
  92. <l-echart ref="chart" @finished="init"></l-echart>
  93. </view>
  94. </view>
  95. <!-- 图表统计 -->
  96. <view class="echart-box">
  97. <view class="echart-box-header ddflex">
  98. <view class="echart-box-title">营业额排名</view>
  99. <!-- <view class="echart-box-timeType ddflex">
  100. <view :class="'echart-box-timeType-item '+(storeType==1?'echart-box-timeType-item-acitve':'')"
  101. @click="storeTypeChange(1)">商户</view>
  102. <view :class="'echart-box-timeType-item '+(storeType==2?'echart-box-timeType-item-acitve':'')"
  103. @click="storeTypeChange(2)">门店</view>
  104. </view> -->
  105. </view>
  106. <view>
  107. <l-echart ref="chart2" @finished="init"></l-echart>
  108. </view>
  109. </view>
  110. <!-- 图表统计 -->
  111. <view class="echart-box">
  112. <view class="echart-box-header ddflex">
  113. <view class="echart-box-title">设备状态</view>
  114. </view>
  115. <view class="ddflex">
  116. <view class="fflex" style="height: 250rpx;">
  117. <l-echart ref="chart4" @finished="init"></l-echart>
  118. </view>
  119. <view class="fflex" style="height: 250rpx;">
  120. <l-echart ref="chart5" @finished="init"></l-echart>
  121. </view>
  122. <view class="fflex" style="height: 250rpx;">
  123. <l-echart ref="chart6" @finished="init"></l-echart>
  124. </view>
  125. </view>
  126. <view class="echart-line"></view>
  127. <view class="ddflex">
  128. <view style="width: 100%;height: 300rpx;">
  129. <l-echart ref="chart3" @finished="init"></l-echart>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="guide" @tap="hideGuide" v-if="first">
  134. <image src="/static/pages/images/guide.png" mode="widthFix"></image>
  135. </view>
  136. <foot channel="home" :isUpdate="isUpdate"></foot>
  137. </view>
  138. <view v-else>
  139. <view class="wei-login" v-if="!isLogin">
  140. <image :src="picUrlss + 'wei_login.png'"></image>
  141. <view>暂未登录</view>
  142. <navigator url="/pages/authorize/authorize" hover-class="none" class="cart-login">立即登录</navigator>
  143. </view>
  144. <foot channel="home" :isUpdate="isUpdate"></foot>
  145. </view>
  146. </template>
  147. <script>
  148. //index.js
  149. //获取应用实例
  150. const app = getApp();
  151. const req = require('../../utils/request.js');
  152. const api = require('../../utils/api.js');
  153. const utils = require('../../utils/util.js');
  154. const mes = require('../../utils/requestmessage.js');
  155. const route = require('../../utils/route');
  156. const QQMapWX = require("../../utils/qqmap.js");
  157. import foot from '../../components/nav-bar/index';
  158. import footerCopyright from '../../components/footer-copyright/footer-copyright';
  159. import LEchart from '../../components/l-echart/l-echart.vue';
  160. import * as echarts from '../../utils/echarts.min.js'
  161. export default {
  162. data() {
  163. return {
  164. picUrlss: req.public.picUrls,
  165. systems: {},
  166. bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
  167. pxToRpxScale: 0,
  168. rpxTopxScale: 0,
  169. isLogin:false,
  170. timeType: 1, //统计时间 1.按日 2.按月 3.按季度
  171. storeType:1,//营业额查询1.商家 2.门店
  172. statisticData:{},//统计数据
  173. echartData:{},//曲线图
  174. storeRanking:{},//营业额排行
  175. userInfo:{},
  176. // 交易趋势图表数据
  177. option: {
  178. tooltip: {
  179. trigger: 'axis',
  180. axisPointer: {
  181. type: 'shadow'
  182. },
  183. confine: true
  184. },
  185. legend: {
  186. data: ['订单数', '订单金额','收益金额'],
  187. x: 'center', //可设定图例在左、右、居中
  188. y: 'top', //可设定图例在上、下、居中
  189. padding: [15, 0, 0, 0]
  190. },
  191. grid: {
  192. left: 0,
  193. right: 8,
  194. bottom: 5,
  195. top: 45,
  196. containLabel: true
  197. },
  198. xAxis: [{
  199. type: 'category',
  200. data: [],
  201. axisLine: {
  202. lineStyle: {
  203. color: '#999999'
  204. }
  205. },
  206. axisLabel: {
  207. color: '#666666',
  208. // interval: 0,
  209. }
  210. }],
  211. yAxis: [{
  212. type: 'value',
  213. axisTick: {
  214. show: false
  215. },
  216. axisLine: {
  217. lineStyle: {
  218. color: '#999999'
  219. }
  220. },
  221. axisLabel: {
  222. color: '#666666'
  223. }
  224. }],
  225. series: [{
  226. name: '订单数',
  227. type: 'line',
  228. data: [],
  229. showSymbol: false,
  230. smooth: true,
  231. itemStyle: {
  232. // 颜色
  233. color: '#5F50E6',
  234. // 给bar设置倒角
  235. barBorderRadius: [15, 15, 0, 0]
  236. }
  237. },
  238. {
  239. name: '订单金额',
  240. type: 'line',
  241. data: [],
  242. showSymbol: false,
  243. smooth: true,
  244. itemStyle: {
  245. // 颜色
  246. color: '#FF7D00',
  247. // 给bar设置倒角
  248. barBorderRadius: [15, 15, 0, 0]
  249. }
  250. },
  251. {
  252. name: '收益金额',
  253. type: 'line',
  254. data: [],
  255. showSymbol: false,
  256. smooth: true,
  257. itemStyle: {
  258. // 颜色
  259. color: '#FFDC0F',
  260. // 给bar设置倒角
  261. barBorderRadius: [15, 15, 0, 0]
  262. }
  263. },
  264. ]
  265. },
  266. // 商家营业额排名
  267. option2: {
  268. tooltip: {
  269. trigger: 'axis',
  270. axisPointer: {
  271. type: 'shadow'
  272. },
  273. confine: true
  274. },
  275. grid: {
  276. left: 0,
  277. right: 5,
  278. bottom: 10,
  279. top: 40,
  280. containLabel: true
  281. },
  282. xAxis: [{
  283. type: 'value',
  284. // data: [],
  285. show: false,
  286. axisLine: {
  287. lineStyle: {
  288. color: '#999999'
  289. }
  290. },
  291. axisLabel: {
  292. color: '#666666',
  293. // interval: 0,
  294. },
  295. splitLine:{
  296. show:false // 不显示网格线
  297. },
  298. }],
  299. yAxis: [{
  300. type: 'category',
  301. axisTick: {
  302. show: false
  303. },
  304. data: [],
  305. axisLine: {
  306. lineStyle: {
  307. color: '#999999'
  308. },
  309. show: false,
  310. },
  311. axisLabel: {
  312. color: '#666666',
  313. // inside:true,
  314. width:10,
  315. padding: [-20, 0, 0, -4],
  316. verticalAlign:'top',
  317. align:'left',
  318. inside:true
  319. },
  320. }],
  321. series: [{
  322. name: '营业额',
  323. type: 'bar',
  324. label: {
  325. normal: {
  326. show: true,
  327. position: 'right',
  328. color: '#4c4a4a',
  329. formatter:'¥{c}',
  330. padding: [-20, 5, 0, -100],
  331. verticalAlign:'top',
  332. align:'right'
  333. },
  334. },
  335. data: [],
  336. barWidth: 5,
  337. itemStyle: {
  338. // 颜色
  339. color: '#FF770F',
  340. // 给bar设置倒角
  341. barBorderRadius: [15, 15, 15, 15]
  342. }
  343. }]
  344. },
  345. // 设备状态
  346. option3: {
  347. title: {
  348. text: '设备出租比例',
  349. textStyle: {
  350. fontSize: 14
  351. },
  352. left: '70%',
  353. top: '30%'
  354. },
  355. tooltip: {
  356. trigger: 'axis',
  357. axisPointer: {
  358. type: 'shadow'
  359. },
  360. confine: true
  361. },
  362. legend: {
  363. data: ['已租', '未租'],
  364. x: 'right', //可设定图例在左、右、居中
  365. y: '50%', //可设定图例在上、下、居中
  366. itemHeight:5,
  367. itemWidth:20
  368. },
  369. grid: {
  370. left: 0,
  371. containLabel: true
  372. },
  373. series: [{
  374. name: '设备出租比例',
  375. type: 'pie',
  376. center: ['30%', '50%'],
  377. radius: ['60%', '80%'],
  378. label: {
  379. show: false
  380. },
  381. data: [{
  382. value: 1055,
  383. name: '未租',
  384. itemStyle: {
  385. color: "#FF770F"
  386. }
  387. },
  388. {
  389. value: 735,
  390. name: '已租',
  391. itemStyle: {
  392. color: "#EAECF5"
  393. }
  394. }
  395. ]
  396. }]
  397. },
  398. // 已租设备
  399. option4: {
  400. tooltip: {
  401. show:false
  402. },
  403. title: {
  404. text: '已租设备',
  405. textStyle: {
  406. fontSize: 14,
  407. fontWeight: 500
  408. },
  409. left: 'center',
  410. bottom: '0'
  411. },
  412. series: [{
  413. type: 'pie',
  414. radius: ['60%', '70%'],
  415. silent:true,
  416. label: {
  417. normal: {
  418. show: true,
  419. position: 'center',
  420. color: '#4c4a4a',
  421. formatter:'{c}',
  422. },
  423. emphasis: { //中间文字显示 
  424. show: true,
  425. textStyle:{
  426. }
  427. }
  428. },
  429. data: [{
  430. value: 1055,
  431. name: '已租',
  432. itemStyle: {
  433. color: "#0FCB27"
  434. }
  435. },
  436. {
  437. value: 735,
  438. name: '未租',
  439. itemStyle: {
  440. color: "#EAECF5"
  441. }
  442. }
  443. ]
  444. }]
  445. },
  446. // 未租设备
  447. option5: {
  448. title: {
  449. text: '未租设备',
  450. textStyle: {
  451. fontSize: 14,
  452. fontWeight: 500
  453. },
  454. left: 'center',
  455. bottom: '0'
  456. },
  457. series: [{
  458. type: 'pie',
  459. center: ['50%', '50%'],
  460. radius: ['60%', '70%'],
  461. silent:true,
  462. label: {
  463. normal: {
  464. show: true,
  465. position: 'center',
  466. color: '#4c4a4a',
  467. formatter:'{c}',
  468. },
  469. emphasis: { //中间文字显示 
  470. show: true,
  471. textStyle:{
  472. }
  473. }
  474. },
  475. data: [{
  476. value: 1055,
  477. name: '未租设备',
  478. itemStyle: {
  479. color: "#666464"
  480. }
  481. },
  482. {
  483. value: 735,
  484. name: '已租设备',
  485. itemStyle: {
  486. color: "#EAECF5"
  487. }
  488. }
  489. ]
  490. }]
  491. },
  492. // 到期设备
  493. option6: {
  494. title: {
  495. text: '到期设备',
  496. textStyle: {
  497. fontSize: 14,
  498. fontWeight: 500
  499. },
  500. left: 'center',
  501. bottom: '0'
  502. },
  503. series: [{
  504. type: 'pie',
  505. center: ['50%', '50%'],
  506. radius: ['60%', '70%'],
  507. silent:true,
  508. label: {
  509. normal: {
  510. show: true,
  511. position: 'center',
  512. color: '#4c4a4a',
  513. formatter:'{c}',
  514. },
  515. emphasis: { //中间文字显示 
  516. show: true,
  517. textStyle:{
  518. }
  519. }
  520. },
  521. data: [{
  522. value: 1055,
  523. name: '到期',
  524. itemStyle: {
  525. color: "#FF770F"
  526. }
  527. },
  528. {
  529. value: 735,
  530. name: '未到期',
  531. itemStyle: {
  532. color: "#EAECF5"
  533. }
  534. }
  535. ]
  536. }]
  537. },
  538. };
  539. },
  540. components: {
  541. foot,
  542. footerCopyright,
  543. LEchart
  544. },
  545. props: {},
  546. onLoad: async function(options) {
  547. },
  548. async onShow() {
  549. if(req.isLogins(false)){
  550. this.isLogin = true
  551. this.getUserInfo()
  552. await this.getEchartData()
  553. await this.getStatisticData()
  554. await this.getStoreData()
  555. this.init()
  556. }else{
  557. this.isLogin = false
  558. }
  559. },
  560. onUnload() {},
  561. onHide() {},
  562. onReachBottom() {},
  563. methods: {
  564. jumpUrl(url){
  565. if(req.isLogins(true)){
  566. uni.navigateTo({
  567. url:url
  568. })
  569. }
  570. },
  571. // 统计时间切换
  572. async timeTypeChange(val) {
  573. if (this.timeType == val) return false
  574. this.timeType = val
  575. await this.getEchartData()
  576. this.init()
  577. },
  578. // 营业额切换
  579. async storeTypeChange(val) {
  580. if (this.storeType == val) return false
  581. this.storeType = val
  582. await this.getStoreData()
  583. this.init()
  584. },
  585. init() {
  586. this.$refs.chart.init(echarts, async chart => {
  587. // let echartData = await this.getEchartData()
  588. this.option.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  589. this.option.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  590. this.option.legend.itemHeight = 10 * this.rpxTopxScale
  591. this.option.legend.itemWidth = 40 * this.rpxTopxScale
  592. if(this.echartData.orderList.length>0){
  593. this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
  594. this.option.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
  595. }
  596. if(this.echartData.profitList.length>0){
  597. this.option.series[1].data = this.echartData.profitList.map(item=>{return item.profit})
  598. }
  599. if(this.echartData.turnoverList.length>0){
  600. this.option.series[2].data = this.echartData.turnoverList.map(item=>{return item.turnover})
  601. }
  602. chart.setOption(this.option);
  603. });
  604. if (this.$refs.chart2) {
  605. this.$refs.chart2.init(echarts, async chart => {
  606. // let echartData = await this.getEchartData()
  607. if(this.storeRanking.length>0){
  608. this.option2.yAxis[0].data = this.storeRanking.map(item=>{return item.name})
  609. this.option2.series[0].data = this.storeRanking.map(item=>{return item.turnover})
  610. }
  611. chart.setOption(this.option2);
  612. });
  613. }
  614. if (this.$refs.chart3) {
  615. this.$refs.chart3.init(echarts, async chart => {
  616. this.option3.title.textStyle.fontSize = 28 * this.rpxTopxScale
  617. this.option3.legend.itemHeight = 10 * this.rpxTopxScale
  618. this.option3.legend.itemWidth = 40 * this.rpxTopxScale
  619. this.option3.series[0].data[0].value = this.statisticData.noLeaseCount
  620. this.option3.series[0].data[1].value = this.statisticData.leaseCount
  621. chart.setOption(this.option3);
  622. });
  623. }
  624. if (this.$refs.chart4) {
  625. this.$refs.chart4.init(echarts, async chart => {
  626. this.option4.title.textStyle.fontSize = 24 * this.rpxTopxScale
  627. this.option4.series[0].data[0].value = this.statisticData.leaseCount
  628. this.option4.series[0].data[1].value = this.statisticData.noLeaseCount
  629. this.option4.series[0].label.normal.formatter = ()=>{return this.statisticData.leaseCount}
  630. chart.setOption(this.option4);
  631. });
  632. }
  633. if (this.$refs.chart5) {
  634. this.$refs.chart5.init(echarts, async chart => {
  635. this.option5.title.textStyle.fontSize = 24 * this.rpxTopxScale
  636. this.option5.series[0].data[0].value = this.statisticData.noLeaseCount
  637. this.option5.series[0].data[1].value = this.statisticData.leaseCount
  638. this.option4.series[0].label.normal.formatter = ()=>{return this.statisticData.noLeaseCount}
  639. chart.setOption(this.option5);
  640. });
  641. }
  642. if (this.$refs.chart6) {
  643. this.$refs.chart6.init(echarts, async chart => {
  644. this.option6.title.textStyle.fontSize = 24 * this.rpxTopxScale
  645. this.option6.series[0].data[0].value = this.statisticData.expireCount
  646. this.option6.series[0].data[1].value =Number(this.statisticData.batteryCount) - Number(this.statisticData.leaseCount)
  647. this.option6.series[0].label.normal.formatter = ()=>{return this.statisticData.expireCount}
  648. chart.setOption(this.option6);
  649. });
  650. }
  651. },
  652. // 获取图表数据
  653. getEchartData() {
  654. return new Promise((r, j) => {
  655. req.getRequest('/admin/v2/statistic/chart', {type: this.timeType}, res => {
  656. this.echartData = res
  657. console.log('statistic chart', res)
  658. r(res)
  659. })
  660. })
  661. },
  662. // 获取营业额数据
  663. getStoreData() {
  664. return new Promise((r, j) => {
  665. req.getRequest('/admin/v2/statistic/ranking', {type: this.storeType}, res => {
  666. this.storeRanking = res
  667. console.log('statistic ranking', res)
  668. r(res)
  669. })
  670. })
  671. },
  672. // 获取图表数据
  673. getStatisticData() {
  674. return new Promise((r, j) => {
  675. req.getRequest('/admin/v2/statistic/top', {}, res => {
  676. console.log('statistic top', res)
  677. this.statisticData = res
  678. r(res)
  679. })
  680. })
  681. },
  682. // 获取当前用户
  683. getUserInfo(){
  684. req.getRequest('/admin/v2/userInfo',{},res=>{
  685. this.userInfo = res
  686. })
  687. }
  688. },
  689. mounted() {
  690. const systemInfo = uni.getSystemInfoSync();
  691. // px转换到rpx的比例
  692. let pxToRpxScale = 750 / systemInfo.windowWidth;
  693. this.pxToRpxScale = pxToRpxScale
  694. this.rpxTopxScale = systemInfo.windowWidth / 750
  695. let systems = {
  696. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  697. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  698. };
  699. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  700. this.systems = systems;
  701. }
  702. };
  703. </script>
  704. <style>
  705. @import './index.css';
  706. </style>