Skip to content

Commit

Permalink
Merge pull request #16 from weiruiyang/master
Browse files Browse the repository at this point in the history
更新sdk
  • Loading branch information
weiruiyang authored Apr 27, 2020
2 parents 1a98cdc + ee060cb commit 8a34116
Show file tree
Hide file tree
Showing 42 changed files with 587 additions and 158 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jg-jverification-cordova-plugin",
"version": "1.2.5",
"version": "1.2.6",
"description": "JVerification-cordova-plugin",
"cordova": {
"id": "jg-jverification-cordova-plugin",
Expand Down
10 changes: 7 additions & 3 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin xmlns:android="http://schemas.android.com/apk/res/android"
id="jg-jverification-cordova-plugin" version="1.2.5"
id="jg-jverification-cordova-plugin" version="1.2.6"
xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>JVerification-cordova-plugin</name>

Expand All @@ -27,13 +27,14 @@
<header-file src="src/ios/JVERIFICATIONService.h"/>
<header-file src="src/ios/JVerificationPlugin.h"/>
<source-file src="src/ios/JVerificationPlugin.m"/>
<source-file src="src/ios/jverification-ios-2.5.2.a" framework="true" />
<source-file src="src/ios/jverification-ios-2.6.2.a" framework="true" />

<resource-file src="src/ios/JVerificationConfig.plist" />
<resource-file src="src/ios/JVerificationResource.bundle" />

<framework src="src/ios/TYRZSDK.framework" custom="true" />
<framework src="src/ios/EAccountApiSDK.framework" custom="true" />
<framework src="src/ios/OAuth.framework" custom="true" />
<framework src="src/ios/account_verify_sdk_core.framework" custom="true" />
<framework src="src/ios/account_login_sdk_noui_core.framework" custom="true" />

Expand All @@ -50,6 +51,7 @@
<framework src="TYRZSDK.framework" weak="true" />
<framework src="account_login_sdk_noui_core.framework" weak="true" />
<framework src="EAccountApiSDK.framework" weak="true" />
<framework src="OAuth.framework" weak="true" />

<framework src="libresolv.tbd" />
<framework src="libz.tbd" />
Expand Down Expand Up @@ -135,7 +137,7 @@
<resource-file src="src/android/libs/x86/libCtaApiLib.so" target="jniLibs/x86/libCtaApiLib.so"/>
<resource-file src="src/android/libs/x86_64/libCtaApiLib.so" target="jniLibs/x86_64/libCtaApiLib.so"/>

<lib-file src="src/android/libs/jverification-android-release-2.5.2.jar" />
<lib-file src="src/android/libs/jverification-android-release-2.6.3.jar" />
<source-file src="src/android/cn/jiguang/cordova/verification/JVerificationPlugin.java"
target-dir="src/cn/jiguang/cordova/verification/" />

Expand All @@ -162,5 +164,7 @@
<resource-file src="src/android/res/drawable-xxhdpi/umcsdk_sms_unable.png" target="res/drawable-xxhdpi/umcsdk_sms_unable.png"/>
<resource-file src="src/android/res/drawable-xxhdpi/umcsdk_toast_bg.png" target="res/drawable-xxhdpi/umcsdk_toast_bg.png"/>
<resource-file src="src/android/res/drawable-xxhdpi/umcsdk_uncheck_image.png" target="res/drawable-xxhdpi/umcsdk_uncheck_image.png"/>

<resource-file src="src/android/assets/cucc/host_cucc.properties" target="assets/cucc/host_cucc.properties"/>
</platform>
</plugin>
4 changes: 4 additions & 0 deletions src/android/assets/cucc/host_cucc.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#统计平台
PRODUCE_STATISTICAL=https://daily.m.zzx9.cn
#取号平台
PRODUCE_DZH=https://auth.wosms.cn
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,33 @@ public void onResult(int code, String desc) {
});
}


