mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-27 02:12:08 +08:00 
			
		
		
		
	修改图片管理
This commit is contained in:
		
							parent
							
								
									2c882556e9
								
							
						
					
					
						commit
						a8ae372842
					
				| @ -42,6 +42,14 @@ class Slider extends Controller | ||||
|     protected function initialize() | ||||
|     { | ||||
|         $this->types = SystemBase::mk()->items($this->type); | ||||
|         foreach ($this->types as &$type) { | ||||
|             if (preg_match('/^(.*?)#(\d+)$/', $type['name'], $matches)) { | ||||
|                 $type['name'] = $matches[1]; | ||||
|                 $type['number'] = $matches[2]; | ||||
|             } else { | ||||
|                 $type['number'] = 0; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
| @ -67,7 +75,7 @@ class Slider extends Controller | ||||
|         $this->skey = input('get.type', ''); | ||||
|         $this->base = $this->types[$this->skey] ?? []; | ||||
|         if (empty($this->base)) $this->error('未配置基础数据!'); | ||||
|         $this->number = 10; | ||||
|         $this->number = $this->base['number']; | ||||
|         $this->sysdata(); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -2,13 +2,13 @@ | ||||
| 
 | ||||
| {block name='content'} | ||||
| <div class="think-box-notify">温馨提示:如需添加新内容,需要在系统管理的基础数据添加类型为 “<b>{$type|default=''}</b>” 的基础数据。</div> | ||||
| <div class="layui-row layui-col-space20 portal-block-container notselect"> | ||||
| <div class="layui-row layui-col-space20 portal-block-container notselect margin-top-10"> | ||||
|     {foreach $types as $key=>$type} | ||||
|     <div class="layui-col-sm4 layui-col-md4 layui-col-lg3"> | ||||
|         <!--{if auth('edit')}--> | ||||
|         <div class="pointer" data-open="{:url('edit')}?type={$key}"> | ||||
|             <div class="portal-block-item nowrap think-bg-violet"> | ||||
|                 <div class="font-s14">编辑页面</div> | ||||
|                 <div class="font-s14">编辑图片</div> | ||||
|                 <div class="font-s16">{$type.name|default=''}</div> | ||||
|             </div> | ||||
|             <i class="portal-block-icon layui-icon layui-icon-carousel"></i> | ||||
| @ -16,7 +16,7 @@ | ||||
|         <!--{else}--> | ||||
|         <div> | ||||
|             <div class="portal-block-item nowrap think-bg-violet"> | ||||
|                 <div class="font-s14">编辑页面</div> | ||||
|                 <div class="font-s14">编辑图片</div> | ||||
|                 <div class="font-s16">{$type.name|default=''}</div> | ||||
|             </div> | ||||
|             <i class="portal-block-icon layui-icon layui-icon-carousel"></i> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user