AboutUsModel.php 405 B

12345678910111213141516171819
  1. <?php
  2. namespace app\api\Model;
  3. use think\Model;
  4. class AboutUsModel extends Model
  5. {
  6. protected $name = 'about_us';
  7. public function index()
  8. {
  9. $data = $this->alias('a')->find();
  10. if ($data) {
  11. return json(['data' => $data, 'msg' => '', 'code' => 200]);
  12. } else {
  13. return json(['data' => [], 'msg' => '暂无信息', 'code' => 100]);
  14. }
  15. }
  16. }