lizhen_gitee 2 anni fa
parent
commit
59f6cc2b28
1 ha cambiato i file con 30 aggiunte e 0 eliminazioni
  1. 30 0
      application/api/controller/Report.php

+ 30 - 0
application/api/controller/Report.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace app\api\controller;
+
+use app\common\controller\Api;
+use think\Db;
+/**
+ * 意见反馈
+ */
+class Report extends Api
+{
+
+    protected $noNeedLogin = [];
+    protected $noNeedRight = ['*'];
+
+    public function report(){
+        $data = [
+            'user_id' => $this->auth->id,
+            'title' => input('title',''),
+            'mobile' => input('mobile',''),
+            'images' => input('images',''),
+            'createtime' => time(),
+        ];
+
+        Db::name('report')->insertGetId($data);
+
+        $this->success('感谢您的反馈');
+    }
+
+}