284 lines
12 KiB
HTML
284 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
|
<link href="/jscss/style.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript" charset="utf-8" src="/jscss/theme.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<form class="search" onsubmit="table.search(this,'btn');return false;">
|
|
<ul></ul>
|
|
<div>
|
|
<div class="sinps"></div>
|
|
<div class="sbtns">
|
|
<button data-lang class="btn" type="submit">查询</button>
|
|
<!-- <a data-lang class="btn" onclick="ManyKeyWordAdd()">批量添加</a>
|
|
<a data-lang class="btn" onclick="GenerateKeywords()">交叉生成</a>
|
|
<a data-lang class="btn" onclick="">AI联想</a> -->
|
|
<a data-lang class="btn" onclick="multiin()">导入</a>
|
|
<a data-lang class="btn" onclick="exportxls()">导出</a>
|
|
<a data-lang class="btn def" onclick="pagehelp()">帮助</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="table">
|
|
<div class="loading col-24">Loading...</div>
|
|
<div class="list"></div>
|
|
<div>
|
|
<div class="btmbtn">
|
|
<a data-lang class="btn def" onclick="ciyfn.select_all(table)">全选</a>
|
|
<a data-lang class="btn def" onclick="ciyfn.select_diff(table)">反选</a>
|
|
|
|
|
<a data-lang class="btn dag" onclick="ciyfn.select_callfunc(table, this, 'del','已选{n}条,是否批量删除?', {},function(json){table.delline(json)})">批量删除</a>
|
|
</div>
|
|
<div class="page"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="alert_pagehelp" style="display:none;">
|
|
<b>标题</b>
|
|
<div style="margin:0 0 1em 1em">
|
|
第一行<br />第二行
|
|
</div>
|
|
<b>标题</b>
|
|
<ol style="margin:0 0 1em -1em">
|
|
<li>第一行</li>
|
|
<li>第二行</li>
|
|
<li>第三行</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div id="alert_multiin" style="display:none;">
|
|
<div style="display:flex;">
|
|
<div><ciy-upload com="file" /></div>
|
|
<div style="margin-left:0.3em;">
|
|
<a data-lang class="btn btn-sm def" href="/ud/inpl/www_keyword.xlsx" target="_blank">下载导入模板</a><br />
|
|
<div data-lang>每次导入建议不超过1000条</div>
|
|
<div data-lang>导入更新,首列为导出的行码</div>
|
|
<div data-lang>请按模版列填写</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="alert_edit" style="display:none;">
|
|
<div class="char4 row">
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label data-lang class="imp">所属栏目</label>
|
|
<div><ciy-select com="cateid" /></div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label data-lang class="imp">关键词</label>
|
|
<div><input type="text" name="name" style="width:100%;" /></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 批量添加 -->
|
|
<!-- <div id="alert_batchAdd" style="display:none;">
|
|
<div style="margin-bottom:10px;">
|
|
<label class="imp">所属栏目</label>
|
|
<ciy-select com="batch_cateid" style="width:200px;"></ciy-select>
|
|
</div>
|
|
<div style="margin-bottom:10px;">
|
|
<label class="imp">关键词</label><br>
|
|
<textarea name="batch_names" style="width:100%;height:280px;padding:10px;" placeholder="请一行输入一个关键词,例如:
|
|
手机
|
|
电脑
|
|
耳机"></textarea>
|
|
</div>
|
|
</div> -->
|
|
|
|
<!-- 交叉生成关键词功能 -->
|
|
<!-- <div id="generateKeywords" style="display:none;">
|
|
<div style="margin-bottom:10px;">
|
|
<label class="imp">所属栏目</label>
|
|
<ciy-select com="cross_cateid" style="width:200px;"></ciy-select>
|
|
</div> -->
|
|
<!-- 三列容器 Flex 同行显示 -->
|
|
<!-- <div style="display:flex;gap:10px;">
|
|
<div style="flex:1;">
|
|
<label class="imp">核心词</label><br>
|
|
<textarea name="cross_dim1" style="width:100%;height:180px;padding:10px;" placeholder="一行一个
|
|
手机
|
|
电脑
|
|
平板"></textarea>
|
|
</div>
|
|
<div style="flex:1;">
|
|
<label class="imp">修饰词</label><br>
|
|
<textarea name="cross_dim2" style="width:100%;height:180px;padding:10px;" placeholder="一行一个
|
|
新款
|
|
特价
|
|
防水"></textarea>
|
|
</div>
|
|
<div style="flex:1;">
|
|
<label>扩展词</label><br>
|
|
<textarea name="cross_dim3" style="width:100%;height:180px;padding:10px;" placeholder="一行一个
|
|
包邮
|
|
官方正品
|
|
2025款"></textarea>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciytable.js"></script>
|
|
<script type="text/javascript" src="../common.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
'use strict';
|
|
var table;
|
|
var Glob = {};
|
|
|
|
ciyfn.pageload(function () {
|
|
table = new ciyclass.table({
|
|
dom: '.table',
|
|
url: 'list',
|
|
pagecount: 10,
|
|
chkbox: true,
|
|
fn_beforedata: function (json) {
|
|
ciyfn.fillsearch({ searchdom: '.search', data: json });
|
|
return json;
|
|
},
|
|
fn_tdcontent: function (key, datashow, field, data) {
|
|
if (key == '_btn') {
|
|
return `<a data-lang class="btn" onclick="menubtn(this, 'edit')">修改</a>`;
|
|
}
|
|
},
|
|
fn_done: function (json) {}
|
|
});
|
|
table.callpage(1);
|
|
});
|
|
|
|
function menubtn(dom, btn) {
|
|
var id = $5(dom).parent('tr').attr('data-id');
|
|
if (btn == 'edit') edit(id);
|
|
}
|
|
|
|
|
|
function getdata(id, act, cb) {
|
|
cb({ data: id == 0 ? {} : table.data[id] });
|
|
}
|
|
|
|
function edit(id) {
|
|
getdata(id, 'edit', function (jsndat) {
|
|
ciyfn.alert({
|
|
title: '修改',
|
|
width: 'pc',
|
|
content: document.getElementById("alert_edit").innerHTML,
|
|
fn_showed: function (doc, dom) {
|
|
var dat = jsndat.data;
|
|
ciycmp({ dom: $5('[com=cateid]', dom), value: dat.cateid, range: table.json.www_list_cate });
|
|
$5('[name=name]', dom).val(dat.name);
|
|
},
|
|
cb: function (opn) {
|
|
if (opn.btn == "关闭") return opn.close();
|
|
opn.inputs.id = id;
|
|
if (ciyfn.throttle(opn.dombtn)) return;
|
|
ciyfn.callfunc('update', opn.inputs, function (json) {
|
|
table.updateline(json);
|
|
opn.close();
|
|
ciyfn.toast('提交成功');
|
|
});
|
|
},
|
|
btns: id == 0 ? ["新建", "*关闭"] : ["提交", "*关闭"],
|
|
});
|
|
});
|
|
}
|
|
|
|
function multiin() {
|
|
ciyfn.table_multiin('importxls', document.getElementById("alert_multiin").innerHTML, function (json) {
|
|
ciyfn.toast('导入成功');
|
|
table.cachecount = -1;
|
|
table.callpage();
|
|
});
|
|
}
|
|
|
|
function exportxls() {
|
|
ciyfn.table_exportxls('exportxls', table, function (json) {
|
|
ciyfn.alert({
|
|
content: '<div style="text-align:center;"><span data-lang>导出数据已生成</span><br/><br/><a data-lang class="btn lg" href="' + json.url + '" target="_blank">下载数据</a></div>',
|
|
btns: null
|
|
});
|
|
});
|
|
}
|
|
|
|
function pagehelp() {
|
|
ciyfn.alert({
|
|
title: '页面帮助',
|
|
width: 'pc',
|
|
content: document.getElementById("alert_pagehelp").innerHTML
|
|
});
|
|
}
|
|
|
|
// 批量添加
|
|
// function ManyKeyWordAdd() {
|
|
// ciyfn.alert({
|
|
// title: '批量添加关键词',
|
|
// width: 'pc',
|
|
// content: document.getElementById("alert_batchAdd").innerHTML,
|
|
// fn_showed: function (doc, dom) {
|
|
// ciycmp({ dom: $5('[com=batch_cateid]', dom), value: 0, range: table.json.www_list_cate });
|
|
// },
|
|
// cb: function (opn) {
|
|
// if (opn.btn == "关闭") return opn.close();
|
|
// let cateid = $5('[com=batch_cateid]', opn.dom).val();
|
|
// let names = $5('[name=batch_names]', opn.dom).val();
|
|
// if (!cateid) { ciyfn.toast('请选择所属栏目'); return; }
|
|
// if (!names) { ciyfn.toast('请输入关键词'); return; }
|
|
// ciyfn.callfunc('BatchAdd', { cateid, names }, function (json) {
|
|
// table.cachecount = -1;
|
|
// table.callpage();
|
|
// opn.close();
|
|
// ciyfn.toast('批量添加成功');
|
|
// });
|
|
// },
|
|
// btns: ["批量添加", "*关闭"],
|
|
// });
|
|
// }
|
|
|
|
// function GenerateKeywords() {
|
|
// ciyfn.alert({
|
|
// title: '交叉生成关键词',
|
|
// width: 'pc',
|
|
// content: document.getElementById("generateKeywords").innerHTML,
|
|
// fn_showed: function (doc, dom) {
|
|
// ciycmp({ dom: $5('[com=cross_cateid]', dom), value: 0, range: table.json.www_list_cate });
|
|
// },
|
|
// cb: function (opn) {
|
|
// if (opn.btn == "关闭") return opn.close();
|
|
|
|
// let cateid = $5('[com=cross_cateid]' , opn.dom).val();
|
|
// let cross_dim1 = $5('[name=cross_dim1]' , opn.dom).val();//核心词
|
|
// let cross_dim2 = $5('[name=cross_dim2]' , opn.dom).val();//修饰词
|
|
// let cross_dim3 = $5('[name=cross_dim3]',opn.dom).val();//扩展词
|
|
// // console.log(cross_dim1);
|
|
// if(!cateid) {ciyfn.toast('请选择所属栏目'); return;}
|
|
// if (!cross_dim1) { ciyfn.toast('请填写核心词'); return; }
|
|
// if (!cross_dim2) { ciyfn.toast('请填写修饰词'); return; }
|
|
|
|
// ciyfn.callfunc('GenerateKeywords', {
|
|
// cateid : cateid,
|
|
// dim1 : cross_dim1,
|
|
// dim2 : cross_dim2,
|
|
// dim3 : cross_dim3
|
|
// }, function (json) {
|
|
// table.cachecount = -1;
|
|
// table.callpage();
|
|
// opn.close();
|
|
// ciyfn.toast(json.msg);
|
|
// });
|
|
// },
|
|
// btns: ["生成", "*关闭"],
|
|
// });
|
|
// }
|
|
// }
|
|
</script>
|
|
</body>
|
|
</html> |