Browse Source

1.升级bloc,修复邀请好友的bug

tags/0.0.9+4
“yanghuaxuan” 3 years ago
parent
commit
2392e6e761
47 changed files with 106 additions and 124 deletions
  1. +4
    -0
      android/build.gradle
  2. BIN
     
  3. +4
    -5
      example/android/app/build.gradle
  4. BIN
     
  5. +1
    -1
      example/android/tmpmob/ShareSDK/assets/ShareSDK.xml
  6. +1
    -1
      example/ios/Podfile.lock
  7. +12
    -5
      example/ios/Runner/AppDelegate.m
  8. +1
    -4
      lib/pages/about_us_page/bloc/about_us_bloc.dart
  9. +2
    -3
      lib/pages/custom_page/bloc/custom_item_page_bloc.dart
  10. +1
    -3
      lib/pages/custom_page/bloc/custom_page_bloc.dart
  11. +1
    -4
      lib/pages/favorites_page/bloc/favorites_bloc.dart
  12. +1
    -3
      lib/pages/feedback_page/bloc/feedback_bloc.dart
  13. +2
    -3
      lib/pages/feedback_page/bloc/feedback_record_bloc.dart
  14. +1
    -3
      lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart
  15. +1
    -3
      lib/pages/message_notice_page/bloc/message_notice_bloc.dart
  16. +2
    -3
      lib/pages/message_settings_page/bloc/message_settings_bloc.dart
  17. +2
    -3
      lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart
  18. +2
    -3
      lib/pages/search_page/bloc/search_bloc.dart
  19. +2
    -4
      lib/pages/search_page/item/bloc/search_item_page_bloc.dart
  20. +2
    -3
      lib/pages/search_result_page/bloc/search_result_bloc.dart
  21. +2
    -3
      lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart
  22. +2
    -3
      lib/pages/search_think_page/bloc/search_think_bloc.dart
  23. +2
    -4
      lib/pages/team_details_page/bloc/team_details_bloc.dart
  24. +2
    -3
      lib/pages/team_page/bloc/team_bloc.dart
  25. +2
    -3
      lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart
  26. +2
    -3
      lib/pages/vip_center_page/bloc/vip_center_bloc.dart
  27. +7
    -5
      lib/register.dart
  28. +2
    -3
      lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart
  29. +2
    -3
      lib/widgets/custom/notice/bloc/custom_notice_bloc.dart
  30. +2
    -3
      lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart
  31. +2
    -3
      lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart
  32. +2
    -3
      lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart
  33. +1
    -1
      lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart
  34. +1
    -3
      lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart
  35. +2
    -3
      lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart
  36. +2
    -3
      lib/widgets/goods_details/store/bloc/store_bloc.dart
  37. +1
    -1
      lib/widgets/home/home_banner/bloc/home_banner_bloc.dart
  38. +1
    -1
      lib/widgets/home/home_goods/home_goods_item.dart
  39. +2
    -3
      lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart
  40. +2
    -3
      lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart
  41. +5
    -1
      lib/widgets/restart_widget/restart_widget.dart
  42. +2
    -3
      lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart
  43. +8
    -0
      lib/widgets/share/share_alert.dart
  44. +1
    -1
      lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart
  45. +1
    -3
      lib/widgets/team/recommend/bloc/team_recommend_bloc.dart
  46. +2
    -1
      lib/zhiying_base_widget.dart
  47. +4
    -4
      pubspec.yaml

+ 4
- 0
android/build.gradle View File

@@ -31,4 +31,8 @@ android {
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
} }

dependencies {
implementation 'com.amap.api:location:5.2.0'
}
} }

BIN
View File


+ 4
- 5
example/android/app/build.gradle View File

@@ -54,7 +54,7 @@ android {
ndk { ndk {
//选择要添加的对应cpu类型的.so库。 //选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a' abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
//abiFilters 'armeabi-v7a','x86_64'
//abiFilters 'armeabi-v7a','x86_64','arm64-v8a'
} }
} }


@@ -113,9 +113,9 @@ android {
// // 智夜生活 // // 智夜生活
// zhiying { // zhiying {
// applicationId "cn.zhios.zhiying" // applicationId "cn.zhios.zhiying"
// versionCode 55
// versionCode 57
// dimension "app" // dimension "app"
// versionName '1.3.15'
// versionName '1.3.17'
// // 签名信息 // // 签名信息
// signingConfig signingConfigs.zhiying // signingConfig signingConfigs.zhiying
// } // }
@@ -186,7 +186,6 @@ dependencies {
implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar' implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
implementation 'com.alibaba:fastjson:1.2.41@jar' implementation 'com.alibaba:fastjson:1.2.41@jar'


implementation fileTree(include: ['*.jar'], dir: 'libs')


} }


