TextreplaceController.php 515 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\index\controller;
  3. use think\exception\ValidateException;
  4. use app\model\Lang;
  5. class LangController extends Base
  6. {
  7. public function index()
  8. {
  9. $where['weid'] = weid();
  10. $where['status'] = 1;
  11. $listdata = Lang::where($where)
  12. ->order('sort asc')
  13. ->select()
  14. ->toArray();
  15. foreach ($listdata as $key => $vo) {
  16. $data[$vo['item']] = $vo['title'];
  17. }
  18. return $this->json(['data' => $data]);
  19. }
  20. }