Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4aa38e7c
authored
Feb 11, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
节流
1 parent
8d84ec40
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
components/HomeFrame/components/Income/History.vue
pages/common/components/Scene.vue
ws/workers/StorageWorker.js
components/HomeFrame/components/Income/History.vue
View file @
4aa38e7
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-2
0 16:15:42
* @LastEditTime: 2025-01-2
2 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
...
...
pages/common/components/Scene.vue
View file @
4aa38e7
...
...
@@ -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
>
...
...
ws/workers/StorageWorker.js
View file @
4aa38e7
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-22 20:45:05
* @LastEditors:
limi
n
* @LastEditTime: 2025-01-
03 20:42:08
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @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
==
'recordList
All
'
)
{
value
=
await
uni
.
$dbManager
.
getRecords
()
}
const
msg
=
`获取本地缓存! key->
${
key
}
value->
${
serializeIfObject
(
value
)}
`
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment