shawenguan před 2 roky
rodič
revize
9f44a993bd

+ 8 - 0
BoxJsSub/Release.json

@@ -874,6 +874,14 @@
           "desc": "首发藏品名称关键字"
         },
         {
+          "id": "lkGandartNewCollectionCateLst",
+          "name": "产品列表",
+          "val": "[]",
+          "autoGrow": true,
+          "type": "textarea",
+          "desc": "产品列表"
+        },
+        {
           "id": "lkGandartPasswordPlainText",
           "name": "钱包支付密码",
           "val": "",

+ 11 - 2
Scripts/gandart/gandartComposite.js

@@ -699,12 +699,12 @@ async function checkGetCompositeTaskList(status) {
         taskLst = [];
         let taskDetail = await getCompositeTaskListByServer(status, 10, 1);
         if (taskDetail && taskDetail.rows) {
-            taskLst = taskLst.concat(taskDetail.rows);
+            taskLst = concatTaskList(taskLst, taskDetail.rows, 1);
             let totalPage = taskDetail.totalPage;
             for (let i = 2; i < totalPage + 1; i++) {
                 taskDetail = await getCompositeTaskListByServer(status, 10, i);
                 if (taskDetail && taskDetail.rows) {
-                    taskLst = taskLst.concat(taskDetail.rows);
+                    taskLst = concatTaskList(taskLst, taskDetail.rows, i);
                 }
             }
         }
@@ -714,6 +714,14 @@ async function checkGetCompositeTaskList(status) {
     return taskLst;
 }
 
+function concatTaskList(latestLst, newLst, page) {
+    for (let i = 0; i < newLst.length; i++) {
+        newLst[i].page = page;
+        latestLst.push(newLst[i]);
+    }
+    return latestLst;
+}
+
 function getCompositeTaskListByCache(status, pageSize = 10, page = 1) {
     try {
         let jsonStr = '';
@@ -744,6 +752,7 @@ function cacheCompositeTaskList(status, taskLst) {
             surplus: info.surplus,
             startTime: info.startTime,
             endTime: info.endTime,
+            page: info.page,
         };
         simpleLst.push(item);
     }

+ 11 - 3
Scripts/gandart/gandartExchange.js

@@ -36,7 +36,7 @@ const GandartConstKey = {
 
     IsCollectionMaxNumLimit: 'lkGandartIsCollectionMaxNumLimit',
     CollectionLockMaxNum: 'lkGandartCollectionLockMaxNum',
-    // -----合成脚本增加的-----
+    // -----置换分解脚本增加的-----
     ExchangeFuncEnalbleList: 'lkGandartExchangeFuncEnalbleList',
     ExchangeTaskList0: 'lkGandartExchangeTaskList0',
     ExchangeTaskList1: 'lkGandartExchangeTaskList1',
@@ -699,12 +699,12 @@ async function checkGetExchangeTaskList(status) {
         taskLst = [];
         let taskDetail = await getExchangeTaskListByServer(status, 10, 1);
         if (taskDetail && taskDetail.rows) {
-            taskLst = taskLst.concat(taskDetail.rows);
+            taskLst = concatTaskList(taskLst, taskDetail.rows, 1);
             let totalPage = taskDetail.totalPage;
             for (let i = 2; i < totalPage + 1; i++) {
                 taskDetail = await getExchangeTaskListByServer(status, 10, i);
                 if (taskDetail && taskDetail.rows) {
-                    taskLst = taskLst.concat(taskDetail.rows);
+                    taskLst = concatTaskList(taskLst, taskDetail.rows, i);
                 }
             }
         }
@@ -713,6 +713,14 @@ async function checkGetExchangeTaskList(status) {
     return taskLst;
 }
 
+function concatTaskList(latestLst, newLst, page) {
+    for (let i = 0; i < newLst.length; i++) {
+        newLst[i].page = page;
+        latestLst.push(newLst[i]);
+    }
+    return latestLst;
+}
+
 function getExchangeTaskListByCache(status, pageSize = 10, page = 1) {
     try {
         let jsonStr = '';

+ 36 - 6
Scripts/gandart/gandartGrab.js

@@ -44,8 +44,9 @@ const GandartConstKey = {
     NewCastingLockMaxNum: 'lkGandartNewCastingLockMaxNum',
 
     NewCastingPayWalletList: 'lkGandartNewCastingPayWalletList',
-    NewCastingId: 'lkGandartNewCollectionCastingId',
-    NewCastingSearchKey: 'lkGandartNewCollectionCastingSearchKey',
+    NewCollectionCastingId: 'lkGandartNewCollectionCastingId',
+    NewCollectionCastingSearchKey: 'lkGandartNewCollectionCastingSearchKey',
+    NewCollectionCateLst: 'lkGandartNewCollectionCateLst',
 };
 
 let gandartToken = lk.getVal(GandartConstKey.Token, '');
@@ -247,23 +248,52 @@ function checkIsInPrivWalletList(walletInfo) {
     return false;
 }
 
+function concatNftSeriesLst(latestLst, newLst, page) {
+    for (let i = 0; i < newLst.length; i++) {
+        newLst[i].page = page;
+        latestLst.push(newLst[i]);
+    }
+    return latestLst;
+}
+
+function cacheNftSeriesLst(seriesLst) {
+    // 精简一下内容
+    let simpleLst = [];
+    for (let i = 0; i < seriesLst.length; i++) {
+        let info = seriesLst[i];
+        let item = {
+            id: info.id,
+            seriesName: info.seriesName,
+            castingCount: info.castingCount,
+            surplus: info.number,
+            startTime: info.startTime,
+            endTime: info.endTime,
+        };
+        simpleLst.push(item);
+    }
+    let jsonStr = JSON.stringify(simpleLst, null, 2);
+    lk.setVal(GandartConstKey.NewCollectionCateLst, jsonStr);
+}
+
 async function getNewCollectionCastingData() {
     let allNftSeriesLst = [];
     let nftSeriesDetail = await findAllFirstNftSeries(1, 5);
     if (nftSeriesDetail && nftSeriesDetail.success) {
-        allNftSeriesLst = allNftSeriesLst.concat(nftSeriesDetail.obj);
+        allNftSeriesLst = concatNftSeriesLst(allNftSeriesLst, nftSeriesDetail.obj, 1);
         for (let i = 2; i < nftSeriesDetail.totalPage + 1; i++) {
             nftSeriesDetail = await findAllFirstNftSeries(i, 5);
             if (nftSeriesDetail && nftSeriesDetail.success) {
-                allNftSeriesLst = allNftSeriesLst.concat(nftSeriesDetail.obj);
+                allNftSeriesLst = concatNftSeriesLst(allNftSeriesLst, nftSeriesDetail.obj, i);
             }
         }
     }
+    cacheNftSeriesLst(allNftSeriesLst);
+
     let tNftCollection;
     let retNftSeriesLst = [];
     let retFinalNftSeries;
     if (allNftSeriesLst && allNftSeriesLst.length > 0) {
-        let newCastingId = lk.getVal(GandartConstKey.NewCastingId, 0);
+        let newCastingId = lk.getVal(GandartConstKey.NewCollectionCastingId, 0);
         newCastingId = Number(newCastingId);
         let nowDate = new Date();
         if (newCastingId > 0) {
@@ -280,7 +310,7 @@ async function getNewCollectionCastingData() {
                 }
             }
         } else {
-            let castingSearchKey = lk.getVal(GandartConstKey.NewCastingSearchKey);
+            let castingSearchKey = lk.getVal(GandartConstKey.NewCollectionCastingSearchKey);
             lk.log('通过产品名称关键字进行匹配');
             if (!lk.isEmpty(castingSearchKey)) {
                 for (let i = 0; i < allNftSeriesLst.length; i++) {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 163 - 1
Scripts/gandart/gandartHelper.js


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů