yzx 6 maanden geleden
bovenliggende
commit
df30ce2b50

+ 16 - 11
app/admin/controller/Admin.php

@@ -46,21 +46,25 @@ class Admin extends BaseController
             $admin_permission = Db::name('admin')->where('id', $id)->value('permission');
             // halt($unit_name);
             $param = get_params();
-
+            $where = array();
             if (!empty($param['keywords'])) {
-                $where[] = ['id|username|nickname|desc|mobile', 'like', '%' . $param['keywords'] . '%'];
+                $where[] = ['nickname', 'like', '%'.$param['keywords'].'%'];
+                $where[] = ['username', 'like', '%'.$param['keywords'].'%'];
+                $where[] = ['mobile', 'like', '%'.$param['keywords'].'%'];
+                $where[] = ['nickname', '=', $param['keywords']];
+                $where[] = ['username', '=', $param['keywords']];
+                $where[] = ['mobile', '=', $param['keywords']];
             }
-
-            $where = array();
+            // halt($where);
             $permission = array();
-            $where[] = ['status', '>=', 0];
             if($admin_permission == 0){
-                $permission[] = ['unit_name', '=',$unit_name];
+                $permission[] = ['unit_name', '=', $unit_name];
             }
-
             $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
-            $admin = AdminList::where($where)->with('Department')
+            // halt($where,$admin_permission);
+            $admin = AdminList::whereOr($where)->with('Department')
                 ->where($permission)
+                ->where('status', '>=', 0)
                 ->order('create_time asc')
                 ->paginate($rows, false, ['query' => $param])
                 ->each(function ($item, $key) {
@@ -87,9 +91,6 @@ class Admin extends BaseController
     {
         if (request()->isAjax()) {
             $param = get_params();
-            if (!preg_match('/^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/', $param['pwd'])) {
-                return to_assign(1, '密码必须至少包含8个字符,含有大小写字母、数字和特殊字符!');
-            }
             // halt($param);
             if (!empty($param['id']) && $param['id'] > 0) { //对已存在账号的编辑
                 try {
@@ -98,6 +99,8 @@ class Admin extends BaseController
                     // 验证失败 输出错误信息
                     return to_assign(1, $e->getError());
                 }
+                // halt($param['edit_pwd'],validate(AdminCheck::class)->scene('edit')->check($param));
+
                 if (!empty($param['edit_pwd'])) {
                     //重置密码
                     if (empty($param['edit_pwd_confirm']) or $param['edit_pwd_confirm'] !== $param['edit_pwd']) {
@@ -107,6 +110,8 @@ class Admin extends BaseController
                     $param['salt'] = set_salt(20);
                     $param['pwd'] = set_password($param['edit_pwd'], $param['salt']);
                 }
+                // halt($param['id'],validate(AdminCheck::class)->scene('edit')->check($param));
+
                 // halt($param);
                 // 启动事务
                 Db::startTrans();

+ 0 - 0
app/admin/view/Basemsg/index.html → app/admin/view/basemsg/index.html


+ 9 - 2
app/admin/view/project/cost/read.html

@@ -428,6 +428,9 @@
                 项目动态
             </li>
             {/if}
+
+            <li data-load="" data-id="9">共享项目</li>
+
         </ul>
 
         <div class="layui-tab-content" style="padding: 16px;">
@@ -466,7 +469,7 @@
             {/if}
             
              <div class="layui-tab-item">
-                {include file="/project/cost/project_appointment" /}
+                {include file="/project/cost/ " /}
             </div>
             
             {if $project_five.project_log == 1}
@@ -474,7 +477,11 @@
                 {include file="/project/projectlog/index" /}
             </div>
             {/if}
-            
+
+            <div class="layui-tab-item">
+                {include file="/project/projectlog/index" /}
+            </div>
+
         </div>
     
 </div>

+ 1 - 0
app/mobile/controller/Index.php

@@ -356,6 +356,7 @@ class Index
                         ["project_status", '>', 0],
                     ]);
                 })
+
                 ->select();
         }else{
             $data = Db::name("cost_project")->where($where)->select();

File diff suppressed because it is too large
+ 6 - 0
public/static/home/js/qrcode.js


Some files were not shown because too many files changed in this diff