hyzp_ybqx-Commit102:完善水印检查更新机制
This commit is contained in:
@@ -4,6 +4,8 @@ import 'EncryptUtil.dart';
|
|||||||
import 'commonFun.dart';
|
import 'commonFun.dart';
|
||||||
|
|
||||||
class UserInfo {
|
class UserInfo {
|
||||||
|
bool trialTag = true; //是否是试用版
|
||||||
|
|
||||||
UserInfo({this.mapUserInfoRet}) {
|
UserInfo({this.mapUserInfoRet}) {
|
||||||
setUserInfo(theMapUserInfoRet: mapUserInfoRet);
|
setUserInfo(theMapUserInfoRet: mapUserInfoRet);
|
||||||
}
|
}
|
||||||
@@ -14,9 +16,15 @@ class UserInfo {
|
|||||||
mapUserInfo = theMapUserInfoRet["data"];
|
mapUserInfo = theMapUserInfoRet["data"];
|
||||||
print('mapUserInfo = ${mapUserInfo.toString()}');
|
print('mapUserInfo = ${mapUserInfo.toString()}');
|
||||||
setQxInfo(mapUserInfo["qx_code"], mapUserInfo["qx_name"]);
|
setQxInfo(mapUserInfo["qx_code"], mapUserInfo["qx_name"]);
|
||||||
|
setTrialTag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 从服务器检查登录用户是否是试用版用户
|
||||||
|
setTrialTag() {
|
||||||
|
// 添加事件处理进行更新
|
||||||
|
}
|
||||||
|
|
||||||
//_mapGetData = {is_login: true, user_id: 135, token: 4C5B3F93FEACAEF4B6CAA7296F22CC67825D7E48B867614383D19E3F23DFE510}
|
//_mapGetData = {is_login: true, user_id: 135, token: 4C5B3F93FEACAEF4B6CAA7296F22CC67825D7E48B867614383D19E3F23DFE510}
|
||||||
Future setUserInfoFaceLogin(Map _mapGetData) async {
|
Future setUserInfoFaceLogin(Map _mapGetData) async {
|
||||||
mapUserInfo['user_id'] = _mapGetData['user_id'];
|
mapUserInfo['user_id'] = _mapGetData['user_id'];
|
||||||
|
|||||||
@@ -27,11 +27,13 @@ class _TabsState extends State<Tabs> {
|
|||||||
try {
|
try {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
if (g_userInfo.trialTag) {
|
||||||
// 添加默认样式的水印
|
// 添加默认样式的水印
|
||||||
_watermarkPlugin.addWatermark(context, "试用版本水印", rowCount: 4, columnCount: 8);
|
_watermarkPlugin.addWatermark(context, "试用版本水印", rowCount: 4, columnCount: 8);
|
||||||
// _watermarkPlugin必须放在这里,放在Widget build(BuildContext context)函数中会报错:
|
// _watermarkPlugin必须放在这里,放在Widget build(BuildContext context)函数中会报错:
|
||||||
// Dart Unhandled Exception: setState() or markNeedsBuild() called during build.
|
// Dart Unhandled Exception: setState() or markNeedsBuild() called during build.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('setState(() {})异常:${e}');
|
print('setState(() {})异常:${e}');
|
||||||
}
|
}
|
||||||
@@ -44,6 +46,7 @@ class _TabsState extends State<Tabs> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
super.initState();
|
||||||
getlistItems().then((value) => try_setState());
|
getlistItems().then((value) => try_setState());
|
||||||
print('widget.arguments = ${widget.arguments}');
|
print('widget.arguments = ${widget.arguments}');
|
||||||
//_currentIndex = 3 == widget.arguments ? 0 : widget.arguments; //解决"我的"页面根据用户所属组及时刷新问题
|
//_currentIndex = 3 == widget.arguments ? 0 : widget.arguments; //解决"我的"页面根据用户所属组及时刷新问题
|
||||||
@@ -59,8 +62,6 @@ class _TabsState extends State<Tabs> {
|
|||||||
bPreLoading = false;
|
bPreLoading = false;
|
||||||
bLoginVerify = false; //处理延时登录,判断用户名登录是否验证通过
|
bLoginVerify = false; //处理延时登录,判断用户名登录是否验证通过
|
||||||
});
|
});
|
||||||
|
|
||||||
super.initState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double _activeIconWidth = 68;
|
double _activeIconWidth = 68;
|
||||||
|
|||||||
Reference in New Issue
Block a user