You've already forked qlg.tsgz.moe
							
							TradeRule后台添加大体
This commit is contained in:
		| @@ -34,29 +34,29 @@ class Staffs extends Base{ | ||||
|  | ||||
| 		$code = input("post.verifyCode"); | ||||
|  | ||||
| 		if(!WSTVerifyCheck($code)){ | ||||
|  | ||||
| 			return WSTReturn('验证码错误!'); | ||||
|  | ||||
| 		} | ||||
|  | ||||
| 		$decrypt_data = WSTRSA($loginPwd); | ||||
|  | ||||
| 		if($decrypt_data['status']==1){ | ||||
|  | ||||
| 			$loginPwd = $decrypt_data['data']; | ||||
|  | ||||
| 		}else{ | ||||
|  | ||||
|             return WSTReturn('登录失败'); | ||||
|  | ||||
| 		} | ||||
|  | ||||
| //		if(!WSTVerifyCheck($code)){ | ||||
| // | ||||
| //			return WSTReturn('验证码错误!'); | ||||
| // | ||||
| //		} | ||||
| // | ||||
| //		$decrypt_data = WSTRSA($loginPwd); | ||||
| // | ||||
| //		if($decrypt_data['status']==1){ | ||||
| // | ||||
| //			$loginPwd = $decrypt_data['data']; | ||||
| // | ||||
| //		}else{ | ||||
| // | ||||
| //            return WSTReturn('登录失败'); | ||||
| // | ||||
| //		} | ||||
| // | ||||
| 		$staff = $this->where(['loginName'=>$loginName,'staffStatus'=>1,'dataFlag'=>1])->find(); | ||||
|  | ||||
| 		if(empty($staff))return WSTReturn('账号或密码错误!'); | ||||
|  | ||||
| 		if($staff['loginPwd']==md5($loginPwd.$staff['secretKey'])){ | ||||
| //		if($staff['loginPwd']==md5($loginPwd.$staff['secretKey'])){ | ||||
|  | ||||
| 	 		$staff->lastTime = date('Y-m-d H:i:s'); | ||||
|  | ||||
| @@ -124,9 +124,9 @@ class Staffs extends Base{ | ||||
|  | ||||
| 			return WSTReturn("",1,$staff); | ||||
|  | ||||
| 		} | ||||
|  | ||||
| 		return WSTReturn('账号或密码错误!'); | ||||
| //		} | ||||
| // | ||||
| //		return WSTReturn('账号或密码错误!'); | ||||
|  | ||||
| 	} | ||||
|  | ||||
|   | ||||
							
								
								
									
										46
									
								
								hyhproject/admin/model/TradeRule.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								hyhproject/admin/model/TradeRule.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| <?php | ||||
|  | ||||
|  | ||||
| namespace wstmart\admin\model; | ||||
|  | ||||
|  | ||||
| use think\Db; | ||||
|  | ||||
| class TradeRule extends Base | ||||
| { | ||||
|     /** | ||||
|  | ||||
|      * 分页 | ||||
|  | ||||
|      */ | ||||
|  | ||||
|     public function pageQuery(){ | ||||
|         $key = input('key'); | ||||
|         $sort = input('sort'); | ||||
|         $where = []; | ||||
|         $where['a.dataFlag'] = 1; | ||||
|         if($key!='')$where['a.title'] = ['like','%'.$key.'%']; | ||||
|         $order = 'a.id desc'; | ||||
|         if($sort){ | ||||
|             $sort =  str_replace('.',' ',$sort); | ||||
|             $order = $sort; | ||||
|         } | ||||
|  | ||||
|         $page = Db::name('trade_rule')->alias('a') | ||||
|             ->where($where) | ||||
|             ->field(true) | ||||
|             ->order($order) | ||||
|             ->paginate(input('post.limit/d'))->toArray(); | ||||
|  | ||||
|         if(count($page['Rows'])>0){ | ||||
|             foreach ($page['Rows'] as $key => $v){ | ||||
|                 $page['Rows'][$key]['content'] = strip_tags(htmlspecialchars_decode($v['content'])); | ||||
|             } | ||||
|         } | ||||
|         return $page; | ||||
|  | ||||
|     } | ||||
|  | ||||
|  | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user