where(['text_no' => $text_no])->order('id','asc')->select(); $list[0]['name'] = $name; return json_encode($list); } /** * 添加 */ public function add(array $data, string $text_no) { //重组数据 for($n=0;$nsaveAll($data); } /** * 添加 */ public function edit(array $data) { return $this->saveAll($data) !== false; } }