void getSmsCode(JSONArray data, CallbackContext callbackContext) {
Context context = mContext;
String phonenum = data.optString(0);
String sign_id = data.optString(1);
String temp_id = data.optString(2);
JVerificationInterface.getSmsCode(context, phonenum, sign_id, temp_id, new RequestCallback<String>() {
@Override
public void onResult(int code, String msg) {

JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("code", code);
jsonObject.put("msg", msg);
} catch (JSONException e) {
e.printStackTrace();
}
sendJsonObject(jsonObject, callbackContext);
}
});
}

void setSmsIntervalTime(JSONArray data, CallbackContext callbackContext) {
long intervalTime = data.optLong(0);
JVerificationInterface.setSmsIntervalTime(intervalTime);
}

//设置授权页背景
private static final String setAuthBGImgPath = "setAuthBGImgPath";
// 状态栏
Expand Down
Binary file modified src/android/libs/arm64-v8a/libCtaApiLib.so
100755 → 100644
Binary file not shown.
Binary file modified src/android/libs/armeabi-v7a/libCtaApiLib.so
100755 → 100644
Binary file not shown.
Binary file modified src/android/libs/armeabi/libCtaApiLib.so
100755 → 100644
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/android/libs/x86/libCtaApiLib.so
100755 → 100644
Binary file not shown.
Binary file modified src/android/libs/x86_64/libCtaApiLib.so
100755 → 100644
Binary file not shown.
Binary file modified src/ios/EAccountApiSDK.framework/EAccountApiSDK
100755 → 100644
Binary file not shown.
21 changes: 21 additions & 0 deletions src/ios/EAccountApiSDK.framework/Headers/EAccountCTEConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// EAccountCTEConfig.h
// EAccountApiSDK
//
// Created by lvzhzh on 2019/12/4.
// Copyright © 2019 21CN. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface EAccountCTEConfig : NSObject

@property (nonatomic, copy) NSString *timestampDomain;
@property (nonatomic, copy) NSString *preLoginDomain;
@property (nonatomic, copy) NSString *uploadLogDomain;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// EAccountPreLoginConfigModel.h
// EAccountApiSDK
//
// Created by Reticence Lee on 2019/12/12.
// Copyright © 2019 21CN. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface EAccountPreLoginConfigModel : NSObject

/**
NSURLRequest的最大空闲时间 默认3s
*/
@property (nonatomic, assign) NSTimeInterval timeoutIntervalForRequest;

/**
NSURLSession资源获取超时时间 默认3s
*/
@property (nonatomic, assign) NSTimeInterval timeoutIntervalForResource;

/**
socket连接超时时间 默认3s
*/
@property (nonatomic, assign) NSTimeInterval socketConnectTimeoutInterval;

/**
socket请求总超时时间 默认6s 建议设置比 socket连接超时时间 长
*/
@property (nonatomic, assign) NSTimeInterval socketTotalTimeoutInterval;

#pragma -mark 初始化方法

/**
初始化方法 请调用该方法进行初始化
*/
- (instancetype)initWithDefaultConfig;

@end

NS_ASSUME_NONNULL_END
19 changes: 16 additions & 3 deletions src/ios/EAccountApiSDK.framework/Headers/EAccountSDK.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
//

/**
定制版SDK v3.7.0 20191017 bitcode
定制版SDK v3.7.2 20191217
*/

#import <Foundation/Foundation.h>
#import "EAccountPreLoginConfigModel.h"
#import "EAccountCTEConfig.h"

/**
声明一个block
Expand Down Expand Up @@ -42,14 +44,23 @@ typedef void (^failureHandler) (NSError * _Nonnull error);
+(void)setTestBundleId;


/**
*@description 预登录接口
@param model 接口超时时间配置
*/

+ (void)requestPRELogin:(EAccountPreLoginConfigModel * _Nonnull)model
completion:(nonnull successHandler)completion
failure:(nonnull failureHandler)fail;

/**
*@description 预登录接口
@param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s
*/

+ (void)requestPreLogin:(NSTimeInterval)apiTimeoutInterval
completion:(nonnull successHandler)completion
failure:(nonnull failureHandler)fail;
failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPRELogin:completion:failure:` instead");


/**
Expand All @@ -59,7 +70,9 @@ typedef void (^failureHandler) (NSError * _Nonnull error);

+ (void)getMobileCodeWithTimeout:(NSTimeInterval)apiTimeoutInterval
completion:(nonnull successHandler)completion
failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Method deprecated. Use `requestPreLogin:completion:failure:`");
failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPreLogin:completion:failure:` instead");


