基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
1.5 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_alibc/alibc_model.dart';
  3. import 'package:flutter_alibc/flutter_alibc.dart';
  4. import 'package:zhiying_comm/util/taobao/taobao_auth_alert.dart';
  5. import 'package:zhiying_comm/zhiying_comm.dart';
  6. class TaobaoAuth {
  7. // 淘宝授权
  8. static auth(BuildContext context) async {
  9. bool isConfirm = await showDialog(
  10. context: context,
  11. builder: (BuildContext context) {
  12. return TaobaoAuthAlert();
  13. });
  14. if (isConfirm != null && isConfirm == true) {
  15. TradeResult result = await FlutterAlibc.openByUrl(
  16. url:
  17. 'https://uland.taobao.com/coupon/edetail?e=3HzI2W1Beb8GQASttHIRqXnNjWpDy9mhXwL7S63FIwYKZE0HebgG45okpD6aY36atPRANf7tQQAMfuX5VbbjJDEhJpUUrcnYl02IO45oPAVVa4HVocdYY3Y9x3IctcCWLspxGy3zBjY8IeN8lvhRA2lzrR4%2BfrcbCbBkjRdlgvJ932VMXbyLuXFtBQJOD%2BAi1xjdOwSZLqE%3D&traceId=0bb623e116004208111058861eea6c&relationId=528397833&union_lens=lensId:TAPI@1600420811@0b8fdc87_0dbb_174a0839173_b4fc@01&relationId=528397833');
  18. // TradeResult result = await FlutterAlibc.openByUrl(
  19. // url:
  20. // 'http://www.izhim.com/comm/tb_callback.php?_ctrl=domain&domain_return_url=aHR0cDovL3d3dy5oYWlydXlpLmNvbS9jb21tL3RicmVkaXJlY3QucGhwP3RyYWNrX2lkPQ%3D%3D&domain_state=r_NTEwMw');
  21. Logger.debug('${result.errorCode} ${result.errorMessage} ');
  22. }
  23. }
  24. // 返回是否授权
  25. static Future<bool> isAuth() {
  26. return Future.delayed(Duration.zero, () => false);
  27. }
  28. }