Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_bcsdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flutter-plugin
flutter_bcsdk
Commits
ef1edb8c
Commit
ef1edb8c
authored
Jun 27, 2022
by
GoldMask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5fe2ec56
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
48 deletions
+60
-48
android/build.gradle
android/build.gradle
+35
-18
android/gradle/wrapper/gradle-wrapper.properties
android/gradle/wrapper/gradle-wrapper.properties
+1
-1
android/src/main/java/com/qiaomeng/flutter/baichuan/BaichuanPlugin.java
...in/java/com/qiaomeng/flutter/baichuan/BaichuanPlugin.java
+4
-0
android/src/main/java/com/qiaomeng/flutter/baichuan/handlers/BCApiHandler.java
.../com/qiaomeng/flutter/baichuan/handlers/BCApiHandler.java
+17
-6
ios/Classes/alibc/AlibcUtil.m
ios/Classes/alibc/AlibcUtil.m
+1
-1
ios/baichuan.podspec
ios/baichuan.podspec
+1
-22
lib/src/handler.dart
lib/src/handler.dart
+1
-0
No files found.
android/build.gradle
View file @
ef1edb8c
...
@@ -8,17 +8,25 @@ buildscript {
...
@@ -8,17 +8,25 @@ buildscript {
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:3.
5.0
'
classpath
'com.android.tools.build:gradle:3.
6.3
'
}
}
}
}
rootProject
.
allprojects
{
rootProject
.
allprojects
{
repositories
{
repositories
{
// flatDir{
// dirs project(':baichuan').file('libs')
// }
google
()
google
()
jcenter
()
jcenter
()
maven
{
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 {
...
@@ -34,30 +42,39 @@ android {
lintOptions
{
lintOptions
{
disable
'InvalidPackage'
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
{
dependencies
{
// api fileTree(dir: 'libs', include: ['*.aar'])
api
'androidx.appcompat:appcompat:1.2.0'
api
'androidx.appcompat:appcompat:1.2.0'
api
'androidx.cardview:cardview:1.0.0'
api
'androidx.cardview:cardview:1.0.0'
// 登陆
api
'com.alibaba.baichuan.sdk:alibclogin:5.0.0.7'
api
'com.xx.baichuan:alibctriver_live:5.0.0.32'
// applink
api
'com.xx.baichuan:alibclogin:5.0.0.32'
api
'com.alibaba.baichuan.sdk:alibcapplink:5.0.0.7'
api
'com.xx.baichuan:alibcapplink:5.0.0.32'
// 广告SDK
api
'com.xx.baichuan:alibcad:5.0.0.32'
api
'com.alibaba.baichuan.sdk:alibcad:5.0.0.7'
api
'com.xx.baichuan:alibctriver:5.0.0.32'
// 小程序
api
'com.alibaba.baichuan.sdk:alibctriver:5.0.0.7'
// c++基础库(如果工程中没有接入该so包:libc++_shared.so,需要接入该sdk)
// 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容器
// webview容器
api
'com.
alibaba.baichuan.sdk:alibcwebview:5.0.0.7
'
api
'com.
xx.baichuan:alibcwebview:5.0.0.32
'
//
电商基础组件
//
电商基础组件
api
'com.
alibaba.baichuan.sdk:alibctradecommon:5.0.0.7
'
api
'com.
xx.baichuan:alibctradecommon:5.0.0.32
'
api
'com.
alibaba.baichuan.sdk:alibcnbtrade:5.0.0.7
'
api
'com.
xx.baichuan:alibcnbtrade:5.0.0.32
'
api
'com.
alibaba.baichuan.sdk:alibcprotocol:5.0.0.7
'
api
'com.
xx.baichuan:alibcprotocol:5.0.0.32
'
api
'com.alibaba:fastjson:1.1.71.android'
api
'com.alibaba:fastjson:1.1.71.android'
api
'com.facebook.fresco:fresco:1.5.0'
api
'com.facebook.fresco:fresco:1.5.0'
api
'com.facebook.fresco:animated-gif:1.5.0'
//加载gif动图需添加此库
api
'com.facebook.fresco:animated-gif:1.5.0'
//加载gif动图需添加此库
...
...
android/gradle/wrapper/gradle-wrapper.properties
View file @
ef1edb8c
...
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
...
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
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
android/src/main/java/com/qiaomeng/flutter/baichuan/BaichuanPlugin.java
View file @
ef1edb8c
package
com.qiaomeng.flutter.baichuan
;
package
com.qiaomeng.flutter.baichuan
;
import
android.util.Log
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
com.qiaomeng.flutter.baichuan.handlers.BCApiHandler
;
import
com.qiaomeng.flutter.baichuan.handlers.BCApiHandler
;
...
@@ -34,9 +36,11 @@ public class BaichuanPlugin implements FlutterPlugin, MethodCallHandler, Activit
...
@@ -34,9 +36,11 @@ public class BaichuanPlugin implements FlutterPlugin, MethodCallHandler, Activit
@Override
@Override
public
void
onMethodCall
(
@NonNull
MethodCall
call
,
@NonNull
Result
result
)
{
public
void
onMethodCall
(
@NonNull
MethodCall
call
,
@NonNull
Result
result
)
{
String
method
=
call
.
method
;
String
method
=
call
.
method
;
Log
.
d
(
"111"
,
method
);
if
(
method
.
equals
(
"debug"
))
{
if
(
method
.
equals
(
"debug"
))
{
bcApiHandler
.
debug
();
bcApiHandler
.
debug
();
}
else
if
(
method
.
equals
(
"asyncInit"
))
{
}
else
if
(
method
.
equals
(
"asyncInit"
))
{
System
.
out
.
print
(
"asyncInit"
);
bcApiHandler
.
asyncInit
(
result
);
bcApiHandler
.
asyncInit
(
result
);
}
else
if
(
method
.
equals
(
"setIsvVersion"
))
{
}
else
if
(
method
.
equals
(
"setIsvVersion"
))
{
bcApiHandler
.
setIsvVersion
((
String
)
call
.
arguments
);
bcApiHandler
.
setIsvVersion
((
String
)
call
.
arguments
);
...
...
android/src/main/java/com/qiaomeng/flutter/baichuan/handlers/BCApiHandler.java
View file @
ef1edb8c
...
@@ -9,6 +9,7 @@ import androidx.annotation.MainThread;
...
@@ -9,6 +9,7 @@ import androidx.annotation.MainThread;
import
com.alibaba.alibclogin.AlibcLogin
;
import
com.alibaba.alibclogin.AlibcLogin
;
import
com.alibaba.alibcprotocol.callback.AlibcLoginCallback
;
import
com.alibaba.alibcprotocol.callback.AlibcLoginCallback
;
import
com.alibaba.alibcprotocol.callback.AlibcTradeCallback
;
import
com.alibaba.alibcprotocol.param.AlibcBizParams
;
import
com.alibaba.alibcprotocol.param.AlibcBizParams
;
import
com.alibaba.alibcprotocol.param.AlibcDegradeType
;
import
com.alibaba.alibcprotocol.param.AlibcDegradeType
;
import
com.alibaba.alibcprotocol.param.AlibcShowParams
;
import
com.alibaba.alibcprotocol.param.AlibcShowParams
;
...
@@ -18,7 +19,7 @@ import com.alibaba.alibctriver.AlibcImageCenter;
...
@@ -18,7 +19,7 @@ import com.alibaba.alibctriver.AlibcImageCenter;
import
com.alibaba.alibctriver.AlibcNavigateCenter
;
import
com.alibaba.alibctriver.AlibcNavigateCenter
;
import
com.alibaba.baichuan.trade.common.AlibcTradeCommon
;
import
com.alibaba.baichuan.trade.common.AlibcTradeCommon
;
import
com.baichuan.nb_trade.AlibcTrade
;
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.callback.AlibcTradeInitCallback
;
import
com.baichuan.nb_trade.core.AlibcTradeBiz
;
import
com.baichuan.nb_trade.core.AlibcTradeBiz
;
import
com.baichuan.nb_trade.core.AlibcTradeSDK
;
import
com.baichuan.nb_trade.core.AlibcTradeSDK
;
...
@@ -38,9 +39,12 @@ public class BCApiHandler {
...
@@ -38,9 +39,12 @@ public class BCApiHandler {
this
.
context
=
context
;
this
.
context
=
context
;
this
.
channel
=
channel
;
this
.
channel
=
channel
;
Fresco
.
initialize
(
context
);
Fresco
.
initialize
(
context
);
AlibcTradeCommon
.
turnOffDebug
();
// AlibcTradeCommon.turnOffDebug();
AlibcTradeBiz
.
turnOffDebug
();
// AlibcTradeBiz.turnOffDebug();
AlibcTradeCommon
.
closeErrorLog
();
// AlibcTradeCommon.closeErrorLog();
AlibcTradeCommon
.
turnOnDebug
();
AlibcTradeCommon
.
openErrorLog
();
AlibcTradeBiz
.
turnOnDebug
();
}
}
/**
/**
...
@@ -62,9 +66,12 @@ public class BCApiHandler {
...
@@ -62,9 +66,12 @@ public class BCApiHandler {
// 初始化扩展map(默认可传入空)
// 初始化扩展map(默认可传入空)
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"open4GDownload"
,
true
);
params
.
put
(
"open4GDownload"
,
true
);
System
.
out
.
print
(
"asyncInit 初始化"
);
AlibcTradeSDK
.
asyncInit
(
context
.
getApplication
(),
params
,
new
AlibcTradeInitCallback
()
{
AlibcTradeSDK
.
asyncInit
(
context
.
getApplication
(),
params
,
new
AlibcTradeInitCallback
()
{
@Override
@Override
public
void
onSuccess
()
{
public
void
onSuccess
()
{
System
.
out
.
print
(
"SDK初始化成功"
);
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"status"
,
true
);
map
.
put
(
"status"
,
true
);
map
.
put
(
"msg"
,
"SDK初始化成功"
);
map
.
put
(
"msg"
,
"SDK初始化成功"
);
...
@@ -72,8 +79,11 @@ public class BCApiHandler {
...
@@ -72,8 +79,11 @@ public class BCApiHandler {
}
}
@Override
@Override
public
void
onFailure
(
int
i
,
String
s
)
{
public
void
onFailure
(
int
i
,
String
s
)
{
System
.
out
.
print
(
"SDK初始化不成功"
);
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"status"
,
false
);
map
.
put
(
"status"
,
false
);
map
.
put
(
"msg"
,
s
);
map
.
put
(
"msg"
,
s
);
...
@@ -208,7 +218,7 @@ public class BCApiHandler {
...
@@ -208,7 +218,7 @@ public class BCApiHandler {
trackParams
,
trackParams
,
new
AlibcTradeCallback
()
{
new
AlibcTradeCallback
()
{
@Override
@Override
public
void
onSuccess
(
int
i
)
{
public
void
onSuccess
(
int
i
,
Object
o
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"status"
,
true
);
map
.
put
(
"status"
,
true
);
map
.
put
(
"code"
,
i
);
map
.
put
(
"code"
,
i
);
...
@@ -250,8 +260,9 @@ public class BCApiHandler {
...
@@ -250,8 +260,9 @@ public class BCApiHandler {
mapToAlibcTaokeParams
(
taokeParams
),
mapToAlibcTaokeParams
(
taokeParams
),
trackParams
,
trackParams
,
new
AlibcTradeCallback
()
{
new
AlibcTradeCallback
()
{
@Override
@Override
public
void
onSuccess
(
int
i
)
{
public
void
onSuccess
(
int
i
,
Object
o
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"status"
,
true
);
map
.
put
(
"status"
,
true
);
map
.
put
(
"code"
,
i
);
map
.
put
(
"code"
,
i
);
...
...
ios/Classes/alibc/AlibcUtil.m
View file @
ef1edb8c
...
@@ -129,7 +129,7 @@ static AlibcUtil *p = nil ;
...
@@ -129,7 +129,7 @@ static AlibcUtil *p = nil ;
showParams:
showParams
showParams:
showParams
taoKeParams:
taokeParam
taoKeParams:
taokeParam
trackParam:
trackParam
trackParam:
trackParam
openUrlCallBack:
^
(
NSError
*
error
,
NSDictionary
*
res
ult
)
{
openUrlCallBack:
^
(
NSError
*
error
,
NSDictionary
*
res
)
{
if
(
error
)
{
if
(
error
)
{
NSLog
(
@"调用失败"
);
NSLog
(
@"调用失败"
);
result
(@{
@"status"
:
@
(
error
.
code
),
@"code"
:
@
(
error
.
code
),
@"msg"
:
error
.
userInfo
});
result
(@{
@"status"
:
@
(
error
.
code
),
@"code"
:
@
(
error
.
code
),
@"msg"
:
error
.
userInfo
});
...
...
ios/baichuan.podspec
View file @
ef1edb8c
...
@@ -17,34 +17,13 @@ Pod::Spec.new do |s|
...
@@ -17,34 +17,13 @@ Pod::Spec.new do |s|
s
.
public_header_files
=
'Classes/**/*.h'
s
.
public_header_files
=
'Classes/**/*.h'
s
.
dependency
'Flutter'
s
.
dependency
'Flutter'
s
.
platform
=
:ios
,
'9.0'
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
'FMDB'
s
.
dependency
'Reachability'
s
.
dependency
'Reachability'
s
.
dependency
'Masonry'
s
.
dependency
'Masonry'
s
.
dependency
'SocketRocket'
s
.
dependency
'SocketRocket'
#电商套件媒体图片库实现外部依赖(媒体自由注入实现 这里只是举例)
s
.
dependency
'SSZipArchive'
s
.
dependency
'SSZipArchive'
s
.
dependency
'SDWebImage'
s
.
dependency
'SDWebImage'
s
.
static_framework
=
true
s
.
static_framework
=
true
...
...
lib/src/handler.dart
View file @
ef1edb8c
...
@@ -23,6 +23,7 @@ class BCHandler {
...
@@ -23,6 +23,7 @@ class BCHandler {
// 初始化
// 初始化
static
Future
<
InitResultModel
>
asyncInit
()
async
{
static
Future
<
InitResultModel
>
asyncInit
()
async
{
print
(
'#####invokeMethod(asyncInit)'
);
var
map
=
await
_channel
.
invokeMethod
(
'asyncInit'
);
var
map
=
await
_channel
.
invokeMethod
(
'asyncInit'
);
var
status
=
map
[
'status'
];
var
status
=
map
[
'status'
];
if
(
Platform
.
isIOS
)
{
if
(
Platform
.
isIOS
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment