fix 安卓getUserProfile 未实现的问题
parent
48f357de17
commit
2abccef963
|
@ -2,7 +2,7 @@ arguments=--init-script /var/folders/tv/dbm7kt650fvdxrtf0k7xgxcm0000gn/T/d146c97
|
|||
auto.sync=false
|
||||
build.scans.enabled=false
|
||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2))
|
||||
connection.project.dir=
|
||||
connection.project.dir=../../finosprite/android
|
||||
eclipse.preferences.version=1
|
||||
gradle.user.home=
|
||||
java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home
|
||||
|
|
|
@ -25,12 +25,13 @@ public class MyUserProfileHandler implements IUserProfileHandler {
|
|||
public void getUserProfileWithAppletInfo(@NotNull Context context, @NotNull FinAppInfo finAppInfo, @NotNull UserProfileCallback callback) {
|
||||
MethodChannel channel = MopPluginService.getInstance().getMethodChannel();
|
||||
Log.d(TAG, "getUserProfileWithAppletInfo:");
|
||||
Log.d(TAG, "channel:" + channel !=null ? "存在": "不存在" );
|
||||
channel.invokeMethod("extensionApi:getUserProfile", null, new MethodChannel.Result() {
|
||||
@Override
|
||||
public void success(Object mapResult) {
|
||||
JSONObject result = null;
|
||||
try {
|
||||
result = new JSONObject(mapResult);
|
||||
result = new JSONObject((Map)mapResult);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ flutter {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
def sdk_version = "2.40.1"
|
||||
def sdk_version = "2.41.1"
|
||||
compileOnly "com.finogeeks.lib:finapplet:${sdk_version}"
|
||||
implementation "com.finogeeks.mop:plugins:${sdk_version}"
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ class _MyAppState extends State<MyApp> {
|
|||
}
|
||||
};
|
||||
|
||||
return result;
|
||||
return Future.value(result);
|
||||
}
|
||||
|
||||
Widget _buildAppletItem(
|
||||
|
@ -248,7 +248,18 @@ class MyAppletHandler extends AppletHandler {
|
|||
@override
|
||||
Future<Map<String, dynamic>> getUserInfo() {
|
||||
// TODO: implement getUserInfo
|
||||
throw UnimplementedError();
|
||||
Map<String, dynamic> result = {
|
||||
"userInfo":{
|
||||
"nickName" : "haley",
|
||||
"avatarUrl" : "https://www.finclip.com",
|
||||
"gender" : 1,
|
||||
"country" : "China",
|
||||
"province" : "Guangdong",
|
||||
"city" : "shenzhen",
|
||||
}
|
||||
};
|
||||
|
||||
return Future.value(result);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -411,7 +411,6 @@ class UIConfig {
|
|||
"disableSlideCloseAppletGesture": disableSlideCloseAppletGesture,
|
||||
"appletText": appletText,
|
||||
"loadingLayoutCls": loadingLayoutCls,
|
||||
"useNativeLiveComponent": useNativeLiveComponent,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue