shawenguan 2 yıl önce
ebeveyn
işleme
46bef7aa7f

+ 4 - 0
Scripts/gandart/gandartComposite.js

@@ -32,6 +32,10 @@ const GandartConstKey = {
     CollectionCateLst: 'lkGandartCollectionCateLst',
     FloatPriceIntaval: 'lkGandartFloatPriceIntaval',
     IsCollectionWatchLocked: 'lkIsGandartCollectionWatchLocked',
+    PrivWalletListInUse: 'lkGandartPrivWalletListInUse',
+
+    IsCollectionMaxNumLimit: 'lkGandartIsCollectionMaxNumLimit',
+    CollectionLockMaxNum: 'lkGandartCollectionLockMaxNum',
     // -----合成脚本增加的-----
     CompositeFuncEnalbleList: 'lkGandartCompositeFuncEnalbleList',
     CompositeTaskList0: 'lkGandartCompositeTaskList0',

+ 4 - 0
Scripts/gandart/gandartExchange.js

@@ -32,6 +32,10 @@ const GandartConstKey = {
     CollectionCateLst: 'lkGandartCollectionCateLst',
     FloatPriceIntaval: 'lkGandartFloatPriceIntaval',
     IsCollectionWatchLocked: 'lkIsGandartCollectionWatchLocked',
+    PrivWalletListInUse: 'lkGandartPrivWalletListInUse',
+
+    IsCollectionMaxNumLimit: 'lkGandartIsCollectionMaxNumLimit',
+    CollectionLockMaxNum: 'lkGandartCollectionLockMaxNum',
 };
 
 let gandartToken = lk.getVal(GandartConstKey.Token, '');

+ 55 - 0
Scripts/gandart/gandartHelper.js

@@ -32,6 +32,15 @@ const GandartConstKey = {
     CollectionCateLst: 'lkGandartCollectionCateLst',
     FloatPriceIntaval: 'lkGandartFloatPriceIntaval',
     IsCollectionWatchLocked: 'lkIsGandartCollectionWatchLocked',
+    PrivWalletListInUse: 'lkGandartPrivWalletListInUse',
+
+    IsCollectionMaxNumLimit: 'lkGandartIsCollectionMaxNumLimit',
+    CollectionLockMaxNum: 'lkGandartCollectionLockMaxNum',
+    // -----合成脚本增加的-----
+    CompositeFuncEnalbleList: 'lkGandartCompositeFuncEnalbleList',
+    CompositeTaskList0: 'lkGandartCompositeTaskList0',
+    CompositeTaskList1: 'lkGandartCompositeTaskList1',
+    CompositeTaskList2: 'lkGandartCompositeTaskList2',
 };
 
 let gandartToken = lk.getVal(GandartConstKey.Token, '');
@@ -93,6 +102,9 @@ function checkHanldeRequest() {
             case '/market/api/v2/resaleManage/resale/collectionDetailsByCastingId':
                 handleCollectionDetailsByCastingId();
                 break;
+            case '/base/v2/composite/v3/list/v2':
+                handleCompositeTaskList();
+                break;
             default:
                 if (path.match(/\/read\/api\/composite\/getDetailByCasting/)) {
                     handleMyCollectionDetailByCasting();
@@ -499,6 +511,49 @@ function handleCollectionDetailsByCastingId() {
     lk.msg('');
 }
 
+function handleCompositeTaskList() {
+    try {
+        let data = lk.getResponseBody();
+        if (!data) {
+            return;
+        }
+        lk.log(`获取合成任务列表`);
+        let ret = JSON.parse(data);
+        if (ret.rows && ret.rows.length > 0) {
+            let retTaskLst = ret.rows;
+            let status = retTaskLst[0].status;
+            cacheCompositeTaskList(status, retTaskLst);
+        }
+    } catch (e) {
+        lk.logErr(e);
+        lk.execFail();
+    }
+}
+function cacheCompositeTaskList(status, taskLst) {
+    // 精简一下内容
+    let simpleLst = [];
+    for (let i = 0; i < taskLst.length; i++) {
+        let info = taskLst[i];
+        let item = {
+            id: info.id,
+            compositeLabel: info.compositeLabel,
+            compositeTaskName: info.compositeTaskName,
+            surplus: info.surplus,
+            startTime: info.startTime,
+            endTime: info.endTime,
+        };
+        simpleLst.push(item);
+    }
+    let jsonStr = JSON.stringify(simpleLst, null, 2);
+    if (status == 0) {
+        lk.setVal(GandartConstKey.CompositeTaskList0, jsonStr);
+    } else if (status == 1) {
+        lk.setVal(GandartConstKey.CompositeTaskList1, jsonStr);
+    } else if (status == 2) {
+        lk.setVal(GandartConstKey.CompositeTaskList2, jsonStr);
+    }
+}
+
 function checkAppendCollectionItemsDiff(cLst, pageLst) {
     let dic = {};
     for (const d of cLst) {

+ 4 - 0
Scripts/gandart/gandartLock.js

@@ -32,6 +32,10 @@ const GandartConstKey = {
     CollectionCateLst: 'lkGandartCollectionCateLst',
     FloatPriceIntaval: 'lkGandartFloatPriceIntaval',
     IsCollectionWatchLocked: 'lkIsGandartCollectionWatchLocked',
+    PrivWalletListInUse: 'lkGandartPrivWalletListInUse',
+
+    IsCollectionMaxNumLimit: 'lkGandartIsCollectionMaxNumLimit',
+    CollectionLockMaxNum: 'lkGandartCollectionLockMaxNum',
 
     // -----通用锁单相关的-----
     LCastingId: "lkGandartLockCastingId",