Commit ef1edb8c authored by GoldMask's avatar GoldMask

fix

parent 5fe2ec56
......@@ -8,17 +8,25 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.6.3'
}
}
rootProject.allprojects {
repositories {
// flatDir{
// dirs project(':baichuan').file('libs')
// }
google()
jcenter()
maven {
url "http://repo.baichuan-android.taobao.com/content/groups/BaichuanRepositories/"
credentials {
username '62b3fb4f29d72730d9f32638'
password 'szxMQyPqEaGL'
}
url 'https://packages.aliyun.com/maven/repository/2244539-release-onYfjA/'
}
}
}
......@@ -34,30 +42,39 @@ android {
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
}
}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
dependencies {
// api fileTree(dir: 'libs', include: ['*.aar'])
api 'androidx.appcompat:appcompat:1.2.0'
api 'androidx.cardview:cardview:1.0.0'
// 登陆
api 'com.alibaba.baichuan.sdk:alibclogin:5.0.0.7'
// applink
api 'com.alibaba.baichuan.sdk:alibcapplink:5.0.0.7'
// 广告SDK
api 'com.alibaba.baichuan.sdk:alibcad:5.0.0.7'
// 小程序
api 'com.alibaba.baichuan.sdk:alibctriver:5.0.0.7'
api 'com.xx.baichuan:alibctriver_live:5.0.0.32'
api 'com.xx.baichuan:alibclogin:5.0.0.32'
api 'com.xx.baichuan:alibcapplink:5.0.0.32'
api 'com.xx.baichuan:alibcad:5.0.0.32'
api 'com.xx.baichuan:alibctriver:5.0.0.32'
// c++基础库(如果工程中没有接入该so包:libc++_shared.so,需要接入该sdk)
api "llvm.stl:cpp_shared:0.0.3@aar"
// implementation "llvm.stl:cpp_shared:0.0.3@aar"
// 直播
api 'com.alibaba.baichuan.sdk:alibctriver_live:5.0.0.7'
// api 'com.xx.baichuan.sdk:alibctriver_live:5.0.0.32'
// webview容器
api 'com.alibaba.baichuan.sdk:alibcwebview:5.0.0.7'
// 电商基础组件
api 'com.alibaba.baichuan.sdk:alibctradecommon:5.0.0.7'
api 'com.alibaba.baichuan.sdk:alibcnbtrade:5.0.0.7'
api 'com.alibaba.baichuan.sdk:alibcprotocol:5.0.0.7'
api 'com.xx.baichuan:alibcwebview:5.0.0.32'
// 电商基础组件
api 'com.xx.baichuan:alibctradecommon:5.0.0.32'
api 'com.xx.baichuan:alibcnbtrade:5.0.0.32'
api 'com.xx.baichuan:alibcprotocol:5.0.0.32'
api 'com.alibaba:fastjson:1.1.71.android'
api 'com.facebook.fresco:fresco:1.5.0'
api 'com.facebook.fresco:animated-gif:1.5.0'//加载gif动图需添加此库
......
......@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
package com.qiaomeng.flutter.baichuan;
import android.util.Log;
import androidx.annotation.NonNull;
import com.qiaomeng.flutter.baichuan.handlers.BCApiHandler;
......@@ -34,9 +36,11 @@ public class BaichuanPlugin implements FlutterPlugin, MethodCallHandler, Activit
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
String method = call.method;
Log.d("111",method);
if (method.equals("debug")) {
bcApiHandler.debug();
} else if (method.equals("asyncInit")) {
System.out.print("asyncInit");
bcApiHandler.asyncInit(result);
} else if (method.equals("setIsvVersion")) {
bcApiHandler.setIsvVersion((String) call.arguments);
......
......@@ -9,6 +9,7 @@ import androidx.annotation.MainThread;
import com.alibaba.alibclogin.AlibcLogin;
import com.alibaba.alibcprotocol.callback.AlibcLoginCallback;
import com.alibaba.alibcprotocol.callback.AlibcTradeCallback;
import com.alibaba.alibcprotocol.param.AlibcBizParams;
import com.alibaba.alibcprotocol.param.AlibcDegradeType;
import com.alibaba.alibcprotocol.param.AlibcShowParams;
......@@ -18,7 +19,7 @@ import com.alibaba.alibctriver.AlibcImageCenter;
import com.alibaba.alibctriver.AlibcNavigateCenter;
import com.alibaba.baichuan.trade.common.AlibcTradeCommon;
import com.baichuan.nb_trade.AlibcTrade;
import com.baichuan.nb_trade.callback.AlibcTradeCallback;
//import com.baichuan.nb_trade.callback.AlibcTradeCallback;
import com.baichuan.nb_trade.callback.AlibcTradeInitCallback;
import com.baichuan.nb_trade.core.AlibcTradeBiz;
import com.baichuan.nb_trade.core.AlibcTradeSDK;
......@@ -38,9 +39,12 @@ public class BCApiHandler {
this.context = context;
this.channel = channel;
Fresco.initialize(context);
AlibcTradeCommon.turnOffDebug();
AlibcTradeBiz.turnOffDebug();
AlibcTradeCommon.closeErrorLog();
// AlibcTradeCommon.turnOffDebug();
// AlibcTradeBiz.turnOffDebug();
// AlibcTradeCommon.closeErrorLog();
AlibcTradeCommon.turnOnDebug();
AlibcTradeCommon.openErrorLog();
AlibcTradeBiz.turnOnDebug();
}
/**
......@@ -62,9 +66,12 @@ public class BCApiHandler {
// 初始化扩展map(默认可传入空)
Map<String, Object> params = new HashMap<>();
params.put("open4GDownload", true);
System.out.print("asyncInit 初始化");
AlibcTradeSDK.asyncInit(context.getApplication(), params, new AlibcTradeInitCallback() {
@Override
public void onSuccess() {
System.out.print("SDK初始化成功");
Map map = new HashMap();
map.put("status", true);
map.put("msg", "SDK初始化成功");
......@@ -72,8 +79,11 @@ public class BCApiHandler {
}
@Override
public void onFailure(int i, String s) {
System.out.print("SDK初始化不成功");
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
......@@ -208,7 +218,7 @@ public class BCApiHandler {
trackParams,
new AlibcTradeCallback() {
@Override
public void onSuccess(int i) {
public void onSuccess(int i, Object o) {
Map map = new HashMap();
map.put("status", true);
map.put("code", i);
......@@ -250,8 +260,9 @@ public class BCApiHandler {
mapToAlibcTaokeParams(taokeParams),
trackParams,
new AlibcTradeCallback() {
@Override
public void onSuccess(int i) {
public void onSuccess(int i, Object o) {
Map map = new HashMap();
map.put("status", true);
map.put("code", i);
......
......@@ -129,7 +129,7 @@ static AlibcUtil *p = nil ;
showParams:showParams
taoKeParams:taokeParam
trackParam:trackParam
openUrlCallBack:^(NSError *error,NSDictionary *result) {
openUrlCallBack:^(NSError *error,NSDictionary *res) {
if (error) {
NSLog(@"调用失败");
result(@{@"status":@(error.code),@"code":@(error.code),@"msg":error.userInfo});
......
......@@ -17,34 +17,13 @@ Pod::Spec.new do |s|
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
#基础电商SDK依赖
# s.dependency 'mtopSDK', '3.0.0.5'
# s.dependency 'securityGuard', '5.4.191'
# s.dependency 'BCUserTrack', '7.2.0.7-BC1'
# s.dependency 'AliAuthSDK', '1.1.0.42-bc'
# s.dependency 'AliLinkPartnerSDK', '4.0.0.24-wk'
# s.dependency 'MunionBcAdSDK', '1.0.5'
# #电商套件依赖
# s.dependency 'WindVane', '8.5.0.46-bc11'
# s.dependency 'WindMix', '1.0.0.5'
# s.dependency 'Ariver', '1.0.11.2-BC1'
# s.dependency 'Triver', '1.0.11.5-BC10'
# s.dependency 'Triver/LivePlayer', '1.0.11.5-BC10'
# s.dependency 'Windmill', '1.3.7.3-BC2'
# s.dependency 'AlibcTradeUltimateSDK', '5.0.0.3-BC4'
# s.dependency 'AlibcTradeUltimateSDK/MiniApp', '5.0.0.3-BC4'
# s.dependency 'TBMediaPlayer', '2.0.7.37'
# s.dependency 'miniAppMediaSDK', '0.0.1.45-BC2'
# s.dependency 'DWInteractiveSDK', '2.0.7.53-BC'
#电商套件外部依赖 可以使用媒体版本
s.dependency 'FMDB'
s.dependency 'Reachability'
s.dependency 'Masonry'
s.dependency 'SocketRocket'
#电商套件媒体图片库实现外部依赖(媒体自由注入实现 这里只是举例)
s.dependency 'SSZipArchive'
s.dependency 'SDWebImage'
s.static_framework = true
......
......@@ -23,6 +23,7 @@ class BCHandler {
// 初始化
static Future<InitResultModel> asyncInit() async {
print('#####invokeMethod(asyncInit)');
var map = await _channel.invokeMethod('asyncInit');
var status = map['status'];
if (Platform.isIOS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment