@iflyrpa/actions 1.2.14-beta.4 → 1.2.14-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +30 -12
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -15955,18 +15955,36 @@ var __webpack_exports__ = {};
|
|
|
15955
15955
|
};
|
|
15956
15956
|
return finalData;
|
|
15957
15957
|
};
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15958
|
+
async function fetchArticles(begin, pageSize, token) {
|
|
15959
|
+
return http.api({
|
|
15960
|
+
method: "get",
|
|
15961
|
+
url: 'https://mp.weixin.qq.com/cgi-bin/appmsgpublish',
|
|
15962
|
+
params: {
|
|
15963
|
+
sub: "list",
|
|
15964
|
+
begin: begin,
|
|
15965
|
+
count: pageSize,
|
|
15966
|
+
token: token,
|
|
15967
|
+
lang: "zh_CN"
|
|
15968
|
+
}
|
|
15969
|
+
});
|
|
15970
|
+
}
|
|
15971
|
+
let size = pageSize > 20 ? 20 : pageSize;
|
|
15972
|
+
let rawArticlesInfo = await fetchArticles((pageNum - 1) * size, size, token);
|
|
15973
|
+
let articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
15974
|
+
if (!onlySuccess && pageSize > 20) {
|
|
15975
|
+
let totalFetched = articlesInfo.publish_list.length;
|
|
15976
|
+
let nextPage = pageNum + 1;
|
|
15977
|
+
while(totalFetched < pageSize){
|
|
15978
|
+
const remaining = pageSize - totalFetched;
|
|
15979
|
+
const currentPageSize = remaining > 20 ? 20 : remaining;
|
|
15980
|
+
let _rawArticlesInfo = await fetchArticles((nextPage - 1) * 20, currentPageSize, token);
|
|
15981
|
+
let parsed = ParsePublishPage(_rawArticlesInfo);
|
|
15982
|
+
articlesInfo.publish_list = articlesInfo.publish_list.concat(parsed.publish_list);
|
|
15983
|
+
totalFetched = articlesInfo.publish_list.length;
|
|
15984
|
+
if (parsed.publish_list.length < currentPageSize) break;
|
|
15985
|
+
nextPage++;
|
|
15967
15986
|
}
|
|
15968
|
-
}
|
|
15969
|
-
const articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
15987
|
+
}
|
|
15970
15988
|
const articleCell = articlesInfo?.publish_list.map((item)=>({
|
|
15971
15989
|
title: item.publish_info.appmsg_info[0].title,
|
|
15972
15990
|
imageUrl: item.publish_info.appmsg_info[0].cover,
|
|
@@ -18121,7 +18139,7 @@ var __webpack_exports__ = {};
|
|
|
18121
18139
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
18122
18140
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
18123
18141
|
};
|
|
18124
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.14-beta.
|
|
18142
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.14-beta.5"}');
|
|
18125
18143
|
class Action {
|
|
18126
18144
|
constructor(task){
|
|
18127
18145
|
this.task = task;
|