lolisaikou / LazyStudy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

建议阅读文章更改为订阅下面的文章

aweder opened this issue · comments

你的手机型号:

你的安卓版本:

错误的截图:
(可以到懒人学习界面,点击返回键查看日志,最好把红色的部分截下,图片可以上传到这里:
mmexport1595133179859

错误描述:

我测试一下,最快明天上线

image
增加了一个按钮可以供选择
为什么只有这两个选项?因为每天都有大量新文章貌似只有这两个地方(如果有别的地方希望大家指出)
总感觉这个功能对刚开始看这个的没用

其实文章标题是有个ID的,建议获取文章标题
//获取当前正在阅读的文章标题
var currentNewsTitle = ""
if (textContains("来源").exists()) { // 有时无法获取到 来源
currentNewsTitle = textContains("来源").findOne().parent().children()[0].text();
} else if (textContains("作者").exists()) {
currentNewsTitle = textContains("作者").findOne().parent().children()[0].text();
} else if (descContains("来源").exists()) {
currentNewsTitle = descContains("来源").findOne().parent().children()[0].desc();
} else if (descContains("作者").exists()) {
currentNewsTitle = descContains("作者").findOne().parent().children()[0].desc();

这段直接改为按ID查然后获取标题下面的那个view找会更准,免得老是找不到标题,如下面代码中加粗部分,标题id为xxqg-article-header这个控件下,只有一个view,则是标题内容

** **

因为有些功能还需要测试,所以今天还不能更新

其实文章标题是有个ID的,建议获取文章标题
//获取当前正在阅读的文章标题
var currentNewsTitle = ""
if (textContains("来源").exists()) { // 有时无法获取到 来源
currentNewsTitle = textContains("来源").findOne().parent().children()[0].text();
} else if (textContains("作者").exists()) {
currentNewsTitle = textContains("作者").findOne().parent().children()[0].text();
} else if (descContains("来源").exists()) {
currentNewsTitle = descContains("来源").findOne().parent().children()[0].desc();
} else if (descContains("作者").exists()) {
currentNewsTitle = descContains("作者").findOne().parent().children()[0].desc();

这段直接改为按ID查然后获取标题下面的那个view找会更准,免得老是找不到标题,如下面代码中加粗部分,标题id为xxqg-article-header这个控件下,只有一个view,则是标题内容


我发现了已经改过了

已更新,可以到release页面下载

commented

厉害了,刚准备反馈下这个问题,没想到今天上来就看到解决了,辛苦了