Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/packages/uploader/uploader.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const InternalUploader: ForwardRefRenderFunction<
document.body.appendChild(obj)
}
}
if ((getEnv() === 'WEAPP' || getEnv() === 'JD') && chooseMedia) {
if (getEnv() === 'WEAPP' && chooseMedia) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

发现其他文件中仍存在 'JD' 环境检查,请检查并确保一致性。

  • src/packages/signature/signature.taro.tsx
🔗 Analysis chain

修改看起来符合预期,但建议进行额外验证。

这个改动移除了对 'JD' 环境的特殊处理,现在只有在 'WEAPP' 环境下才会使用 chooseMedia API。这符合 PR 的目标,即在 'JD' 环境下使用 chooseImage API。

建议在 'JD' 环境中测试此更改,以确保 chooseImage API 能够正常工作,并且没有引入任何意外的副作用。可以运行以下脚本来检查是否有其他地方可能受到影响:

如果脚本返回结果,请检查这些位置是否也需要类似的更改。


建议调整搜索命令以正确识别 .ts.tsx 文件。可以使用 --glob 选项来指定文件扩展名。以下是更新后的脚本:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:检查代码库中是否有其他地方使用了 'JD' 环境检查
rg "getEnv\(\)\s*===\s*('|\")JD('|\")" --type tsx --type ts

Length of output: 93


Script:

#!/bin/bash
# 描述:检查代码库中是否有其他地方使用了 'JD' 环境检查
rg "getEnv\(\)\s*===\s*('|\")JD('|\")" --glob '*.ts' --glob '*.tsx'

Length of output: 269

// 其余端全部使用 chooseImage API
chooseMedia({
count: multiple ? (maxCount as number) * 1 - fileList.length : 1,
Expand Down
Loading