dever 5 years ago
parent
commit
fc9109e507
4 changed files with 14 additions and 4 deletions
  1. 1 1
      package.json
  2. 1 1
      service/database/order.php
  3. 8 2
      service/lib/Manage.php
  4. 4 0
      service/src/Api.php

+ 1 - 1
package.json

@@ -1,3 +1,3 @@
 {
-	"rely": "manage,pay,passport"
+	"rely": "manage,pay,passport,excel,survey"
 }

+ 1 - 1
service/database/order.php

@@ -96,7 +96,7 @@ return array
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
 			'list_name'	=> '问卷详情',
-			'list'		=> 'Dever::load("service/lib/manage.showQuestion", "{uid}", "{product_id}", "{id}")',
+			'list'		=> 'Dever::load("service/lib/manage.showQuestion", "{uid}", "{product_id}", "{id}", "{feedback_status}")',
 		),
 
 		'product_id'		=> array

+ 8 - 2
service/lib/Manage.php

@@ -57,10 +57,16 @@ class Manage
         }
     }
 
-    public function showQuestion($uid, $product_id, $order_id)
+    public function showQuestion($uid, $product_id, $order_id, $feedback_status)
     {
         $link = Dever::url('api.view&uid='.$uid.'&product_id=' . $product_id . '&order_id=' . $order_id, 'survey');
-        $html = '<a href="javascript:;" onclick="window.open(\''.$link.'\')">查看</a>';
+
+        if ($feedback_status == 1) {
+            $html = '';
+        } else {
+            $html = '<a href="javascript:;" onclick="window.open(\''.$link.'\')">查看</a>';
+        }
+        
 
         return $html;
         

+ 4 - 0
service/src/Api.php

@@ -192,6 +192,10 @@ class Api extends Base
 
         $this->data['feedback'] = Dever::db('service/feedback')->one($id);
 
+        if (isset($this->data['feedback']['product'])) {
+            $this->data['feedback']['product'] = Dever::array_decode($this->data['feedback']['product']);
+        }
+
         return $this->data;
     }