点击解除验证限制
var params = (function() {
var url = location.href;
var q = {};
var _index = url.indexOf('?');
if (_index != -1) {
url = url.substr(_index + 1)
}
var _params = url.replace(/#.*/g, '').split('&');
for (var i = 0; i < _params.length; i++) {
var pair = _params[i].split('=');
if (pair[0] == '' || pair[1] == undefined) {
continue;
}
q[pair[0]] = pair[1]
}
return q
})();
MIP.setData({
bookId: params.bid,
chapterNum: parseInt(params.chapter)
});
setTimeout(function() {
MIP.setData({
bookId: params.bid,
chapterNum: parseInt(params.chapter)
})
}, 500)
var apis = {
HOST: 'https://m.zhangyue.com',
getNextChapter: function() {
fetch(this.HOST + '/nextchapter/' + params.bid + '/' + params.chapter + '?width=' + (window.innerWidth - 32) + '&nextRowId=1&p2=104235', {
method: 'POST'
}).then(function(data) {
return data.json()
}).then(function(res) {
if(res.code === 0) {
MIP.setData({
chapterName: res.body.chapterName,
html: res.html.split('\n')
});
setTimeout(function() {
MIP.setData({
chapterName: res.body.chapterName,
html: res.html.split('\n')
});
}, 500)
} else if(res.code === 111999 ) {
MIP.setData({
authUrl: res.body.url
});
setTimeout(function() {
MIP.setData({
authUrl: res.body.url
})
}, 500)
}
})
}
}
apis.getNextChapter()