fix: rid_str长度大于12时使用dynamic_id_str

This commit is contained in:
shanmite 2021-02-26 15:38:04 +08:00
parent 6149819919
commit e93b86ed32

View File

@ -120,7 +120,7 @@ class Public {
obj.official_verify = official_verify.type > -1 ? true : false; /* 是否官方号 */
obj.createtime = desc.timestamp /* 动态的ts10 */
obj.type = desc.type /* 动态类型 */
obj.rid_str = obj.type === 1 ? desc.dynamic_id_str : desc.rid_str;/* 用于发送评论 */
obj.rid_str = desc.rid_str.length > 12 ? desc.dynamic_id_str : desc.rid_str;/* 用于发送评论 */
obj.orig_type = desc.orig_type /* 源动态类型 */
obj.dynamic_id = desc.dynamic_id_str; /* 转发者的动态ID !!!!此为大数需使用字符串值,不然JSON.parse()会有丢失精度 */
const { extension, extend_json } = onecard;