12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\index\controller;
- use think\exception\ValidateException;
- use app\model\Lang;
- class LangController extends Base
- {
- public function index()
- {
- $where['weid'] = weid();
- $where['status'] = 1;
- $listdata = Lang::where($where)
- ->order('sort asc')
- ->select()
- ->toArray();
- foreach ($listdata as $key => $vo) {
- $data[$vo['item']] = $vo['title'];
- }
- return $this->json(['data' => $data]);
- }
- }
|