|
@@ -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();
|