Showing
5 changed files
with
17 additions
and
20 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "350" | 15 | +def flutterVersionCode = "351" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '350' | 17 | + flutterVersionCode = '351' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "3.5.0" | 20 | +def flutterVersionName = "3.5.1" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '3.5.0' | 22 | + flutterVersionName = '3.5.1' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -119,7 +119,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> | @@ -119,7 +119,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> | ||
| 119 | ///点击某个店铺 | 119 | ///点击某个店铺 |
| 120 | _clickStore(context, CheckSellerAccSunModel sunModel) async { | 120 | _clickStore(context, CheckSellerAccSunModel sunModel) async { |
| 121 | Map<String, dynamic> seller = sunModel.toJson(); | 121 | Map<String, dynamic> seller = sunModel.toJson(); |
| 122 | - | 122 | + |
| 123 | await _getCustomerActivityBaseinfo(seller['id'], seller['uid']); | 123 | await _getCustomerActivityBaseinfo(seller['id'], seller['uid']); |
| 124 | //判断进入个人信息还是直接进入主页 | 124 | //判断进入个人信息还是直接进入主页 |
| 125 | if (name == '' || phone == '') { | 125 | if (name == '' || phone == '') { |
| @@ -134,7 +134,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> | @@ -134,7 +134,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> | ||
| 134 | ///进入某个店铺 | 134 | ///进入某个店铺 |
| 135 | _loginStore(context, CheckSellerAccSunModel sunModel) { | 135 | _loginStore(context, CheckSellerAccSunModel sunModel) { |
| 136 | UserModel userModel = Provider.of<UserModel>(context, listen: false); | 136 | UserModel userModel = Provider.of<UserModel>(context, listen: false); |
| 137 | - userModel.accountLogin = false; | 137 | + App.sp.setBool("accountLogin", false); |
| 138 | Map<String, dynamic> seller = sunModel.toJson(); | 138 | Map<String, dynamic> seller = sunModel.toJson(); |
| 139 | Map<String, dynamic> userMap = { | 139 | Map<String, dynamic> userMap = { |
| 140 | "openid": seller['uid'], | 140 | "openid": seller['uid'], |
| @@ -220,8 +220,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { | @@ -220,8 +220,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { | ||
| 220 | 220 | ||
| 221 | ///进入某个店铺 | 221 | ///进入某个店铺 |
| 222 | _loginStore(context, CheckSellerAccSunModel sunModel) { | 222 | _loginStore(context, CheckSellerAccSunModel sunModel) { |
| 223 | - UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 224 | - userModel.accountLogin = false; | 223 | + App.sp.setBool("accountLogin", false); |
| 225 | Map<String, dynamic> seller = sunModel.toJson(); | 224 | Map<String, dynamic> seller = sunModel.toJson(); |
| 226 | Map<String, dynamic> userMap = { | 225 | Map<String, dynamic> userMap = { |
| 227 | "openid": seller['uid'], | 226 | "openid": seller['uid'], |
| @@ -239,6 +238,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { | @@ -239,6 +238,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { | ||
| 239 | "noon": "", | 238 | "noon": "", |
| 240 | "night": "", | 239 | "night": "", |
| 241 | }; | 240 | }; |
| 241 | + UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 242 | userModel.saveUserInfo(User.fromJson(userMap)); | 242 | userModel.saveUserInfo(User.fromJson(userMap)); |
| 243 | userModel.getSellerInfo( | 243 | userModel.getSellerInfo( |
| 244 | context, | 244 | context, |
| @@ -233,15 +233,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -233,15 +233,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 233 | height: ScreenUtil().setWidth(56), | 233 | height: ScreenUtil().setWidth(56), |
| 234 | fontSize: 28, | 234 | fontSize: 28, |
| 235 | isBold: false, | 235 | isBold: false, |
| 236 | - textColor: | ||
| 237 | - Provider.of<UserModel>(context, listen: false) | ||
| 238 | - .accountLogin | ||
| 239 | - ? MyColours.color_999999 | ||
| 240 | - : MyColours.color_199095, | 236 | + textColor: App.sp.getBool("accountLogin") |
| 237 | + ? MyColours.color_999999 | ||
| 238 | + : MyColours.color_199095, | ||
| 241 | radius: ScreenUtil().setWidth(20), | 239 | radius: ScreenUtil().setWidth(20), |
| 242 | onPressed: () { | 240 | onPressed: () { |
| 243 | - if (Provider.of<UserModel>(context, listen: false) | ||
| 244 | - .accountLogin) { | 241 | + if (App.sp.getBool("accountLogin")) { |
| 245 | return; | 242 | return; |
| 246 | } | 243 | } |
| 247 | NavigatorUtil.goIfNeedCreateStorePage(context, | 244 | NavigatorUtil.goIfNeedCreateStorePage(context, |
| @@ -25,7 +25,7 @@ class UserModel with ChangeNotifier { | @@ -25,7 +25,7 @@ class UserModel with ChangeNotifier { | ||
| 25 | String _registrationId; //极光推送registrationId | 25 | String _registrationId; //极光推送registrationId |
| 26 | String _token; //信鸽推送token | 26 | String _token; //信鸽推送token |
| 27 | List<PullMarketingByUidSunModel> pullMarketingByUidSunModel; | 27 | List<PullMarketingByUidSunModel> pullMarketingByUidSunModel; |
| 28 | - bool accountLogin = false; | 28 | + // bool accountLogin = false; |
| 29 | 29 | ||
| 30 | User get user => _user; | 30 | User get user => _user; |
| 31 | 31 | ||
| @@ -63,9 +63,9 @@ class UserModel with ChangeNotifier { | @@ -63,9 +63,9 @@ class UserModel with ChangeNotifier { | ||
| 63 | // return baseResp.msg ?? '用户名密码错误,请重新输入'; | 63 | // return baseResp.msg ?? '用户名密码错误,请重新输入'; |
| 64 | } else { | 64 | } else { |
| 65 | if (acclogin) { | 65 | if (acclogin) { |
| 66 | - accountLogin = true; | 66 | + App.sp.setBool("accountLogin", true); |
| 67 | } else { | 67 | } else { |
| 68 | - accountLogin = false; | 68 | + App.sp.setBool("accountLogin", false); |
| 69 | } | 69 | } |
| 70 | Map<String, dynamic> seller = baseResp.data[0]["seller"]; | 70 | Map<String, dynamic> seller = baseResp.data[0]["seller"]; |
| 71 | Map<String, dynamic> user = baseResp.data[0]["user"]; | 71 | Map<String, dynamic> user = baseResp.data[0]["user"]; |
| @@ -332,7 +332,7 @@ class UserModel with ChangeNotifier { | @@ -332,7 +332,7 @@ class UserModel with ChangeNotifier { | ||
| 332 | App.sp.remove("unionid"); | 332 | App.sp.remove("unionid"); |
| 333 | } | 333 | } |
| 334 | App.sp.setBool("isLogin", false); | 334 | App.sp.setBool("isLogin", false); |
| 335 | - XgFlutterPlugin().stopXg(); | 335 | + // XgFlutterPlugin().stopXg(); |
| 336 | NavigatorUtil.goLoginPage(context); | 336 | NavigatorUtil.goLoginPage(context); |
| 337 | } | 337 | } |
| 338 | } | 338 | } |
| @@ -349,7 +349,7 @@ class UserModel with ChangeNotifier { | @@ -349,7 +349,7 @@ class UserModel with ChangeNotifier { | ||
| 349 | Utils.showToast(baseResp.msg ?? "切换店铺失败,请稍后重试"); | 349 | Utils.showToast(baseResp.msg ?? "切换店铺失败,请稍后重试"); |
| 350 | return false; | 350 | return false; |
| 351 | } else { | 351 | } else { |
| 352 | - XgFlutterPlugin().stopXg(); | 352 | + // XgFlutterPlugin().stopXg(); |
| 353 | return true; | 353 | return true; |
| 354 | } | 354 | } |
| 355 | } | 355 | } |
-
Please register or login to post a comment