浏览代码

1、智能弹窗渠道跳转指定原生应用

2、右上角小图标大小调整
3、微信分享图片修复
tags/0.013+9^0
PH2 3 年前
父节点
当前提交
6807699c2c
共有 5 个文件被更改,包括 35 次插入34 次删除
  1. +30
    -24
      lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart
  2. +1
    -2
      lib/register.dart
  3. +0
    -5
      lib/widgets/custom/goods/custom_goods_creater.dart
  4. +2
    -2
      lib/widgets/custom/multi_nav/custom_quick_entry.dart
  5. +2
    -1
      lib/widgets/share/share_alert.dart

+ 30
- 24
lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart 查看文件

@@ -1,12 +1,9 @@
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:zhiying_comm/util/turn_chain/turn_chain_util.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_comm/zhiying_comm.dart';
@@ -376,26 +373,35 @@ class _IntellectSearchGoodsDialogState
}
widget?.model?.couponUrl=widget?.model?.couponUrl.replaceAll("\\", "");
print("链接" + widget?.model?.couponUrl ?? "");
if (widget?.model?.provider == 'taobao') {
TradeResult result;
if (Platform.isAndroid) {
result = await FlutterAlibc.openByUrl(
url: widget?.model?.couponUrl ?? "",
backUrl: "alisdk://");
} else if (Platform.isIOS) {
result = await FlutterAlibc.openByUrl(
url: widget?.model?.couponUrl ?? ""
);
}
Logger.debug('${result.errorCode} ${result.errorMessage} ');
print("链接" + widget?.model?.couponUrl ?? "");
print("错误码" + result.errorCode);
print("原因" + result.errorMessage);
} else {
await FlutterAlibc.openByUrl(
url: widget?.model?.couponUrl,
openType: AlibcOpenType.AlibcOpenTypeNative);
}
// if (widget?.model?.provider == GlobalConfig.PROVIDER_TB || widget?.model?.provider == GlobalConfig.PROVIDER_TM) {
// TradeResult result;
// if (Platform.isAndroid) {
// result = await FlutterAlibc.openByUrl(url: widget?.model?.couponUrl ?? "", backUrl: "alisdk://");
// } else if (Platform.isIOS) {
// result = await FlutterAlibc.openByUrl(url: widget?.model?.couponUrl ?? "");
// }
// Logger.debug('${result.errorCode} ${result.errorMessage} ');
// print("链接" + widget?.model?.couponUrl ?? "");
// print("错误码" + result.errorCode);
// print("原因" + result.errorMessage);
// } else if (widget?.model?.provider == GlobalConfig.PROVIDER_JD) {
// /// 京东
// // Jdsdk.openUrl(url: openAppUrl);
// Logger.log('走了京东打开');
// } else {
// /// 其它
// Logger.log('走了其它打开方式');
// // await FlutterAlibc.openByUrl(url: widget?.model?.couponUrl, openType: AlibcOpenType.AlibcOpenTypeNative);
// }
Logger.log('智能弹窗有商品情况跳转数据 = ${widget?.model?.toJson()}');
/// 改成统一跳转
await TurnChainUtil.jumpNative(
context,
provider: widget?.model?.provider ?? 'taobao',
openAppUrl: widget?.model?.couponUrl,
appUrl: widget?.model?.couponUrl,
webUrl: widget?.model?.couponUrl,
);

///关闭弹窗
if (Navigator.canPop(context)) {


+ 1
- 2
lib/register.dart 查看文件

@@ -131,8 +131,7 @@ class BaseWidgetRegister {
register.setupWechat(config.keys?.weixin?.appId ?? '', config.keys?.weixin?.secret ?? '', config.keys?.weixin?.universalLink ?? '');

//================ Weibo
register.setupSinaWeibo(
config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '', config.keys?.weibo?.universalLink ?? 'templink');
register.setupSinaWeibo(config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '', config.keys?.weibo?.universalLink ?? 'templink');

// ================ QQ
register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? '');


+ 0
- 5
lib/widgets/custom/goods/custom_goods_creater.dart 查看文件

@@ -4,9 +4,6 @@ import 'package:zhiying_base_widget/widgets/goods_details/recommend/goods_detail
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_creater.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

import 'category_goods/category_goods_creater.dart';
import 'category_goods/category_goods_creater2.dart';

///
/// 通用模块的商品列表
///
@@ -18,8 +15,6 @@ class CustomGoodsCreater extends WidgetCreater {
Map<String, dynamic> json = jsonDecode(model['data']);
// 有Tab头部的商品列表
if (!EmptyUtil.isEmpty(json['recommend_list'])) {
// creater = CategoryGoodsListCreater2();
// creater = CategoryGoodsListCreater();
creater = GoodsListCreater();
} else {
// 没有Tab头部的商品列表


+ 2
- 2
lib/widgets/custom/multi_nav/custom_quick_entry.dart 查看文件

@@ -414,7 +414,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
/// 小角标
Visibility(
visible: model?.isShowCornerIcon == '1',
child: Align(alignment: Alignment.topRight, child: Transform.translate( offset: Offset(7, -3) ,child: MyNetWorkImage(item?.rightIcon, width: 30))))
child: Align(alignment: Alignment.topRight, child: Transform.translate( offset: Offset(7, -3) ,child: MyNetWorkImage(item?.rightIcon, width: 34))))
],
),

@@ -932,7 +932,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry> with Ticker
/// 小角标
Visibility(
visible: model?.isShowCornerIcon == '1',
child: Align(alignment: Alignment.topRight, child: Transform.translate( offset: Offset(7, -3) ,child: MyNetWorkImage(item?.rightIcon, width: 30))))
child: Align(alignment: Alignment.topRight, child: Transform.translate( offset: Offset(7, -3) ,child: MyNetWorkImage(item?.rightIcon, width: 34))))
],
),



+ 2
- 1
lib/widgets/share/share_alert.dart 查看文件

@@ -389,7 +389,8 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {

try {
// 保存到本地路径
final tempDir = await getTemporaryDirectory();
// final tempDir = await getTemporaryDirectory();
final tempDir = await getApplicationSupportDirectory();
final file = await File('${tempDir.path}/image.png').create();
file.writeAsBytesSync(widget.model.poster);



正在加载...
取消
保存