Преглед изворни кода

1.修复改获取UDID方式

tags/0.0.12+3
“yanghuaxuan” пре 3 година
родитељ
комит
8cd625cfc6
3 измењених фајлова са 60 додато и 100 уклоњено
  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 Прегледај датотеку

@@ -155,14 +155,14 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
public Map getSetting() {
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


+ 3
- 3
lib/pages/home_page/home_page.dart Прегледај датотеку

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

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

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


});

IntellectCreate.checkAndCreateFirst(context);


+ 51
- 91
lib/register.dart Прегледај датотеку

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

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

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

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

//================ 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
register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? '');
@@ -165,11 +166,13 @@ class BaseWidgetRegister {
MobPushUtil.setCanPush();

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

});
});

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

FlutterUserAgent.init(force: true);

});

// 延迟一秒
@@ -250,20 +252,16 @@ class BaseWidgetRegister {
/// 订单页面
PageFactory.regist('pub.flutter.my_order', (model) => OrdersPage(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));
@@ -284,15 +282,13 @@ class BaseWidgetRegister {
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.message_settings', (model) => MessageSettingsPage(model));
PageFactory.regist('pub.flutter.message_settings', (model) => MessageSettingsPage(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
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
WidgetFactory.regist('search_result_icon_list', SearchResultTabCreater());
// 搜索筛选Widget
WidgetFactory.regist('search_conditions',
DefaultWidgetCreater((model) => SearchResultSortWidget(model)));
WidgetFactory.regist('search_conditions', DefaultWidgetCreater((model) => SearchResultSortWidget(model)));

// 搜索结果页筛选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());

// 搜索结果页筛选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());

// 搜索结果页筛选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());

// 搜索结果页筛选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());

// 搜索结果页筛选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());

// 搜索结果页筛选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('product_detail_carousel',
DefaultWidgetCreater((model) => GoodsDetailsSlideBannerWidget(model)));
WidgetFactory.regist('product_detail_carousel', DefaultWidgetCreater((model) => GoodsDetailsSlideBannerWidget(model)));
// 商品详情下载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',
DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model)));
WidgetFactory.regist('product_detail_bottom', DefaultWidgetCreater((model) => GoodsDetailsFooterWidget(model)));

// ==================== 个人中心
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(
'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', HomeBannerCreater());

@@ -429,18 +400,14 @@ class BaseWidgetRegister {
// )));
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(
// 'wallet_detail', DefaultWidgetCreater((model) => WalletDetail()));
// 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(
@@ -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(
'multi_nav', DefaultWidgetCreater((model) => CustomQuickEntry(model)));
WidgetFactory.regist('multi_nav', DefaultWidgetCreater((model) => CustomQuickEntry(model)));
// banner, 不可滑动
WidgetFactory.regist(
'banner', DefaultWidgetCreater((model) => CustomBannerWidget(model)));
WidgetFactory.regist('banner', DefaultWidgetCreater((model) => CustomBannerWidget(model)));
// 商品列表
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)));
// 分享内容组件


Loading…
Откажи
Сачувај