소스 검색

更新ios百川小把手点击无效问题

tags/0.0.1
Weller 4 년 전
부모
커밋
c4a42c7533
2개의 변경된 파일26개의 추가작업 그리고 17개의 파일을 삭제
  1. +19
    -14
      lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart
  2. +7
    -3
      lib/widgets/goods_details/footer/goods_details_footer_widget.dart

+ 19
- 14
lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart 파일 보기

@@ -1,19 +1,17 @@
import 'dart:convert';
import 'dart:io';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_alibc/alibc_const_key.dart';
import 'package:flutter_alibc/alibc_model.dart';
import 'package:flutter_alibc/flutter_alibc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/has_goods_dialog_style_model.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/model/wallet_detail_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:provider/provider.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:flutter_alibc/flutter_alibc.dart';
import 'package:flutter_alibc/alibc_model.dart';
import 'package:flutter_alibc/alibc_const_key.dart';

class IntellectSearchGoodsDialog extends StatefulWidget {
final IntellectDialogDataModel model;
@@ -244,8 +242,8 @@ class _IntellectSearchGoodsDialogState
),
Text(
(num.tryParse(widget?.model?.price ?? "0") -
num.tryParse(
widget?.model?.couponPrice ?? "0")).toString() ??
num.tryParse(widget?.model?.couponPrice ?? "0"))
.toString() ??
"",
style: TextStyle(
fontSize: 32.sp,
@@ -286,8 +284,7 @@ class _IntellectSearchGoodsDialogState
" ¥" +
((num.tryParse(widget?.model?.couponPrice ?? "0") ??
0) +
num.tryParse(
widget?.model?.commission ?? '0'))
num.tryParse(widget?.model?.commission ?? '0'))
.toString(),
style: TextStyle(
color: HexColor.fromHex(
@@ -357,10 +354,18 @@ class _IntellectSearchGoodsDialogState
print("平台" + widget?.model?.provider ?? "");
print("链接" + widget?.model?.couponUrl ?? "");
if (widget?.model?.provider == 'taobao') {
TradeResult result = await FlutterAlibc.openByUrl(
TradeResult result;
if (Platform.isAndroid) {
result = await FlutterAlibc.openByUrl(
url: widget?.model?.couponUrl ?? "",
openType: AlibcOpenType.AlibcOpenTypeNative,
backUrl: "alisdk://");
} else if (Platform.isIOS) {
result = await FlutterAlibc.openByUrl(
url: widget?.model?.couponUrl ?? "",
openType: AlibcOpenType.AlibcOpenTypeNative,
backUrl: "alisdk://");
);
}
Logger.debug('${result.errorCode} ${result.errorMessage} ');
print("链接" + widget?.model?.couponUrl ?? "");
print("错误码" + result.errorCode);


+ 7
- 3
lib/widgets/goods_details/footer/goods_details_footer_widget.dart 파일 보기

@@ -1,4 +1,5 @@
import 'dart:convert';
import 'dart:io';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
@@ -126,9 +127,12 @@ class _GooddsDetailsFooterContainerState
TaobaoAuth.auth(context);
return;
}

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


불러오는 중...
취소
저장