w-R 3 years ago
parent
commit
b4f56ce7fe
  1. 2
      lib/community/community_course.dart
  2. 1
      lib/community/headlines/article_page.dart
  3. 2
      lib/main.dart
  4. 17
      lib/mine/mine_view/mine_item.dart
  5. 35
      lib/order/bargain_group_order.dart
  6. 1
      lib/store/shopping/shopping_goods_details.dart
  7. 3
      lib/store/shopping/shopping_home/shopping_home_page.dart
  8. 10
      pubspec.lock
  9. 8
      pubspec.yaml

2
lib/community/community_course.dart

@ -15,8 +15,6 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'community_view/class_list_view.dart'; import 'community_view/class_list_view.dart';

1
lib/community/headlines/article_page.dart

@ -17,7 +17,6 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';

2
lib/main.dart

@ -262,7 +262,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/order_history_page': (context, {arguments}) => '/router/order_history_page': (context, {arguments}) =>
OrderHistoryPage(arguments: arguments), OrderHistoryPage(arguments: arguments),
'/router/bargain_group_order': (context, {arguments}) => '/router/bargain_group_order': (context, {arguments}) =>
BargainGroupOrder(), BargainGroupOrder(arguments:arguments),
'/router/union_detail_page': (context, {arguments}) => '/router/union_detail_page': (context, {arguments}) =>
UnionDetailsPage(arguments: arguments), UnionDetailsPage(arguments: arguments),
'/router/address_edit_page': (context, {arguments}) => '/router/address_edit_page': (context, {arguments}) =>

17
lib/mine/mine_view/mine_item.dart

@ -17,7 +17,7 @@ class _MineItem extends State<MineItem> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 6.h), margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 6.h),
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), padding: EdgeInsets.only(top: 12,bottom: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -50,7 +50,7 @@ class _MineItem extends State<MineItem> {
// ), // ),
// ), // ),
Container( Container(
padding: EdgeInsets.symmetric(vertical: 4.h), padding: EdgeInsets.symmetric(vertical: 4.h,horizontal: 20.w),
child: Text( child: Text(
S.of(context).wodegongju, S.of(context).wodegongju,
style: TextStyle( style: TextStyle(
@ -137,15 +137,9 @@ class _MineItem extends State<MineItem> {
Expanded(child: Expanded(child:
InkWell( InkWell(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context) Navigator.of(context)
.pushNamed('/router/bargain_group_order'); .pushNamed('/router/bargain_group_order',
}); arguments: {"type":3});
}, },
child: mineItem( child: mineItem(
S.of(context).wodekanjia, S.of(context).wodekanjia,
@ -154,7 +148,8 @@ class _MineItem extends State<MineItem> {
),), ),),
Expanded(child: InkWell( Expanded(child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/bargain_group_order'); Navigator.of(context).pushNamed('/router/bargain_group_order',
arguments: {"type":1});
}, },
child: mineItem( child: mineItem(
S.of(context).wodepintuan, S.of(context).wodepintuan,

35
lib/order/bargain_group_order.dart

@ -20,8 +20,12 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:shared_preferences/shared_preferences.dart';
class BargainGroupOrder extends StatefulWidget { class BargainGroupOrder extends StatefulWidget {
final Map<String, dynamic> arguments;
BargainGroupOrder({this.arguments});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _BargainGroupOrder(); return _BargainGroupOrder();
@ -33,10 +37,12 @@ class _BargainGroupOrder extends State<BargainGroupOrder>
List<Widget> tabs; List<Widget> tabs;
List<Widget> _pages; List<Widget> _pages;
TabController tabcontroller; TabController tabcontroller;
int type = 0;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
type = widget.arguments["type"];
} }
/// ///
@ -62,10 +68,10 @@ class _BargainGroupOrder extends State<BargainGroupOrder>
) )
]; ];
_pages = [ _pages = [
ExchangeHistoryList(0), ExchangeHistoryList(0,type),
ExchangeHistoryList(1), ExchangeHistoryList(2,type),
ExchangeHistoryList(2), ExchangeHistoryList(3,type),
ExchangeHistoryList(3) ExchangeHistoryList(4,type)
]; ];
} }
@ -75,7 +81,7 @@ class _BargainGroupOrder extends State<BargainGroupOrder>
length: 4, length: 4,
child: Scaffold( child: Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: S.of(context).wodekanjia, title:type == 1 ? S.of(context).wodepintuan :S.of(context).wodekanjia,
titleColor: Colors.black, titleColor: Colors.black,
titleSize: 18.sp, titleSize: 18.sp,
background: Color(0xFFFFFFFF), background: Color(0xFFFFFFFF),
@ -113,8 +119,9 @@ class _BargainGroupOrder extends State<BargainGroupOrder>
class ExchangeHistoryList extends StatefulWidget { class ExchangeHistoryList extends StatefulWidget {
final int orderStatus; final int orderStatus;
final int type;
ExchangeHistoryList(this.orderStatus); ExchangeHistoryList(this.orderStatus,this.type);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -150,7 +157,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
BaseData<List<ActivityOrderList>> baseData = BaseData<List<ActivityOrderList>> baseData =
await minService.showMyActList({ await minService.showMyActList({
"state":0, "state":0,
"type" :1, "type" :widget.type,
}).catchError((error) { }).catchError((error) {
_refreshController.loadFailed(); _refreshController.loadFailed();
_refreshController.refreshFailed(); _refreshController.refreshFailed();
@ -164,19 +171,18 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
}); });
} else { } else {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
_refreshController.loadFailed();
} }
} }
// int pageNum = 1;
_refresh() { _refresh() {
// pageNum = 1;
queryShowMyActList(); queryShowMyActList();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SmartRefresher( return Container(
child: SmartRefresher(
enablePullDown: true, enablePullDown: true,
enablePullUp: true, enablePullUp: true,
header: MyHeader(), header: MyHeader(),
@ -187,9 +193,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
), ),
controller: _refreshController, controller: _refreshController,
onRefresh: _refresh, onRefresh: _refresh,
onLoading: queryShowMyActList, child: (activityOrderList?.length ?? 0) < 0
child:
(activityOrderList?.length ?? 0) < 0
? NoDataView( ? NoDataView(
isShowBtn: false, isShowBtn: false,
text: "还没有订单,快去下一单吧~", text: "还没有订单,快去下一单吧~",
@ -199,10 +203,13 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
: :
ListView.builder( ListView.builder(
itemCount: activityOrderList?.length ?? 0, itemCount: activityOrderList?.length ?? 0,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return bargainOrder(activityOrderList[position]); return bargainOrder(activityOrderList[position]);
}, },
), ),
),
); );
} }

