权限申请配置

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

View File

@ -1,8 +1,8 @@
PODS:
- FinApplet (2.2.0)
- FinApplet (2.4.16)
- Flutter (1.0.0)
- mop (0.1.0):
- FinApplet (= 2.2.0)
- FinApplet (= 2.4.16)
- Flutter
DEPENDENCIES:
@ -20,10 +20,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/mop/ios"
SPEC CHECKSUMS:
FinApplet: 53f8235e950dd540c7cd1716b709a9154dfa05fc
FinApplet: 7e1996d9bc81279a675dda954c8386ea05e7fe26
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
mop: 0c8c250840b4e424d84c49ac4b747ee7113d1195
mop: 64c0911b36f549bd62e06e63f5e8eb8d3de1e78d
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* apiPrefix;
@property(nonatomic,copy)NSString* cryptType;
@property (nonatomic, assign) BOOL disablePermission;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

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

View File

@ -67,16 +67,20 @@ class Mop {
/// [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
/// [cryptType] is optional. cryptType, should be MD5/SM
///
/// [disablePermission] is optional.
///
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', {
'appkey': appkey,
'secret': secret,
'apiServer': apiServer,
'apiPrefix': apiPrefix,
'cryptType': cryptType
'cryptType': cryptType,
'disablePermission': disablePermission
});
return ret;
}