Browse Source

更新邀请码封装

tags/0.0.2+10^0
Weller 4 years ago
parent
commit
b4558fa9e4
2 changed files with 3 additions and 6 deletions
  1. +3
    -3
      lib/pages/home_page/home_page.dart
  2. +0
    -3
      lib/utils/contants.dart

+ 3
- 3
lib/pages/home_page/home_page.dart View File

@@ -14,6 +14,7 @@ import 'package:zhiying_base_widget/dialog/global_dialog/policy_dialog/policy_di
import 'package:zhiying_base_widget/utils/contants.dart'; import 'package:zhiying_base_widget/utils/contants.dart';
import 'package:zhiying_comm/models/base/base_tab_model.dart'; import 'package:zhiying_comm/models/base/base_tab_model.dart';
import 'package:zhiying_comm/util/image_util.dart'; import 'package:zhiying_comm/util/image_util.dart';
import 'package:zhiying_comm/util/mob_util/mob_util.dart';
import 'package:zhiying_comm/util/shared_prefe_util.dart'; import 'package:zhiying_comm/util/shared_prefe_util.dart';
import 'package:zhiying_comm/util/update/app_update_util.dart'; import 'package:zhiying_comm/util/update/app_update_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';
@@ -215,7 +216,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
if (params.containsKey('tgid')) { if (params.containsKey('tgid')) {
String tgid = params['tgid'].toString(); String tgid = params['tgid'].toString();
// 记录邀请码到本地 // 记录邀请码到本地
SharedPreferencesUtil.setNetCacheResult(Constants.mobInvitedCode, tgid);
MobUtil.storeInvitedCode(tgid);
} }
} catch (e) { } catch (e) {
Logger.error(e); Logger.error(e);
@@ -236,8 +237,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
if (params['params'].containsKey('tgid')) { if (params['params'].containsKey('tgid')) {
String tgid = params['params']['tgid'].toString(); String tgid = params['params']['tgid'].toString();
// 记录邀请码到本地 // 记录邀请码到本地
SharedPreferencesUtil.setNetCacheResult(
Constants.mobInvitedCode, tgid);
MobUtil.storeInvitedCode(tgid);
} }
} }
} catch (e) { } catch (e) {


+ 0
- 3
lib/utils/contants.dart View File

@@ -29,7 +29,4 @@ class Constants {


//==============================版本号,控制引导页显示=================================== //==============================版本号,控制引导页显示===================================
static String versionNumber = "versionNumber"; static String versionNumber = "versionNumber";

//==============================Mob场景还原邀请码===================================
static String mobInvitedCode = "mobInvitedCode";
} }

Loading…
Cancel
Save