作者 lyh
... ... @@ -65,6 +65,7 @@ class CNoticeController extends BaseController
if($domain_info){
//判断是否已有更新进行中
$notify_model = new Notify();
$type = $is_sitemap == 1 ? Notify::TYPE_ALL_SITEMAP : $type;
$data = [
'project_id' => $project_id,
'type' => $type,
... ... @@ -90,6 +91,7 @@ class CNoticeController extends BaseController
$data['data'] = Arr::a2s(['domain'=>$domain,'url'=>$url,'language'=>$language]);
$data['status'] = $is_sitemap == 1 ? Notify::STATUS_FINISH_PAGE : Notify::STATUS_INIT;
$data['is_pull_html_zip'] = $is_sitemap == 1 ? Notify::IS_PULL_HTML_ZIP_TRUE : Notify::IS_PULL_HTML_ZIP_FALSE;
$notify_model->add($data);
}
}
... ...
... ... @@ -273,6 +273,10 @@ class LoginController extends BaseController
$dept_user->user_id = $user->id;
$dept_user->save();
}
$data = [
'user_id'=>$user['id'],
'manager_id'=>0,
];
}else{
//有from_order_id, 找到对应的项目并登录对应账号
$project = (new Project())->read(['from_order_id'=>$arr['from_order_id'], 'delete_status' => Project::IS_DEL_FALSE]);
... ... @@ -281,13 +285,18 @@ class LoginController extends BaseController
}
$user = (new User())->where('project_id', $project['id'])->where('mobile', $arr['phone'])->first();
if(!$user){
$this->response('账号不存在,请联系管理员',Code::USER_ERROR);
}
}
$data = [
'project_id'=>$project['id'],
'manager_id'=>0,
];
}else{
$data = [
'user_id'=>$user['id'],
'manager_id'=>0,
];
}
}
$info = $logic->autologin($data);
$this->response('success',Code::SUCCESS,['info'=>$info]);
}
... ...
... ... @@ -18,11 +18,12 @@ class Notify extends Base
const STATUS_ERROR = 9;
/**
* 类型 1:主站, 2:小语种, 3:amp
* 类型 1:主站, 2:小语种, 3:amp,4:sitemap
*/
const TYPE_MASTER = 1;
const TYPE_MINOR = 2;
const TYPE_AMP = 3;
const TYPE_ALL_SITEMAP = 4;
/**
* 路由
... ... @@ -41,6 +42,14 @@ class Notify extends Base
const ROUTE_PRODUCT_VIDEO_KEYWORD = 6;
/**
* 是否拉取HTML压缩包
* 0:默认不拉取
* 1:拉取
*/
const IS_PULL_HTML_ZIP_FALSE = 0;
const IS_PULL_HTML_ZIP_TRUE = 1;
/**
* 类型
* @return array
*/
... ...