framework7io / framework7-vue

Deprecated! Build full featured iOS & Android apps using Framework7 & Vue
http://framework7.io/vue/
MIT License
674 stars 151 forks source link

The ajax method $request.post work on Android incorrect. #387

Closed yaojunWang closed 6 years ago

yaojunWang commented 6 years ago

This is a (multiple allowed):

What I did

/*a base64 encoded jpeg image.*/ var img ='XXXXXXXX'; var param = {}; param.contentBase64=encodeURIComponent(img); app.$request.post( /* url */ 'http://stbs.market.alicloudapi.com/word/entity/recognize', /* data */ param, /* success */ function (data) { if(data.success){ alert(data.data[0].contents) }else{ console.log(data); } }, /* error */ function(err){ console.log(err) }, /* dataType */ 'json');

Expected Behavior

It works correctly on all platform.

Actual Behavior

It works correctly on iOS to show the result json's contents, but call error callback on Android6.0 and Android 7.0.

The error callback object like this: img_20180319_164507

nolimits4web commented 6 years ago
  1. Update F7 libs to latest
  2. Check the console with request data, it works the same, but looks like there is a request error in Android that need to be checked in debug console
yaojunWang commented 6 years ago

@nolimits4web Thanks for advice.I updated the libs to 2.0.10 , but still not working. Is there any limit to the length of the parameter?

nolimits4web commented 6 years ago

Do other POST requests work in your Android app? You need to check debug console to see what is the issu

yaojunWang commented 6 years ago

Thanks.I find the answer here