You've already forked qlg.tsgz.moe
							
							Init Repo
This commit is contained in:
		
							
								
								
									
										23
									
								
								hyhproject/common/model/Addons.php
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								hyhproject/common/model/Addons.php
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?php | ||||
| namespace wstmart\common\model; | ||||
| /** | ||||
|  * ============================================================================ | ||||
|  * 插件类 | ||||
|  */ | ||||
| class Addons extends Base{ | ||||
|     | ||||
| 	public function getAddonsMaps(){ | ||||
| 		$addons = cache('WST_ADDONS_MAPS'); | ||||
| 		if(!$addons){ | ||||
| 			$list = $this->where(["dataFlag"=>1])->field("name,title")->select(); | ||||
| 			$addons = array(); | ||||
| 			for($i=0,$j=count($list);$i<$j;$i++){ | ||||
| 				$addon = $list[$i]; | ||||
| 				$addons[strtolower($addon["name"])] = $addon["title"]; | ||||
| 			} | ||||
| 			cache('WST_ADDONS_MAPS',$addons,86400); | ||||
| 		} | ||||
| 		return $addons; | ||||
| 	} | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user