$body['mac'] ?? "", "localid" => $body['localid'] ?? "", "desc" => $body['desc'] ?? "", "ver" => $body['v'] ?? "", "ip" => $this->request->ip(), "createtime" => time(), "sys" => $body['sys'] ?? "", "cpu" => $body['cpu'] ?? "", "oem" => $body['oem'] ?? "", "app" => $body['app'] ?? "", // "dev_type" => $body['dev_type'] ?? "", ]; $install_log = new \app\admin\model\install\Log; $install_log->save($post); break; case '2': # 卸载 $post = [ "mac" => $body['mac'] ?? "", "localid" => $body['localid'] ?? "", "desc" => $body['desc'] ?? "", "ver" => $body['v'] ?? "", "ip" => $this->request->ip(), "createtime" => time(), "sys" => $body['sys'] ?? "", "cpu" => $body['cpu'] ?? "", "oem" => $body['oem'] ?? "", "app" => $body['app'] ?? "", // "dev_type" => $body['dev_type'] ?? "", ]; $uninstalll_log = new \app\admin\model\uninstall\Log; $uninstalll_log->save($post); break; case '3': # 崩溃 $post = [ "mac" => $body['mac'] ?? "", "localid" => $body['localid'] ?? "", "crashaddress" => $body['crashaddress'] ?? "", "crash_data" => $body['crash_data'] ?? "", "desc" => $body['desc'] ?? "", "ver" => $body['v'] ?? "", "ip" => $this->request->ip(), "createtime" => time(), "sys" => $body['sys'] ?? "", "cpu" => $body['cpu'] ?? "", "oem" => $body['oem'] ?? "", "app" => $body['app'] ?? "", // "dev_type" => $body['dev_type'] ?? "", ]; $collapse_log = new \app\admin\model\collapse\Log; $collapse_log->save($post); break; case '4': # 用户反馈 $post = [ "mac" => $body['mac'] ?? "", "localid" => $body['localid'] ?? "", "content" => $body['content'] ?? "", "contact" => $body['contact'] ?? "", "ver" => $body['v'] ?? "", "desc" => $body['desc'] ?? "", "ip" => $this->request->ip(), "createtime" => time(), "sys" => $body['sys'] ?? "", "cpu" => $body['cpu'] ?? "", "oem" => $body['oem'] ?? "", "app" => $body['app'] ?? "", // "dev_type" => $body['dev_type'] ?? "", ]; $collapse_log = new \app\admin\model\feedback\Log; $collapse_log->save($post); break; default: # code... break; } } $this->success('success', ''); } }