Browse Source

1.修复改获取UDID方式

tags/0.0.12+3
“yanghuaxuan” 3 years ago
parent
commit
8cd625cfc6
3 changed files with 60 additions and 100 deletions
  1. +6
    -6
      example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
  2. +3
    -3
      lib/pages/home_page/home_page.dart
  3. +51
    -91
      lib/register.dart

+ 6
- 6
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java View File

@@ -155,14 +155,14 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
public Map getSetting() { public Map getSetting() {
Map map = new HashMap(); Map map = new HashMap();
///测试 ///测试
map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989");http://47.114.51.254:80 http://inapi.izhyin.cn/
map.put("master_id", "123456");
map.put("secret_key", "123456");
// map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989");http://47.114.51.254:80 http://inapi.izhyin.cn/
// map.put("master_id", "123456");
// map.put("secret_key", "123456");


///正式 ///正式
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
// map.put("master_id", "99813608");
// map.put("secret_key", "123456");
map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
map.put("master_id", "99813608");
map.put("secret_key", "123456");


//客户测试 //客户测试
// map.put("domain", "https://api.douchaoren.com/");//45678910,api.zhios.cn84198689 // map.put("domain", "https://api.douchaoren.com/");//45678910,api.zhios.cn84198689


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

@@ -365,13 +365,13 @@ class _HomePageState extends LifeState<HomePage> with WidgetsBindingObserver, Ti
await AdvertisingDialog.show(context); await AdvertisingDialog.show(context);


await Future.delayed(Duration(milliseconds: 600),() async { await Future.delayed(Duration(milliseconds: 600),() async {
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {

//debug app不更新 app更新插件 //debug app不更新 app更新插件
await AppUpdateUtil.initXUpdate(); await AppUpdateUtil.initXUpdate();
// 检查app更新 // 检查app更新
await AppUpdateUtil.updateApp(context); await AppUpdateUtil.updateApp(context);
}


}); });


IntellectCreate.checkAndCreateFirst(context); IntellectCreate.checkAndCreateFirst(context);


+ 51
- 91
lib/register.dart View File

@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io'; import 'dart:io';


import 'package:flutter_user_agent/flutter_user_agent.dart'; import 'package:flutter_user_agent/flutter_user_agent.dart';
@@ -123,15 +124,15 @@ class BaseWidgetRegister {
return; return;
} }


Future.delayed(Duration(milliseconds: 2000),()async{

Future.delayed(Duration(milliseconds: 2000), () async {
print("初始化各种SDK"); print("初始化各种SDK");
ShareSDKRegister register = ShareSDKRegister(); ShareSDKRegister register = ShareSDKRegister();
// ================ Weixin // ================ Weixin
register.setupWechat(config.keys?.weixin?.appId ?? '', config.keys?.weixin?.secret ?? '', config.keys?.weixin?.universalLink ?? ''); register.setupWechat(config.keys?.weixin?.appId ?? '', config.keys?.weixin?.secret ?? '', config.keys?.weixin?.universalLink ?? '');


//================ Weibo //================ Weibo
register.setupSinaWeibo(config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '',config.keys?.weibo?.universalLink??'templink');
register.setupSinaWeibo(
config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '', config.keys?.weibo?.universalLink ?? 'templink');


// ================ QQ // ================ QQ
register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? ''); register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? '');
@@ -165,11 +166,13 @@ class BaseWidgetRegister {
MobPushUtil.setCanPush(); MobPushUtil.setCanPush();


// 初始化百川sdk // 初始化百川sdk
FlutterAlibc.initAlibc(version: "", appName: "").then((result) {
FlutterAlibc.initAlibc(version: "", appName: "").then((result) async {
Logger.debug('初始化百川sdk ${result.errorCode} ${result.errorMessage}'); Logger.debug('初始化百川sdk ${result.errorCode} ${result.errorMessage}');
Timer(Duration(milliseconds: 1000), () async {
await NetUtil.getImei();
});
}); });

});
});


return null; return null;
}); });
@@ -193,7 +196,6 @@ class BaseWidgetRegister {
LoginStyleUtil.fetchNetPageData(); LoginStyleUtil.fetchNetPageData();


FlutterUserAgent.init(force: true); FlutterUserAgent.init(force: true);

}); });


