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