1
lib/store/shopping/shopping_goods_details.dart

@ -417,7 +417,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Stack(

3
lib/store/shopping/shopping_home/shopping_home_page.dart

@ -3,11 +3,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/home_recommend_list.dart'; import 'package:huixiang/retrofit/data/home_recommend_list.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/data/shopping_home_config.dart'; import 'package:huixiang/retrofit/data/shopping_home_config.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';

10
pubspec.lock

@ -743,10 +743,12 @@ packages:
tpns_flutter_plugin: tpns_flutter_plugin:
dependency: "direct main" dependency: "direct main"
description: description:
name: tpns_flutter_plugin path: "."
url: "https://pub.flutter-io.cn" ref: "V1.0.7"
source: hosted resolved-ref: ab0c457ab52f36a34e2b90256929a9809e8d4f9b
version: "1.0.8" url: "git://github.com/TencentCloud/TPNS-Flutter-Plugin"
source: git
version: "1.0.7"
transformer_page_view: transformer_page_view:
dependency: transitive dependency: transitive
description: description:

8
pubspec.yaml

@ -19,10 +19,10 @@ dependencies:
keframe: ^2.0.2 #滑动组件卡顿优化 keframe: ^2.0.2 #滑动组件卡顿优化
tpns_flutter_plugin: 1.0.8 tpns_flutter_plugin:
# git: git:
# url: git://github.com/TencentCloud/TPNS-Flutter-Plugin url: git://github.com/TencentCloud/TPNS-Flutter-Plugin
# ref: V1.0.7 ref: V1.0.7
like_button: ^2.0.2 like_button: ^2.0.2
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2

Loading…
Cancel
Save