{
var [k, v] = item.split("=");
obj[k] = v;
return obj;
}, {});
var params = new URLSearchParams(window.location.search);
var requestParams = {};
for (var p of params) {
var [k, v] = p;
requestParams[k] = v;
}
window.__pdpMtopStartTime = new Date().getTime();
window.__pdpTriggerMtopStatus = 0;
window.__pdpTriggerCSR = true;
if(window.Mtop) {
window.__pdpTriggerMtopStatus = 1;
window.Mtop.default.request(
{
data: {
deviceType: deviceType,
path: window.location.href,
uri: uri,
headerParams: JSON.stringify(headerParams),
cookieParams: JSON.stringify(cookieParams),
requestParams: JSON.stringify(requestParams),
},
type: "POST",
v: "1.0",
needLogin: false,
api: "mtop.global.detail.web.getDetailInfo",
},
function (res) {
window.__pdpMtopEndTime = new Date().getTime();
if (res.data && res.data.module) {
window.__pdpMtopStatus = 1;
reportMtopData();
var data = JSON.parse(res.data.module);
var msiteExperimentConfig = {}
if (__moduleData__.data && __moduleData__.data.root && __moduleData__.data.root.fields && __moduleData__.data.root.fields.globalConfig) {
msiteExperimentConfig = __moduleData__.data.root.fields.globalConfig.msiteExperimentConfig
}
if(data.globalConfig) {
data.globalConfig.msiteExperimentConfig = msiteExperimentConfig
}
__moduleData__.data.root.fields = data;
renderTpl(data);
callback && callback();
} else {
window.__pdpMtopStatus = 0;
reportMtopData();
}
},
function (err) {
window.__pdpMtopStatus = 0 ;
window.__pdpMtopEndTime = new Date().getTime();
reportMtopData();
console.log(err);
callback && callback();
}
)
}
reportMtopData2();
function renderTpl(data) {
if (deviceType === "pc" && data.Breadcrumb) {
window.LZD.updateBreadcrumb && window.LZD.updateBreadcrumb(data.Breadcrumb)
}
}
}
fetchData(hydrate);