feat: xxbb
This commit is contained in:
@@ -174,13 +174,14 @@ layui.use(['table', 'form', 'layer'], function () {
|
||||
var links = data.links || [];
|
||||
var html = '<div style="padding:16px;line-height:1.6;font-size:13px;">';
|
||||
html += '<div style="margin-bottom:10px;"><b>渠道</b> ' + channelId + '</div>';
|
||||
if (data.builder_type === 'new' && data.channel_name) {
|
||||
html += '<div style="margin-bottom:8px;"><b>channel_name</b> <code>' + data.channel_name + '</code></div>';
|
||||
}
|
||||
if (data.weifile_path || data.support_path) {
|
||||
html += '<div style="margin-bottom:10px;"><b>落地页</b> <code>' +
|
||||
(data.weifile_path || data.support_path).replace(/</g, '<') + '</code></div>';
|
||||
}
|
||||
if (data.builder_type === 'new' && data.daily_path) {
|
||||
html += '<div style="margin-bottom:10px;"><b>details</b> <code>' +
|
||||
String(data.daily_path).replace(/</g, '<') + '</code></div>';
|
||||
}
|
||||
if (links.length) {
|
||||
html += '<div style="margin-bottom:6px;"><b>投放链接</b></div>';
|
||||
links.forEach(function (u) {
|
||||
@@ -218,7 +219,7 @@ layui.use(['table', 'form', 'layer'], function () {
|
||||
'<option value="old"' + ((values.builder_type || 'old') === 'old' ? ' selected' : '') + '>旧版</option>' +
|
||||
'<option value="new"' + (values.builder_type === 'new' ? ' selected' : '') + '>新版</option>' +
|
||||
'</select>' +
|
||||
'<div class="layui-form-mid layui-word-aux">旧版=channel-builder(/web/id/support.html);新版=channel-builder-new(/source/{name}/index.html)</div></div></div>'
|
||||
'<div class="layui-form-mid layui-word-aux">旧版=channel-builder(/web/id/support.html);新版=channel-builder-new(/weifile/weifile.html + /details)</div></div></div>'
|
||||
: '';
|
||||
|
||||
var templateBlock = (isAdmin && creating)
|
||||
@@ -318,10 +319,10 @@ layui.use(['table', 'form', 'layer'], function () {
|
||||
if (obj.event === 'edit') openForm('编辑渠道链接', obj.data, false);
|
||||
if (obj.event === 'links') openLinks(obj.data);
|
||||
if (obj.event === 'del') {
|
||||
var pathHint = obj.data.builder_type === 'new' && obj.data.channel_name
|
||||
? ('source/' + obj.data.channel_name + '/index.html')
|
||||
: ('web/' + obj.data.channel_id);
|
||||
layer.confirm('删除后将移除数据库记录与 ' + pathHint + ' 资源,确认?', function (idx) {
|
||||
var pathHint = obj.data.builder_type === 'new'
|
||||
? '数据库记录(共享 /weifile 与 /details 保留)'
|
||||
: ('数据库记录与 web/' + obj.data.channel_id + ' 资源');
|
||||
layer.confirm('删除后将移除 ' + pathHint + ',确认?', function (idx) {
|
||||
$.ajax({
|
||||
url: @json(url('/admin/channels')) + '/' + obj.data.id,
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user