...
|
...
|
@@ -295,6 +295,7 @@ class LoginController extends Controller{ |
|
|
* @author panhaowen
|
|
|
* @url /user/login/userIndex
|
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
* @param name:param type:array require:0 desc:搜索条件(user_login,mobile,user_type)
|
|
|
* @return data:用户数据
|
|
|
*/
|
...
|
...
|
@@ -309,10 +310,43 @@ class LoginController extends Controller{ |
|
|
$where['mobile']=['like','%'.$param['mobile'].'%'];
|
|
|
}
|
|
|
$where['user_type']=empty($param['user_type'])?1:$param['user_type'];
|
|
|
$data=Db::name('user')->where($where)->field('id,user_type,user_login,mobile,money,qq,wx,parent_id')->paginate(1)->each(function ($item) {
|
|
|
$data=Db::name('user')->where($where)->field('id,user_type,user_login,mobile,money,qq,wx,parent_id')->paginate(10)->each(function ($item) {
|
|
|
$item['parent_id'] = Db::name('user') ->where('id',$item['parent_id'])->find()['user_login'];
|
|
|
return $item;
|
|
|
});
|
|
|
$this->success('用户数据',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @title 资料设置
|
|
|
* @description 资料设置接口
|
|
|
* @author panhaowen
|
|
|
* @url /user/login/config
|
|
|
* @method POST
|
|
|
* @return data:资料
|
|
|
*/
|
|
|
public function config()
|
|
|
{
|
|
|
$data=Db::name('config')->where('id',1)->find();
|
|
|
$this->success('资料',$data);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @title 资料设置提交
|
|
|
* @description 资料设置提交接口
|
|
|
* @author panhaowen
|
|
|
* @url /user/login/configPost
|
|
|
* @method POST
|
|
|
* @param name:zhifubao type:varchar require:1 desc:支付宝账号
|
|
|
* @param name:name type:varchar require:1 desc:收款人姓名
|
|
|
*/
|
|
|
public function configPost()
|
|
|
{
|
|
|
$param=$this->request->param();
|
|
|
$data=Db::name('config')->where('id',1)->update($param);
|
|
|
$this->success('操作成功');
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|