|
@@ -3,6 +3,7 @@ import 'dart:io'; |
|
|
import 'package:flutter/cupertino.dart'; |
|
|
import 'package:flutter/cupertino.dart'; |
|
|
import 'package:flutter_alibc/alibc_model.dart'; |
|
|
import 'package:flutter_alibc/alibc_model.dart'; |
|
|
import 'package:flutter_alibc/flutter_alibc.dart'; |
|
|
import 'package:flutter_alibc/flutter_alibc.dart'; |
|
|
|
|
|
import 'package:fluttertoast/fluttertoast.dart'; |
|
|
import 'package:jdsdk/jdsdk.dart'; |
|
|
import 'package:jdsdk/jdsdk.dart'; |
|
|
import 'package:url_launcher/url_launcher.dart'; |
|
|
import 'package:url_launcher/url_launcher.dart'; |
|
|
import 'package:zhiying_comm/models/user/user_info_model.dart'; |
|
|
import 'package:zhiying_comm/models/user/user_info_model.dart'; |
|
@@ -12,7 +13,7 @@ import 'package:zhiying_comm/util/global_config.dart'; |
|
|
import 'package:zhiying_comm/util/log/let_log.dart'; |
|
|
import 'package:zhiying_comm/util/log/let_log.dart'; |
|
|
import 'package:zhiying_comm/util/net_util.dart'; |
|
|
import 'package:zhiying_comm/util/net_util.dart'; |
|
|
import 'package:zhiying_comm/util/taobao/taobao_auth.dart'; |
|
|
import 'package:zhiying_comm/util/taobao/taobao_auth.dart'; |
|
|
import 'package:fluttertoast/fluttertoast.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../router_util.dart'; |
|
|
import '../router_util.dart'; |
|
|
|
|
|
|
|
|
class TurnChainUtil { |
|
|
class TurnChainUtil { |
|
@@ -104,9 +105,14 @@ class TurnChainUtil { |
|
|
case GlobalConfig.PROVIDER_PDD: |
|
|
case GlobalConfig.PROVIDER_PDD: |
|
|
case GlobalConfig.PROVIDER_SN: |
|
|
case GlobalConfig.PROVIDER_SN: |
|
|
case GlobalConfig.PROVIDER_VIP: |
|
|
case GlobalConfig.PROVIDER_VIP: |
|
|
if (!EmptyUtil.isEmpty(appUrl) && await canLaunch(appUrl)) { |
|
|
|
|
|
Logger.log('打开${provider} app, url = ${appUrl}'); |
|
|
|
|
|
launch(appUrl); |
|
|
|
|
|
|
|
|
bool launchable = await canLaunch(appUrl); |
|
|
|
|
|
if (Platform.isIOS) { |
|
|
|
|
|
launchable = await launch(appUrl); |
|
|
|
|
|
} |
|
|
|
|
|
if (launchable) { |
|
|
|
|
|
if (!Platform.isIOS) { |
|
|
|
|
|
await launch(appUrl); |
|
|
|
|
|
} |
|
|
} else if (!EmptyUtil.isEmpty(webUrl)) { |
|
|
} else if (!EmptyUtil.isEmpty(webUrl)) { |
|
|
Logger.log('打开${provider} webUrl, url = ${webUrl}'); |
|
|
Logger.log('打开${provider} webUrl, url = ${webUrl}'); |
|
|
RouterUtil.openWebview(webUrl, context); |
|
|
RouterUtil.openWebview(webUrl, context); |
|
|