281 lines
30 KiB
PHP
Executable File
281 lines
30 KiB
PHP
Executable File
<?php /*a:6:{s:80:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/applet/center/index.html";i:1700553054;s:67:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/layout/food.html";i:1700553054;s:53:"../addons/upload/view/template/tpl_file_item_url.html";i:1700552721;s:48:"../addons/upload/view/template/file_library.html";i:1700552721;s:78:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/applet/center/add.html";i:1700553054;s:79:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/applet/center/edit.html";i:1700553054;}*/ ?>
|
||
<!DOCTYPE html>
|
||
|
||
<html lang="en">
|
||
|
||
<head>
|
||
|
||
<meta charset="utf-8"/>
|
||
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||
|
||
<title><?php echo htmlentities($app_name); ?>管理后台</title>
|
||
|
||
<meta name="author" content="<?php echo htmlentities($web['name']); ?>">
|
||
|
||
<meta name="keywords" content="<?php echo htmlentities($web['keywords']); ?>">
|
||
|
||
<meta name="description" content="<?php echo htmlentities($web['description']); ?>">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
||
<meta name="referrer" content="no-referrer-when-downgrade">
|
||
|
||
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||
|
||
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
||
|
||
<link rel="stylesheet" href="/assets/plugins/amazeui/amazeui.css?v=<?php echo htmlentities($version); ?>"/>
|
||
|
||
<link rel="stylesheet" href="/assets/css/hema.app.css?v=<?php echo htmlentities($version); ?>"/>
|
||
|
||
<link rel="stylesheet" href="/addons/upload/css/file.library.css?v=<?php echo htmlentities($version); ?>"/>
|
||
|
||
<script src="/assets/plugins/jquery/jquery.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<link rel="stylesheet" href="/assets/plugins/iconfont/iconfont.css?v=<?php echo htmlentities($version); ?>">
|
||
|
||
<script src="/assets/plugins/iconfont/iconfont.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script>
|
||
|
||
BASE_URL = "<?php echo isset($base_url) ? $base_url : ''; ?>";
|
||
|
||
STORE_URL = "<?php echo isset($store_url) ? $store_url : ''; ?>";
|
||
|
||
APPLET_ID = "<?php echo isset($applet_id) ? $applet_id : 0; ?>";
|
||
|
||
</script>
|
||
|
||
</head>
|
||
|
||
|
||
|
||
<body data-type="">
|
||
|
||
<div class="am-g tpl-g">
|
||
|
||
<!-- 头部 -->
|
||
|
||
<header class="tpl-header">
|
||
|
||
<!-- 右侧内容 -->
|
||
|
||
<div class="tpl-header-fluid">
|
||
|
||
<!-- 侧边切换 -->
|
||
|
||
<div class="am-fl tpl-header-button switch-button">
|
||
|
||
<i class="iconfont iconzhedie"></i>
|
||
|
||
</div>
|
||
|
||
<!-- 刷新页面 -->
|
||
|
||
<div class="am-fl tpl-header-button refresh-button">
|
||
|
||
<i class="iconfont iconshuaxin"></i>
|
||
|
||
</div>
|
||
|
||
<!-- 超链接-->
|
||
|
||
<div class="am-fl tpl-header-navbar">
|
||
|
||
<ul>
|
||
|
||
<!-- 网站首页 -->
|
||
|
||
<li class="am-text-sm">
|
||
|
||
<a href="/">
|
||
|
||
<i class="iconfont iconshouye"></i> 网站首页
|
||
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<!-- 其它功能-->
|
||
|
||
<div class="am-fr tpl-header-navbar">
|
||
|
||
<ul>
|
||
|
||
<li class="am-text-sm">
|
||
|
||
<div class="am-dropdown" data-am-dropdown="{boundary: '.am-topbar'}">
|
||
|
||
<div class="am-topbar-btn am-dropdown-toggle" data-am-dropdown-toggle>
|
||
|
||
<img src="<?php echo htmlentities($user['user']['avatar']); ?>" />
|
||
|
||
<?php echo htmlentities($user['user']['user_name']); ?>
|
||
|
||
<span class="am-icon-caret-down"></span>
|
||
|
||
</div>
|
||
|
||
<ul class="am-dropdown-content">
|
||
|
||
<li><a href="/user">用户中心</a></li>
|
||
|
||
<li><a href="/store/<?php echo htmlentities($app_type); ?>.setting/renew">修改密码</a></li>
|
||
|
||
<li><a href="/store/passport/<?php echo htmlentities($logout); ?>?app_type=<?php echo htmlentities($app_type); ?>">安全退出</a></li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</header>
|
||
|
||
<!-- 侧边导航栏 -->
|
||
|
||
<div class="left-sidebar dis-flex">
|
||
|
||
<!-- 一级菜单 -->
|
||
|
||
<ul class="sidebar-nav">
|
||
|
||
<li class="sidebar-nav-heading"><?php echo htmlentities($app_name); ?> <small>V<?php echo htmlentities((isset($version) && ($version !== '')?$version:'1.0.0')); ?></small></li>
|
||
|
||
<?php foreach($menus as $key => $item): ?>
|
||
|
||
<li class="sidebar-nav-link">
|
||
|
||
<a href="<?php echo isset($item['index'])?url($item['index']):'javascript:void(0);'; ?>"
|
||
|
||
class="<?php echo !empty($item['active']) ? 'active' : ''; ?>">
|
||
|
||
<?php if(isset($item['is_svg']) && $item['is_svg'] === true): ?>
|
||
|
||
<svg class="icon sidebar-nav-link-logo" aria-hidden="true">
|
||
|
||
<use xlink:href="#<?php echo htmlentities($item['icon']); ?>"></use>
|
||
|
||
</svg>
|
||
|
||
<?php else: ?>
|
||
|
||
<i class="iconfont sidebar-nav-link-logo <?= $item['icon'] ?>"
|
||
|
||
style="color:<?php echo isset($item['color'])?$item['color']:''; ?>;"></i>
|
||
|
||
<?php endif; ?>
|
||
|
||
<?php echo htmlentities($item['name']); ?>
|
||
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<?php endforeach; ?>
|
||
|
||
</ul>
|
||
|
||
<!-- 子级菜单-->
|
||
|
||
<?php $second = isset($menus[$group]['submenu']) ? $menus[$group]['submenu'] : []; if(!empty($second)): ?>
|
||
|
||
<ul class="left-sidebar-second">
|
||
|
||
<li class="sidebar-second-title"><?php echo htmlentities($menus[$group]['name']); ?></li>
|
||
|
||
<li class="sidebar-second-item">
|
||
|
||
<?php foreach($second as $item): if(!isset($item['submenu'])): ?>
|
||
|
||
<!-- 二级菜单-->
|
||
|
||
<a href="<?= url($item['index']) ?>" class="<?= $item['active'] ? 'active' : '' ?>">
|
||
|
||
<?= $item['name']; ?>
|
||
|
||
</a>
|
||
|
||
<?php else: ?>
|
||
|
||
<!-- 三级菜单-->
|
||
|
||
<div class="sidebar-third-item">
|
||
|
||
<a href="javascript:void(0);"
|
||
|
||
class="sidebar-nav-sub-title <?php echo !empty($item['active']) ? 'active' : ''; ?>">
|
||
|
||
<i class="iconfont icongengduo"></i>
|
||
|
||
<?php echo htmlentities($item['name']); ?>
|
||
|
||
</a>
|
||
|
||
<ul class="sidebar-third-nav-sub">
|
||
|
||
<?php foreach($item['submenu'] as $third): ?>
|
||
|
||
<li>
|
||
|
||
<a class="<?php echo !empty($third['active']) ? 'active' : ''; ?>"
|
||
|
||
href="<?php echo url($third['index']); ?>">
|
||
|
||
<?php echo htmlentities($third['name']); ?>
|
||
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<?php endforeach; ?>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<?php endif; ?>
|
||
|
||
<?php endforeach; ?>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
<?php endif; ?>
|
||
|
||
</div>
|
||
|
||
<!-- 内容区域 start -->
|
||
|
||
<div class="tpl-content-wrapper <?php echo empty($second) ? 'no-sidebar-second' : ''; ?>">
|
||
|
||
|
||
|
||
<div class="row-content am-cf">
|
||
|
||
<div class="row">
|
||
|
||
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
|
||
|
||
<div class="widget am-cf">
|
||
|
||
<form id="myform" class="am-form tpl-form-line-form" method="post">
|
||
<fieldset>
|
||
<div class="widget-head am-cf">
|
||
|
||
<div class="widget-title am-fl">用户中心设置</div>
|
||
|
||
</div>
|
||
<div class="widget-body">
|
||
<div class="am-form-group">
|
||
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">会员卡 </label>
|
||
|
||
<div class="am-u-sm-9 am-u-end">
|
||
|
||
<label class="am-radio-inline">
|
||
|
||
<input type="radio" v-model="model.vip" name="data[vip]" value="1" data-am-ucheck>
|
||
显示
|
||
|
||
</label>
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.vip" name="data[vip]" value="0" data-am-ucheck>
|
||
隐藏
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">权限设置 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.setting" name="data[setting]" value="1" data-am-ucheck>
|
||
显示
|
||
</label>
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.setting" name="data[setting]" value="0" data-am-ucheck>
|
||
隐藏
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">商家助手 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.helper" name="data[helper]" value="1" data-am-ucheck>
|
||
显示
|
||
</label>
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.helper" name="data[helper]" value="0" data-am-ucheck>
|
||
隐藏
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系我们 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.contact.is_open" name="data[contact][is_open]" value="1" data-am-ucheck>
|
||
显示
|
||
</label>
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.contact.is_open" name="data[contact][is_open]" value="0" data-am-ucheck>
|
||
隐藏
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div v-if="model.contact.is_open == 1">
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系方式 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.contact.type" name="data[contact][type]" value="wechat" data-am-ucheck>
|
||
微信客服
|
||
</label>
|
||
<label class="am-radio-inline">
|
||
<input type="radio" v-model="model.contact.type" name="data[contact][type]" value="phone" data-am-ucheck>
|
||
电话号码
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div v-if="model.contact.type == 'phone'" class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 电话号码 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="text" class="tpl-form-input" v-model="model.contact.phone" name="data[contact][phone]" placeholder="请输入联系电话" required>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label">菜单列表</label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<div style="padding-bottom:20px">
|
||
<button type="button" class="hema-add am-btn am-btn-primary am-radius am-btn-xs">
|
||
<i class="am-icon-plus"></i> 添加菜单
|
||
</button>
|
||
</div>
|
||
<div v-if="model.menu.length > 0">
|
||
<table width="100%" class="am-table am-table-hover tpl-table-black">
|
||
<thead>
|
||
<tr>
|
||
<th>编号</th>
|
||
<th>图标</th>
|
||
<th>标题</th>
|
||
<th>链接</th>
|
||
<th>排序</th>
|
||
<th>操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr v-for="(item,index) in model.menu">
|
||
<td class="am-text-middle">{{index+1}}</td>
|
||
<td class="am-text-middle">
|
||
<img :src="item.logo" width="50" height="50" alt="菜单图标">
|
||
</td>
|
||
<td class="am-text-middle">{{item.title}}</td>
|
||
<td class="am-text-middle">{{item.path}}</td>
|
||
<td class="am-text-middle">{{item.sort}}</td>
|
||
<td class="am-text-middle">
|
||
<div class="tpl-table-black-operation">
|
||
<a href="javascript:;" class="hema-edit"
|
||
:data-index="index"
|
||
:data-logo="item.logo"
|
||
:data-title="item.title"
|
||
:data-path="item.path"
|
||
:data-sort="item.sort">
|
||
<i class="am-icon-pencil"></i> 编辑
|
||
</a>
|
||
<a href="javascript:;" class="hema-del tpl-table-black-operation-del"
|
||
:data-id="index">
|
||
<i class="am-icon-trash"></i> 删除
|
||
</a>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
|
||
<div class="am-u-sm-9 am-u-sm-push-2 am-margin-top-lg">
|
||
|
||
<button type="submit" class="j-submit am-btn am-btn-secondary">提交
|
||
|
||
</button>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</fieldset>
|
||
</form>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<!-- 图片文件列表模板 -->
|
||
<script id="tpl-file-item" type="text/template">
|
||
|
||
{{ each list }}
|
||
|
||
<div class="file-item">
|
||
|
||
<a href="{{ $value.url }}" title="点击查看大图" target="_blank">
|
||
|
||
<img src="{{ $value.url }}">
|
||
|
||
</a>
|
||
|
||
<input type="hidden" name="{{ name }}" value="{{ $value.url }}">
|
||
|
||
<i class="iconfont iconshanchu file-item-delete"></i>
|
||
|
||
</div>
|
||
|
||
{{ /each }}
|
||
|
||
</script>
|
||
<!-- 文件库弹窗 -->
|
||
<!-- 文件库模板 -->
|
||
|
||
<script id="tpl-file-library" type="text/template">
|
||
|
||
<div class="row">
|
||
|
||
<div class="file-group">
|
||
|
||
<ul class="nav-new">
|
||
|
||
<li class="ng-scope {{ is_default ? 'active' : '' }}" data-group-id="0">
|
||
|
||
<a class="group-name am-text-truncate" href="javascript:void(0);" title="全部">全部</a>
|
||
|
||
</li>
|
||
|
||
<li class="ng-scope" data-group-id="-1">
|
||
|
||
<a class="group-name am-text-truncate" href="javascript:void(0);" title="未分组">未分组</a>
|
||
|
||
</li>
|
||
|
||
{{ each group_list }}
|
||
|
||
<li class="ng-scope"
|
||
|
||
data-group-id="{{ $value.group_id }}" title="{{ $value.group_name }}">
|
||
|
||
<a class="group-edit" href="javascript:void(0);" title="编辑分组">
|
||
|
||
<i class="iconfont iconbianji"></i>
|
||
|
||
</a>
|
||
|
||
<a class="group-name am-text-truncate" href="javascript:void(0);">
|
||
|
||
{{ $value.group_name }}
|
||
|
||
</a>
|
||
|
||
<a class="group-delete" href="javascript:void(0);" title="删除分组">
|
||
|
||
<i class="iconfont iconshanchu"></i>
|
||
|
||
</a>
|
||
|
||
</li>
|
||
|
||
{{ /each }}
|
||
|
||
</ul>
|
||
|
||
<a class="group-add" href="javascript:void(0);">新增分组</a>
|
||
|
||
</div>
|
||
|
||
<div class="file-list">
|
||
|
||
<div class="v-box-header am-cf">
|
||
|
||
<div class="h-left am-fl am-cf">
|
||
|
||
<div class="am-fl">
|
||
|
||
<div class="group-select am-dropdown">
|
||
|
||
<button type="button" class="am-btn am-btn-sm am-btn-secondary am-dropdown-toggle">
|
||
|
||
移动至 <span class="am-icon-caret-down"></span>
|
||
|
||
</button>
|
||
|
||
<ul class="group-list am-dropdown-content">
|
||
|
||
<li class="am-dropdown-header">请选择分组</li>
|
||
|
||
{{ each group_list }}
|
||
|
||
<li>
|
||
|
||
<a class="move-file-group" data-group-id="{{ $value.group_id }}"
|
||
|
||
href="javascript:void(0);">{{ $value.group_name }}</a>
|
||
|
||
</li>
|
||
|
||
{{ /each }}
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="am-fl file-library-operation">
|
||
|
||
<a href="javascript:void(0);" class="file-delete tpl-table-black-operation-del"
|
||
|
||
data-group-id="2">
|
||
|
||
<i class="am-icon-trash"></i> 删除
|
||
|
||
</a>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="h-rigth am-fr">
|
||
|
||
<div class="j-upload upload-image">
|
||
|
||
<i class="iconfont icontianjia"></i>
|
||
|
||
上传图片
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div id="file-list-body" class="v-box-body">
|
||
|
||
{{ include 'tpl-file-list' file_list }}
|
||
|
||
</div>
|
||
|
||
<div class="v-box-footer am-cf"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</script>
|
||
|
||
|
||
|
||
<!-- 文件列表模板 -->
|
||
|
||
<script id="tpl-file-list" type="text/template">
|
||
|
||
<ul class="file-list-item">
|
||
|
||
{{ include 'tpl-file-list-item' data }}
|
||
|
||
</ul>
|
||
|
||
{{ if last_page > 1 }}
|
||
|
||
<div class="file-page-box am-fr">
|
||
|
||
<ul class="pagination">
|
||
|
||
{{ if current_page > 1 }}
|
||
|
||
<li>
|
||
|
||
<a class="switch-page" href="javascript:void(0);" title="上一页" data-page="{{ current_page - 1 }}">«</a>
|
||
|
||
</li>
|
||
|
||
{{ /if }}
|
||
|
||
{{ if current_page < last_page }}
|
||
|
||
<li>
|
||
|
||
<a class="switch-page" href="javascript:void(0);" title="下一页" data-page="{{ current_page + 1 }}">»</a>
|
||
|
||
</li>
|
||
|
||
{{ /if }}
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
{{ /if }}
|
||
|
||
</script>
|
||
|
||
|
||
|
||
<!-- 文件列表模板 -->
|
||
|
||
<script id="tpl-file-list-item" type="text/template">
|
||
|
||
{{ each $data }}
|
||
|
||
<li class="ng-scope" title="{{ $value.file_name }}" data-file-id="{{ $value.file_id }}"
|
||
|
||
data-url="{{ $value.url }}" data-file-path="{{ $value.file_path }}">
|
||
|
||
<div class="img-cover"
|
||
|
||
style="background-image: url('{{ $value.url }}')">
|
||
|
||
</div>
|
||
|
||
<p class="file-name am-text-center am-text-truncate">{{ $value.file_name }}</p>
|
||
|
||
<div class="select-mask">
|
||
|
||
<img src="/assets/img/chose.png">
|
||
|
||
</div>
|
||
|
||
</li>
|
||
|
||
{{ /each }}
|
||
|
||
</script>
|
||
|
||
|
||
|
||
<!-- 分组元素-->
|
||
|
||
<script id="tpl-group-item" type="text/template">
|
||
|
||
<li class="ng-scope" data-group-id="{{ group_id }}" title="{{ group_name }}">
|
||
|
||
<a class="group-edit" href="javascript:void(0);" title="编辑分组">
|
||
|
||
<i class="iconfont iconbianji"></i>
|
||
|
||
</a>
|
||
|
||
<a class="group-name am-text-truncate" href="javascript:void(0);">
|
||
|
||
{{ group_name }}
|
||
|
||
</a>
|
||
|
||
<a class="group-delete" href="javascript:void(0);" title="删除分组">
|
||
|
||
<i class="iconfont iconshanchu"></i>
|
||
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</script>
|
||
|
||
|
||
<!-- 添加 -->
|
||
<script id="tpl-add" type="text/template">
|
||
<div class="am-padding-xs am-padding-top-sm">
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">菜单图标 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<div class="am-form-file">
|
||
<div class="am-form-file">
|
||
<button type="button"
|
||
class="upload-file am-btn am-btn-secondary am-radius">
|
||
<i class="am-icon-cloud-upload"></i> 选择图片
|
||
</button>
|
||
<div class="uploader-list am-cf"></div>
|
||
</div>
|
||
<div class="help-block am-margin-top-sm">
|
||
<small>建议尺寸100x100像素以上,大小2M以下</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">菜单标题 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="text" class="tpl-form-input" name="data[title]" value="" required>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">链接路径 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="text" class="tpl-form-input" name="data[path]" value="" required>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">显示排序 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="number" min="1" class="tpl-form-input" name="data[sort]" value="100" required>
|
||
<small>数字越小越靠前</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</script>
|
||
|
||
|
||
<!-- 编辑 -->
|
||
<script id="tpl-edit" type="text/template">
|
||
<div class="am-padding-xs am-padding-top-sm">
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">菜单图标 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<div class="am-form-file">
|
||
<div class="am-form-file">
|
||
<button type="button"
|
||
class="upload-file am-btn am-btn-secondary am-radius">
|
||
<i class="am-icon-cloud-upload"></i> 选择图片
|
||
</button>
|
||
<div class="uploader-list am-cf">
|
||
<div class="file-item">
|
||
<img src="{{ menu.logo }}">
|
||
<input type="hidden" name="data[logo]" value="{{ menu.logo }}">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="help-block am-margin-top-sm">
|
||
<small>建议尺寸100x100像素以上,大小2M以下</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">菜单标题 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="text" class="tpl-form-input" name="data[title]" value="{{ menu.title }}" required>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">链接路径 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="text" class="tpl-form-input" name="data[path]" value="{{ menu.path }}" required>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group">
|
||
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">显示排序 </label>
|
||
<div class="am-u-sm-9 am-u-end">
|
||
<input type="number" min="1" class="tpl-form-input" name="data[sort]" value="{{ menu.sort }}" required>
|
||
<small>数字越小越靠前</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</script>
|
||
|
||
|
||
<script src="/assets/plugins/vue/vue.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
<script>
|
||
$(function () {
|
||
new Vue({
|
||
el: '#myform',
|
||
data: {
|
||
model: <?= json_encode($model) ?>
|
||
}
|
||
});
|
||
$('.hema-add').on('click', function () {
|
||
$.showAction({
|
||
title: '添加',
|
||
area: '750px',
|
||
content: template('tpl-add', {}),
|
||
uCheck: true,
|
||
success: function ($content) {
|
||
// 选择图片
|
||
$('.upload-file').selectImages({
|
||
name: 'data[logo]'
|
||
});
|
||
$('#my-form').formPost({
|
||
url: "<?php echo url('food.applet.center/add'); ?>"
|
||
});
|
||
},
|
||
btn2: function ($content) {
|
||
return true;
|
||
}
|
||
});
|
||
});
|
||
//编辑
|
||
$('.hema-edit').on('click', function () {
|
||
var data = $(this).data();
|
||
console.log(data);
|
||
$.showAction({
|
||
title: '编辑',
|
||
area: '750px',
|
||
content: template('tpl-edit', {menu:data}),
|
||
uCheck: true,
|
||
success: function ($content) {
|
||
// 选择图片
|
||
$('.upload-file').selectImages({
|
||
name: 'data[logo]'
|
||
});
|
||
$('#my-form').formPost({
|
||
url: "<?php echo url('food.applet.center/edit'); ?>?index=" + data.index
|
||
});
|
||
},
|
||
btn2: function ($content) {
|
||
return true;
|
||
}
|
||
});
|
||
});
|
||
// 删除元素
|
||
var url = "<?php echo url('food.applet.center/delete'); ?>";
|
||
$('.hema-del').del('id', url);
|
||
$('#myform').formPost();
|
||
});
|
||
</script>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<!-- 内容区域 end -->
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<script src="/assets/plugins/layer/layer.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/assets/plugins/jquery/jquery.form.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/assets/plugins/amazeui/amazeui.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/assets/js/hema.app.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/assets/js/webuploader.html5only.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/assets/js/art-template.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
<script src="/addons/upload/js/file.library.js?v=<?php echo htmlentities($version); ?>"></script>
|
||
|
||
</body>
|
||
|
||
|
||
|
||
</html>
|
||
|