Authored by 陶雨

网销搜索词现在不能无限添加同一个了

var $ = require('jquery'),
common = require('../../common/common');
common = require('../../common/common'),
util = require('../../common/util');
if (window.NETSALEDATA) {
//{ //商品参数
... ... @@ -127,9 +128,13 @@ if (window.NETSALEDATA) {
$(document).on('click', '.add', function() {
var item = g.rows[$(this).data("index")];
var value = $("#searchKeys").val();
if (value) value += ",";
$("#searchKeys").val(value + item.content);
searchKeys = $("#searchKeys").val();
if(value.indexOf(item.content) == -1) {
if (value) value += ",";
$("#searchKeys").val(value + item.content);
searchKeys = $("#searchKeys").val();
} else {
util.__tip("商品关键词不能重复");
}
});
$("#save-searchKey").on('click', function() {
... ...