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