Commit 4aa38e7c by 前端

节流

1 parent 8d84ec40
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-20 16:15:42
* @LastEditTime: 2025-01-22 00:25:25
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -17,7 +17,7 @@
<view class="history-box">
<view class="chart-box">
<view class="chart-header">
<text class="year-text">{{ year - 1 }}年</text>
<text class="year-text">{{ year }}年</text>
<view class="sprite-icon icon-tips-g"></view>
<text>点击柱形图切换月份</text>
</view>
......@@ -28,7 +28,7 @@
<view class="income-box">
<view class="income-header">
<view class="sprite-icon icon-income-icon"></view>
<text>{{ year - 1 }}年{{ monthStr || month }}月收入</text>
<text>{{ year }}年{{ monthStr || month }}月收入</text>
</view>
<template v-if="salaryDetail">
<view class="income-footer">
......@@ -136,7 +136,7 @@ export default {
return true
},
getDetail(date) {
uni.$api.pointApi.pageStat({ salaryMonthBegin: `${this.year - 1}-1`, salaryMonthEnd: `${this.year - 1}-12` }).then(res => {
uni.$api.pointApi.pageStat({ salaryMonthBegin: `${this.year}-1`, salaryMonthEnd: `${this.year}-12` }).then(res => {
const list = res.list || []
const canvasList = []
for (let i = 0; i < 12; i++) {
......@@ -155,7 +155,7 @@ export default {
this.canvasList = canvasList
this.showChart(this.month - 1)
})
this.monthSalaryDetail(this.year - 1 + '-' + this.month)
this.monthSalaryDetail(this.year + '-' + this.month)
},
/**
......@@ -218,7 +218,7 @@ export default {
this.showChart(i) // 重新绘制图表,如果需要更新显示
const month = this.canvasList[i].date.replace(/\D+/, '')
this.monthStr = month
this.monthSalaryDetail(this.year - 1 + '-' + month)
this.monthSalaryDetail(this.year + '-' + month)
}
break
......
......@@ -19,6 +19,7 @@
</template>
<script type="text/ecmascript-6">
import utils from '@/utils/utils.js'
export default {
name: '',
data () {
......@@ -105,7 +106,7 @@ export default {
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
}
},
async jump (userInfo, data) {
jump:utils.throttle( async function (userInfo, data) {
uni.$logger.local.info(`跳转进入首页!`)
try {
uni.hideLoading()
......@@ -137,7 +138,7 @@ export default {
icon: 'none'
})
}
}
},3000)
}
}
</script>
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-22 20:45:05
* @LastEditors: limin
* @LastEditTime: 2025-01-03 20:42:08
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-22 15:33:03
* @FilePath: \gl_tape\ws\workers\StorageWorker.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,7 +17,7 @@ export default class StorageWorker {
return
}
let value = uni.$storage.get(key)
if (key == 'recordList') {
if (key == 'recordListAll') {
value = await uni.$dbManager.getRecords()
}
const msg = `获取本地缓存! key->${key} value->${serializeIfObject(value)}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!