From 2ca45e4313ec5a0f753a787c89a9ab83518d9813 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Thu, 29 Apr 2021 19:04:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1=E3=80=81=E6=B7=98=E5=AE=9D=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E6=8F=90=E7=A4=BA=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/taobao/taobao_auth.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/util/taobao/taobao_auth.dart b/lib/util/taobao/taobao_auth.dart index 037b319..64fec85 100644 --- a/lib/util/taobao/taobao_auth.dart +++ b/lib/util/taobao/taobao_auth.dart @@ -61,11 +61,14 @@ class TaobaoAuth { } if (!EmptyUtil.isEmpty(resultMsg["accessToken"])) { - Fluttertoast.showToast(msg: '授权成功~'); + // Fluttertoast.showToast(msg: '授权成功~'); print("access 成功 $resultMsg"); Map params = {}; params['access_token'] = resultMsg["accessToken"]?.toString(); - await NetUtil.post('/api/v1/tbredirect', params: params, method: NetMethod.POST); + var result = await NetUtil.post('/api/v1/tbredirect', params: params, method: NetMethod.POST); + if (NetUtil.isSuccess(result)) { + Fluttertoast.showToast(msg: '授权成功~'); + } } else { print("access 失败 $resultMsg"); Fluttertoast.showToast(msg: "access 失败 $resultMsg"); From 9c5be24383929d60903db5187655944d260a002f Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Thu, 6 May 2021 14:13:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1=E3=80=81imei=E5=8F=AA=E6=9C=89=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8C=E6=84=8F=E7=94=A8=E6=88=B7=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=89=8D=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/global_config.dart | 3 +++ lib/util/net_util.dart | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/util/global_config.dart b/lib/util/global_config.dart index b4abf9c..b77415a 100644 --- a/lib/util/global_config.dart +++ b/lib/util/global_config.dart @@ -50,4 +50,7 @@ class GlobalConfig { ///guide缓存表记 static final String GUIDE='sp_guide'; + /// 用户协议显示 用户是否同意隐私协议 + static String isShowPolicy = "is_show_policy"; + } diff --git a/lib/util/net_util.dart b/lib/util/net_util.dart index a4ed6c6..6494ed4 100644 --- a/lib/util/net_util.dart +++ b/lib/util/net_util.dart @@ -446,7 +446,11 @@ class NetUtil { /// 获取Android imei static Future getImei() async { try { - return await FlutterAlibc.getUdid(); + // 用户同意隐私协议之后才能读取 + String isShowPolicy = await SharedPreferencesUtil.getStringValue(GlobalConfig.isShowPolicy); + if (!EmptyUtil.isEmpty(isShowPolicy) && '1' == isShowPolicy) { + return await FlutterAlibc.getUdid(); + } } catch (e, s) { Logger.error(e, s); } From c4c4c757a6c06a2ff3aba81ff038d4343110da45 Mon Sep 17 00:00:00 2001 From: "23028876916@qq.com" Date: Thu, 6 May 2021 18:46:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?0506=20modle=E6=B7=BB=E5=8A=A0=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/models/base/base_tab_model.dart | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/models/base/base_tab_model.dart b/lib/models/base/base_tab_model.dart index 09136e7..e759896 100644 --- a/lib/models/base/base_tab_model.dart +++ b/lib/models/base/base_tab_model.dart @@ -9,16 +9,19 @@ class BaseTabModel extends SkipModel { String cateTag; String bgColor; String fontColor; + //抖券判断是否是底部创建,默认不是 + bool isBottomVideo = false; - BaseTabModel( - {this.name, - this.isShow, - this.icon, - this.chooseColor, - this.chooseIcon, - this.cateTag, - this.bgColor, - this.fontColor}); + BaseTabModel({this.name, + this.isShow, + this.icon, + this.chooseColor, + this.chooseIcon, + this.cateTag, + this.bgColor, + this.fontColor, + this.isBottomVideo + }); BaseTabModel.fromJson(Map json) { super.fromJson(json); @@ -33,6 +36,7 @@ class BaseTabModel extends SkipModel { requiredTaobaoAuth = json['required_taobao_auth']; bgColor = json['bg_color']; fontColor = json['font_color']; + isBottomVideo=json['is_bottom_video']; } Map toJson() { @@ -45,6 +49,7 @@ class BaseTabModel extends SkipModel { data['cate_tag'] = this.cateTag; data['bg_color'] = this.bgColor; data['font_color'] = this.fontColor; + data['is_bottom_video'] = this.isBottomVideo; return data; } }