linwu 16 hours ago
parent
commit
13b0d34652
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/home/controller/Officer.php

+ 7 - 1
app/home/controller/Officer.php

@@ -69,8 +69,14 @@ class Officer extends MobileBaseController
         $no    = input('no');
         $index = input('index');
 
+        $option = [];
         $review_title = OfficerReviewTitleModel::where('rid', $id)->where('no', $no)->find();
-        $option       = $review_title['option'][$index - 1];
+        foreach ($review_title['option'] as $v) {
+            if ($v['score'] == $index) {
+                $option = $v;
+                break;
+            }
+        }
         OfficerAnswerDetailModel::create([
             'aid'          => $aid,
             'no'           => $no,