@@ -219,7 +218,7 @@ MobSDK {
} }
Wechat { Wechat {
appId "wx598aaef252cd78e4" appId "wx598aaef252cd78e4"
appSecret "d2fc2edf9ece746765b3bfc0bf1b230e"
appSecret "e3e41385b2832d53745805181cb0daa6"
shareByAppClient true shareByAppClient true
withShareTicket true withShareTicket true
bypassApproval false bypassApproval false


BIN
View File


+ 1
- 1
example/android/tmpmob/ShareSDK/assets/ShareSDK.xml View File

@@ -16,7 +16,7 @@
<Tumblr Enable="false" /> <Tumblr Enable="false" />
<Email Enable="false" /> <Email Enable="false" />
<ShortMessage Enable="false" /> <ShortMessage Enable="false" />
<Wechat AppId="wx598aaef252cd78e4" AppSecret="d2fc2edf9ece746765b3bfc0bf1b230e" ShareByAppClient="true" WithShareTicket="true" BypassApproval="false" Enable="true" />
<Wechat AppId="wx598aaef252cd78e4" AppSecret="e3e41385b2832d53745805181cb0daa6" ShareByAppClient="true" WithShareTicket="true" BypassApproval="false" Enable="true" />
<WechatMoments Enable="true" /> <WechatMoments Enable="true" />
<QQ AppId="1111030588" AppKey="XoHKlrBybXy7ORBt" ShareByAppClient="true" BypassApproval="false" Enable="true" /> <QQ AppId="1111030588" AppKey="XoHKlrBybXy7ORBt" ShareByAppClient="true" BypassApproval="false" Enable="true" />
<Instapaper Enable="false" /> <Instapaper Enable="false" />


+ 1
- 1
example/ios/Podfile.lock View File

@@ -443,7 +443,7 @@ SPEC CHECKSUMS:
flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694 flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694
flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
fluwx: 8d47bee15c7fed07b94c2a12fb2381677232431a
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09


+ 12
- 5
example/ios/Runner/AppDelegate.m View File

@@ -27,12 +27,19 @@


// 获取设置 // 获取设置
- (NSDictionary*)getSetting { - (NSDictionary*)getSetting {
return @{
@"domain": @"http://inapi.izhyin.cn",
@"master_id": @"123456",
@"secret_key": @"123456"
// return @{
// @"domain": @"http://inapi.izhyin.cn",
// @"master_id": @"123456",
// @"secret_key": @"123456"
//@"domain": @"http://192.168.0.113:5000" //@"domain": @"http://192.168.0.113:5000"
};
// };

return @{
@"domain": @"http://api.zhios.cn",
@"master_id": @"99813608",
@"secret_key": @"123456"
//@"domain": @"http://192.168.0.113:5000"
};
} }


#pragma mark -- 第三方应用跳转 #pragma mark -- 第三方应用跳转


+ 1
- 4
lib/pages/about_us_page/bloc/about_us_bloc.dart View File

@@ -10,10 +10,7 @@ class AboutUsBloc extends Bloc<AboutUsEvent, AboutUsState> {


AboutUsRepository repository; AboutUsRepository repository;


AboutUsBloc(this.repository);

@override
AboutUsState get initialState => AboutUsInitial();
AboutUsBloc(this.repository) : super(AboutUsInitial());


@override @override
Stream<AboutUsState> mapEventToState( Stream<AboutUsState> mapEventToState(


+ 2
- 3
lib/pages/custom_page/bloc/custom_item_page_bloc.dart View File

@@ -11,10 +11,9 @@ class CustomItemPageBloc extends Bloc<CustomItemPageEvent, CustomItemPageState>


CustomItemPageRepository repository; CustomItemPageRepository repository;


CustomItemPageBloc(this.repository);
CustomItemPageBloc(this.repository) : super(CustomItemPageInitial());



@override
CustomItemPageState get initialState => CustomItemPageInitial();


@override @override
Stream<CustomItemPageState> mapEventToState( Stream<CustomItemPageState> mapEventToState(


+ 1
- 3
lib/pages/custom_page/bloc/custom_page_bloc.dart View File

@@ -13,10 +13,8 @@ class CustomPageBloc extends Bloc<CustomPageEvent, CustomPageState> {


CustomPageRepository repository; CustomPageRepository repository;


CustomPageBloc(this.repository);
CustomPageBloc(this.repository) : super(CustomPageInitialState());


@override
CustomPageState get initialState => CustomPageInitialState();


@override @override
Stream<CustomPageState> mapEventToState( Stream<CustomPageState> mapEventToState(


+ 1
- 4
lib/pages/favorites_page/bloc/favorites_bloc.dart View File

@@ -17,11 +17,8 @@ class FavoritesBloc extends Bloc<FavoritesEvent, FavoritesState> {


FavoritesRepository repository; FavoritesRepository repository;


FavoritesBloc(this.repository);
FavoritesBloc(this.repository) : super(FavoritesInitial());


@override
// TODO: implement initialState
FavoritesState get initialState => FavoritesInitial();


@override @override
Stream<FavoritesState> mapEventToState( Stream<FavoritesState> mapEventToState(


+ 1
- 3
lib/pages/feedback_page/bloc/feedback_bloc.dart View File

@@ -7,12 +7,10 @@ import 'package:flutter_bloc/flutter_bloc.dart';


class FeedbackBloc extends Bloc<FeedbackEvent, FeedbackState> { class FeedbackBloc extends Bloc<FeedbackEvent, FeedbackState> {
// FeedbackBloc() : super(FeedbackInitial()); // FeedbackBloc() : super(FeedbackInitial());
@override
FeedbackState get initialState => FeedbackInitial();


FeedBackRepository repository; FeedBackRepository repository;


FeedbackBloc(this.repository);
FeedbackBloc(this.repository) : super(FeedbackInitial());


@override @override
Stream<FeedbackState> mapEventToState( Stream<FeedbackState> mapEventToState(


+ 2
- 3
lib/pages/feedback_page/bloc/feedback_record_bloc.dart View File

@@ -8,12 +8,11 @@ import 'feedback_record_state.dart';


class FeedbackRecordBloc extends Bloc<FeedbackRecordEvent, FeedbackRecordState> { class FeedbackRecordBloc extends Bloc<FeedbackRecordEvent, FeedbackRecordState> {
// FeedbackRecordBloc() : super(FeedbackRecordInitial()); // FeedbackRecordBloc() : super(FeedbackRecordInitial());
@override
FeedbackRecordState get initialState => FeedbackRecordInitial();



FeedbackRecordRepository repository; FeedbackRecordRepository repository;


FeedbackRecordBloc(this.repository);
FeedbackRecordBloc(this.repository) : super(FeedbackRecordInitial());


@override @override
Stream<FeedbackRecordState> mapEventToState( Stream<FeedbackRecordState> mapEventToState(


+ 1
- 3
lib/pages/goods_details_page/bloc/goods_details_page_bloc.dart View File

@@ -13,12 +13,10 @@ part 'goods_details_page_state.dart';
class GoodsDetailsPageBloc extends Bloc<GoodsDetailsPageEvent, GoodsDetailsPageState> { class GoodsDetailsPageBloc extends Bloc<GoodsDetailsPageEvent, GoodsDetailsPageState> {
// GoodsDetailsPageBloc() : super(GoodsDetailsPageInitial()); // GoodsDetailsPageBloc() : super(GoodsDetailsPageInitial());


@override
GoodsDetailsPageState get initialState => GoodsDetailsPageInitial();


GoodsDetailsPageRepository repository; GoodsDetailsPageRepository repository;


GoodsDetailsPageBloc({@required this.repository});
GoodsDetailsPageBloc({@required this.repository}) : super(GoodsDetailsPageInitial());


@override @override
Stream<GoodsDetailsPageState> mapEventToState( Stream<GoodsDetailsPageState> mapEventToState(


+ 1
- 3
lib/pages/message_notice_page/bloc/message_notice_bloc.dart View File

@@ -18,10 +18,8 @@ class MessageNoticeBloc extends Bloc<MessageNoticeEvent, MessageNoticeState> {


MessageNoticeRepository repository; MessageNoticeRepository repository;


MessageNoticeBloc(this.repository);
MessageNoticeBloc(this.repository) : super(MessageNoticeInitial());


@override
MessageNoticeState get initialState => MessageNoticeInitial();


@override @override
Stream<MessageNoticeState> mapEventToState( Stream<MessageNoticeState> mapEventToState(


+ 2
- 3
lib/pages/message_settings_page/bloc/message_settings_bloc.dart View File

@@ -8,11 +8,10 @@ import 'message_settings_event.dart';
import 'message_settings_state.dart'; import 'message_settings_state.dart';


class MessageSettingsBloc extends Bloc<MessageSettingsEvent, MessageSettingsState> { class MessageSettingsBloc extends Bloc<MessageSettingsEvent, MessageSettingsState> {
@override
MessageSettingsState get initialState => MessageSettingsInitial();

MessageSettingsRepository repository; MessageSettingsRepository repository;


MessageSettingsBloc(this.repository);
MessageSettingsBloc(this.repository) : super(MessageSettingsInitial());


@override @override
Stream<MessageSettingsState> mapEventToState( Stream<MessageSettingsState> mapEventToState(


+ 2
- 3
lib/pages/privacy_settings_page/bloc/privacy_settings_bloc.dart View File

@@ -7,12 +7,11 @@ import 'privacy_settings_state.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';


class PrivacySettingsBloc extends Bloc<PrivacySettingsEvent, PrivacySettingsState> { class PrivacySettingsBloc extends Bloc<PrivacySettingsEvent, PrivacySettingsState> {
@override
PrivacySettingsState get initialState => PrivacySettingsInitial();



PrivacySettingsRepository repository; PrivacySettingsRepository repository;


PrivacySettingsBloc(this.repository);
PrivacySettingsBloc(this.repository) : super(PrivacySettingsInitial());


@override @override
Stream<PrivacySettingsState> mapEventToState( Stream<PrivacySettingsState> mapEventToState(


+ 2
- 3
lib/pages/search_page/bloc/search_bloc.dart View File

@@ -15,10 +15,9 @@ class SearchBloc extends Bloc<SearchEvent, SearchState> {


SearchRepository repository; SearchRepository repository;


SearchBloc({this.repository});
SearchBloc({this.repository}) : super(SearchInitial());



@override
SearchState get initialState => SearchInitial();


@override @override
Stream<SearchState> mapEventToState( Stream<SearchState> mapEventToState(


+ 2
- 4
lib/pages/search_page/item/bloc/search_item_page_bloc.dart View File

@@ -15,11 +15,9 @@ class SearchItemPageBloc extends Bloc<SearchItemPageEvent, SearchItemPageState>


SearchItemRepository repository; SearchItemRepository repository;


SearchItemPageBloc({@required this.repository});
SearchItemPageBloc({@required this.repository}) : super(SearchItemPageInitial());



@override
// TODO: implement initialState
SearchItemPageState get initialState => SearchItemPageInitial();


@override @override
Stream<SearchItemPageState> mapEventToState( Stream<SearchItemPageState> mapEventToState(


+ 2
- 3
lib/pages/search_result_page/bloc/search_result_bloc.dart View File

@@ -15,10 +15,9 @@ class SearchResultBloc extends Bloc<SearchResultEvent, SearchResultState> {


SearchResultRepository repository; SearchResultRepository repository;


SearchResultBloc({@required this.repository});
SearchResultBloc({@required this.repository}) : super(SearchResultInitial());



@override
SearchResultState get initialState => SearchResultInitial();


@override @override
Stream<SearchResultState> mapEventToState( Stream<SearchResultState> mapEventToState(


+ 2
- 3
lib/pages/search_result_page/item/bloc/search_result_item_bloc.dart View File

@@ -15,10 +15,9 @@ class SearchResultItemBloc extends Bloc<SearchResultItemEvent, SearchResultItemS


SearchResultItemRepository repository; SearchResultItemRepository repository;


@override
SearchResultItemState get initialState => SearchResultItemInitial();


SearchResultItemBloc({@required this.repository});

SearchResultItemBloc({@required this.repository}) : super(SearchResultItemInitial());


@override @override
Stream<SearchResultItemState> mapEventToState( Stream<SearchResultItemState> mapEventToState(


+ 2
- 3
lib/pages/search_think_page/bloc/search_think_bloc.dart View File

@@ -13,12 +13,11 @@ part 'search_think_state.dart';


class SearchThinkBloc extends Bloc<SearchThinkEvent, SearchThinkState> { class SearchThinkBloc extends Bloc<SearchThinkEvent, SearchThinkState> {
// SearchThinkBloc() : super(SearchThinkInitial()); // SearchThinkBloc() : super(SearchThinkInitial());
@override
SearchThinkState get initialState => SearchThinkInitial();



SearchThinkRepository repository; SearchThinkRepository repository;


SearchThinkBloc(this.repository);
SearchThinkBloc(this.repository) : super(SearchThinkInitial());


@override @override
Stream<SearchThinkState> mapEventToState(SearchThinkEvent event,) async* { Stream<SearchThinkState> mapEventToState(SearchThinkEvent event,) async* {


+ 2
- 4
lib/pages/team_details_page/bloc/team_details_bloc.dart View File

@@ -13,13 +13,11 @@ part 'team_details_event.dart';
part 'team_details_state.dart'; part 'team_details_state.dart';


class TeamDetailsBloc extends Bloc<TeamDetailsEvent, TeamDetailsState> { class TeamDetailsBloc extends Bloc<TeamDetailsEvent, TeamDetailsState> {
// TeamDetailsBloc() : super(TeamDetailsInitial());
@override
TeamDetailsState get initialState => TeamDetailsInitial();



TeamDetailsRepository repository; TeamDetailsRepository repository;


TeamDetailsBloc({@required this.repository});
TeamDetailsBloc({@required this.repository}) : super(TeamDetailsInitial());


@override @override
Stream<TeamDetailsState> mapEventToState( Stream<TeamDetailsState> mapEventToState(


+ 2
- 3
lib/pages/team_page/bloc/team_bloc.dart View File

@@ -17,10 +17,9 @@ class TeamBloc extends Bloc<TeamEvent, TeamState> {


TeamRepository repository; TeamRepository repository;


TeamBloc({@required this.repository});
TeamBloc({@required this.repository}) : super(TeamInitial());



@override
TeamState get initialState => TeamInitial();


@override @override
Stream<TeamState> mapEventToState( Stream<TeamState> mapEventToState(


+ 2
- 3
lib/pages/upload_wechat_page/bloc/upload_wechat_bloc.dart View File

@@ -7,12 +7,11 @@ import 'upload_wechat_event.dart';
import 'upload_wechat_state.dart'; import 'upload_wechat_state.dart';


class UploadWeChatBloc extends Bloc<UploadWeChatEvent, UploadWeChatState> { class UploadWeChatBloc extends Bloc<UploadWeChatEvent, UploadWeChatState> {
@override
UploadWeChatState get initialState => UploadWeChatInitial();



UploadWeChatRepository repository; UploadWeChatRepository repository;


UploadWeChatBloc(this.repository);
UploadWeChatBloc(this.repository) : super(UploadWeChatInitial());


@override @override
Stream<UploadWeChatState> mapEventToState( Stream<UploadWeChatState> mapEventToState(


+ 2
- 3
lib/pages/vip_center_page/bloc/vip_center_bloc.dart View File

@@ -13,12 +13,11 @@ part 'vip_center_state.dart';


class VipCenterBloc extends Bloc<VipCenterEvent, VipCenterState> { class VipCenterBloc extends Bloc<VipCenterEvent, VipCenterState> {
// VipCenterBloc() : super(VipCenterInitial()); // VipCenterBloc() : super(VipCenterInitial());
@override
VipCenterState get initialState => VipCenterInitial();



VipCenterRepository repository; VipCenterRepository repository;


VipCenterBloc(this.repository);
VipCenterBloc(this.repository) : super(VipCenterInitial());


@override @override
Stream<VipCenterState> mapEventToState( Stream<VipCenterState> mapEventToState(


+ 7
- 5
lib/register.dart View File

@@ -128,19 +128,21 @@ class BaseWidgetRegister {
register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? ''); register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? '');


// ================ jd // ================ jd
if (Platform.isIOS) {
Jdsdk.init(appKey: config.keys?.jdIos?.appkey ?? '', appSecret: config.keys?.jdIos?.secret ?? '');
} else if (Platform.isAndroid) {
Jdsdk.init(appKey: config.keys?.jdAndroid?.appkey ?? '', appSecret: config.keys?.jdAndroid?.secret ?? '');
}
SharesdkPlugin.regist(register); SharesdkPlugin.regist(register);



///微信支付初始化 ///微信支付初始化
registerWxApi(appId: config?.keys?.weixin?.appId, universalLink: config?.keys?.weixin?.universalLink); registerWxApi(appId: config?.keys?.weixin?.appId, universalLink: config?.keys?.weixin?.universalLink);


///高德定位注册 ///高德定位注册
AMapFlutterLocation.setApiKey(config?.keys?.gd?.androidKey ?? "", config?.keys?.gd?.iosKey); AMapFlutterLocation.setApiKey(config?.keys?.gd?.androidKey ?? "", config?.keys?.gd?.iosKey);


if (Platform.isIOS) {
Jdsdk.init(appKey: config.keys?.jdIos?.appkey ?? '', appSecret: config.keys?.jdIos?.secret ?? '');
} else if (Platform.isAndroid) {
Jdsdk.init(appKey: config.keys?.jdAndroid?.appkey ?? '', appSecret: config.keys?.jdAndroid?.secret ?? '');
}

}); });


// MOB 秒验 // MOB 秒验


+ 2
- 3
lib/widgets/custom/multi_nav/bloc/custom_quick_entry_bloc.dart View File

@@ -10,10 +10,9 @@ import './bloc.dart';
class CustomQuickEntryBloc extends Bloc<CustomQuickEntryEvent, CustomQuickEntryState> { class CustomQuickEntryBloc extends Bloc<CustomQuickEntryEvent, CustomQuickEntryState> {
CustomQuickEntryRepository repository; CustomQuickEntryRepository repository;


CustomQuickEntryBloc({@required this.repository});
CustomQuickEntryBloc({@required this.repository}) : super(InitialCustomQuickEntryState());



@override
CustomQuickEntryState get initialState => InitialCustomQuickEntryState();


@override @override
Stream<CustomQuickEntryState> mapEventToState(CustomQuickEntryEvent event) async* { Stream<CustomQuickEntryState> mapEventToState(CustomQuickEntryEvent event) async* {


+ 2
- 3
lib/widgets/custom/notice/bloc/custom_notice_bloc.dart View File

@@ -6,10 +6,9 @@ import 'bloc.dart';
class CustomNoticeBloc extends Bloc<CustomNoticeEvent, CustomNoticeState> { class CustomNoticeBloc extends Bloc<CustomNoticeEvent, CustomNoticeState> {
CustomNoticeRepository repository; CustomNoticeRepository repository;


CustomNoticeBloc({this.repository});
CustomNoticeBloc({this.repository}) : super(CustomNoticeInitial());



@override
CustomNoticeState get initialState => CustomNoticeInitial();


@override @override
Stream<CustomNoticeState> mapEventToState( Stream<CustomNoticeState> mapEventToState(


+ 2
- 3
lib/widgets/custom/slide_banner/bloc/custom_slide_banner_bloc.dart View File

@@ -9,10 +9,9 @@ import './bloc.dart';
class CustomSlideBannerBloc extends Bloc<CustomSlideBannerEvent, CustomSlideBannerState> { class CustomSlideBannerBloc extends Bloc<CustomSlideBannerEvent, CustomSlideBannerState> {
CustomSlideBannerRepository repository; CustomSlideBannerRepository repository;


CustomSlideBannerBloc({@required this.repository});
CustomSlideBannerBloc({@required this.repository}) : super(InitialCustomSlideBannerState());



@override
CustomSlideBannerState get initialState => InitialCustomSlideBannerState();


@override @override
Stream<CustomSlideBannerState> mapEventToState(CustomSlideBannerEvent event) async* { Stream<CustomSlideBannerState> mapEventToState(CustomSlideBannerEvent event) async* {


+ 2
- 3
lib/widgets/favorites/goods_list/bloc/favorites_goods_list_bloc.dart View File

@@ -14,12 +14,11 @@ part 'favorites_goods_list_event.dart';
part 'favorites_goods_list_state.dart'; part 'favorites_goods_list_state.dart';


class FavoritesGoodsListBloc extends Bloc<FavoritesGoodsListEvent, FavoritesGoodsListState> { class FavoritesGoodsListBloc extends Bloc<FavoritesGoodsListEvent, FavoritesGoodsListState> {
@override
FavoritesGoodsListState get initialState => FavoritesGoodsListInitial();



FavoritesGoodsListRepository repository; FavoritesGoodsListRepository repository;


FavoritesGoodsListBloc(this.repository);
FavoritesGoodsListBloc(this.repository) : super(FavoritesGoodsListInitial());


@override @override
Stream<FavoritesGoodsListState> mapEventToState( Stream<FavoritesGoodsListState> mapEventToState(


+ 2
- 3
lib/widgets/goods_details/coupon/bloc/counpon_bloc.dart View File

@@ -6,12 +6,11 @@ import 'bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';


class CounponBloc extends Bloc<CounponEvent, CounponState> { class CounponBloc extends Bloc<CounponEvent, CounponState> {
@override
CounponState get initialState => CounponInitial();



CounponRepository repository; CounponRepository repository;


CounponBloc({this.repository});
CounponBloc({this.repository}) : super(CounponInitial());


@override @override
Stream<CounponState> mapEventToState( Stream<CounponState> mapEventToState(


+ 1
- 1
lib/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart View File

@@ -13,7 +13,7 @@ part 'goods_details_img_event.dart';
part 'goods_details_img_state.dart'; part 'goods_details_img_state.dart';


class GoodsDetailsImgBloc extends Bloc<GoodsDetailsImgEvent, GoodsDetailsImgState> { class GoodsDetailsImgBloc extends Bloc<GoodsDetailsImgEvent, GoodsDetailsImgState> {
GoodsDetailsImgBloc({this.repository});
GoodsDetailsImgBloc({this.repository}) : super(GoodsDetailsImgInitial());


GoodsDetailsImgRepository repository; GoodsDetailsImgRepository repository;




+ 1
- 3
lib/widgets/goods_details/footer/bloc/goods_details_footer_bloc.dart View File

@@ -12,12 +12,10 @@ part 'goods_details_footer_event.dart';
part 'goods_details_footer_state.dart'; part 'goods_details_footer_state.dart';


class GoodsDetailsFooterBloc extends Bloc<GoodsDetailsFooterEvent, GoodsDetailsFooterState> { class GoodsDetailsFooterBloc extends Bloc<GoodsDetailsFooterEvent, GoodsDetailsFooterState> {
GoodsDetailsFooterBloc({this.repository});
GoodsDetailsFooterBloc({this.repository}) : super(GoodsDetailsFooterInitial());


GoodsDetailsFooterRepository repository; GoodsDetailsFooterRepository repository;


@override
GoodsDetailsFooterState get initialState => GoodsDetailsFooterInitial();


@override @override
Stream<GoodsDetailsFooterState> mapEventToState( Stream<GoodsDetailsFooterState> mapEventToState(


+ 2
- 3
lib/widgets/goods_details/slide_banner/bloc/goods_details_slide_banner_bloc.dart View File

@@ -15,10 +15,9 @@ part 'goods_details_slide_banner_state.dart';
class GoodsDetailsSlideBannerBloc extends Bloc<GoodsDetailsSlideBannerEvent, GoodsDetailsSlideBannerState> { class GoodsDetailsSlideBannerBloc extends Bloc<GoodsDetailsSlideBannerEvent, GoodsDetailsSlideBannerState> {
GoodsDetailsSlideBannerRepository repository; GoodsDetailsSlideBannerRepository repository;


GoodsDetailsSlideBannerBloc({@required this.repository});
GoodsDetailsSlideBannerBloc({@required this.repository}) : super(GoodsDetailsSlideBannerInitial());



@override
GoodsDetailsSlideBannerState get initialState => GoodsDetailsSlideBannerInitial();


@override @override
Stream<GoodsDetailsSlideBannerState> mapEventToState( Stream<GoodsDetailsSlideBannerState> mapEventToState(


+ 2
- 3
lib/widgets/goods_details/store/bloc/store_bloc.dart View File

@@ -8,10 +8,9 @@ import 'bloc.dart';
class StoreBloc extends Bloc<StoreEvent, StoreState> { class StoreBloc extends Bloc<StoreEvent, StoreState> {
StoreRepository repository; StoreRepository repository;


StoreBloc({this.repository});
StoreBloc({this.repository}) : super(StoreInitial());



@override
StoreState get initialState => StoreInitial();


@override @override
Stream<StoreState> mapEventToState( Stream<StoreState> mapEventToState(


+ 1
- 1
lib/widgets/home/home_banner/bloc/home_banner_bloc.dart View File

@@ -10,7 +10,7 @@ import './bloc.dart';
class HomeBannerBloc extends Bloc<HomeBannerEvent, HomeBannerState> { class HomeBannerBloc extends Bloc<HomeBannerEvent, HomeBannerState> {
HomeBannerRepository repository; HomeBannerRepository repository;


HomeBannerBloc({@required this.repository});
HomeBannerBloc({@required this.repository}) : super(InitialHomeBannerState());


@override @override
HomeBannerState get initialState => InitialHomeBannerState(); HomeBannerState get initialState => InitialHomeBannerState();


+ 1
- 1
lib/widgets/home/home_goods/home_goods_item.dart View File

@@ -120,7 +120,7 @@ class HomeGoodsItem extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: HexColor.fromHex('#333333'), color: HexColor.fromHex('#333333'),
fontWeight: FontWeight.bold),
fontWeight: style?.listStyle?.isTitleBold=="1"? FontWeight.bold:FontWeight.w500),
)); ));
return RichText( return RichText(
maxLines: 2, maxLines: 2,


+ 2
- 3
lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart View File

@@ -11,10 +11,9 @@ import './bloc.dart';
class HomeQuickEntryBloc extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState> { class HomeQuickEntryBloc extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState> {
HomeQuickEntryRepository repository; HomeQuickEntryRepository repository;


HomeQuickEntryBloc({@required this.repository});
HomeQuickEntryBloc({@required this.repository}) : super(InitialHomeQuickEntryState());



@override
HomeQuickEntryState get initialState => InitialHomeQuickEntryState();


@override @override
Stream<HomeQuickEntryState> mapEventToState(HomeQuickEntryEvent event) async* { Stream<HomeQuickEntryState> mapEventToState(HomeQuickEntryEvent event) async* {


+ 2
- 3
lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart View File

@@ -12,10 +12,9 @@ import './bloc.dart';
class HomeSlideBannerBloc extends Bloc<HomeSlideBannerEvent, HomeSlideBannerState> { class HomeSlideBannerBloc extends Bloc<HomeSlideBannerEvent, HomeSlideBannerState> {
HomeSlideBannerRepository repository; HomeSlideBannerRepository repository;


HomeSlideBannerBloc({@required this.repository});
HomeSlideBannerBloc({@required this.repository}) : super(InitialHomeSlideBannerState());



@override
HomeSlideBannerState get initialState => InitialHomeSlideBannerState();


@override @override
Stream<HomeSlideBannerState> mapEventToState(HomeSlideBannerEvent event) async* { Stream<HomeSlideBannerState> mapEventToState(HomeSlideBannerEvent event) async* {


+ 5
- 1
lib/widgets/restart_widget/restart_widget.dart View File

@@ -68,7 +68,11 @@ class _RestartWidgetState extends State<RestartWidget> {


@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {
///debug阶段可重启
isFirst=true;
}
return StreamBuilder(stream: outData,builder: (context,asyn){ return StreamBuilder(stream: outData,builder: (context,asyn){
if(asyn.data==null&&!isFirst){ if(asyn.data==null&&!isFirst){
return Scaffold( return Scaffold(


+ 2
- 3
lib/widgets/search_result/goods_list/bloc/search_result_goods_list_bloc.dart View File

@@ -16,10 +16,9 @@ class SearchResultGoodsListBloc extends Bloc<SearchResultGoodsListEvent, SearchR


SearchResultGoodsListRepository repository; SearchResultGoodsListRepository repository;


SearchResultGoodsListBloc({@required this.repository});
SearchResultGoodsListBloc({@required this.repository}) : super(SearchResultGoodsListInitial());



@override
SearchResultGoodsListState get initialState => SearchResultGoodsListInitial();


@override @override
Stream<SearchResultGoodsListState> mapEventToState( Stream<SearchResultGoodsListState> mapEventToState(


+ 8
- 0
lib/widgets/share/share_alert.dart View File

@@ -224,6 +224,14 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
_shareMultipleImages(item.type); _shareMultipleImages(item.type);
return; return;
} }

if (widget?.model?.poster != null) {
Loading.show(context);
File file = await EncodeUtil.compressImage(context, images: widget?.model?.poster, size: 600);
widget?.model?.poster = await file.readAsBytes();
Loading.dismiss();
}

if (item.type == 'wx') { if (item.type == 'wx') {
_shareByMob(ShareSDKPlatforms.wechatSession); _shareByMob(ShareSDKPlatforms.wechatSession);
} else if (item.type == 'pyq') { } else if (item.type == 'pyq') {


+ 1
- 1
lib/widgets/team/fans_list/bloc/team_list_fans_bloc.dart View File

@@ -15,7 +15,7 @@ class TeamListFansBloc extends Bloc<TeamListFansEvent, TeamListFansState> {


TeamListFansRepository repository; TeamListFansRepository repository;


TeamListFansBloc(this.repository);
TeamListFansBloc(this.repository) : super(null);


@override @override
TeamListFansState get initialState => TeamListFansInitial(); TeamListFansState get initialState => TeamListFansInitial();


+ 1
- 3
lib/widgets/team/recommend/bloc/team_recommend_bloc.dart View File

@@ -15,10 +15,8 @@ class TeamRecommendBloc extends Bloc<TeamRecommendEvent, TeamRecommendState> {


TeamRecommendRepository repository; TeamRecommendRepository repository;


TeamRecommendBloc(this.repository);
TeamRecommendBloc(this.repository) : super(TeamRecommendInitial());


@override
TeamRecommendState get initialState => TeamRecommendInitial();


@override @override
Stream<TeamRecommendState> mapEventToState( Stream<TeamRecommendState> mapEventToState(


+ 2
- 1
lib/zhiying_base_widget.dart View File

@@ -8,4 +8,5 @@ export 'package:pull_to_refresh/pull_to_refresh.dart';
export 'package:flutter_user_agent/flutter_user_agent.dart'; export 'package:flutter_user_agent/flutter_user_agent.dart';
export 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart'; export 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart';
export 'package:amap_flutter_location/amap_flutter_location.dart'; export 'package:amap_flutter_location/amap_flutter_location.dart';
export 'package:amap_flutter_location/amap_location_option.dart';
export 'package:amap_flutter_location/amap_location_option.dart';
export 'package:tab_indicator_styler/tab_indicator_styler.dart';

+ 4
- 4
pubspec.yaml View File

@@ -12,7 +12,7 @@ dependencies:
sdk: flutter sdk: flutter


flutter_swiper: ^1.1.6 flutter_swiper: ^1.1.6
bloc: ^4.0.0
bloc: ^5.0.0
event_bus: ^1.1.1 event_bus: ^1.1.1
pull_to_refresh: pull_to_refresh:
git: git:
@@ -56,8 +56,8 @@ dependencies:




mobpush_plugin: mobpush_plugin:
plugin_platform_interface: ^1.0.1
permission_handler_platform_interface: ^2.0.1
plugin_platform_interface: "1.0.2"
permission_handler_platform_interface: "2.0.1"


flutter_user_agent: ^1.2.2 flutter_user_agent: ^1.2.2


@@ -66,10 +66,10 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

zhiying_comm: zhiying_comm:
path: ../zhiying_comm path: ../zhiying_comm



# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec




Loading…
Cancel
Save