mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:部分逻辑
This commit is contained in:
parent
800bc15007
commit
c5d9131c1d
9 changed files with 56 additions and 30 deletions
|
|
@ -22,12 +22,14 @@ export const saveMonthlyNewData = (uid, ...newDatas) => {
|
|||
/**
|
||||
* 获取月度数据
|
||||
* @param {MysZZZApi} api
|
||||
* @param {string} deviceFp
|
||||
* @param {string} month
|
||||
* @returns {Promise<object | null>}
|
||||
*/
|
||||
export const getMonthly = async (api, month) => {
|
||||
export const getMonthly = async (api, deviceFp, month) => {
|
||||
// 获取月度数据
|
||||
const data = await api.getFinalData('zzzMonthly', {
|
||||
deviceFp,
|
||||
query: { month },
|
||||
});
|
||||
saveMonthlyNewData(api.uid, data);
|
||||
|
|
@ -37,11 +39,12 @@ export const getMonthly = async (api, month) => {
|
|||
/**
|
||||
* 月度数据(统计)
|
||||
* @param {MysZZZApi} api
|
||||
* @param {string} deviceFp
|
||||
* @returns {Promise<object | null>}
|
||||
*/
|
||||
export const getMonthlyCollect = async api => {
|
||||
export const getMonthlyCollect = async (api, deviceFp) => {
|
||||
// 获取当前月度数据
|
||||
const currentData = await getMonthly(api, '');
|
||||
const currentData = await getMonthly(api, deviceFp, '');
|
||||
|
||||
if (!currentData) return null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue