内嵌了拼多多的页面,想从我的域名拿到拼多多下域名里的PDDAccessToken(存在于cookies)
//内嵌的拼多多页面
<webview id="foo" ref="iframe" class="video" :src="url ? url : pddLoginUrl" partitions="trusted"></webview>
getCookie(){
setInterval(()=>{
//nwjs chrome方法
chrome.cookies.getAll({
//要拿cookies的域名
url:"http://mobile.yangkeduo.com",
//getCookieStoreId()方法获得storeId
storeId:document.getElementById("foo").getCookieStoreId()
}, function(a){
//输出结果
console.log(a)
})
},3000)
},