ソースを参照

fix: 四选一收集活动 任务ID自增

Pius-X 1 年間 前
コミット
21c743d052

+ 1 - 1
application/models/Activity/CollectActCouponActModel.php

@@ -148,7 +148,7 @@ class CollectActCouponActModel extends ActBaseModel implements ActInterface
             }
 
             $confMap[$id][] = [
-                "taskId" => $taskId,
+                "taskId" => count($confMap[$id]) + 1,
                 "taskType" => $taskType,
                 "score" => $score
             ];

+ 2 - 2
static/activity/js/collect_act_coupon.js

@@ -277,7 +277,7 @@ function addCollectActCouponShushuWrap(obj) {
                 <table class="table table-bordered" > 
                     <thead>
                         <tr>
-                            <th width="120">任务ID</th> 
+                            <th width="120">#</th> 
                             <th>任务类型</th> 
                             <th>获得经验(每次)</th> 
                         </tr>
@@ -464,7 +464,7 @@ function addCollectActCouponTaskTr(obj) {
     let html = `
         <tr id="collectActCouponTaskInfo_${rewardKey}" data-idx="${rIdx}"> 
             <td>
-                <input type="number" class="form-control" name="collectActCouponConf[stageConf][${lvIdx}][stages][${spinsIdx}][stages][${ssIdx}][stages][taskConf][${rIdx}][taskId]" value="0">
+                <input type="number" class="form-control" name="collectActCouponConf[stageConf][${lvIdx}][stages][${spinsIdx}][stages][${ssIdx}][stages][taskConf][${rIdx}][taskId]" readonly value="${rIdx + 1}">
             </td> 
             <td>
                 <select class="form-control" name="collectActCouponConf[stageConf][${lvIdx}][stages][${spinsIdx}][stages][${ssIdx}][stages][taskConf][${rIdx}][taskType]">