作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

合并分支 'heshupeng' 到 'master'

Heshupeng



查看合并请求 !235
... ... @@ -403,7 +403,8 @@ class Index extends Api
"study": [{ //学习平台入口
"title": "天津市二级建造师课程", //标题
"image": "http://qizhibang.brotop.cn/uploads/20210127/Fowbl73z1EpqVj0cBILbJL06myDf.png", //图片
"type_id": 3 //科目分类ID
"type_id": 3, //科目分类ID
"is_enter": 1 //是否可进入:0=否,1=是
}],
"class": { //优选课程入口
"title": "2020版一建二建课程" //标题
... ... @@ -424,6 +425,13 @@ class Index extends Api
->select();
foreach ($study as &$v){
$v['image'] = cdnurl($v['image'],true);
$list = Db::name('study')
->alias('a')
->join('third_study b','b.study_id = a.id')
->where('a.type_id',$v['type_id'])
->where('b.third_id',$this->auth->id)
->select();
$v['is_enter'] = count($list) > 0 ? 1 : 0;
}
// 优选课程入口
$class = Db::name('enter_class')->where('id',1)->field('title')->find();
... ...
... ... @@ -124,17 +124,21 @@ class User extends Api
}
}
$data = Db::name('user')->where('id',$user_id)->find();
if(empty($data['image'])){
Db::name('user')
->where('id',$user_id)
->update(['nickname'=>$nickname,'sex'=>$sex,'card'=>$card,'work_address'=>$work_address,'phone'=>$phone,'image'=>$image]);
}else{
$params = [];
if($sex){
$params['sex'] = $sex;
}
if($phone){
$params['phone'] = $phone;
}
if(empty($data['image']) && $image){
$params['image'] = $image;
}
if($params){
Db::name('user')
->where('id',$user_id)
->update(['nickname'=>$nickname,'sex'=>$sex,'card'=>$card,'work_address'=>$work_address,'phone'=>$phone]);
->update($params);
}
$this->success('success');
}
... ...
open_basedir=/www/wwwroot/admin.022jgzj.com/:/tmp/:/proc/
\ No newline at end of file