Skip to content

Commit db9b96a

Browse files
committed
- [x] [帖子] 修复回复引用没转码的问题
- [x] [个人中心] 不能加载下一页的问题
1 parent 3d50cdd commit db9b96a

File tree

13 files changed

+2201
-20
lines changed

13 files changed

+2201
-20
lines changed

CHANGELOG.MD

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## CHANGELOG
22

3+
v0.11.5 - 2019/08/16
4+
5+
—— 修复 ——
6+
7+
- [x] [帖子] 修复回复引用没转码的问题
8+
- [x] [个人中心] 不能加载下一页的问题
9+
310
v0.11.4 - 2019/08/16
411

512
—— 优化 ——

README.MD

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616

1717
#### Versions
1818

19+
v0.11.5 - 2019/08/16
20+
21+
—— 修复 ——
22+
23+
- [x] [帖子] 修复回复引用没转码的问题
24+
- [x] [个人中心] 不能加载下一页的问题
25+
1926
v0.11.4 - 2019/08/16
2027

2128
—— 优化 ——

app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ios",
99
"android"
1010
],
11-
"version": "0.11.1",
11+
"version": "0.11.5",
1212
"orientation": "portrait",
1313
"icon": "./assets/images/icon.png",
1414
"splash": {

components/render-html/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @Author: czy0729
55
* @Date: 2019-04-29 19:54:57
66
* @Last Modified by: czy0729
7-
* @Last Modified time: 2019-08-14 16:34:18
7+
* @Last Modified time: 2019-08-16 21:04:45
88
*/
99
import React from 'react'
1010
import { View } from 'react-native'

constants/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: czy0729
44
* @Date: 2019-02-22 01:25:31
55
* @Last Modified by: czy0729
6-
* @Last Modified time: 2019-08-16 10:07:59
6+
* @Last Modified time: 2019-08-16 22:07:19
77
*/
88
import { Platform } from 'react-native'
99
import { Constants } from 'expo'
@@ -33,7 +33,7 @@ export const GITHUB_URL = 'https://github.com/czy0729/Bangumi'
3333
export const GITHUB_RELEASE_URL = `${GITHUB_URL}/releases`
3434
export const GITHUB_RELEASE_REPOS_URL =
3535
'https://api.github.com/repos/czy0729/Bangumi/releases'
36-
export const GITHUB_RELEASE_VERSION = '0.11.4' // 20190816
36+
export const GITHUB_RELEASE_VERSION = '0.11.5' // 20190816
3737
export const CODE_PUSH_VERSION = ''
3838
export const DEV = false
3939

navigations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: czy0729
33
* @Date: 2019-06-02 14:42:28
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-08-16 10:19:16
5+
* @Last Modified time: 2019-08-16 21:59:39
66
*/
77
export default {
88
initialRouteName: 'HomeTab', // HomeTab

screens/topic/store.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
* @Author: czy0729
33
* @Date: 2019-04-29 19:55:09
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-08-15 19:52:00
5+
* @Last Modified time: 2019-08-16 21:27:59
66
*/
77
import { observable, computed } from 'mobx'
88
import { rakuenStore, subjectStore, userStore, usersStore } from '@stores'
99
import store from '@utils/store'
1010
import { removeHTMLTag } from '@utils/html'
11+
import decoder from '@utils/thirdParty/html-entities-decoder'
1112

1213
const namespace = 'ScreenTopic'
1314

@@ -240,7 +241,7 @@ export default class ScreenTopic extends store {
240241
const [, topicId, related, , subReplyUid, postUid] = replySub.split(',')
241242
let _content = content
242243
if (message) {
243-
const _message = message.replace(
244+
const _message = decoder(message).replace(
244245
/<div class="quote"><q>.*<\/q><\/div>/,
245246
''
246247
)

screens/user/list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: czy0729
33
* @Date: 2019-05-25 22:57:29
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-07-28 13:15:27
5+
* @Last Modified time: 2019-08-16 21:32:34
66
*/
77
import React from 'react'
88
import PropTypes from 'prop-types'

screens/user/store.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: czy0729
33
* @Date: 2019-05-25 22:03:14
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-07-28 13:08:23
5+
* @Last Modified time: 2019-08-16 21:30:56
66
*/
77
import { observable, computed } from 'mobx'
88
import { userStore, collectionStore } from '@stores'
@@ -52,10 +52,8 @@ export default class ScreenUser extends store {
5252
await this.fetchUsersInfo()
5353

5454
// 用户收藏概览统计
55-
if (!this.userCollectionsStatus._loaded) {
56-
const { userId } = this.params
57-
userStore.fetchUserCollectionsStatus(userId)
58-
}
55+
const { userId } = this.params
56+
userStore.fetchUserCollectionsStatus(userId)
5957

6058
// 用户收藏记录
6159
this.fetchUserCollections(true)

stores/collection/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: czy0729
44
* @Date: 2019-02-21 20:40:40
55
* @Last Modified by: czy0729
6-
* @Last Modified time: 2019-08-11 00:01:08
6+
* @Last Modified time: 2019-08-16 21:57:27
77
*/
88
import { observable, computed } from 'mobx'
99
import { getTimestamp } from '@utils'
@@ -175,7 +175,6 @@ class Collection extends store {
175175
const userCollectionsHTML = HTML.match(
176176
/<ul id="browserItemList" class="browserFull">(.+?)<\/ul><div id="multipage"/
177177
)
178-
179178
if (userCollectionsHTML) {
180179
// 总页数
181180
if (page === 1) {
@@ -184,7 +183,7 @@ class Collection extends store {
184183
/<span class="p_edge">\(&nbsp;\d+&nbsp;\/&nbsp;(\d+)&nbsp;\)<\/span>/
185184
) ||
186185
HTML.match(
187-
/<a href="\? page=\d+" class="p">(\d+)<\/a><a href="\? page=2" class="p">&rsaquo;&rsaquo;<\/a>/
186+
/\?page=\d+" class="p">(\d+)<\/a><a href="(.*)page=2" class="p">&rsaquo;&rsaquo;<\/a>/
188187
)
189188
if (pageHTML) {
190189
pageTotal = pageHTML[1]

stores/rakuen/common.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: czy0729
33
* @Date: 2019-07-13 18:59:53
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-08-16 10:26:18
5+
* @Last Modified time: 2019-08-16 21:25:20
66
*/
77
import cheerio from 'cheerio-without-node-native'
88
import { safeObject, trim } from '@utils'
@@ -331,7 +331,9 @@ export function cheerioTopic(HTML) {
331331
comments =
332332
$('#comment_list > div.row_reply')
333333
.map((index, element) => {
334-
const $row = cheerio(element)
334+
const $row = cheerio(element, {
335+
decodeEntities: false
336+
})
335337
const [floor, time] = (
336338
$row.find('> div.re_info > small').text() || ''
337339
)
@@ -362,7 +364,9 @@ export function cheerioTopic(HTML) {
362364
$row
363365
.find('div.sub_reply_bg')
364366
.map((index, element) => {
365-
const $row = cheerio(element)
367+
const $row = cheerio(element, {
368+
decodeEntities: false
369+
})
366370
const [floor, time] = ($row.find('small').text() || '')
367371
.replace(' / del / edit', '')
368372
.split(' - ')

stores/users/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: czy0729
33
* @Date: 2019-07-24 11:11:43
44
* @Last Modified by: czy0729
5-
* @Last Modified time: 2019-08-12 16:55:56
5+
* @Last Modified time: 2019-08-16 21:04:58
66
*/
77
import cheerio from 'cheerio-without-node-native'
88

0 commit comments

Comments
 (0)