Sfoglia il codice sorgente

1、图片的占位

2、搜索结果页和搜索页的item page删除注册
tags/0.0.2+15
PH2 4 anni fa
parent
commit
9fcb159c7e
5 ha cambiato i file con 65 aggiunte e 11 eliminazioni
  1. +30
    -7
      lib/register.dart
  2. +7
    -1
      lib/widgets/goods_details/detail_img/goods_details_img.dart
  3. +22
    -1
      lib/widgets/goods_details/detail_img/goods_details_img_sk.dart
  4. +3
    -1
      lib/widgets/search/tabbar/search_tab_widget.dart
  5. +3
    -1
      lib/widgets/search_result/tarbar/search_result_tab_widget.dart

+ 30
- 7
lib/register.dart Vedi File

@@ -160,37 +160,60 @@ class BaseWidgetRegister {

// 注册页面
static void registPage() {
/// 闪图页
PageFactory.regist('LaunchPage', (model) => LaunchPage());
// PageFactory.regist('homePage', (model) => HomePage());
// PageFactory.regist('pub.flutter.index', (model) => MainPage(model));
/// 首页 -> 第一页
PageFactory.regist('pub.flutter.index', (model) => CustomPage(model));

/// 我的页面
PageFactory.regist('pub.flutter.profile', (model) => MainPage(model));

/// 热榜页
PageFactory.regist('pub.flutter.hot_rank', (model) => HotRankingPage(model));

/// 钱包页
PageFactory.regist('pub.flutter.my_wallet', (model) => WalletPage(data: model));

/// 商品详情页
PageFactory.regist('goods_details', (model) => GoodsDetailsPage(model));

/// 搜索页
PageFactory.regist('pub.flutter.search_index', (model) => SearchPage(model));
PageFactory.regist('search_item_page', (model) => SearchItemPage(model));

/// 搜索结果页
PageFactory.regist('pub.flutter.search_result', (model) => SearchResultPage(model));
PageFactory.regist('search_result_item', (model) => SearchResultItemPage(model));

/// 反馈页
PageFactory.regist('pub.flutter.feedback', (model) => FeedbackPage(model));

/// 反馈列表页
PageFactory.regist('pub.flutter.feedback_list', (model) => FeedbackRecordPage(model));

/// 微信导师
PageFactory.regist('pub.flutter.wechat_teacher', (model) => WechatTeacherPage(model));

/// 提现页
PageFactory.regist('pub.flutter.cash_out', (model) => WithdrawPage(model));

// webview
/// webview
PageFactory.regist('pub.flutter.url', (model) => BaseWebview(model));

PageFactory.regist('pub.flutter.profile_settings', (model) => MineDetailPage());
PageFactory.regist('pub.flutter.settings', (model) => SettingPage(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_alipay', (model) => SecurityBindAlipayPage(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.invite_friends', (model) => InvitedFriendsPage(model));

/// 我的团队


+ 7
- 1
lib/widgets/goods_details/detail_img/goods_details_img.dart Vedi File

@@ -3,7 +3,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:zhiying_base_widget/widgets/goods_details/detail_img/bloc/goods_details_img_bloc.dart';
import 'package:zhiying_base_widget/widgets/goods_details/detail_img/goods_details_img_sk.dart';
import 'package:zhiying_base_widget/widgets/goods_details/detail_img/model/goods_details_img_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:zhiying_base_widget/widgets/goods_details/detail_img/bloc/goods_details_img_repository.dart';
@@ -108,6 +107,13 @@ class _GoodsDetailsImgWidgetContainerState
child: CachedNetworkImage(
imageUrl: item ?? '',
fit: BoxFit.fitWidth,
// 默认default图片
placeholder: (context, url){
return AspectRatio(
aspectRatio: 1/1,
child: Container(color: Colors.white, height: double.infinity, width: double.infinity,),
);
},
),
));
}).toList(),


+ 22
- 1
lib/widgets/goods_details/detail_img/goods_details_img_sk.dart Vedi File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

///
/// 商品详情骨架图
@@ -6,6 +7,26 @@ import 'package:flutter/material.dart';
class GoodsDetailsImgSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
return Column(
children: List.generate(4, (index) => AspectRatio(
aspectRatio: 1/1,
child: Container(
margin: const EdgeInsets.only(top: 7.5, left: 12.5, right: 12.5),
child: _shimmerWidget(width: double.infinity, height: double.infinity, radius: 5),
),
)),
);
}

Widget _shimmerWidget({double width, double height, double radius = 0}) {
return Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Container(
width: width,
height: height,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(radius)),
),
);
}
}

+ 3
- 1
lib/widgets/search/tabbar/search_tab_widget.dart Vedi File

@@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
import 'package:zhiying_base_widget/pages/search_page/item/search_item_page.dart';
import 'package:zhiying_base_widget/pages/search_page/notifier/search_tag_notifier.dart';
import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart';
import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart';
@@ -169,7 +170,8 @@ class _SearchTabWidgetState extends State<SearchTabWidget> {
controller: _tabController,
children: model.search_icon_list.map((item){
// TODO 这里需要和后台沟通改成页面的唯一标示
return PageFactory.create('search_item_page', item.toJson());
// return PageFactory.create('search_item_page', item.toJson());
return SearchItemPage(item.toJson());
}).toList(),
);
}


+ 3
- 1
lib/widgets/search_result/tarbar/search_result_tab_widget.dart Vedi File

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
import 'package:zhiying_base_widget/pages/search_page/notifier/search_tag_notifier.dart';
import 'package:zhiying_base_widget/pages/search_result_page/item/search_result_item_page.dart';
import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart';
import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart';
import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart';
@@ -220,7 +221,8 @@ class _SearchResultTabWidgetState extends State<SearchResultTabWidget> {
controller: _tabController,
children: model.search_icon_list.map((item) {
// TODO 这里需要和后台沟通改成页面的唯一标示
return PageFactory.create('search_result_item', item.toJson()..['keywords']= widget?.model?.keywords ?? '');
// return PageFactory.create('search_result_item', item.toJson()..['keywords']= widget?.model?.keywords ?? '');
return SearchResultItemPage(item.toJson()..['keywords']= widget?.model?.keywords ?? '');
}).toList(),
);
}


Caricamento…
Annulla
Salva