@@ -9,16 +9,19 @@ class BaseTabModel extends SkipModel { | |||||
String cateTag; | String cateTag; | ||||
String bgColor; | String bgColor; | ||||
String fontColor; | String fontColor; | ||||
//抖券判断是否是底部创建,默认不是 | |||||
bool isBottomVideo = false; | |||||
BaseTabModel( | BaseTabModel({this.name, | ||||
{this.name, | this.isShow, | ||||
this.isShow, | this.icon, | ||||
this.icon, | this.chooseColor, | ||||
this.chooseColor, | this.chooseIcon, | ||||
this.chooseIcon, | this.cateTag, | ||||
this.cateTag, | this.bgColor, | ||||
this.bgColor, | this.fontColor, | ||||
this.fontColor}); | this.isBottomVideo | ||||
}); | |||||
BaseTabModel.fromJson(Map<String, dynamic> json) { | BaseTabModel.fromJson(Map<String, dynamic> json) { | ||||
super.fromJson(json); | super.fromJson(json); | ||||
@@ -33,6 +36,7 @@ class BaseTabModel extends SkipModel { | |||||
requiredTaobaoAuth = json['required_taobao_auth']; | requiredTaobaoAuth = json['required_taobao_auth']; | ||||
bgColor = json['bg_color']; | bgColor = json['bg_color']; | ||||
fontColor = json['font_color']; | fontColor = json['font_color']; | ||||
isBottomVideo=json['is_bottom_video']; | |||||
} | } | ||||
Map<String, dynamic> toJson() { | Map<String, dynamic> toJson() { | ||||
@@ -45,6 +49,7 @@ class BaseTabModel extends SkipModel { | |||||
data['cate_tag'] = this.cateTag; | data['cate_tag'] = this.cateTag; | ||||
data['bg_color'] = this.bgColor; | data['bg_color'] = this.bgColor; | ||||
data['font_color'] = this.fontColor; | data['font_color'] = this.fontColor; | ||||
data['is_bottom_video'] = this.isBottomVideo; | |||||
return data; | return data; | ||||
} | } | ||||
} | } |
@@ -50,4 +50,7 @@ class GlobalConfig { | |||||
///guide缓存表记 | ///guide缓存表记 | ||||
static final String GUIDE='sp_guide'; | static final String GUIDE='sp_guide'; | ||||
/// 用户协议显示 用户是否同意隐私协议 | |||||
static String isShowPolicy = "is_show_policy"; | |||||
} | } |
@@ -446,7 +446,11 @@ class NetUtil { | |||||
/// 获取Android imei | /// 获取Android imei | ||||
static Future<String> getImei() async { | static Future<String> getImei() async { | ||||
try { | 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) { | } catch (e, s) { | ||||
Logger.error(e, s); | Logger.error(e, s); | ||||
} | } | ||||
@@ -61,11 +61,14 @@ class TaobaoAuth { | |||||
} | } | ||||
if (!EmptyUtil.isEmpty(resultMsg["accessToken"])) { | if (!EmptyUtil.isEmpty(resultMsg["accessToken"])) { | ||||
Fluttertoast.showToast(msg: '授权成功~'); | // Fluttertoast.showToast(msg: '授权成功~'); | ||||
print("access 成功 $resultMsg"); | print("access 成功 $resultMsg"); | ||||
Map<String, dynamic> params = {}; | Map<String, dynamic> params = {}; | ||||
params['access_token'] = resultMsg["accessToken"]?.toString(); | 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 { | } else { | ||||
print("access 失败 $resultMsg"); | print("access 失败 $resultMsg"); | ||||
Fluttertoast.showToast(msg: "access 失败 $resultMsg"); | Fluttertoast.showToast(msg: "access 失败 $resultMsg"); | ||||