fix: dyn comment type

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-04 23:40:05 +08:00
parent 21da122902
commit 4aaaffbcea
2 changed files with 5 additions and 3 deletions

View File

@@ -64,11 +64,11 @@ class HtmlHttp {
.innerHtml; .innerHtml;
} catch (_) {} } catch (_) {}
String commentId = opusDetail List comment = opusDetail
.querySelector('.bili-comment-container')! .querySelector('.bili-comment-container')!
.className .className
.split(' ')[1] .split(' ')[1]
.split('-')[2]; .split('-');
// List imgList = opusDetail.querySelectorAll('bili-album__preview__picture__img'); // List imgList = opusDetail.querySelectorAll('bili-album__preview__picture__img');
return { return {
'status': true, 'status': true,
@@ -76,7 +76,8 @@ class HtmlHttp {
'uname': uname, 'uname': uname,
'updateTime': updateTime, 'updateTime': updateTime,
'content': (test ?? '') + opusContent, 'content': (test ?? '') + opusContent,
'commentId': int.parse(commentId) 'commentType': int.parse(comment[1]),
'commentId': int.parse(comment[2]),
}; };
} catch (err) { } catch (err) {
debugPrint('err: $err'); debugPrint('err: $err');

View File

@@ -41,6 +41,7 @@ class DynamicDetailController extends ReplyController {
// 根据jumpUrl获取动态html // 根据jumpUrl获取动态html
reqHtmlByOpusId(int id) async { reqHtmlByOpusId(int id) async {
var res = await HtmlHttp.reqHtml(id, 'opus'); var res = await HtmlHttp.reqHtml(id, 'opus');
type = res['commentType'];
oid = res['commentId']; oid = res['commentId'];
queryData(); queryData();
} }