search-key.js
859 Bytes
var $ = require('jquery'),
common = require('../../../../common/common');
var taobaoUrl = window.NETSALEDATA.productUrlBo.taobaoUrl || "";
var tmallUrl = window.NETSALEDATA.productUrlBo.tmallUrl || "";
var jdUrl = window.NETSALEDATA.productUrlBo.jdUrl || "";
$("#taobaoUrl").val(taobaoUrl);
$("#tmallUrl").val(tmallUrl);
$("#jdUrl").val(jdUrl);
$("#taobaoUrl").on('change', function() { taobaoUrl = $("#taobaoUrl").val(); });
$("#tmallUrl").on('change', function() { tmallUrl = $("#tmallUrl").val(); });
$("#jdUrl").on('change', function() { jdUrl = $("#jdUrl").val(); });
$("#save-urlList").on('click', function() {
common.util.__ajax({
url: '/netSale/saveProductUrlList',
data: {
productSkn: window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
taobaoUrl: taobaoUrl,
tmallUrl : tmallUrl,
jdUrl : jdUrl
}
});
return false;
});