Ver a proveniência

1.优化公共跳转

tags/0.0.7+4
“yanghuaxuan” há 3 anos
ascendente
cometimento
d2f24c874e
2 ficheiros alterados com 21 adições e 0 eliminações
  1. +20
    -0
      lib/util/turn_chain/turn_chain_util.dart
  2. +1
    -0
      lib/zhiying_comm.dart

+ 20
- 0
lib/util/turn_chain/turn_chain_util.dart Ver ficheiro

@@ -119,6 +119,26 @@ class TurnChainUtil {
case GlobalConfig.PROVIDER_KL:
case GlobalConfig.PROVIDER_PDD:
case GlobalConfig.PROVIDER_SN:
bool launchable = await canLaunch(appUrl);
if (Platform.isIOS) {
launchable = await launch(appUrl);
}
if (launchable) {
if (!Platform.isIOS) {
if(appUrl.startsWith("suning")){
RouterUtil.openWebview(webUrl, context);
}else{
RouterUtil.openWebview(webUrl, context);
}
}
} else if (!EmptyUtil.isEmpty(webUrl)) {
Logger.log('打开${provider} webUrl, url = ${webUrl}');
RouterUtil.openWebview(webUrl, context);
} else {
Fluttertoast.cancel();
Fluttertoast.showToast(msg: '购买链接不存在');
}
break;
case GlobalConfig.PROVIDER_VIP:
bool launchable = await canLaunch(appUrl);
if (Platform.isIOS) {


+ 1
- 0
lib/zhiying_comm.dart Ver ficheiro

@@ -49,3 +49,4 @@ export 'package:zhiying_comm/util/encode_util.dart';
export 'package:path_provider/path_provider.dart';
export 'package:dio/dio.dart';
export 'package:fluwx/fluwx.dart';
export 'package:permission_handler/permission_handler.dart';

Carregando…
Cancelar
Guardar