初始化代码
This commit is contained in:
31
application/admin/controller/UserPack.php
Normal file
31
application/admin/controller/UserPack.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class UserPack extends Common
|
||||
{
|
||||
|
||||
|
||||
//获取系统配置
|
||||
public function add_user_pack_gift()
|
||||
{
|
||||
$password = input('secondary_password', '');
|
||||
$aid = $this->aid;
|
||||
$uid = input('uid', 0);
|
||||
$num = input('num', 0);
|
||||
$gid = input('gid', 0);
|
||||
$res = model('Admin')->check_secondary_password($password);
|
||||
if($res['code'] == 201) {
|
||||
return ajaxReturn(201, '二级密码错误', null);
|
||||
}
|
||||
$result = model('UserPack')->add_user_pack_gift($aid, $uid, $gid, $num);
|
||||
return ajaxReturn($result['code'], $result['msg'], null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user