style: 简化createOption

This commit is contained in:
MoeFurina
2026-07-15 21:06:50 +08:00
parent f527c1ef73
commit 321c25bd7d
4 changed files with 19 additions and 15 deletions
+2 -8
View File
@@ -1,11 +1,5 @@
// 获取广告
// 基于逆向网易云音乐 v9.5.45 RN Hermes 源码:
// - adService.getAd() → Network.nativeRequest → /api/ad/get
// - 需要 X-antiCheatToken 易盾反作弊头
// - 使用 xeapi 加密
//
// 返回 extra.reqId 可用于 ad_listening_rights_gain 的 reqUid
//
const createOption = require('../util/option.js')
module.exports = async (query, request) => {
@@ -19,7 +13,7 @@ module.exports = async (query, request) => {
const res = await request(`/api/ad/get`, data, option)
const raw = res.body
// 提取广告中的 req_id (用于领取权益)
// 提取广告中的 req_id
let reqId = ''
try {
if (raw?.ads) {