Commit c221503f authored by wuxiaoli's avatar wuxiaoli

no message

parent 97ba0644
Pipeline #763 canceled with stages
......@@ -408,7 +408,7 @@ class Friend extends Api{
$map['user_id'] = ['in',$ids];
}
$list = Db::name('fastim_user')->where(['user_id'=>['neq',$this->auth->id]])->where($map)->limit(30)->select();
$list = Db::name('fastim_user')->where(['user_id'=>['neq',$this->auth->id]])->where($map)->limit(6)->select();
$this->success('操作成功',['list' =>$list]);
}
......
......@@ -16,6 +16,7 @@ use \app\common\controller\Api;
use app\common\library\Redis\RedisMaster;
use app\common\library\wechat\WxUser;
use app\common\model\Config;
use app\lib\model\SurnameModel;
use EasyWeChat\Factory;
use fast\Random;
use \addons\fastim\library\Common as ImCommon;
......@@ -142,6 +143,7 @@ class Users extends Api
if($this->auth->village_id >0) {
$userinfo['addr_name']= Db::name("addr_village")->where(['village_code' => $this->auth->village_id])->field('province,city,county,town,village')->find();
}
$userinfo['Surname']=SurnameModel::where(['ID'=>$userinfo['surname_id']])->value("Surname");
$this->success('获取成功', ['userinfo' => $userinfo]);
}
......
......@@ -74,7 +74,7 @@ class UsersModel extends BaseModel {
}
public static function getUserinfo($id,$field = ['id', 'username', 'nickname', 'mobile', 'avatar', 'score', 'prevtime' ,'wx_openid', 'app_openid', 'unionid', 'money', 'level','is_shaikh','commission','agent_money', 'province_id', 'city_id','area_id','town_id','village_id','educational','work_experience']){
public static function getUserinfo($id,$field = ['id', 'username', 'nickname','surname_id','realname', 'mobile', 'avatar', 'score', 'prevtime' ,'wx_openid', 'app_openid', 'unionid', 'money', 'level','is_shaikh','commission','agent_money', 'province_id', 'city_id','area_id','town_id','village_id','educational','work_experience']){
return self::where(['id'=>$id])->field($field)->find();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment