與服務端的交互請求比較個性化,需要自行?封裝組件,在組件中可以用 fetch 自行實現。
示例:
fetch(location.href).then(function (res) { ? ?return res.text();
}).then(function (text) {
? ?fetchElement.innerHTML = 'fetch: ' + (text.search('mip-test') !== -1);
});
閱讀本文的人還閱讀了:
開發百度MIP 后,搜索流量是導流到MIP,還是導流到原頁面?