浏览代码

关闭政策入口,企业用户登录自动替换中英文括号来匹配账号,直认恢复5种来源

sugangqiang 2 年之前
父节点
当前提交
6d1d3a35ed

+ 1 - 0
app/admin/controller/Policy.php

@@ -23,6 +23,7 @@ class Policy extends AdminController {
     public function __construct(\think\App $app) {
         parent::__construct($app);
         $this->companyId = $this->user["companyId"];
+        return json(["msg" => "政策录入已经结束"]);
     }
 
     public function index() {

+ 6 - 1
app/common/api/UserApi.php

@@ -29,7 +29,12 @@ class UserApi {
         switch ($usertype) {
             case 2:
                 //企业
-                $user = Enterprise::where(['username' => $username])->findOrEmpty();
+                $where = [];
+                $name1 = str_replace(["(", ")"], ["(", ")"], $username);
+                $name2 = str_replace(["(", ")"], ["(", ")"], $username);
+                $where[] = ["username", "=", $name1];
+                $where[] = ["username", "=", $name2];
+                $user = Enterprise::whereOr($where)->findOrEmpty();
                 break;
             case 3:
                 //个人

+ 2 - 2
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -1175,8 +1175,8 @@ $(function () {
     Feng.findChildDictBatch(JSON.stringify(arr));
 
     if (!TalentInfoInfoDlg.isImport() || !TalentInfoInfoDlg.isZhiRen()) {
-        $("#source option[value=1]").css("display", "none");
-        $("#source option[value=2]").css("display", "none");
+        //$("#source option[value=1]").css("display", "none");
+        //$("#source option[value=2]").css("display", "none");
     }
     if (TalentInfoInfoDlg.isImport() && TalentInfoInfoDlg.isZhiRen()) {
         $("#source option[value=3]").css("display", "none");