Skip to content

Commit

Permalink
- [x] [帖子] 修复回复引用没转码的问题
Browse files Browse the repository at this point in the history
- [x] [个人中心] 不能加载下一页的问题
  • Loading branch information
czy0729 committed Aug 16, 2019
1 parent 3d50cdd commit db9b96a
Show file tree
Hide file tree
Showing 13 changed files with 2,201 additions and 20 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## CHANGELOG

v0.11.5 - 2019/08/16

—— 修复 ——

- [x] [帖子] 修复回复引用没转码的问题
- [x] [个人中心] 不能加载下一页的问题

v0.11.4 - 2019/08/16

—— 优化 ——
Expand Down
7 changes: 7 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@

#### Versions

v0.11.5 - 2019/08/16

—— 修复 ——

- [x] [帖子] 修复回复引用没转码的问题
- [x] [个人中心] 不能加载下一页的问题

v0.11.4 - 2019/08/16

—— 优化 ——
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ios",
"android"
],
"version": "0.11.1",
"version": "0.11.5",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
Expand Down
2 changes: 1 addition & 1 deletion components/render-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @Author: czy0729
* @Date: 2019-04-29 19:54:57
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-14 16:34:18
* @Last Modified time: 2019-08-16 21:04:45
*/
import React from 'react'
import { View } from 'react-native'
Expand Down
4 changes: 2 additions & 2 deletions constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-02-22 01:25:31
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-16 10:07:59
* @Last Modified time: 2019-08-16 22:07:19
*/
import { Platform } from 'react-native'
import { Constants } from 'expo'
Expand Down Expand Up @@ -33,7 +33,7 @@ export const GITHUB_URL = 'https://github.com/czy0729/Bangumi'
export const GITHUB_RELEASE_URL = `${GITHUB_URL}/releases`
export const GITHUB_RELEASE_REPOS_URL =
'https://api.github.com/repos/czy0729/Bangumi/releases'
export const GITHUB_RELEASE_VERSION = '0.11.4' // 20190816
export const GITHUB_RELEASE_VERSION = '0.11.5' // 20190816
export const CODE_PUSH_VERSION = ''
export const DEV = false

Expand Down
2 changes: 1 addition & 1 deletion navigations.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-06-02 14:42:28
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-16 10:19:16
* @Last Modified time: 2019-08-16 21:59:39
*/
export default {
initialRouteName: 'HomeTab', // HomeTab
Expand Down
5 changes: 3 additions & 2 deletions screens/topic/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
* @Author: czy0729
* @Date: 2019-04-29 19:55:09
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-15 19:52:00
* @Last Modified time: 2019-08-16 21:27:59
*/
import { observable, computed } from 'mobx'
import { rakuenStore, subjectStore, userStore, usersStore } from '@stores'
import store from '@utils/store'
import { removeHTMLTag } from '@utils/html'
import decoder from '@utils/thirdParty/html-entities-decoder'

const namespace = 'ScreenTopic'

Expand Down Expand Up @@ -240,7 +241,7 @@ export default class ScreenTopic extends store {
const [, topicId, related, , subReplyUid, postUid] = replySub.split(',')
let _content = content
if (message) {
const _message = message.replace(
const _message = decoder(message).replace(
/<div class="quote"><q>.*<\/q><\/div>/,
''
)
Expand Down
2 changes: 1 addition & 1 deletion screens/user/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-25 22:57:29
* @Last Modified by: czy0729
* @Last Modified time: 2019-07-28 13:15:27
* @Last Modified time: 2019-08-16 21:32:34
*/
import React from 'react'
import PropTypes from 'prop-types'
Expand Down
8 changes: 3 additions & 5 deletions screens/user/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-25 22:03:14
* @Last Modified by: czy0729
* @Last Modified time: 2019-07-28 13:08:23
* @Last Modified time: 2019-08-16 21:30:56
*/
import { observable, computed } from 'mobx'
import { userStore, collectionStore } from '@stores'
Expand Down Expand Up @@ -52,10 +52,8 @@ export default class ScreenUser extends store {
await this.fetchUsersInfo()

// 用户收藏概览统计
if (!this.userCollectionsStatus._loaded) {
const { userId } = this.params
userStore.fetchUserCollectionsStatus(userId)
}
const { userId } = this.params
userStore.fetchUserCollectionsStatus(userId)

// 用户收藏记录
this.fetchUserCollections(true)
Expand Down
5 changes: 2 additions & 3 deletions stores/collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-02-21 20:40:40
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-11 00:01:08
* @Last Modified time: 2019-08-16 21:57:27
*/
import { observable, computed } from 'mobx'
import { getTimestamp } from '@utils'
Expand Down Expand Up @@ -175,7 +175,6 @@ class Collection extends store {
const userCollectionsHTML = HTML.match(
/<ul id="browserItemList" class="browserFull">(.+?)<\/ul><div id="multipage"/
)

if (userCollectionsHTML) {
// 总页数
if (page === 1) {
Expand All @@ -184,7 +183,7 @@ class Collection extends store {
/<span class="p_edge">\(&nbsp;\d+&nbsp;\/&nbsp;(\d+)&nbsp;\)<\/span>/
) ||
HTML.match(
/<a href="\? page=\d+" class="p">(\d+)<\/a><a href="\? page=2" class="p">&rsaquo;&rsaquo;<\/a>/
/\?page=\d+" class="p">(\d+)<\/a><a href="(.*)page=2" class="p">&rsaquo;&rsaquo;<\/a>/
)
if (pageHTML) {
pageTotal = pageHTML[1]
Expand Down
10 changes: 7 additions & 3 deletions stores/rakuen/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-07-13 18:59:53
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-16 10:26:18
* @Last Modified time: 2019-08-16 21:25:20
*/
import cheerio from 'cheerio-without-node-native'
import { safeObject, trim } from '@utils'
Expand Down Expand Up @@ -331,7 +331,9 @@ export function cheerioTopic(HTML) {
comments =
$('#comment_list > div.row_reply')
.map((index, element) => {
const $row = cheerio(element)
const $row = cheerio(element, {
decodeEntities: false
})
const [floor, time] = (
$row.find('> div.re_info > small').text() || ''
)
Expand Down Expand Up @@ -362,7 +364,9 @@ export function cheerioTopic(HTML) {
$row
.find('div.sub_reply_bg')
.map((index, element) => {
const $row = cheerio(element)
const $row = cheerio(element, {
decodeEntities: false
})
const [floor, time] = ($row.find('small').text() || '')
.replace(' / del / edit', '')
.split(' - ')
Expand Down
2 changes: 1 addition & 1 deletion stores/users/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-07-24 11:11:43
* @Last Modified by: czy0729
* @Last Modified time: 2019-08-12 16:55:56
* @Last Modified time: 2019-08-16 21:04:58
*/
import cheerio from 'cheerio-without-node-native'

Expand Down
Loading

0 comments on commit db9b96a

Please sign in to comment.