diff --git a/.gitignore b/.gitignore
index 4fb84c2..efe135f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,4 @@ typings/
*.iml
.idea/
examples/package-lock.json
+.DS_Store
diff --git a/README.md b/README.md
index 6b30268..156ca61 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-# react-native-mkepler (SDK Ver. 2.2.4)
+# react-native-mkepler (SDK Ver. 3.2.0)
## 开始
diff --git a/android/libs/JDSDK_h.jar b/android/libs/JDSDK_h.jar
index 19c795e..670692f 100644
Binary files a/android/libs/JDSDK_h.jar and b/android/libs/JDSDK_h.jar differ
diff --git a/android/src/main/java/com/jd/jdsdk/RNReactNativeMkeplerModule.java b/android/src/main/java/com/jd/jdsdk/RNReactNativeMkeplerModule.java
index a689bcf..3969fae 100644
--- a/android/src/main/java/com/jd/jdsdk/RNReactNativeMkeplerModule.java
+++ b/android/src/main/java/com/jd/jdsdk/RNReactNativeMkeplerModule.java
@@ -243,22 +243,14 @@ public void showItemById(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService()
- .openItemDetailsWebViewPage(itemID,
- mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService()
+ .openItemDetailsWebViewPage(itemID,
+ mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
.openItemDetailsPage(itemID, mKeplerAttachParameter,
reactContext, mOpenAppAction, timeOut);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -283,21 +275,13 @@ public void showItemByUrl(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService().openJDUrlWebViewPage(url,
- mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService().openJDUrlWebViewPage(url,
+ mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
.openJDUrlPage(url, mKeplerAttachParameter,
reactContext, mOpenAppAction, timeOut);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -320,21 +304,13 @@ public void openOrderList(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService().openOrderListWebViewPage(
- mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService().openOrderListWebViewPage(
+ mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
.openOrderListPage(mKeplerAttachParameter,
reactContext, mOpenAppAction, timeOut);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -357,21 +333,13 @@ public void openNavigationPage(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService().openNavigationWebViewPage(
- mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService().openNavigationWebViewPage(
+ mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
.openNavigationPage(mKeplerAttachParameter,
reactContext, mOpenAppAction, timeOut);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -396,21 +364,13 @@ public void openSearchResult(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService().openSearchWebViewPage(
- searchKey, mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService().openSearchWebViewPage(
+ searchKey, mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
.openSearchPage(searchKey, mKeplerAttachParameter,
reactContext, mOpenAppAction, timeOut);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -433,13 +393,8 @@ public void openShoppingCart(final ReadableMap data, final Promise p) {
Boolean isOpenByH5 = data.getBoolean("isOpenByH5");
this.dealParam(data);
if (isOpenByH5 == true) {
- try {
- KeplerApiManager.getWebViewService().openCartWebViewPage(
- mKeplerAttachParameter);
- } catch (KeplerBufferOverflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ KeplerApiManager.getWebViewService().openCartWebViewPage(
+ mKeplerAttachParameter);
} else {
try {
mKelperTask = KeplerApiManager.getWebViewService()
diff --git a/android/src/main/res/drawable-xxhdpi/kepler_back_normal.png b/android/src/main/res/drawable-xxhdpi/kepler_back_normal.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/kepler_back_pressed.png b/android/src/main/res/drawable-xxhdpi/kepler_back_pressed.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/kepler_selcet_more_normal.png b/android/src/main/res/drawable-xxhdpi/kepler_selcet_more_normal.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/kepler_selcet_more_pressed.png b/android/src/main/res/drawable-xxhdpi/kepler_selcet_more_pressed.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/neterror.png b/android/src/main/res/drawable-xxhdpi/neterror.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_has_message.png b/android/src/main/res/drawable-xxhdpi/seclect_item_has_message.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_history.png b/android/src/main/res/drawable-xxhdpi/seclect_item_history.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_logout.png b/android/src/main/res/drawable-xxhdpi/seclect_item_logout.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_no_has_message.png b/android/src/main/res/drawable-xxhdpi/seclect_item_no_has_message.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_orderlist.png b/android/src/main/res/drawable-xxhdpi/seclect_item_orderlist.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/seclect_item_serch.png b/android/src/main/res/drawable-xxhdpi/seclect_item_serch.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/select_bg.9.png b/android/src/main/res/drawable-xxhdpi/select_bg.9.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable-xxhdpi/white.png b/android/src/main/res/drawable-xxhdpi/white.png
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/btn_reload.xml b/android/src/main/res/drawable/btn_reload.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/kepler_btn_back.xml b/android/src/main/res/drawable/kepler_btn_back.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/kepler_btn_select_more.xml b/android/src/main/res/drawable/kepler_btn_select_more.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/kepler_dialog_bk.xml b/android/src/main/res/drawable/kepler_dialog_bk.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/kepler_dialog_button_ne.xml b/android/src/main/res/drawable/kepler_dialog_button_ne.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/kepler_dialog_button_po.xml b/android/src/main/res/drawable/kepler_dialog_button_po.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/pressbar_color.xml b/android/src/main/res/drawable/pressbar_color.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/drawable/sdk_title_bg_with_shadow.xml b/android/src/main/res/drawable/sdk_title_bg_with_shadow.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/item_tab_layout.xml b/android/src/main/res/layout/item_tab_layout.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/kepler_mid_lin.xml b/android/src/main/res/layout/kepler_mid_lin.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/kepler_simple_dialog_lay.xml b/android/src/main/res/layout/kepler_simple_dialog_lay.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/more_select_item.xml b/android/src/main/res/layout/more_select_item.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/neterror_layout.xml b/android/src/main/res/layout/neterror_layout.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/sdk_title_layout.xml b/android/src/main/res/layout/sdk_title_layout.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/layout/web_bottom_layout.xml b/android/src/main/res/layout/web_bottom_layout.xml
old mode 100755
new mode 100644
diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml
old mode 100755
new mode 100644
index 91bd98c..c73d1b6
--- a/android/src/main/res/values/strings.xml
+++ b/android/src/main/res/values/strings.xml
@@ -1,45 +1,45 @@
-
-
- sdk
- Illegal application ,check init !
- 请检查您的网络环境
- 订单中心
- 最近浏览
- 搜索
- 消息
- 退出登录
- "下单后24小时内未支付成功,订单将被取消,请尽快完成支付。"
- 确定要离开收银台
- 继续支付
- 确认离开
- 注销成功
- 未登录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ sdk
+ Illegal application ,check init !
+ 请检查您的网络环境
+ 订单中心
+ 最近浏览
+ 搜索
+ 消息
+ 退出登录
+ "下单后24小时内未支付成功,订单将被取消,请尽快完成支付。"
+ 确定要离开收银台
+ 继续支付
+ 确认离开
+ 注销成功
+ 未登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/src/main/res/values/styles.xml b/android/src/main/res/values/styles.xml
old mode 100755
new mode 100644
diff --git a/ios/KeplerSDK/JDKeplerSDK.framework/Headers/KeplerApiManager.h b/ios/KeplerSDK/JDKeplerSDK.framework/Headers/KeplerApiManager.h
index 44dc0ab..ce5e92e 100644
--- a/ios/KeplerSDK/JDKeplerSDK.framework/Headers/KeplerApiManager.h
+++ b/ios/KeplerSDK/JDKeplerSDK.framework/Headers/KeplerApiManager.h
@@ -4,7 +4,7 @@
// 提供Kepler服务
// Created by JD.K on 16/6/20.
// Copyright © 2016年 JD.K. All rights reserved.
-// version 2.2.4
+// version 3.2.0
#import
#import
@@ -16,6 +16,8 @@ typedef void (^initFailedCallback)(NSError *error);
/** JD内部App登录流程 */
typedef void (^initJDInnerLogin)(UIViewController *currentViewController);
+typedef void (^clearCookiesCallBack)(BOOL isSuccess);
+
typedef NS_ENUM(NSInteger, JDInnerLogin) {
JDInnerLoginFailure = 0, //获取code失败
JDInnerLoginCancel, //用户取消登录
@@ -125,14 +127,27 @@ typedef void (^keplerCompletionHandler)(BOOL result,id _Nullable responseObject,
- (void)openNavigationPage:(UIViewController *)sourceController jumpType:(NSInteger)jumpType customParams:(NSString *)customParams API_DEPRECATED_WITH_REPLACEMENT("openNavigationPage:sourceController:jumpType:userInfo:", ios(7.0,11.0));
- (void)openNavigationPage:(UIViewController *)sourceController jumpType:(NSInteger)jumpType userInfo:(NSDictionary *)userInfo;
+
/**
* 通过SKU打开Kepler单品页
*
* @param sku 商品SKU
*/
-- (void)openItemDetailWithSKU:(NSString *)sku sourceController:(UIViewController *)sourceController jumpType:(NSInteger)jumpType customParams:(NSString *)customParams API_DEPRECATED_WITH_REPLACEMENT("openItemDetailWithSKU:sourceController:jumpType:userInfo:", ios(7.0,11.0));
+- (void)openItemDetailWithSKU:(NSString *)sku
+ sourceController:(UIViewController *)sourceController
+ jumpType:(NSInteger)jumpType
+ customParams:(NSString *)customParams API_DEPRECATED_WITH_REPLACEMENT("openItemDetailWithSKU:sourceController:jumpType:userInfo:", ios(7.0,11.0));
+// 京东商详接口
+- (void)openItemDetailWithSKU:(NSString *)sku
+ sourceController:(UIViewController *)sourceController
+ jumpType:(NSInteger)jumpType
+ userInfo:(NSDictionary *)userInfo;
-- (void)openItemDetailWithSKU:(NSString *)sku sourceController:(UIViewController *)sourceController jumpType:(NSInteger)jumpType userInfo:(NSDictionary *)userInfo;
+// 京喜商详接口
+- (void)openJXItemDetailWithSKU:(NSString *)sku
+ sourceController:(UIViewController *)sourceController
+ jumpType:(NSInteger)jumpType
+ userInfo:(NSDictionary *)userInfo;
/**
* 打开订单列表
@@ -204,6 +219,7 @@ typedef void (^keplerCompletionHandler)(BOOL result,id _Nullable responseObject,
@param appID AppID 查看位置:我的推广-推广管理-APP管理
@param skuID 商品SKU
@param refer refer (原生页面传域名+文章编号)
+ @param subUnionId 子联盟ID,可用于区分媒体自身的用户ID
@param viewController 当前的视图控制器
@param completionHandler 返回
*/
@@ -211,9 +227,30 @@ typedef void (^keplerCompletionHandler)(BOOL result,id _Nullable responseObject,
appID:(NSString *)appID
skuID:(NSString *)skuID
refer:(NSString *)refer
+ subUnionId:(NSString *)subUnionId
controller:(UIViewController *)viewController
completion:(keplerCompletionHandler)completionHandler;
+/**
+ 批量一键加购
+
+ @param unionID
+ @param appID AppID 查看位置:我的推广-推广管理-APP管理
+ @param skuIDs 商品SKU 以逗号隔开
+ @param skuCounts 商品SKU 对应的数量 以逗号隔开
+ @param refer refer (原生页面传域名+文章编号)
+ @param subUnionId 子联盟ID,可用于区分媒体自身的用户ID
+ @param viewController 当前的视图控制器
+ @param completionHandler 返回
+ */
+- (void)keplerFastPurchaseWith:(NSString *)unionID
+ appID:(NSString *)appID
+ skuIDs:(NSString *)skuIDs
+ skuCounts:(NSString *)skuCounts
+ refer:(NSString *)refer
+ subUnionId:(NSString *)subUnionId
+ controller:(UIViewController *)viewController
+ completion:(keplerCompletionHandler)completionHandler;
/***************************** End *******************************************/
@@ -250,6 +287,8 @@ typedef void (^keplerCompletionHandler)(BOOL result,id _Nullable responseObject,
*/
- (void)cancelAuth;
+- (void)cancelAuthWithBlock:(clearCookiesCallBack)completedBlock;
+
/**
* 设置加载进度条颜色
*/
diff --git a/ios/KeplerSDK/JDKeplerSDK.framework/Info.plist b/ios/KeplerSDK/JDKeplerSDK.framework/Info.plist
index 56d6f40..cb08aa5 100644
Binary files a/ios/KeplerSDK/JDKeplerSDK.framework/Info.plist and b/ios/KeplerSDK/JDKeplerSDK.framework/Info.plist differ
diff --git a/ios/KeplerSDK/JDKeplerSDK.framework/JDKeplerSDK b/ios/KeplerSDK/JDKeplerSDK.framework/JDKeplerSDK
index 84cf536..9af7c70 100644
Binary files a/ios/KeplerSDK/JDKeplerSDK.framework/JDKeplerSDK and b/ios/KeplerSDK/JDKeplerSDK.framework/JDKeplerSDK differ
diff --git a/package.json b/package.json
index d8ff6eb..0354e56 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-mkepler",
- "version": "3.0.1",
+ "version": "3.1.0",
"description": "react-native library for JD Kepler",
"main": "index.js",
"scripts": {
@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/bashen1/react-native-mkepler#readme",
"peerDependencies": {
- "react-native": ">=0.40"
+ "react-native": ">=0.60"
}
}
diff --git a/react-native-mkepler.podspec b/react-native-mkepler.podspec
index 320253b..7d9a2e3 100644
--- a/react-native-mkepler.podspec
+++ b/react-native-mkepler.podspec
@@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.vendored_frameworks = "ios/KeplerSDK/*"
- s.dependency "React"
+ s.dependency "React-Core"
end
\ No newline at end of file