Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后端返回超长数字怎么解决 #146

Open
xIongEr1213 opened this issue Dec 11, 2024 · 1 comment
Open

后端返回超长数字怎么解决 #146

xIongEr1213 opened this issue Dec 11, 2024 · 1 comment

Comments

@xIongEr1213
Copy link

rawData的数据格式还是一个对象,怎么直接获取json格式的数据呢

@lei-mu
Copy link
Owner

lei-mu commented Dec 11, 2024

将 config dataType 设置为 ‘text’ 试试。
uni.request dataType 如果设为 json,会对返回的数据进行一次 JSON.parse,非 json 不会进行 JSON.parse
文档uni.request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants