24 lines
787 B
Dart
24 lines
787 B
Dart
import '../../login/login/app_get_version.dart';
|
|
import '../../network/api_repository.dart';
|
|
import '../storage.dart';
|
|
import 'customer_tool.dart';
|
|
import 'pay/wx_pay_tool.dart';
|
|
|
|
class WechatManageTool {
|
|
static void init(String wechatServiceUrl) {
|
|
// CustomerTool.init(wechatServiceUrl);
|
|
}
|
|
|
|
static Future<void> getAppInfo(void Function() action) async {
|
|
// AppLog.log('AppFirstEnterHandle调用了获取App信息接口');
|
|
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
|
if (entity.errorCode == 0) {
|
|
Storage.setString(
|
|
appVersionHistoryUrl, entity.data?.appVersionHistoryUrl ?? '');
|
|
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
|
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
|
action();
|
|
}
|
|
}
|
|
}
|