Skip to content

Commit

Permalink
image
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom10086 committed Apr 11, 2021
1 parent 4c3a849 commit 091e27f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void onCreate(Bundle savedInstanceState) {
"bug反馈:<br />" +
"1.到 <a href=\"forum.php?mod=viewthread&tid=" + App.POST_TID + "&mobile=2\">本帖</a> 回复<br />" +
"2.本站 <a href=\"home.php?mod=space&uid=252553&do=profile&mobile=2\">@谁用了FREEDOM</a><br />" +
"3.本站 <a href=\"home.php?mod=space&uid=261098&do=profile&mobile=2\">@wangfuyang</a><br />" +
"3.邮件 <a href=\"mailto:[email protected]\">[email protected]</a><br />" +
"4.本站 <a href=\"home.php?mod=space&uid=260255&do=profile&mobile=2\">@金鲨鱼</a><br />" +
"5.github提交 <a href=\"https://github.com/freedom10086/Ruisi/issues\">点击这儿<br /></a><br /><br />" +
"<b>下载地址: <a href=\"https://www.coolapk.com/apk/149321\">库安</a></b><br />";
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/me/yluo/ruisiapp/activity/PostActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,12 @@ protected List<SingleArticleData> doInBackground(String... params) {
}
}

// 处理未点击添加到帖子里的图片
// http://rsbbs.xidian.edu.cn/forum.php?mod=viewthread&tid=952530&page=1&mobile=2
final Elements extraImages = temp.select("ul[class^=img_]").select("li");
if (extraImages.size() > 0) {
contentels.append(extraImages.html());
}

SingleArticleData data;
if (pageLoad == 1 && i == 0) {//内容
Expand Down Expand Up @@ -1262,6 +1268,8 @@ private void handleReply(boolean isok, String res) {
showToast("您两次发表间隔太短了......");
} else if (res.contains("主题自动关闭")) {
showLongToast("此主题已关闭回复,无法回复");
} else if (!TextUtils.isEmpty(RuisUtils.getRuisiReqAjaxError(res))) {
showLongToast(RuisUtils.getRuisiReqAjaxError(res));
} else {
showToast("由于未知原因发表失败");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ public static void handleClick(final Context context, String url) {
}

} else {
if (!url.startsWith("http")) {
if (!url.startsWith("http") && !url.startsWith("mailto:")) {
url = App.getBaseUrl() + url;
}


CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder.setToolbarColor(ContextCompat.getColor(context, R.color.colorPrimary));
CustomTabsIntent customTabsIntent = builder.build();
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/java/me/yluo/ruisiapp/utils/RuisUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,29 @@ public static String getErrorTextPC(String res) {
return null;
}

//<dt id="messagetext">
//<p>密码太弱,密码中必须包含数字<script type="text/javascript" reload="1">if(typeof errorhandle_=='function') {errorhandle_('密码太弱,密码中必须包含数字', {});}</script></p>
public static String getRuisiReqAjaxError(String res) {
if (!res.contains("id=\"messagetext\"")) {
return null;
}

int index = res.indexOf("id=\"messagetext\"");
if (index < 0) {
return null;
}

index = res.indexOf("<p>", index);
if (index < 0) {
return null;
}

int startIndex = index + "<p>".length();
int endIndex = res.indexOf("<script", startIndex);

return res.substring(startIndex, endIndex);
}


//获得到下一等级的积分
public static int getNextLevel(int a) {
Expand Down

0 comments on commit 091e27f

Please sign in to comment.