Commit 0eafe9dbd84ae444ac506ec062896bf10cb06388

Authored by wdn127929
1 parent 71e6a2af

高级版

Showing 1 changed file with 5 additions and 2 deletions
@@ -71,6 +71,7 @@ class UserModel with ChangeNotifier { @@ -71,6 +71,7 @@ class UserModel with ChangeNotifier {
71 // _user = User.fromJson(json.decode(s)); 71 // _user = User.fromJson(json.decode(s));
72 // } 72 // }
73 // } 73 // }
  74 +
74 75
75 /// 登录 76 /// 登录
76 Future<String> login(BuildContext context, Map<String, String> params, 77 Future<String> login(BuildContext context, Map<String, String> params,
@@ -94,7 +95,7 @@ class UserModel with ChangeNotifier { @@ -94,7 +95,7 @@ class UserModel with ChangeNotifier {
94 } 95 }
95 Map<String, dynamic> seller = baseResp.data[0]["seller"]; 96 Map<String, dynamic> seller = baseResp.data[0]["seller"];
96 Map<String, dynamic> user = baseResp.data[0]["user"]; 97 Map<String, dynamic> user = baseResp.data[0]["user"];
97 - String sellerVersion = baseResp.data[0]["sellerVersion"]; 98 + // String sellerVersion = baseResp.data[0]["sellerVersion"];
98 99
99 Map<String, dynamic> userMap = { 100 Map<String, dynamic> userMap = {
100 "openid": user['id'], 101 "openid": user['id'],
@@ -116,7 +117,7 @@ class UserModel with ChangeNotifier { @@ -116,7 +117,7 @@ class UserModel with ChangeNotifier {
116 'token': baseResp.data[0]["token"]['token'], 117 'token': baseResp.data[0]["token"]['token'],
117 'nickname': user['nick_name'], 118 'nickname': user['nick_name'],
118 'edate': seller['edate'], 119 'edate': seller['edate'],
119 - 'sellerVersion': sellerVersion 120 + // 'sellerVersion': sellerVersion
120 }; 121 };
121 await saveUserInfo(User.fromJson(userMap)); 122 await saveUserInfo(User.fromJson(userMap));
122 123
@@ -214,6 +215,8 @@ class UserModel with ChangeNotifier { @@ -214,6 +215,8 @@ class UserModel with ChangeNotifier {
214 user['morning'] = daily['morning']; 215 user['morning'] = daily['morning'];
215 user['noon'] = daily['noon']; 216 user['noon'] = daily['noon'];
216 user['night'] = daily['night']; 217 user['night'] = daily['night'];
  218 + user['sellerVersion'] = seller['vid'];
  219 +
217 220
218 await saveUserInfo(User.fromJson(user)); 221 await saveUserInfo(User.fromJson(user));
219 App.sp.setBool("isLogin", true); 222 App.sp.setBool("isLogin", true);