Skip to content

Commit

Permalink
修复小说异步目录跳转链接bug #268 (#269)
Browse files Browse the repository at this point in the history
* feat:#266

* feat:#266

* fix: 修改url获取方式#266

* fix:修复小说异步目录跳转链接bug #268
  • Loading branch information
tfciw authored Sep 18, 2018
1 parent adf4b74 commit d561394
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/mip-shell-xiaoshuo/feature/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class Catalog {
// 目录配置为空
this.isCatFetch = true
const originUrl = encodeURIComponent(MIP.util.getOriginalUrl())
MIP.sandbox.fetchJsonp(' https://sp0.baidu.com/5LMDcjW6BwF3otqbppnN2DJv/novelsearch.pae.baidu.com/novel/api/mipinfo?originUrl=' + originUrl, {
MIP.sandbox.fetchJsonp('https://sp0.baidu.com/5LMDcjW6BwF3otqbppnN2DJv/novelsearch.pae.baidu.com/novel/api/mipinfo?originUrl=' + originUrl, {
jsonpCallback: 'callback'
}).then(res => res.json())
.then(data => {
Expand All @@ -154,7 +154,7 @@ class Catalog {
renderCatalog = catalogs => catalogs.map(catalog => `
<div class="catalog-page">
<a class="mip-catalog-btn catalog-page-content"
mip-catalog-btn mip-link data-button-name="${catalog.name}" href="${catalog.link}" replace>
mip-catalog-btn mip-link data-button-name="${catalog.name}" href="${catalog.contentUrl[0]}" replace>
${catalog.name}
</a>
</div>`).join('\n')
Expand Down Expand Up @@ -237,7 +237,6 @@ class Catalog {
util.css(document.querySelector('.net-err-info'), {
display: 'block'
})
console.log('netError')
return
}
let currentPage = this.getCurrentPage()
Expand Down Expand Up @@ -299,7 +298,6 @@ class Catalog {
util.css(document.querySelector('.net-err-info'), {
display: 'block'
})
console.log('netError')
return
}
let currentPage = this.getCurrentPage()
Expand Down

0 comments on commit d561394

Please sign in to comment.