mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-05-20 16:15:47 +08:00
修复请求重写编辑中文乱码
This commit is contained in:
@@ -199,17 +199,13 @@ async function onResponse(context, request, response) {
|
||||
|
||||
/// js结果转换
|
||||
static Future<dynamic> jsResultResolve(JsEvalResult jsResult) async {
|
||||
if (jsResult.isPromise) {
|
||||
if (jsResult.isPromise || jsResult.rawResult is Future) {
|
||||
jsResult = await flutterJs.handlePromise(jsResult);
|
||||
}
|
||||
var result = jsResult.rawResult;
|
||||
if (Platform.isMacOS || Platform.isIOS) {
|
||||
result = flutterJs.convertValue(jsResult);
|
||||
}
|
||||
if (result is Future) {
|
||||
flutterJs.executePendingJob();
|
||||
result = await (jsResult.rawResult as Future);
|
||||
}
|
||||
if (result is String) {
|
||||
result = jsonDecode(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user