Authored by 马力

buried

... ... @@ -434,6 +434,22 @@ var util = {
result=data;
}
return result;
},
// 埋点请求 如果埋点成功则返回true
__sknOperateLog(productSkn, newValue, oldValue, operateType) {
if ((newValue && newValue.trim() != oldValue) || (oldValue != '' && newValue == '')) {
util.__ajax({
url:'/product/addProductOperateLog',
data:{
productSkn:productSkn,
updateBeforeValue : oldValue?oldValue:'',
updateAfterValue : newValue?newValue:'',
operateType : operateType
}
},null, true);
return true;
}
return false;
}
}
module.exports = util;
\ No newline at end of file
... ...
... ... @@ -261,7 +261,7 @@ $('#saveBasicInfo').on('click', function() {
}
})
if (sknOperateLog(common.util.__input('phrase'), oldphrase)) {
if (common.util.__sknOperateLog(basicInfo.productSkn, common.util.__input('phrase'), oldphrase, 6)) {
oldphrase = common.util.__input('phrase');
}
})
... ... @@ -295,23 +295,4 @@ $('#saveBasicInfo').on('click', function() {
// data.shopIds = data.shopIds ? data.shopIds.split('|').join(',') : '';
// return data;
// }
// });
// 埋点请求
function sknOperateLog(newValue, oldValue) {
if ((newValue && newValue.trim() != oldValue) || (oldValue != '' && newValue == '')) {
common.util.__ajax({
url:'/product/addProductOperateLog',
data:{
productSkn:basicInfo.productSkn,
updateBeforeValue : oldValue?oldValue:'',
updateAfterValue : newValue?newValue:'',
operateType : 6
}
},null, true);
return true;
}
return false;
}
\ No newline at end of file
// });
\ No newline at end of file
... ...
... ... @@ -96,13 +96,13 @@ if (window.NETSALEDATA) {
}
});
if (sknOperateLog(taobaoUrl, oldtaobaoUrl, 7)) {
if (common.util.__sknOperateLog(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn, taobaoUrl, oldtaobaoUrl, 7)) {
oldtaobaoUrl = taobaoUrl;
}
if (sknOperateLog(tmallUrl, oldtmallUrl, 8)) {
if (common.util.__sknOperateLog(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn, tmallUrl, oldtmallUrl, 8)) {
oldtmallUrl = tmallUrl;
}
if (sknOperateLog(jdUrl, oldjdUrl, 9)) {
if (common.util.__sknOperateLog(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn, jdUrl, oldjdUrl, 9)) {
oldjdUrl = jdUrl;
}
... ... @@ -291,24 +291,4 @@ if (window.NETSALEDATA) {
}
//当点击“无需测量”,该列输入框不可编辑
common.sizeInfo.check();
// 埋点请求
function sknOperateLog(newValue, oldValue, operateType) {
if ((newValue && newValue.trim() != oldValue) || (oldValue != '' && newValue == '')) {
common.util.__ajax({
url:'/product/addProductOperateLog',
data:{
productSkn:window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
updateBeforeValue : oldValue?oldValue:'',
updateAfterValue : newValue?newValue:'',
operateType : operateType
}
},null, true);
return true;
}
return false;
}
\ No newline at end of file
common.sizeInfo.check();
\ No newline at end of file
... ...