SDK菜单添加平台选型

master
Your Name 5 years ago
parent 879accf9f5
commit 51701a485d

@ -10,6 +10,12 @@ class SdkMenuController extends ThinkController{
'2' => '外部链接',
];
public $menu_version = [
'0' => '双平台',
'1' => '安卓',
'2' => 'ios',
];
public function lists()
{
$menu_name = I('get.menu_name','sdk_menu');
@ -21,6 +27,7 @@ class SdkMenuController extends ThinkController{
{
$config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
$config[$k]['type'] = $this->but_type[$v['type']];
$config[$k]['menu_version'] = $this->menu_version[$v['menu_version']];
}
}
$this->assign('list',$config);
@ -70,6 +77,7 @@ class SdkMenuController extends ThinkController{
$this->assign('data',$data);
$this->assign('menu_name',$menu_name);
$this->assign('but_type',$this->but_type);
$this->assign('menu_version',$this->menu_version);
$this->display('add');
}
@ -121,6 +129,7 @@ class SdkMenuController extends ThinkController{
$this->assign('data',$data);
$this->assign('menu_name',$menu_name);
$this->assign('but_type',$this->but_type);
$this->assign('menu_version',$this->menu_version);
$this->display('add');
}

@ -31,6 +31,23 @@
<input type="text" class="" name="title" value="{$data.title|default=''}" >
</td>
</tr>
<tr>
<td class="l noticeinfo">平台</td>
<td class="r table_radio">
<span class="form_select">
<select name="menu_version">
<foreach name="menu_version" item="vo" key="k">
<if condition="$data['menu_version'] == $k">
<option value="{$k}" selected="selected">{$vo}</option>
<else />
<option value="{$k}">{$vo}</option>
</if>
</foreach>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">菜单链接</td>
<td class="r table_radio">

@ -35,6 +35,7 @@
<th style="text-align:center">ID</th>
<th style="text-align:center">菜单名称</th>
<th style="text-align:center">菜单标题</th>
<th style="text-align:center">平台</th>
<th style="text-align:center">菜单图标</th>
<th style="text-align:center">菜单链接</th>
<th style="text-align:center">url类型</th>
@ -52,6 +53,7 @@
<td>{$channel.id}</td>
<td>{$channel.name}</td>
<td>{$channel.title}</td>
<td>{$channel.menu_version}</td>
<td><img src="{$channel.icon}"></td>
<td>{$channel.url}</td>
<td>{$channel.type}</td>

Loading…
Cancel
Save