operationData.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <template>
  2. <view style="padding-bottom: 30rpx;">
  3. <!-- tab -->
  4. <view class="tab-box ddflex" v-if="!userInfo.storeId">
  5. <view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
  6. <view>我的</view>
  7. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  8. </view>
  9. <view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
  10. <view>商家</view>
  11. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  12. </view>
  13. <view :class="'tab-item fflex '+(queryType==3?'tab-item-active':'')" @click="queryTypeChange(3)">
  14. <view>门店</view>
  15. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  16. </view>
  17. </view>
  18. <view style="height: 110rpx;" v-if="!userInfo.storeId"></view>
  19. <!-- 我的收益 -->
  20. <block v-if="queryType==1">
  21. <!-- 图表统计 -->
  22. <view class="echart-box">
  23. <view class="echart-box-header ddflex">
  24. <view class="echart-box-title">交易趋势</view>
  25. <view class="echart-box-timeType ddflex">
  26. <view :class="'echart-box-timeType-item '+(timeType==1?'echart-box-timeType-item-acitve':'')"
  27. @click="timeTypeChange(1)">今日</view>
  28. <view :class="'echart-box-timeType-item '+(timeType==2?'echart-box-timeType-item-acitve':'')"
  29. @click="timeTypeChange(2)">近7日</view>
  30. <view :class="'echart-box-timeType-item '+(timeType==3?'echart-box-timeType-item-acitve':'')"
  31. @click="timeTypeChange(3)">近30日</view>
  32. </view>
  33. </view>
  34. <view style="margin-top: 30rpx;height:500rpx">
  35. <l-echart ref="chart" @finished="init"></l-echart>
  36. </view>
  37. </view>
  38. <!-- 图表统计 -->
  39. <view class="echart-box">
  40. <view class="echart-box-header ddflex">
  41. <view class="echart-box-title">实时设备数据</view>
  42. </view>
  43. <view class="sssb-box ddflex">
  44. <view class="sssb-item fflex">
  45. <view class="sssb-label">总数</view>
  46. <view class="sssb-data">{{statisticData.batteryCount?statisticData.batteryCount:0}}台</view>
  47. </view>
  48. <view class="sssb-line"></view>
  49. <view class="sssb-item fflex">
  50. <view class="sssb-label">使用总次数</view>
  51. <view class="sssb-data">{{statisticData.useCount?statisticData.useCount:0}}次</view>
  52. </view>
  53. </view>
  54. <!-- <view class="sssb-box ddflex">
  55. <view class="sssb-item">
  56. <view class="sssb-label">已下发</view>
  57. <view class="sssb-data">509台</view>
  58. </view>
  59. <view class="sssb-line"></view>
  60. <view class="sssb-item">
  61. <view class="sssb-label">总收益</view>
  62. <view class="sssb-data sssb-color">92516元</view>
  63. </view>
  64. </view> -->
  65. </view>
  66. <!-- 图表统计 -->
  67. <view class="echart-box">
  68. <view class="echart-box-header ddflex">
  69. <view class="echart-box-title">我的运营情况</view>
  70. </view>
  71. <view class="sssb-box ddflex">
  72. <view class="sssb-item fflex">
  73. <view class="sssb-data sssb-color">{{statisticData.totalTurnover?statisticData.totalTurnover:0}}</view>
  74. <view class="sssb-label">营业总额</view>
  75. </view>
  76. <view class="sssb-line"></view>
  77. <view class="sssb-item fflex">
  78. <view class="sssb-data sssb-color">{{statisticData.totalRefund?statisticData.totalRefund:0}}</view>
  79. <view class="sssb-label">累计退款</view>
  80. </view>
  81. </view>
  82. <view class="sssb-box ddflex">
  83. <view class="sssb-item fflex">
  84. <view class="sssb-data sssb-color">{{statisticData.totalProfit?statisticData.totalProfit:0}}</view>
  85. <view class="sssb-label">收益总额</view>
  86. </view>
  87. <view class="sssb-line"></view>
  88. <view class="sssb-item fflex">
  89. <view class="sssb-data sssb-color">{{statisticData.useProfit?statisticData.useProfit:0}}</view>
  90. <view class="sssb-label">可分账金额</view>
  91. </view>
  92. </view>
  93. <view style="margin-top: 30rpx;height:500rpx">
  94. <view class="echart-title">近一周营业额度(元)图表数据</view>
  95. <l-echart ref="chart2" @finished="init"></l-echart>
  96. </view>
  97. <view style="margin-top: 30rpx;height:500rpx">
  98. <view class="echart-title">近一周收益额度(元)</view>
  99. <l-echart ref="chart3" @finished="init"></l-echart>
  100. </view>
  101. </view>
  102. </block>
  103. <!-- 商家营业额 -->
  104. <block v-if="queryType==2">
  105. <!-- 搜索 -->
  106. <view>
  107. <view class="search-box ddflex">
  108. <image class="search-icon" src="../../static/images/ssico.png"></image>
  109. <input class="fflex" v-model="searchValue" confirm-type="search" @confirm="searchFn" placeholder="请输入商家名称或电话"/>
  110. <view class="search-btn" @click="searchFn">搜索</view>
  111. </view>
  112. </view>
  113. <!-- 数据 -->
  114. <view>
  115. <view class="sjyy-item" v-for="item,index in groupList" :key="index">
  116. <view class="ddflex">
  117. <view class="sjyy-header">
  118. <image src="../../static/pages/images/wdsj.png"></image>
  119. </view>
  120. <view class="fflex">
  121. <view class="sjyy-name">{{item.name}}</view>
  122. <view class="sjyy-phone">{{item.phone}}</view>
  123. </view>
  124. <view class="sjyy-btn" @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal?merchantId='+item.id+'&totalTurnover='+item.totalTurnover+'&totalRefund='+item.totalRefund+'&totalProfit='+item.totalProfit+'&useProfit='+item.useProfit)">运营情况</view>
  125. </view>
  126. <view class="sjyy-data">
  127. <view class="ddflex">
  128. <view class="sjyy-data-item fflex">
  129. <view class="sssb-data sssb-color">{{item.totalTurnover?item.totalTurnover:0}}</view>
  130. <view class="sssb-label">营业总额</view>
  131. </view>
  132. <view class="sjyy-data-item fflex">
  133. <view class="sssb-data sssb-color">{{item.totalRefund?item.totalRefund:0}}</view>
  134. <view class="sssb-label">累计退款</view>
  135. </view>
  136. </view>
  137. <view class="ddflex" style="margin-top: 40rpx;">
  138. <view class="sjyy-data-item fflex">
  139. <view class="sssb-data sssb-color">{{item.totalProfit?item.totalProfit:0}}</view>
  140. <view class="sssb-label">收益总额</view>
  141. </view>
  142. <view class="sjyy-data-item fflex">
  143. <view class="sssb-data sssb-color">{{item.useProfit?item.useProfit:0}}</view>
  144. <view class="sssb-label">可分账金额</view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </block>
  151. <!-- 门店营业额 -->
  152. <block v-if="queryType==3">
  153. <!-- 搜索 -->
  154. <view>
  155. <view class="search-box ddflex">
  156. <image class="search-icon" src="../../static/images/ssico.png"></image>
  157. <input class="fflex" v-model="searchValue" confirm-type="search" @confirm="searchFn" placeholder="请输入门店名称或电话"/>
  158. <view class="search-btn" @click="searchFn">搜索</view>
  159. </view>
  160. </view>
  161. <!-- 数据 -->
  162. <view>
  163. <view class="sjyy-item" v-for="item,index in groupList" :key="index">
  164. <view class="ddflex">
  165. <view class="sjyy-header">
  166. <image src="../../static/pages/images/wdmd.png"></image>
  167. </view>
  168. <view class="fflex">
  169. <view class="sjyy-name">{{item.name}}</view>
  170. <view class="sjyy-phone">{{item.linkman}}({{item.phone}})</view>
  171. </view>
  172. <view class="sjyy-btn"
  173. @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal?storeId='+item.id+'&totalTurnover='+item.totalTurnover+'&totalRefund='+item.totalRefund+'&totalProfit='+item.totalProfit+'&useProfit='+item.useProfit)">
  174. 运营情况</view>
  175. </view>
  176. <view class="sjyy-data ddflex" style="padding: 20rpx;">
  177. <image style="width: 26rpx;height: 26rpx;margin-right: 10rpx;" src="../../static/pages/images/address-icon.png"></image>
  178. <view class="tover fflex" style="font-size: 24rpx;line-height: 36rpx;color: #A8A5A5;">{{item.address}}</view>
  179. </view>
  180. <view class="sjyy-data">
  181. <view class="ddflex">
  182. <view class="sjyy-data-item fflex">
  183. <view class="sssb-data sssb-color">{{item.totalTurnover?item.totalTurnover:0}}</view>
  184. <view class="sssb-label">营业总额</view>
  185. </view>
  186. <view class="sjyy-data-item fflex">
  187. <view class="sssb-data sssb-color">{{item.totalRefund?item.totalRefund:0}}</view>
  188. <view class="sssb-label">累计退款</view>
  189. </view>
  190. </view>
  191. <view class="ddflex" style="margin-top: 40rpx;">
  192. <view class="sjyy-data-item fflex">
  193. <view class="sssb-data sssb-color">{{item.totalProfit?item.totalProfit:0}}</view>
  194. <view class="sssb-label">收益总额</view>
  195. </view>
  196. <view class="sjyy-data-item fflex">
  197. <view class="sssb-data sssb-color">{{item.useProfit?item.useProfit:0}}</view>
  198. <view class="sssb-label">可分账金额</view>
  199. </view>
  200. </view>
  201. </view>
  202. </view>
  203. </view>
  204. </block>
  205. </view>
  206. </template>
  207. <script>
  208. const app = getApp();
  209. const req = require("../../utils/request.js");
  210. import LEchart from '../../components/l-echart/l-echart.vue';
  211. import * as echarts from '../../utils/echarts.min.js'
  212. export default {
  213. components: {
  214. LEchart
  215. },
  216. props: {},
  217. data() {
  218. return {
  219. systems: {},
  220. isTop: 0,
  221. pxToRpxScale: 0,
  222. rpxTopxScale: 0,
  223. userInfo:{},
  224. merchantId:null,
  225. storeId:null,
  226. queryType: 1,
  227. timeType: 1, //统计时间 1.按日 2.按月 3.按季度
  228. groupList: [],
  229. page: 1,
  230. limit: 10,
  231. searchValue:'',
  232. isQuerying:false,//正在查询数据
  233. echartData:{},//交易趋势图表
  234. statisticData:{},
  235. barEchartData:{},
  236. // 交易趋势图表数据
  237. option: {
  238. tooltip: {
  239. trigger: 'axis',
  240. axisPointer: {
  241. type: 'shadow'
  242. },
  243. confine: true
  244. },
  245. legend: {
  246. data: ['订单数', '订单金额','收益金额'],
  247. x: 'center', //可设定图例在左、右、居中
  248. y: 'top', //可设定图例在上、下、居中
  249. padding: [15, 0, 0, 0]
  250. },
  251. grid: {
  252. left: 0,
  253. right: 8,
  254. bottom: 5,
  255. top: 45,
  256. containLabel: true
  257. },
  258. xAxis: [{
  259. type: 'category',
  260. data: [],
  261. axisLine: {
  262. lineStyle: {
  263. color: '#999999'
  264. }
  265. },
  266. axisLabel: {
  267. color: '#666666',
  268. // interval: 0,
  269. }
  270. }],
  271. yAxis: [{
  272. type: 'value',
  273. axisTick: {
  274. show: false
  275. },
  276. axisLine: {
  277. lineStyle: {
  278. color: '#999999'
  279. }
  280. },
  281. axisLabel: {
  282. color: '#666666'
  283. }
  284. }],
  285. series: [{
  286. name: '订单数',
  287. type: 'line',
  288. data: [300, 270, 340, 344, 300, 320, 310],
  289. showSymbol: false,
  290. smooth: true,
  291. itemStyle: {
  292. // 颜色
  293. color: '#5F50E6',
  294. // 给bar设置倒角
  295. barBorderRadius: [15, 15, 0, 0]
  296. }
  297. },
  298. {
  299. name: '订单金额',
  300. type: 'line',
  301. data: [120, 102, 141, 174, 190, 250, 220],
  302. showSymbol: false,
  303. smooth: true,
  304. itemStyle: {
  305. // 颜色
  306. color: '#FF7D00',
  307. // 给bar设置倒角
  308. barBorderRadius: [15, 15, 0, 0]
  309. }
  310. },
  311. {
  312. name: '收益金额',
  313. type: 'line',
  314. data: [120, 102, 141, 174, 190, 250, 120],
  315. showSymbol: false,
  316. smooth: true,
  317. itemStyle: {
  318. // 颜色
  319. color: '#FFDC0F',
  320. // 给bar设置倒角
  321. barBorderRadius: [15, 15, 0, 0]
  322. }
  323. },
  324. ]
  325. },
  326. // 近一周营业额度(元)图表数据
  327. option2: {
  328. tooltip: {
  329. trigger: 'axis',
  330. axisPointer: {
  331. type: 'shadow'
  332. },
  333. confine: true
  334. },
  335. grid: {
  336. left: 0,
  337. right: 8,
  338. bottom: 20,
  339. top: 30,
  340. containLabel: true
  341. },
  342. xAxis: [{
  343. type: 'category',
  344. data: [],
  345. axisLine: {
  346. lineStyle: {
  347. color: '#999999'
  348. }
  349. },
  350. axisLabel: {
  351. color: '#666666',
  352. // interval: 0,
  353. }
  354. }],
  355. yAxis: [{
  356. type: 'value',
  357. axisTick: {
  358. show: false
  359. },
  360. axisLine: {
  361. lineStyle: {
  362. color: '#999999'
  363. }
  364. },
  365. axisLabel: {
  366. color: '#666666'
  367. }
  368. }],
  369. series: [{
  370. name: '订单',
  371. type: 'bar',
  372. label: {
  373. normal: {
  374. show: true,
  375. position: 'top',
  376. color: '#FF770F',
  377. formatter: (res)=>{
  378. if(res.value>0) return '¥'+res.value
  379. else return ''
  380. },
  381. },
  382. },
  383. data: [285, 200, 285, 300, 285, 285, 320],
  384. barWidth: 15,
  385. itemStyle: {
  386. // 颜色
  387. color: '#FF770F',
  388. // 给bar设置倒角
  389. barBorderRadius: [0, 0, 0, 0]
  390. }
  391. }]
  392. },
  393. // 近一周收益额度(元)
  394. option3: {
  395. tooltip: {
  396. trigger: 'axis',
  397. axisPointer: {
  398. type: 'shadow'
  399. },
  400. confine: true
  401. },
  402. grid: {
  403. left: 0,
  404. right: 8,
  405. bottom: 20,
  406. top: 30,
  407. containLabel: true
  408. },
  409. xAxis: [{
  410. type: 'category',
  411. data: [],
  412. axisLine: {
  413. lineStyle: {
  414. color: '#999999'
  415. }
  416. },
  417. axisLabel: {
  418. color: '#666666',
  419. // interval: 0,
  420. }
  421. }],
  422. yAxis: [{
  423. type: 'value',
  424. axisTick: {
  425. show: false
  426. },
  427. axisLine: {
  428. lineStyle: {
  429. color: '#999999'
  430. }
  431. },
  432. axisLabel: {
  433. color: '#666666'
  434. }
  435. }],
  436. series: [{
  437. name: '订单',
  438. type: 'bar',
  439. label: {
  440. normal: {
  441. show: true,
  442. position: 'top',
  443. color: '#FF770F',
  444. formatter: (res)=>{
  445. if(res.value>0) return '¥'+res.value
  446. else return ''
  447. },
  448. },
  449. },
  450. data: [285, 200, 285, 300, 285, 285, 320],
  451. barWidth: 15,
  452. itemStyle: {
  453. // 颜色
  454. color: '#FF770F',
  455. // 给bar设置倒角
  456. barBorderRadius: [0, 0, 0, 0]
  457. }
  458. }]
  459. }
  460. }
  461. },
  462. onLoad(options) {
  463. this.userInfo = req.getStorage('userInfo')
  464. this.getStatisticData()
  465. },
  466. onShow() {
  467. },
  468. methods: {
  469. jumpUrl(url) {
  470. if (req.isLogins(true)) {
  471. uni.navigateTo({
  472. url: url
  473. })
  474. }
  475. },
  476. queryTypeChange(val) {
  477. if (this.queryType == val) return false
  478. this.queryType = val
  479. if(this.queryType==1){
  480. this.getStatisticData()
  481. }
  482. if(this.queryType==2||this.queryType==3){
  483. this.getDataList()
  484. this.searchValue = ''
  485. }
  486. },
  487. // 统计时间切换
  488. timeTypeChange(val) {
  489. if (this.timeType == val) return false
  490. this.timeType = val
  491. this.getStatisticData()
  492. },
  493. init() {
  494. this.$refs.chart.init(echarts, async chart => {
  495. // let echartData = await this.getEchartData()
  496. this.option.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  497. this.option.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  498. this.option.legend.itemHeight = 10 * this.rpxTopxScale
  499. this.option.legend.itemWidth = 40 * this.rpxTopxScale
  500. if(this.echartData.orderList&&this.echartData.orderList.length>0){
  501. this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
  502. this.option.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
  503. }
  504. if(this.echartData.profitList&&this.echartData.profitList.length>0){
  505. this.option.series[1].data = this.echartData.profitList.map(item=>{return item.profit})
  506. }
  507. if(this.echartData.turnoverList&&this.echartData.turnoverList.length>0){
  508. this.option.series[2].data = this.echartData.turnoverList.map(item=>{return item.turnover})
  509. }
  510. chart.setOption(this.option);
  511. });
  512. if (this.$refs.chart2) {
  513. this.$refs.chart2.init(echarts, async chart => {
  514. // let echartData = await this.getEchartData()
  515. this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  516. this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  517. if(this.barEchartData.turnoverList&&this.barEchartData.turnoverList.length>0){
  518. this.option2.xAxis[0].data = this.barEchartData.turnoverList.map(item=>{return item.showTime})
  519. this.option2.series[0].data = this.barEchartData.turnoverList.map(item=>{return item.orderCount?item.orderCount:0})
  520. }
  521. this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
  522. chart.setOption(this.option2);
  523. });
  524. }
  525. if (this.$refs.chart3) {
  526. this.$refs.chart3.init(echarts, async chart => {
  527. // let echartData = await this.getEchartData()
  528. this.option3.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  529. this.option3.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
  530. if(this.barEchartData.profitList&&this.barEchartData.profitList.length>0){
  531. this.option3.xAxis[0].data = this.barEchartData.profitList.map(item=>{return item.showTime})
  532. this.option3.series[0].data = this.barEchartData.profitList.map(item=>{return item.profit})
  533. }
  534. this.option3.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
  535. chart.setOption(this.option3);
  536. });
  537. }
  538. },
  539. getDataList(isPage) {
  540. if(this.isQuerying) return
  541. else this.isQuerying = true
  542. if (!isPage) {
  543. this.page = 1
  544. }
  545. let queryParams = {
  546. page: this.page,
  547. limit: this.limit,
  548. }
  549. if(this.searchValue){
  550. queryParams.name=this.searchValue
  551. }
  552. let api = '/admin/v2/merchant/pageDate'
  553. if(this.queryType==2){
  554. api = '/admin/v2/merchant/pageDate'
  555. }
  556. if(this.queryType==3){
  557. api = '/admin/v2/store/pageData'
  558. if(req.getStorage('userInfo').merchantId) queryParams.merchantId = req.getStorage('userInfo').merchantId
  559. }
  560. req.getRequest(
  561. api,
  562. queryParams,
  563. data => {
  564. if (data != null && data.list.length > 0) {
  565. if (!isPage) {
  566. this.groupList = data.list
  567. } else {
  568. this.groupList = this.groupList.concat(data.list)
  569. }
  570. this.page++
  571. } else {
  572. if (!isPage)
  573. this.groupList = data.list
  574. else {}
  575. }
  576. uni.hideLoading()
  577. this.isQuerying = false
  578. }
  579. )
  580. },
  581. searchFn(){
  582. this.getDataList()
  583. },
  584. // 获取运营数据-交易趋势
  585. async getStatisticData(){
  586. await this.getEchartData()
  587. await this.getTopData()
  588. await this.getBarEchartData()
  589. this.init()
  590. },
  591. getEchartData() {
  592. return new Promise((r, j) => {
  593. req.getRequest('/admin/v2/statistic/chart', {type: this.timeType}, res => {
  594. this.echartData = res
  595. console.log('statistic chart', res)
  596. r(res)
  597. })
  598. })
  599. },
  600. // 获取统计数据
  601. getTopData() {
  602. return new Promise((r, j) => {
  603. req.getRequest('/admin/v2/statistic/top', {}, res => {
  604. console.log('statistic top', res)
  605. this.statisticData = res
  606. r(res)
  607. })
  608. })
  609. },
  610. getBarEchartData() {
  611. return new Promise((r, j) => {
  612. let merchantId = this.merchantId?this.merchantId:req.getStorage('userInfo').merchantId?req.getStorage('userInfo').merchantId:''
  613. let storeId = this.storeId?this.storeId:req.getStorage('userInfo').storeId?req.getStorage('userInfo').storeId:''
  614. let pData = {
  615. merchantId:merchantId?merchantId:null,
  616. storeId:storeId?storeId:null
  617. }
  618. req.getRequest('/admin/v2/statistic/histogram', pData, res => {
  619. this.barEchartData = res
  620. console.log('statistic chart', res)
  621. r(res)
  622. })
  623. })
  624. },
  625. },
  626. mounted() {
  627. const systemInfo = uni.getSystemInfoSync();
  628. // px转换到rpx的比例
  629. let pxToRpxScale = 750 / systemInfo.windowWidth;
  630. this.pxToRpxScale = pxToRpxScale
  631. this.rpxTopxScale = systemInfo.windowWidth / 750
  632. let systems = {
  633. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  634. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  635. };
  636. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  637. this.systems = systems;
  638. },
  639. onPageScroll: function(e) {
  640. if (e.scrollTop > this.systems.barHeight) {
  641. this.isTop = 1;
  642. } else {
  643. this.isTop = 0;
  644. }
  645. }
  646. }
  647. </script>
  648. <style>
  649. @import "./operationData.css";
  650. </style>