+ (void)setDomainName:(EAccountCTEConfig *)config;

@end
Empty file modified src/ios/EAccountApiSDK.framework/Info.plist
100755 → 100644
Empty file.
36 changes: 35 additions & 1 deletion src/ios/JVERIFICATIONService.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#define JVER_VERSION_NUMBER 2.5.2
#define JVER_VERSION_NUMBER 2.6.2


/**
Expand Down Expand Up @@ -119,6 +119,8 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) {
//MARK:图片设置************
/**授权界面背景图片*/
@property (nonatomic,strong) UIImage *authPageBackgroundImage;
/**授权界面背景gif资源路径,与authPageBackgroundImage属性不可生效*/
@property (nonatomic,copy) NSString *authPageGifImagePath;
/**LOGO图片*/
@property (nonatomic,strong) UIImage *logoImg;
/**LOGO图片宽度*/
Expand Down Expand Up @@ -184,10 +186,12 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) {

/**隐私条款一:数组(务必按顺序)
@[条款名称,条款链接]
条款链接, 支持在线文件和NSBundle本地文件, 沙盒中文件仅支持 NSTemporaryDirectory() 路径下文件
*/
@property (nonatomic,strong) NSArray *appPrivacyOne;
/**隐私条款二:数组(务必按顺序)
@[条款名称,条款链接]
条款链接, 支持在线文件和NSBundle本地文件, 沙盒中文件仅支持 NSTemporaryDirectory() 路径下文件
*/
@property (nonatomic,strong) NSArray *appPrivacyTwo;
/**隐私条款名称颜色
Expand Down Expand Up @@ -223,6 +227,16 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) {
*/
@property (nonatomic,copy) void(^customPrivacyAlertViewBlock)(UIViewController * vc);

/// 为隐私文本添加富文本属性,该方法的设置隐私协议富文本属性的优先级最高
/// @param name NSAttributedStringKey
/// @param value NSAttributedStringKey 对应的值
/// @param range 对应字符串范围
- (void)addPrivacyTextAttribute:(NSAttributedStringKey)name value: (id)value range:(NSRange)range;

/// 设置一键登录页面背景视频
/// @param path 视频路径支持在线url或者本地视频路径
/// @param imageName 视频未准备好播放时的占位图片名称
- (void)setVideoBackgroudResource:(NSString*)path placeHolder:(NSString*)imageName;

//MARK:slogan************

Expand Down Expand Up @@ -467,6 +481,26 @@ DEPRECATED_MSG_ATTRIBUTE("Please use JVUIConfig") @interface JVTelecomUIConfig :
*/
+ (void)customUIWithConfig:(JVUIConfig *)UIConfig customViews:(void(^)(UIView *customAreaView))customViewsBlk;

/**
* 获取短信验证码 (最小间隔时间内只能调用一次)
* v2.6.0之后新增接口
* @param phoneNumber 手机号码
* @param templateID 短信模板ID 如果为nil,则为默认短信签名ID
* @param signID 签名ID 如果为nil,则为默认短信签名id
* @param handler block 回调, 成功的时返回的 result 字典包含uuid ,code, msg字段,uuid为此次获取的唯一标识码, 失败时result字段仅返回code ,msg字段
*/
+ (void)getSMSCode:(NSString *)phoneNumber
templateID:(NSString * _Nullable)templateID
signID:(NSString * _Nullable)signID
completionHandler:(void (^_Nonnull)(NSDictionary * _Nonnull result))handler;
/**
* 设置前后两次获取验证码的时间间隔 ,默认为30000ms (30s),有效间隔 (0,300000)
* v2.6.0之后新增接口
* 在设置间隔时间内只能发送一次获取验证码的请求,SDK 默认是30s
* @param intervalTime 时间间隔,单位 ms
*/
+ (void)setGetCodeInternal:(NSTimeInterval)intervalTime;


@end

Expand Down
Loading

0 comments on commit 8a34116

Please sign in to comment.