Преглед на файлове

1.修改渠道授权、加入自维护阿里百川插件

tags/0.0.1
杨华轩 преди 4 години
родител
ревизия
a8c89d5280
променени са 4 файла, в които са добавени 28 реда и са изтрити 5 реда
  1. +4
    -1
      example/pubspec.yaml
  2. +18
    -3
      lib/util/taobao/taobao_auth.dart
  3. +2
    -0
      lib/zhiying_comm.dart
  4. +4
    -1
      pubspec.yaml

+ 4
- 1
example/pubspec.yaml Целия файл

@@ -20,7 +20,10 @@ dev_dependencies:
zhiying_comm:
path: ../

flutter_alibc: ^0.0.15
flutter_alibc:
git:
ref: 0.0.1
url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_flutter_alibc.git

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec


+ 18
- 3
lib/util/taobao/taobao_auth.dart Целия файл

@@ -3,6 +3,7 @@ import 'package:flutter_alibc/alibc_model.dart';
import 'package:flutter_alibc/flutter_alibc.dart';
import 'package:zhiying_comm/util/taobao/taobao_auth_alert.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'dart:io';

class TaobaoAuth {
// 淘宝授权
@@ -17,9 +18,23 @@ class TaobaoAuth {
await NetUtil.post('/api/v1/taobao/auth', method: NetMethod.GET));
Logger.debug(data);
String url = data['data']['redirect_url'];
TradeResult result = await FlutterAlibc.openByUrl(url: url);
// TradeResult result = await FlutterAlibc.openByUrl(url: '');
Logger.debug('${result.errorCode} ${result.errorMessage} ');
print("授权链接" + url);
if(Platform.isAndroid){

TradeResult result = await FlutterAlibc.openByUrl(
url: url, backUrl: "alisdk://",isAuth: true);
// TradeResult result = await FlutterAlibc.openByUrl(url: '');
Logger.debug('${result.errorCode} ${result.errorMessage} ');


}else if(Platform.isIOS){
TradeResult result = await FlutterAlibc.openByUrl(
url: url, backUrl: "alisdk://");
// TradeResult result = await FlutterAlibc.openByUrl(url: '');
Logger.debug('${result.errorCode} ${result.errorMessage} ');
}
}
}



+ 2
- 0
lib/zhiying_comm.dart Целия файл

@@ -32,3 +32,5 @@ export 'util/taobao/taobao_image_webview_loader.dart';
export 'util/taobao/taobao_loader.dart';
export 'util/widget_creater.dart';
export 'util/widget_factory.dart';
export 'package:cached_network_image/cached_network_image.dart';


+ 4
- 1
pubspec.yaml Целия файл

@@ -32,7 +32,10 @@ dependencies:
webview_flutter: ^0.3.22+1
# 京东sdk
jdsdk: ^0.0.1
flutter_alibc: ^0.0.15
flutter_alibc:
git:
ref: 0.0.1
url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_flutter_alibc.git
url_launcher: ^5.6.0




Зареждане…
Отказ
Запис