基础库
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

34 líneas
1.6 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. Map data =
  16. await NetUtil.post('/api/v1/taobao/auth', method: NetMethod.GET);
  17. TradeResult result = await FlutterAlibc.openByUrl(
  18. url:
  19. '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');
  20. // TradeResult result = await FlutterAlibc.openByUrl(
  21. // url:
  22. // 'http://www.izhim.com/comm/tb_callback.php?_ctrl=domain&domain_return_url=aHR0cDovL3d3dy5oYWlydXlpLmNvbS9jb21tL3RicmVkaXJlY3QucGhwP3RyYWNrX2lkPQ%3D%3D&domain_state=r_NTEwMw');
  23. Logger.debug('${result.errorCode} ${result.errorMessage} ');
  24. }
  25. }
  26. // 返回是否授权
  27. static Future<bool> isAuth() {
  28. return Future.delayed(Duration.zero, () => false);
  29. }
  30. }