Thank you everyone, I have found a solution. When returning float or double type in the background, use NSDecimalNumber to deal with the problem of precision loss. Here I received it in string mode and directly added the NSString classification. The correction method is posted as follows:
Isn’t the returned string a string? id = 2747 is the basic data type. Let the background process it directly
Try using NSNumber accept? Then, sometimes the type conversion does go wrong, and then you can try it again on the browser.
Thank you everyone, I have found a solution. When returning float or double type in the background, use NSDecimalNumber to deal with the problem of precision loss.
Here I received it in string mode and directly added the NSString classification. The correction method is posted as follows:
+(NSString )reviseString:(NSString )string{
}
The data returned in this way is the corrected precision data. Because of personal needs, it is converted into string type