Ver código fonte

成为主播

zhangxiaobin 1 ano atrás
pai
commit
eda21ebcac
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      application/api/controller/Usercenter.php

+ 4 - 2
application/api/controller/Usercenter.php

@@ -614,15 +614,17 @@ class UserCenter extends Common
      * 主播申请
      */
     public function anchorApply() {
-        $type_id = $this->request->request('type_id'); // 技能分类ID
+        $type_id = $this->request->request('type_id',0); // 技能分类ID
+        $party_type_id = $this->request->request('party_type_id'); //分类ID
         $desc = $this->request->request('desc'); // 申请备注
-        if (!$type_id && !$desc) {
+        if (!$party_type_id && !$desc) {
             $this->error(__('Invalid parameters'));
         }
         $useranchorModel = new \app\common\model\UserAnchor();
         $data = [];
         $data["user_id"] = $this->auth->id;
         $data["type_id"] = $type_id;
+        $data["party_type_id"] = $party_type_id;
         if($useranchorModel->where($data)->find()) $this->error(__('您已申请过该类型的主播,请勿重复申请!'));
         $data["desc"] = $desc;
         $data["createtime"] = time();