$this->auth->id, 'title' => '签到', ]; $find = model('wechat_autoreply')->where($where)->find(); if ($this->request->isPost()) { $data = json_decode($this->request->param('data'), true); $result = ReplyVipService::instance()->createSignReply($data, $this->auth->id); if ($result->code == ErrorCodeConstants::SUCCESS) { $this->success(); } else { $this->error($result->msg); } } if ($find && $find['text_content'] != '') { $data = json_decode($find['text_content'], true); if ($data['deploy_type'] == SubscribeDelayConstants::VIP_DEPLOY_GROUP) { $groupList = model('vip_group')->whereIn('id', $data['admin_group'])->column('id,id,name,createtime,updatetime'); foreach($data['admin_group'] as $groupId){ if (array_key_exists($groupId, $groupList)) { $data['selected'][$groupId] = $groupList[$groupId]; } } } if ($find['status'] == 'hidden') { $data['text'] = '[]'; $data['type'] = 1; } } else { $data = [ 'text' => '[]', 'type' => 1, 'text_split' => '', ]; } $this->assignconfig($data); return $this->view->fetch(); } }