@iflyrpa/actions 1.2.14-beta.4 → 1.2.14-beta.5
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 +29 -12
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +29 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3029,18 +3029,35 @@ async function handleWeixinData(params) {
|
|
|
3029
3029
|
};
|
|
3030
3030
|
return finalData;
|
|
3031
3031
|
};
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3032
|
+
async function fetchArticles(begin, pageSize, token) {
|
|
3033
|
+
return http.api({
|
|
3034
|
+
method: "get",
|
|
3035
|
+
url: 'https://mp.weixin.qq.com/cgi-bin/appmsgpublish',
|
|
3036
|
+
params: {
|
|
3037
|
+
sub: "list",
|
|
3038
|
+
begin: begin,
|
|
3039
|
+
count: pageSize,
|
|
3040
|
+
token: token,
|
|
3041
|
+
lang: "zh_CN"
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
let rawArticlesInfo = await fetchArticles(0, pageSize > 20 ? 20 : pageSize, token);
|
|
3046
|
+
let articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
3047
|
+
if (!onlySuccess && pageSize > 20) {
|
|
3048
|
+
let totalFetched = articlesInfo.publish_list.length;
|
|
3049
|
+
let nextPage = pageNum + 1;
|
|
3050
|
+
while(totalFetched < pageSize){
|
|
3051
|
+
const remaining = pageSize - totalFetched;
|
|
3052
|
+
const currentPageSize = remaining > 20 ? 20 : remaining;
|
|
3053
|
+
let _rawArticlesInfo = await fetchArticles((nextPage - 1) * 20, currentPageSize, token);
|
|
3054
|
+
let parsed = ParsePublishPage(_rawArticlesInfo);
|
|
3055
|
+
articlesInfo.publish_list = articlesInfo.publish_list.concat(parsed.publish_list);
|
|
3056
|
+
totalFetched = articlesInfo.publish_list.length;
|
|
3057
|
+
if (parsed.publish_list.length < currentPageSize) break;
|
|
3058
|
+
nextPage++;
|
|
3041
3059
|
}
|
|
3042
|
-
}
|
|
3043
|
-
const articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
3060
|
+
}
|
|
3044
3061
|
const articleCell = articlesInfo?.publish_list.map((item)=>({
|
|
3045
3062
|
title: item.publish_info.appmsg_info[0].title,
|
|
3046
3063
|
imageUrl: item.publish_info.appmsg_info[0].cover,
|
|
@@ -5195,7 +5212,7 @@ const xiaohongshuPublish = async (task, params)=>{
|
|
|
5195
5212
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
5196
5213
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
5197
5214
|
};
|
|
5198
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.14-beta.
|
|
5215
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.14-beta.4"}');
|
|
5199
5216
|
class Action {
|
|
5200
5217
|
constructor(task){
|
|
5201
5218
|
this.task = task;
|