346 行
16 KiB
HTML
346 行
16 KiB
HTML
<style>
|
|
.fc-form-container {
|
|
padding: 15px 15px 0;
|
|
}
|
|
/* 当前选中的图标微卡片展示区 */
|
|
.fc-current-icon-box {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: #f8fafc;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 12px;
|
|
padding: 8px 14px;
|
|
min-height: 54px;
|
|
}
|
|
.fc-current-icon-info {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.fc-current-icon-info img {
|
|
width: 40px;
|
|
height: 40px;
|
|
object-fit: contain;
|
|
background: #ffffff;
|
|
border-radius: 10px;
|
|
padding: 4px;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 2px 6px rgba(0,0,0,0.04);
|
|
}
|
|
.fc-icon-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
/* 推荐调色板 */
|
|
.fc-color-presets {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
.fc-color-dot {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
border: 2px solid #fff;
|
|
box-shadow: 0 0 0 1px #d5d5d5;
|
|
transition: transform 0.15s ease;
|
|
}
|
|
.fc-color-dot:hover {
|
|
transform: scale(1.2);
|
|
}
|
|
/* 右侧迷你小程序模拟器 */
|
|
.fc-preview-box {
|
|
background: linear-gradient(150deg, #f2fef7 0%, #e6fbf1 100%);
|
|
border: 1px solid #c8f2de;
|
|
border-radius: 14px;
|
|
padding: 16px 14px;
|
|
text-align: center;
|
|
box-shadow: 0 4px 14px rgba(4, 48, 30, 0.05);
|
|
}
|
|
.fc-preview-title {
|
|
font-size: 12px;
|
|
color: #04874a;
|
|
font-weight: 700;
|
|
margin-bottom: 12px;
|
|
}
|
|
.fc-preview-badge {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 18px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 8px;
|
|
box-shadow: 0 4px 12px rgba(4, 48, 30, 0.08);
|
|
transition: all 0.2s ease;
|
|
}
|
|
.fc-preview-badge img {
|
|
width: 38px;
|
|
height: 38px;
|
|
object-fit: contain;
|
|
}
|
|
.fc-preview-name {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
}
|
|
|
|
/* 纯插画选择模态窗口(默认严格隐藏,仅在点击按钮后展示) */
|
|
.fc-icon-modal-wrap {
|
|
display: none;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 1999;
|
|
}
|
|
.fc-icon-modal-wrap.open {
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.fc-modal-overlay {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(15, 23, 42, 0.6);
|
|
backdrop-filter: blur(2px);
|
|
}
|
|
.fc-modal-card {
|
|
position: relative;
|
|
background: #ffffff;
|
|
border-radius: 16px;
|
|
width: 660px;
|
|
max-width: 95%;
|
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
|
|
padding: 18px 22px 20px;
|
|
z-index: 2000;
|
|
animation: fcModalZoom 0.2s ease-out;
|
|
}
|
|
.fc-modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
margin-bottom: 16px;
|
|
}
|
|
.fc-modal-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #0f172a;
|
|
}
|
|
.fc-modal-close {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
background: #f1f5f9;
|
|
color: #64748b;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
border: none;
|
|
font-size: 16px;
|
|
}
|
|
/* 纯图标网格容器 */
|
|
.fc-modal-grid-box {
|
|
max-height: 360px;
|
|
overflow-y: auto;
|
|
padding: 2px 4px 6px;
|
|
}
|
|
.fc-modal-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
}
|
|
.fc-icon-chip {
|
|
flex: 0 0 calc(16.666% - 10px);
|
|
height: 72px;
|
|
background: #f8fafc;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
}
|
|
.fc-icon-chip:hover {
|
|
border-color: #00E070;
|
|
background: #f0fdf4;
|
|
transform: translateY(-2px);
|
|
}
|
|
.fc-icon-chip.active {
|
|
border-color: #00E070;
|
|
background: #e6fbf1;
|
|
box-shadow: 0 0 0 2px #00E070;
|
|
}
|
|
.fc-icon-chip img {
|
|
width: 44px;
|
|
height: 44px;
|
|
object-fit: contain;
|
|
}
|
|
@keyframes fcModalZoom {
|
|
from { opacity: 0; transform: scale(0.95); }
|
|
to { opacity: 1; transform: scale(1); }
|
|
}
|
|
</style>
|
|
|
|
<form id="edit-form" class="form-horizontal fc-form-container" role="form" data-toggle="validator" method="POST" action="">
|
|
<div class="row">
|
|
<!-- 左侧核心表单区 -->
|
|
<div class="col-xs-12 col-sm-8">
|
|
<div class="form-group" style="margin-bottom:16px;">
|
|
<label class="control-label col-xs-12 col-sm-3">{:__('Name')}:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" placeholder="例如:招聘求职、房产租售、二手闲置">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 分类图标(纯视觉图标控件,无多余文字标签) -->
|
|
<div class="form-group" style="margin-bottom:16px;">
|
|
<label class="control-label col-xs-12 col-sm-3">分类图标:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<div class="fc-current-icon-box">
|
|
<div class="fc-current-icon-info">
|
|
<img id="current-icon-img" src="/static/icons/{$row.icon_key|htmlentities}.png?v=2" onerror="this.src='/static/icons/cat-job.png'" alt="当前图标">
|
|
</div>
|
|
<div class="fc-icon-actions">
|
|
<button type="button" class="btn btn-success" id="btn-open-icon-picker" style="background:#00E070;border-color:#00c860;color:#04301e;font-weight:700;">
|
|
<i class="fa fa-th-large"></i> 挑选系统插画
|
|
</button>
|
|
<button type="button" id="faupload-icon_key" class="btn btn-default faupload" data-input-id="c-icon_key" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/svg+xml" data-multiple="false">
|
|
<i class="fa fa-upload text-primary"></i> 上传图片
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- 底层安全隐蔽传参 -->
|
|
<input type="hidden" name="row[icon_key]" id="c-icon_key" value="{$row.icon_key|htmlentities}">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 主题色设置 + 推荐调色板 -->
|
|
<div class="form-group" style="margin-bottom:16px;">
|
|
<label class="control-label col-xs-12 col-sm-3">{:__('Color')}:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<div class="input-group">
|
|
<input id="c-color" data-rule="required" class="form-control" name="row[color]" type="text" value="{$row.color|htmlentities}" placeholder="例如:#00E070">
|
|
<span class="input-group-addon" id="color-preview-addon" style="width:38px;padding:0;background:{$row.color|htmlentities};border-color:#ccc;"></span>
|
|
</div>
|
|
<div class="fc-color-presets">
|
|
<span style="font-size:11px;color:#64748b;">推荐配色:</span>
|
|
<div class="fc-color-dot" style="background:#00E070;" title="春绿(品牌主色)" data-color="#00E070"></div>
|
|
<div class="fc-color-dot" style="background:#FF7A59;" title="活力橙" data-color="#FF7A59"></div>
|
|
<div class="fc-color-dot" style="background:#F5A623;" title="阳光金" data-color="#F5A623"></div>
|
|
<div class="fc-color-dot" style="background:#2ECC71;" title="翠青绿" data-color="#2ECC71"></div>
|
|
<div class="fc-color-dot" style="background:#3498DB;" title="晴空蓝" data-color="#3498DB"></div>
|
|
<div class="fc-color-dot" style="background:#9B59B6;" title="典雅紫" data-color="#9B59B6"></div>
|
|
<div class="fc-color-dot" style="background:#E67E22;" title="收获橙" data-color="#E67E22"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 排序权重 -->
|
|
<div class="form-group" style="margin-bottom:16px;">
|
|
<label class="control-label col-xs-12 col-sm-3">{:__('Sort')}:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
|
|
<span class="help-block text-muted" style="margin-top:4px;margin-bottom:0;font-size:11px;"><i class="fa fa-info-circle"></i> 数值越小越靠前,直接决定小程序金刚区的排列次序。</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 启用状态 -->
|
|
<div class="form-group" style="margin-bottom:12px;">
|
|
<label class="control-label col-xs-12 col-sm-3">{:__('Enabled')}:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<input id="c-enabled" name="row[enabled]" type="hidden" value="{$row.enabled}">
|
|
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-enabled" data-yes="1" data-no="0">
|
|
<i class="fa fa-toggle-on text-success {eq name="$row.enabled" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 帖子统计信息(只读展示) -->
|
|
<div class="form-group" style="margin-bottom:0;">
|
|
<label class="control-label col-xs-12 col-sm-3">{:__('Post_count')}:</label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<p class="form-control-static" style="padding-top:7px;color:#64748b;font-weight:600;">
|
|
<span class="label label-success" style="background:#eaf8f1;color:#04874a;">{$row.post_count|htmlentities} 篇已审核帖子</span>
|
|
</p>
|
|
<input id="c-post_count" type="hidden" name="row[post_count]" value="{$row.post_count|htmlentities}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 右侧:小程序金刚区微缩呈现 -->
|
|
<div class="col-xs-12 col-sm-4 hidden-xs">
|
|
<div class="fc-preview-box">
|
|
<div class="fc-preview-title">
|
|
<i class="fa fa-mobile fa-lg"></i> 小程序金刚区·实时呈现
|
|
</div>
|
|
<div class="fc-preview-badge" id="preview-badge" style="background: rgba(0, 224, 112, 0.15); border: 1px solid rgba(0, 224, 112, 0.35);">
|
|
<img id="preview-icon" src="/static/icons/{$row.icon_key|htmlentities}.png?v=2" onerror="this.src='/static/icons/cat-job.png'" alt="分类图标">
|
|
</div>
|
|
<div class="fc-preview-name" id="preview-name">{$row.name|htmlentities}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group layer-footer" style="margin-top:16px;padding-top:14px;border-top:1px solid #f1f5f9;">
|
|
<label class="control-label col-xs-12 col-sm-3"></label>
|
|
<div class="col-xs-12 col-sm-9">
|
|
<button type="submit" class="btn btn-success btn-embossed disabled" style="background:#00E070;border-color:#00c860;color:#04301e;font-weight:700;"><i class="fa fa-check"></i> 确认保存修改</button>
|
|
<button type="reset" class="btn btn-default btn-embossed" style="margin-left:10px;">重置</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- 纯插画选择面板(默认完全隐藏,只有主动点击按钮才唤起) -->
|
|
<div class="fc-icon-modal-wrap" id="fc-icon-modal" style="display:none !important;">
|
|
<div class="fc-modal-overlay"></div>
|
|
<div class="fc-modal-card">
|
|
<div class="fc-modal-header">
|
|
<div class="fc-modal-title">
|
|
<i class="fa fa-th-large text-success"></i> 选择分类插画
|
|
</div>
|
|
<button type="button" class="fc-modal-close" id="btn-close-icon-modal">×</button>
|
|
</div>
|
|
|
|
<!-- 纯插画网格 -->
|
|
<div class="fc-modal-grid-box">
|
|
<div class="fc-modal-grid">
|
|
<div class="fc-icon-chip" data-key="cat-job"><img src="/static/icons/cat-job.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-house"><img src="/static/icons/cat-house.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-goods"><img src="/static/icons/cat-goods.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-car"><img src="/static/icons/cat-car.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-service"><img src="/static/icons/cat-service.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-education"><img src="/static/icons/cat-education.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-clean"><img src="/static/icons/cat-clean.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-friend"><img src="/static/icons/cat-friend.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-pet"><img src="/static/icons/cat-pet.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-food"><img src="/static/icons/cat-food.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-digital"><img src="/static/icons/cat-digital.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-sport"><img src="/static/icons/cat-sport.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-baby"><img src="/static/icons/cat-baby.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-health"><img src="/static/icons/cat-health.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-entertainment"><img src="/static/icons/cat-entertainment.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-community"><img src="/static/icons/cat-community.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-move"><img src="/static/icons/cat-move.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-repair"><img src="/static/icons/cat-repair.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-furniture"><img src="/static/icons/cat-furniture.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-business"><img src="/static/icons/cat-business.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-law"><img src="/static/icons/cat-law.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-consult"><img src="/static/icons/cat-consult.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-vip"><img src="/static/icons/cat-vip.png?v=2" alt="icon"></div>
|
|
<div class="fc-icon-chip" data-key="cat-photo"><img src="/static/icons/cat-photo.png?v=2" alt="icon"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|