权限申请配置

master
kangxuyao 2020-07-27 09:13:55 +08:00
parent 0a25869196
commit 641681f9b6
7 changed files with 23 additions and 10 deletions

View File

@ -91,6 +91,6 @@ kapt {
} }
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.finogeeks.lib:finapplet:2.9.2' implementation 'com.finogeeks.lib:finapplet:2.8.81'
} }

View File

@ -56,6 +56,10 @@ public class BaseModule extends BaseApi {
apiPrefix = apiPrefix + "/"; apiPrefix = apiPrefix + "/";
} }
} }
Boolean disablePermission = (Boolean) param.get("disablePermission");
if (disablePermission == null) {
disablePermission = false;
}
FinAppConfig config = new FinAppConfig.Builder() FinAppConfig config = new FinAppConfig.Builder()
.setAppKey(appkey) .setAppKey(appkey)
.setAppSecret(secret) .setAppSecret(secret)
@ -63,6 +67,7 @@ public class BaseModule extends BaseApi {
.setApiPrefix(apiPrefix) .setApiPrefix(apiPrefix)
.setGlideWithJWT(false) .setGlideWithJWT(false)
.setEncryptionType(cryptType) .setEncryptionType(cryptType)
.setDisableRequestPermissions(disablePermission)
.build(); .build();
// SDKSDK // SDKSDK
FinCallback<Object> cb = new FinCallback<Object>() { FinCallback<Object> cb = new FinCallback<Object>() {

View File

@ -1,8 +1,8 @@
PODS: PODS:
- FinApplet (2.2.0) - FinApplet (2.4.16)
- Flutter (1.0.0) - Flutter (1.0.0)
- mop (0.1.0): - mop (0.1.0):
- FinApplet (= 2.2.0) - FinApplet (= 2.4.16)
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
@ -20,10 +20,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/mop/ios" :path: ".symlinks/plugins/mop/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
FinApplet: 53f8235e950dd540c7cd1716b709a9154dfa05fc FinApplet: 7e1996d9bc81279a675dda954c8386ea05e7fe26
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
mop: 0c8c250840b4e424d84c49ac4b747ee7113d1195 mop: 64c0911b36f549bd62e06e63f5e8eb8d3de1e78d
PODFILE CHECKSUM: fa591ea0d89752dd0191ae3f82c83db034678e82 PODFILE CHECKSUM: fa591ea0d89752dd0191ae3f82c83db034678e82
COCOAPODS: 1.9.1 COCOAPODS: 1.9.3

View File

@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic,copy)NSString* apiServer; @property(nonatomic,copy)NSString* apiServer;
@property(nonatomic,copy)NSString* apiPrefix; @property(nonatomic,copy)NSString* apiPrefix;
@property(nonatomic,copy)NSString* cryptType; @property(nonatomic,copy)NSString* cryptType;
@property (nonatomic, assign) BOOL disablePermission;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@ -33,7 +33,10 @@
{ {
config.cryptType = FATApiCryptTypeMD5; config.cryptType = FATApiCryptTypeMD5;
} }
NSLog(@"disablePermission:%d",self.disablePermission);
config.autoAdaptDarkMode = YES; config.autoAdaptDarkMode = YES;
config.disableAuthorize = self.disablePermission;
NSError* error = nil; NSError* error = nil;
[[FATClient sharedClient] initWithConfig:config error:&error]; [[FATClient sharedClient] initWithConfig:config error:&error];
if (error) { if (error) {

View File

@ -17,6 +17,6 @@ A new flutter plugin project.
s.dependency 'Flutter' s.dependency 'Flutter'
s.ios.deployment_target = '8.0' s.ios.deployment_target = '8.0'
s.dependency 'FinApplet' , '2.5.6' s.dependency 'FinApplet' , '2.4.16'
end end

View File

@ -67,16 +67,20 @@ class Mop {
/// [apiServer] is optional. the mop server address. default is https://mp.finogeek.com /// [apiServer] is optional. the mop server address. default is https://mp.finogeek.com
/// [apiPrefix] is optional. the mop server prefix. default is /api/v1/mop /// [apiPrefix] is optional. the mop server prefix. default is /api/v1/mop
/// [cryptType] is optional. cryptType, should be MD5/SM /// [cryptType] is optional. cryptType, should be MD5/SM
/// /// [disablePermission] is optional.
/// ///
Future<Map> initialize(String appkey, String secret, Future<Map> initialize(String appkey, String secret,
{String apiServer, String apiPrefix, String cryptType}) async { {String apiServer,
String apiPrefix,
String cryptType,
bool disablePermission}) async {
final Map ret = await _channel.invokeMethod('initialize', { final Map ret = await _channel.invokeMethod('initialize', {
'appkey': appkey, 'appkey': appkey,
'secret': secret, 'secret': secret,
'apiServer': apiServer, 'apiServer': apiServer,
'apiPrefix': apiPrefix, 'apiPrefix': apiPrefix,
'cryptType': cryptType 'cryptType': cryptType,
'disablePermission': disablePermission
}); });
return ret; return ret;
} }