|
@@ -50,13 +50,14 @@ class TaobaoAuth { |
|
|
// result = await FlutterAlibc.openByUrl(url: url, backUrl: "alisdk://", isAuth: true); |
|
|
// result = await FlutterAlibc.openByUrl(url: url, backUrl: "alisdk://", isAuth: true); |
|
|
print("name: $name" + "\n" + "alibcAppKey: $alibcAppKey"); |
|
|
print("name: $name" + "\n" + "alibcAppKey: $alibcAppKey"); |
|
|
var resultMsg = await FlutterAlibc.taoKeLoginNew(name, alibcAppKey); |
|
|
var resultMsg = await FlutterAlibc.taoKeLoginNew(name, alibcAppKey); |
|
|
|
|
|
|
|
|
|
|
|
FlutterAlibc.loginOut(); |
|
|
if (!EmptyUtil.isEmpty(resultMsg["accessToken"])) { |
|
|
if (!EmptyUtil.isEmpty(resultMsg["accessToken"])) { |
|
|
print("access 成功 $resultMsg"); |
|
|
print("access 成功 $resultMsg"); |
|
|
Map<String, dynamic> params = {}; |
|
|
Map<String, dynamic> params = {}; |
|
|
params['access_token'] = resultMsg["accessToken"]?.toString(); |
|
|
params['access_token'] = resultMsg["accessToken"]?.toString(); |
|
|
await NetUtil.post('/api/v1/tbredirect', |
|
|
await NetUtil.post('/api/v1/tbredirect', |
|
|
params: params, method: NetMethod.POST); |
|
|
params: params, method: NetMethod.POST); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
print("access 失败 $resultMsg"); |
|
|
print("access 失败 $resultMsg"); |
|
|
Fluttertoast.showToast(msg: "access 失败 $resultMsg"); |
|
|
Fluttertoast.showToast(msg: "access 失败 $resultMsg"); |
|
|