// 延迟一秒 // 延迟一秒
@@ -250,20 +252,16 @@ class BaseWidgetRegister {
/// 订单页面 /// 订单页面
PageFactory.regist('pub.flutter.my_order', (model) => OrdersPage(model)); PageFactory.regist('pub.flutter.my_order', (model) => OrdersPage(model));
PageFactory.regist('pub.flutter.account_security', (model) => SecurityPage(model)); PageFactory.regist('pub.flutter.account_security', (model) => SecurityPage(model));
PageFactory.regist(
'pub.flutter.account_security_alipay', (model) => SecurityBindAlipayPage(model));
PageFactory.regist('pub.flutter.account_security_alipay', (model) => SecurityBindAlipayPage(model));


/// 登录密码 /// 登录密码
PageFactory.regist(
'pub.flutter.account_security_password', (model) => SecurityPassword(model));
PageFactory.regist('pub.flutter.account_security_password', (model) => SecurityPassword(model));


/// 修改手机号 /// 修改手机号
PageFactory.regist(
'pub.flutter.account_security_mobile', (model) => SecurityMobile(model));
PageFactory.regist('pub.flutter.account_security_mobile', (model) => SecurityMobile(model));


/// 邀请好友 /// 邀请好友
PageFactory.regist(
'pub.flutter.invite_friends', (model) => InvitedFriendsPage(model));
PageFactory.regist('pub.flutter.invite_friends', (model) => InvitedFriendsPage(model));


/// 我的团队 /// 我的团队
PageFactory.regist('pub.flutter.my_team', (model) => TeamPage(model)); PageFactory.regist('pub.flutter.my_team', (model) => TeamPage(model));
@@ -284,15 +282,13 @@ class BaseWidgetRegister {
PageFactory.regist('pub.flutter.about_us', (model) => AboutUsPage(model)); PageFactory.regist('pub.flutter.about_us', (model) => AboutUsPage(model));


/// 隐私设置 /// 隐私设置
PageFactory.regist(
'pub.flutter.privacy_settings', (model) => PrivacySettingsPage(model));
PageFactory.regist('pub.flutter.privacy_settings', (model) => PrivacySettingsPage(model));


/// 注销账号页 /// 注销账号页
PageFactory.regist('pub.flutter.account_delete', (model) => AccountDeletePage(model)); PageFactory.regist('pub.flutter.account_delete', (model) => AccountDeletePage(model));


/// 消息设置 /// 消息设置
PageFactory.regist(
'pub.flutter.message_settings', (model) => MessageSettingsPage(model));
PageFactory.regist('pub.flutter.message_settings', (model) => MessageSettingsPage(model));


/// 钱包明细 /// 钱包明细
PageFactory.regist('pub.flutter.my_wallet_detail', (model) => BilDetailPage(model)); PageFactory.regist('pub.flutter.my_wallet_detail', (model) => BilDetailPage(model));
@@ -316,108 +312,83 @@ class BaseWidgetRegister {


/// ==================== 搜索页面 ==================== /// /// ==================== 搜索页面 ==================== ///
// 搜索输入框 // 搜索输入框
WidgetFactory.regist(
'search_index_input', DefaultWidgetCreater((model) => SearchInputWidget(model)));
WidgetFactory.regist('search_index_input', DefaultWidgetCreater((model) => SearchInputWidget(model)));
// // 搜索tabBar // // 搜索tabBar
WidgetFactory.regist('search_index_icon_list', SearcchTabCreater()); WidgetFactory.regist('search_index_icon_list', SearcchTabCreater());
// // 热门搜索标签 // // 热门搜索标签
WidgetFactory.regist('search_index_hot_keyword',
DefaultWidgetCreater((model) => SearchHotTagWidget(model)));
WidgetFactory.regist('search_index_hot_keyword', DefaultWidgetCreater((model) => SearchHotTagWidget(model)));
// // 历史搜索标签 // // 历史搜索标签
WidgetFactory.regist('search_index_history',
DefaultWidgetCreater((model) => SearchHistoryTagWidget(model)));
WidgetFactory.regist('search_index_history', DefaultWidgetCreater((model) => SearchHistoryTagWidget(model)));


/// ==================== 搜索结果页面 ==================== /// /// ==================== 搜索结果页面 ==================== ///
// 输入框 // 输入框
WidgetFactory.regist('search_result_input',
DefaultWidgetCreater((model) => SearchResultInputWidget(model)));
WidgetFactory.regist('search_result_input', DefaultWidgetCreater((model) => SearchResultInputWidget(model)));
// tabbar // tabbar
WidgetFactory.regist('search_result_icon_list', SearchResultTabCreater()); WidgetFactory.regist('search_result_icon_list', SearchResultTabCreater());
// 搜索筛选Widget // 搜索筛选Widget
WidgetFactory.regist('search_conditions',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_conditions', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));


// 搜索结果页筛选widget 淘宝 // 搜索结果页筛选widget 淘宝
WidgetFactory.regist('search_result_taobao_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_taobao_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 淘宝 // 搜索结果的商品列表 淘宝
WidgetFactory.regist('search_result_taobao_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_taobao_item', SearchResultGoodsListCreater());


// 搜索结果页筛选widget 京东 // 搜索结果页筛选widget 京东
WidgetFactory.regist('search_result_jd_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_jd_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 京东 // 搜索结果的商品列表 京东
WidgetFactory.regist('search_result_jd_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_jd_item', SearchResultGoodsListCreater());


// 搜索结果页筛选widget 苏宁 // 搜索结果页筛选widget 苏宁
WidgetFactory.regist('search_result_suning_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_suning_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 苏宁 // 搜索结果的商品列表 苏宁
WidgetFactory.regist('search_result_suning_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_suning_item', SearchResultGoodsListCreater());


// 搜索结果页筛选widget 拼多多 // 搜索结果页筛选widget 拼多多
WidgetFactory.regist('search_result_pdd_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_pdd_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 拼多多 // 搜索结果的商品列表 拼多多
WidgetFactory.regist('search_result_pdd_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_pdd_item', SearchResultGoodsListCreater());


// 搜索结果页筛选widget 唯品会 // 搜索结果页筛选widget 唯品会
WidgetFactory.regist('search_result_vip_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_vip_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 唯品会 // 搜索结果的商品列表 唯品会
WidgetFactory.regist('search_result_vip_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_vip_item', SearchResultGoodsListCreater());


// 搜索结果页筛选widget 考拉 // 搜索结果页筛选widget 考拉
WidgetFactory.regist('search_result_kaola_sort',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_result_kaola_sort', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
// 搜索结果的商品列表 考拉 // 搜索结果的商品列表 考拉
WidgetFactory.regist('search_result_kaola_item', SearchResultGoodsListCreater()); WidgetFactory.regist('search_result_kaola_item', SearchResultGoodsListCreater());


/// ==================== 商品详情 ==================== /// /// ==================== 商品详情 ==================== ///
// 商品详情轮播图 // 商品详情轮播图
WidgetFactory.regist('product_detail_carousel',
DefaultWidgetCreater((model) => GoodsDetailsSlideBannerWidget(model)));
WidgetFactory.regist('product_detail_carousel', DefaultWidgetCreater((model) => GoodsDetailsSlideBannerWidget(model)));
// 商品详情下载APP提示 // 商品详情下载APP提示
WidgetFactory.regist('product_detail_bulletin',
DefaultWidgetCreater((model) => UpgradeTipWidget(model)));
WidgetFactory.regist('product_detail_bulletin', DefaultWidgetCreater((model) => UpgradeTipWidget(model)));
// 商品详情标题(包括价格) // 商品详情标题(包括价格)
WidgetFactory.regist('product_detail_title',
DefaultWidgetCreater((model) => GoodsDetailsTitleWidget(model)));
WidgetFactory.regist('product_detail_title', DefaultWidgetCreater((model) => GoodsDetailsTitleWidget(model)));
// 标签组件组件 // 标签组件组件
WidgetFactory.regist('product_detail_tag',
DefaultWidgetCreater((model) => GoodsDetailsTagWidget(model)));
WidgetFactory.regist('product_detail_tag', DefaultWidgetCreater((model) => GoodsDetailsTagWidget(model)));
// 商品详情优惠劵 // 商品详情优惠劵
WidgetFactory.regist(
'product_detail_coupon', DefaultWidgetCreater((model) => CounponWidget(model)));
WidgetFactory.regist('product_detail_coupon', DefaultWidgetCreater((model) => CounponWidget(model)));
// 商品详情店铺 // 商品详情店铺
WidgetFactory.regist(
'product_detail_shop', DefaultWidgetCreater((model) => StoreWidget(model)));
WidgetFactory.regist('product_detail_shop', DefaultWidgetCreater((model) => StoreWidget(model)));
// 商品详情宝贝评价 // 商品详情宝贝评价
WidgetFactory.regist('product_detail_comment',
DefaultWidgetCreater((model) => GoodsDetailsEvaluateWidget(model)));
WidgetFactory.regist('product_detail_comment', DefaultWidgetCreater((model) => GoodsDetailsEvaluateWidget(model)));
// 商品详情图片 // 商品详情图片
WidgetFactory.regist('product_detail_image',
DefaultWidgetCreater((model) => GoodsDetailsImgWidget(model)));
WidgetFactory.regist('product_detail_image', DefaultWidgetCreater((model) => GoodsDetailsImgWidget(model)));
// 商品推荐列表的小标题 // 商品推荐列表的小标题
WidgetFactory.regist('product_detail_recommend_title',
DefaultWidgetCreater((model) => GoodsDetailsRecommendTitleWidget(model)));
WidgetFactory.regist('product_detail_recommend_title', DefaultWidgetCreater((model) => GoodsDetailsRecommendTitleWidget(model)));
// 商品详情底部推荐列表(改用首页的商品列表了) // 商品详情底部推荐列表(改用首页的商品列表了)
// WidgetFactory.regist('product_detail_bottom_rec', GoodsDetailCommendCreater()); // WidgetFactory.regist('product_detail_bottom_rec', GoodsDetailCommendCreater());
// 商品详情底部 // 商品详情底部
WidgetFactory.regist('product_detail_bottom',
DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model)));
WidgetFactory.regist('product_detail_bottom', DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model)));


// ==================== 个人中心 // ==================== 个人中心
WidgetFactory.regist('appbar', MineNavCreater()); WidgetFactory.regist('appbar', MineNavCreater());
WidgetFactory.regist(
'profile_background', DefaultWidgetCreater((model) => MineNavBg(model)));
WidgetFactory.regist(
'member_info', DefaultWidgetCreater((model) => MineHeader(model)));
WidgetFactory.regist('profile_background', DefaultWidgetCreater((model) => MineNavBg(model)));
WidgetFactory.regist('member_info', DefaultWidgetCreater((model) => MineHeader(model)));
WidgetFactory.regist('earning', DefaultWidgetCreater((model) => MineData(model))); WidgetFactory.regist('earning', DefaultWidgetCreater((model) => MineData(model)));
WidgetFactory.regist(
'profile_functions', DefaultWidgetCreater((model) => MineQuickEntry(model)));
WidgetFactory.regist(
'profile_my_functions', DefaultWidgetCreater((model) => MineQuickEntry(model)));
WidgetFactory.regist('profile_functions', DefaultWidgetCreater((model) => MineQuickEntry(model)));
WidgetFactory.regist('profile_my_functions', DefaultWidgetCreater((model) => MineQuickEntry(model)));
// WidgetFactory.regist('profile_carousel', DefaultWidgetCreater((model) => HomeBannerWidget(model))); // WidgetFactory.regist('profile_carousel', DefaultWidgetCreater((model) => HomeBannerWidget(model)));
// WidgetFactory.regist('profile_carousel', HomeBannerCreater()); // WidgetFactory.regist('profile_carousel', HomeBannerCreater());


@@ -429,18 +400,14 @@ class BaseWidgetRegister {
// ))); // )));
WidgetFactory.regist('my_wallet_appbar', NormalNavCreater()); WidgetFactory.regist('my_wallet_appbar', NormalNavCreater());


WidgetFactory.regist(
'my_wallet_header', DefaultWidgetCreater((model) => WalletData(model)));
WidgetFactory.regist(
'my_wallet_bil', DefaultWidgetCreater((model) => WalletBil(model)));
WidgetFactory.regist('my_wallet_header', DefaultWidgetCreater((model) => WalletData(model)));
WidgetFactory.regist('my_wallet_bil', DefaultWidgetCreater((model) => WalletBil(model)));
// WidgetFactory.regist( // WidgetFactory.regist(
// 'wallet_detail', DefaultWidgetCreater((model) => WalletDetail())); // 'wallet_detail', DefaultWidgetCreater((model) => WalletDetail()));
// WidgetFactory.regist('wallet_detail', HomeAuthCreater()); // WidgetFactory.regist('wallet_detail', HomeAuthCreater());
WidgetFactory.regist(
'my_wallet_providers', DefaultWidgetCreater((model) => WalletDetail(model)));
WidgetFactory.regist('my_wallet_providers', DefaultWidgetCreater((model) => WalletDetail(model)));


WidgetFactory.regist(
'wallet_income', DefaultWidgetCreater((model) => WalletIncome()));
WidgetFactory.regist('wallet_income', DefaultWidgetCreater((model) => WalletIncome()));


//======================= 账单明细 //======================= 账单明细
WidgetFactory.regist( WidgetFactory.regist(
@@ -450,30 +417,23 @@ class BaseWidgetRegister {
))); )));


//======================== 热榜 //======================== 热榜
WidgetFactory.regist(
'hot_rank_appbar', DefaultWidgetCreater((model) => HotRankingAppBar(model)));
WidgetFactory.regist(
'hot_rank_tabs', DefaultWidgetCreater((model) => HotRankTableBar(model)));
WidgetFactory.regist(
'hot_rank_tab_view', DefaultWidgetCreater((model) => HotRankingList(model)));
WidgetFactory.regist('hot_rank_appbar', DefaultWidgetCreater((model) => HotRankingAppBar(model)));
WidgetFactory.regist('hot_rank_tabs', DefaultWidgetCreater((model) => HotRankTableBar(model)));
WidgetFactory.regist('hot_rank_tab_view', DefaultWidgetCreater((model) => HotRankingList(model)));


/// ==================== 通用模块 ==================== /// /// ==================== 通用模块 ==================== ///
// 搜索 // 搜索
WidgetFactory.regist(
'search', DefaultWidgetCreater((model) => CustomSearchWidget(model)));
WidgetFactory.regist('search', DefaultWidgetCreater((model) => CustomSearchWidget(model)));
// 轮播广告位, 可滑动 // 轮播广告位, 可滑动
WidgetFactory.regist('carousel', CustomSlideBannerCreater()); WidgetFactory.regist('carousel', CustomSlideBannerCreater());
// 多眼导航,可滑动 // 多眼导航,可滑动
WidgetFactory.regist(
'multi_nav', DefaultWidgetCreater((model) => CustomQuickEntry(model)));
WidgetFactory.regist('multi_nav', DefaultWidgetCreater((model) => CustomQuickEntry(model)));
// banner, 不可滑动 // banner, 不可滑动
WidgetFactory.regist(
'banner', DefaultWidgetCreater((model) => CustomBannerWidget(model)));
WidgetFactory.regist('banner', DefaultWidgetCreater((model) => CustomBannerWidget(model)));
// 商品列表 // 商品列表
WidgetFactory.regist('product', CustomGoodsCreater()); WidgetFactory.regist('product', CustomGoodsCreater());
// 公告头条 // 公告头条
WidgetFactory.regist(
'placard', DefaultWidgetCreater((model) => CustomNoticeWidget(model)));
WidgetFactory.regist('placard', DefaultWidgetCreater((model) => CustomNoticeWidget(model)));
// 授权 // 授权
WidgetFactory.regist('audit_tip', DefaultWidgetCreater((model) => HomeAuth(model))); WidgetFactory.regist('audit_tip', DefaultWidgetCreater((model) => HomeAuth(model)));
// 分享内容组件 // 分享内容组件


Loading…
Cancel
Save