Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/generated/l10n.dart
	lib/l10n/intl_en.arb
	lib/l10n/intl_zh_CN.arb
	lib/l10n/intl_zh_Hans_CN.arb
	lib/l10n/intl_zh_Hant_CN.arb
	lib/l10n/intl_zh_TW.arb
	lib/mine/mine_page.dart
null_safety
fmk 4 years ago
parent
commit
59857df174
  1. BIN
      assets/image/2x/icon_guide_1.png
  2. BIN
      assets/image/2x/icon_guide_2.png
  3. BIN
      assets/image/2x/icon_guide_3.png
  4. BIN
      assets/image/2x/icon_guide_4.png
  5. BIN
      assets/image/2x/icon_zan.png
  6. BIN
      assets/image/3x/icon_guide_1.png
  7. BIN
      assets/image/3x/icon_guide_2.png
  8. BIN
      assets/image/3x/icon_guide_33.png
  9. BIN
      assets/image/3x/icon_guide_4.png
  10. BIN
      assets/image/3x/icon_zan.png
  11. BIN
      assets/image/icon_guide_1.png
  12. BIN
      assets/image/icon_guide_2.png
  13. BIN
      assets/image/icon_guide_3.png
  14. BIN
      assets/image/icon_guide_4.png
  15. BIN
      assets/image/icon_zan.png
  16. 2
      lib/article/hot_article_item.dart
  17. 2
      lib/generated/intl/messages_en.dart
  18. 2
      lib/generated/intl/messages_zh_CN.dart
  19. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  20. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  21. 2
      lib/generated/intl/messages_zh_TW.dart
  22. 356
      lib/home/guide_page.dart
  23. 240
      lib/home/home_page.dart
  24. 6
      lib/home/main_home_page.dart
  25. 2
      lib/integral_store/integral_store_details_page.dart
  26. 3
      lib/l10n/intl_en.arb
  27. 2
      lib/l10n/intl_zh_Hans_CN.arb
  28. 3
      lib/l10n/intl_zh_Hant_CN.arb
  29. 3
      lib/l10n/intl_zh_TW.arb
  30. 12
      lib/login/login_page.dart
  31. 6
      lib/main.dart
  32. 6
      lib/mine/mine_page.dart
  33. 4
      lib/mine/user_info_page.dart
  34. 14
      lib/view_widget/hot_item.dart
  35. 29
      pubspec.lock
  36. 4
      pubspec.yaml

BIN
assets/image/2x/icon_guide_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

BIN
assets/image/2x/icon_guide_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
assets/image/2x/icon_guide_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/image/2x/icon_guide_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
assets/image/2x/icon_zan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

BIN
assets/image/3x/icon_guide_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

BIN
assets/image/3x/icon_guide_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
assets/image/3x/icon_guide_33.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
assets/image/3x/icon_guide_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
assets/image/3x/icon_zan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/icon_guide_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
assets/image/icon_guide_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/image/icon_guide_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/image/icon_guide_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/icon_zan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

2
lib/article/hot_article_item.dart

@ -80,7 +80,7 @@ class _HotArticlePage extends State<HotArticlePage> {
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
title: Text(
S.of(context).remenwenzhangshipinliebiao,
S.of(context).huixiangtoutiao,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,

2
lib/generated/intl/messages_en.dart

@ -166,11 +166,13 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
"hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"),
"hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"),
"huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"),
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),

2
lib/generated/intl/messages_zh_CN.dart

@ -165,11 +165,13 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
"hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"),
"hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"),
"huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"),
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -165,11 +165,13 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
"hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"),
"hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"),
"huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"),
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -165,11 +165,13 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"),
"hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"),
"hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"),
"huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黃金會員"),
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),

2
lib/generated/intl/messages_zh_TW.dart

@ -165,11 +165,13 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"),
"hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"),
"hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"),
"huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黃金會員"),
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),

356
lib/home/guide_page.dart

@ -0,0 +1,356 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/border_text.dart';
class GuidePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _GuidePage();
}
}
class _GuidePage extends State<GuidePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageView(
scrollDirection: Axis.horizontal,
reverse: false,
controller: PageController(
initialPage: 0,
viewportFraction: 1,
keepPage: true,
),
physics: BouncingScrollPhysics(),
pageSnapping: true,
onPageChanged: (index) {
//
print('index=====$index');
},
children: <Widget>[
Container(
alignment: Alignment.center,
color: Colors.white,
child: Center(
child: Container(
margin: EdgeInsets.only(top: 120, left: 19, right: 19),
child: Stack(
children: [
Column(
children: [
Align(
alignment: Alignment.center,
child: Image.asset(
"assets/image/icon_guide_1.png",
// height: 307,
),
),
SizedBox(
height: 66,
),
Padding(
padding: EdgeInsets.only(left: 37, right: 37),
child: Text(
"会员最新资讯抢先看",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060)),
),
),
SizedBox(
height: 23,
),
Padding(
padding: EdgeInsets.only(left: 19, right: 19),
child: Text(
"新增多项功能,海量优惠资讯实时推送",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
height:1.5,
fontWeight: FontWeight.w600,
color: Color(0XFF727272)),
),
),
],
),
Container(
alignment: Alignment.bottomCenter,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"",
style: TextStyle(fontSize: 8, color: Colors.black),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
height: 98,
),
],
),
),
],
),
),
),
),
Container(
alignment: Alignment.center,
color: Colors.white,
child: Center(
child: Container(
margin: EdgeInsets.only(top: 120, left: 19, right: 19),
child: Stack(
children: [
Column(
children: [
Align(
alignment: Alignment.center,
child: Image.asset(
"assets/image/icon_guide_2.png",
// height: 307,
),
),
SizedBox(
height: 66,
),
Padding(
padding: EdgeInsets.only(left: 37, right: 37),
child: Text(
"全新集团联盟店会员点餐",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060)),
),
),
SizedBox(
height: 23,
),
Padding(
padding: EdgeInsets.only(left: 19, right: 19),
child: Text(
"新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
height:1.5,
fontWeight: FontWeight.w600,
color: Color(0XFF727272)),
),
),
],
),
Container(
alignment: Alignment.bottomCenter,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(fontSize: 8, color: Colors.black),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
height: 98,
),
],
),
),
],
),
),
),
),
Container(
alignment: Alignment.center,
color: Colors.white,
child: Center(
child: Container(
margin: EdgeInsets.only(top: 120, left: 19, right: 19),
child: Stack(
children: [
Column(
children: [
Align(
alignment: Alignment.center,
child: Image.asset(
"assets/image/icon_guide_3.png",
// height: 307,
),
),
SizedBox(
height: 66,
),
Padding(
padding: EdgeInsets.only(left: 37, right: 37),
child: Text(
"会员活动专区",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060)),
),
),
SizedBox(
height: 23,
),
Padding(
padding: EdgeInsets.only(left: 19, right: 19),
child: Text(
"新增会员任务得积分,消费可得绿金、积分商城换购",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
height:1.5,
fontWeight: FontWeight.w600,
color: Color(0XFF727272)),
),
),
],
),
Container(
alignment: Alignment.bottomCenter,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(
fontSize: 8, color: Color(0xffB2B2B2)),
),
SizedBox(
width: 10,
),
Text(
"",
style: TextStyle(fontSize: 8, color: Colors.black),
),
SizedBox(
height: 98,
),
],
),
),
],
),
),
),
),
Container(
alignment: Alignment.center,
color: Colors.white,
child: Center(
child: Container(
margin: EdgeInsets.only(top: 108),
child:
Column(
children: [
Image.asset(
"assets/image/icon_guide_4.png",
width: double.infinity,
fit: BoxFit.fill,
),
SizedBox(
height: 66,
),
Padding(
padding: EdgeInsets.only(left: 104, right: 104),
child: Text(
"会员活动专区",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060)),
),
),
SizedBox(
height: 23,
),
Padding(
padding: EdgeInsets.only(left: 52, right: 52),
child: Text(
"传递友爱纯净健康有机环保智慧理念",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
height:1.5,
fontWeight: FontWeight.w600,
color: Color(0XFF727272)),
),
),
SizedBox(
height: 50,
),
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/login_page');
},
child:Container(
margin: EdgeInsets.only(left: 71,right: 71),
alignment: Alignment.bottomCenter,
child:BorderText(
padding: EdgeInsets.all(11),
text: "立即体验",
fontSize: 20,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1,
radius: 26.5,
),
),
),
],
),
),
),
)
],
),
);
}
}

240
lib/home/home_page.dart

@ -14,6 +14,7 @@ import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/hot_item.dart';
@ -24,14 +25,18 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class HomePage extends StatefulWidget {
final GestureTapCallback callback;
HomePage(this.callback);
@override
State<StatefulWidget> createState() {
return _HomePage();
return _HomePage(callback);
}
}
class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
ApiService apiService;
final GestureTapCallback callback;
_HomePage(this.callback);
@override
void initState() {
@ -190,7 +195,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: signIn(),
),
ItemTitle(
text: S.of(context).remenwenzhangshipin,
text: S.of(context).huixiangtoutiao,
imgPath: "assets/image/icon_today_video.png",
moreText: S.of(context).chakangengduo,
onTap: () {
@ -198,10 +203,10 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
),
hotList(),
ItemTitle(
text: S.of(context).chuangshirendegushi,
imgPath: "assets/image/icon_founder.png",
),
// ItemTitle(
// text: S.of(context).chuangshirendegushi,
// imgPath: "assets/image/icon_founder.png",
// ),
GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/founder_story_page');
@ -213,11 +218,69 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
imgPath: "assets/image/icon_brand_introduction.png",
),
brands(),
ItemTitle(
Container(
margin: EdgeInsets.only(left:16.5,right: 16.5,bottom: 40),
padding: EdgeInsets.only(bottom: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
color: Colors.white),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(flex: 1,child:ItemTitle(
text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.png",
)),
GestureDetector(
onTap: callback,
child:Container(
padding: EdgeInsets.only(left:8,right: 8,top:3,bottom: 3),
margin:EdgeInsets.only(right: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(11.5),
),
color: Color(0xFF32A060)),
child: Row(
children: [
Text("GO",style: TextStyle(
fontSize: 14,fontWeight: FontWeight.bold,color: Colors.white
),),
Icon(
Icons.chevron_right,
color: Colors.white,
size: 18,
),
],
),
),
),
],
),
Divider(
// indent: 0.0,
thickness:1,
color: Color(0xffF2F2F2),
),
points(),
],
),
),
integralStore(),
// integralStore(),
],
),
),
@ -225,6 +288,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
}
Widget hotList() {
return AspectRatio(
aspectRatio: 2.47,
@ -268,7 +332,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
MImage(
founder != null ? founder.imgUrl : "",
aspectRatio: 2,
radius: BorderRadius.circular(4),
// radius: BorderRadius.circular(4),
fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
@ -292,45 +356,38 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child:
Row(
children: [
Text(
founder != null ? founder.name : "",
"创始人的故事-",
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
SizedBox(
width: 10.w,
),
Text(
S.of(context).jituanchuangshiren,
founder != null ? founder.name : "",
style: TextStyle(
fontSize: 8.sp,
fontSize: 14.sp,
color: Colors.white,
),
),
SizedBox(
width: 20.w,
],
),
Expanded(
child: Text(
S.of(context).jianjie(
"${founder != null ? founder.description : ""}"),
maxLines: 1,
overflow: TextOverflow.ellipsis,
flex: 1,
),
Row(
children: [
Text(
"查看详情",
style: TextStyle(
fontSize: 10.sp,
color: Colors.white,
),
),
flex: 1,
)
],
),
flex: 1,
),
Icon(
Icons.keyboard_arrow_right,
size: 12,
@ -338,12 +395,45 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
),
],
),
],
),
flex: 1,
),
],
),
),
],
),
);
}
Widget points() {
return Container(
child: Column(
children: [
Container(
height: 219.h,
child: Swiper(
key: UniqueKey(),
itemCount: articles != null ? articles.length : 0,
viewportFraction: 0.95,
scale: 1,
loop: false,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return Container(
// margin: EdgeInsets.symmetric(vertical: 15.h, horizontal: 4.5.w),
child:integralStore(),
);
},
),
)
],
),
);
}
Widget integralStore() {
return GridView.builder(
itemCount: gooods != null ? gooods.length : 0,
@ -352,7 +442,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget数量
crossAxisCount: 3,
crossAxisCount: 2,
//Widget之间间距
crossAxisSpacing: 13,
//Widget之间间距
@ -363,8 +453,8 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
itemBuilder: (contetx, index) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/integral_store_page',
arguments: {"goodsId": gooods[index].id});
// Navigator.of(context).pushNamed('/router/integral_store_page',
// arguments: {"goodsId": gooods[index].id});
},
child: buildItem(gooods[index]),
);
@ -375,29 +465,31 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
Widget buildItem(Goods goods) {
return Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
color: Colors.white),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(4),
// ),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// )
// ],
// color: Colors.white),
child: Column(
children: [
MImage(
goods.mainImgPath,
aspectRatio: 1,
aspectRatio: 5/3,
radius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
bottomLeft: Radius.circular(4),
),
fit: BoxFit.fill,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
@ -410,47 +502,41 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
SizedBox(height: 14,),
Row(
children: [
Expanded(flex: 1,child:Text(
goods.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black,
color: Color(0xff353535),
fontWeight: FontWeight.bold,
fontSize: 14.sp,
),
) )
,
BorderText(
padding: EdgeInsets.all(2.h),
text: S.of(context).haowu,
fontSize: 12.sp,
fontWeight: FontWeight.bold,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1.w,
),
],
),
SizedBox(
height: 4.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Text(
S
.of(context)
.yuan_(double.tryParse(goods.worth).toInt()),
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF585858),
decoration: TextDecoration.lineThrough,
decorationColor: Color(0xFF585858),
fontSize: 10.sp,
),
),
flex: 1,
height: 5.h,
),
Text(
S.of(context).jifen_(goods.price),
overflow: TextOverflow.ellipsis,
goods.description,
maxLines: 2,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: FontWeight.w500
),
],
),
],
),

6
lib/home/main_home_page.dart

@ -28,7 +28,11 @@ class _MainHomePage extends State<MainHomePage>
tabcontroller.addListener(() => () {});
//NoDataView(),
_widgetOptions = <Widget>[HomePage(), ActivityListPage(), PointsMallPage()];
_widgetOptions = <Widget>[HomePage((){
setState(() {
tabcontroller.index = 2;
});
}), ActivityListPage(), PointsMallPage()];
eventBus.on<EventType>().listen((event) {
print("object: MainHomePage");

2
lib/integral_store/integral_store_details_page.dart

@ -254,7 +254,7 @@ class _IntegralStoreDetailsPage extends State {
Text(
goods == null
? ""
: S.of(context).yiduihuanjian("${goods.sales}"),
: S.of(context).yiduihuanjian("${goods.sales}"),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),

3
lib/l10n/intl_en.arb

@ -391,6 +391,9 @@
"bangong": "办公",
"fenxiangdao": "分享到",
"jifenbuzu": "您的积分不足",
"haowu": "好物",
"huixiangtoutiao": "回乡头条",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -393,6 +393,8 @@
"fenxiangdao": "分享到",
"jifenbuzu": "您的积分不足",
"haowu": "好物",
"huixiangtoutiao": "回乡头条",

3
lib/l10n/intl_zh_Hant_CN.arb

@ -384,6 +384,9 @@
"bangong": "辦公",
"fenxiangdao": "分享到",
"jifenbuzu": "您的積分不足",
"haowu": "好物",
"huixiangtoutiao": "回鄉頭條",
"privacy_policy4": "并使用本機號碼登錄"

3
lib/l10n/intl_zh_TW.arb

@ -384,6 +384,9 @@
"bangong": "辦公",
"fenxiangdao": "分享到",
"jifenbuzu": "您的積分不足",
"haowu": "好物",
"huixiangtoutiao": "回鄉頭條",
"privacy_policy4": "并使用本機號碼登錄"

12
lib/login/login_page.dart

@ -17,7 +17,7 @@ import 'package:flutter/services.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:dio/dio.dart';
import 'package:photo_view/photo_view.dart';
// import 'package:photo_view/photo_view.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
@ -394,11 +394,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
child: Stack(
alignment: Alignment.center,
children: [
PhotoView(
imageProvider: AssetImage("assets/image/laoban.png"),
initialScale: Platform.isAndroid ? 1.02 : 1.2,
basePosition: alignmentProgress,
),
// PhotoView(
// imageProvider: AssetImage("assets/image/laoban.png"),
// initialScale: Platform.isAndroid ? 1.02 : 1.2,
// basePosition: alignmentProgress,
// ),
Positioned(
top: 54.h,
left: 28.w,

6
lib/main.dart

@ -57,6 +57,7 @@ import 'package:sharesdk_plugin/sharesdk_interface.dart';
import 'package:sharesdk_plugin/sharesdk_register.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
import 'home/guide_page.dart';
import 'main_page.dart';
import 'mine/manage_address_page.dart';
import 'mine/roll_center_page.dart';
@ -141,7 +142,7 @@ class MyApp extends StatelessWidget {
return appLocale ?? locales[0];
},
supportedLocales: S.delegate.supportedLocales,
home: LoginPage(),
home: GuidePage(),
// home: MainPage(),
builder: (context, widget) {
return MediaQuery(
@ -167,7 +168,7 @@ class MyApp extends StatelessWidget {
return MaterialPageRoute(
//
builder: (context) {
return LoginPage();
return GuidePage();
},
settings: settings,
);
@ -178,6 +179,7 @@ class MyApp extends StatelessWidget {
}
Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/guide_Page': (context, {arguments}) => GuidePage(),
'/router/login_page': (context, {arguments}) => LoginPage(arguments: arguments),
'/router/main_page': (context, {arguments}) => MainPage(),
'/router/msg_page': (context, {arguments}) => MainMessagePage(),

6
lib/mine/mine_page.dart

@ -52,6 +52,12 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
);
}
@override
void dispose() {
super.dispose();
_refreshController.dispose();
}
@override
void initState() {
super.initState();

4
lib/mine/user_info_page.dart

@ -196,7 +196,7 @@ class _UserInfoPage extends State<UserInfoPage> {
(modifyInfo["nickname"]) == "" ? "回乡" : modifyInfo["nickname"]),
),
InkWell(
onTap: showDateSelector,
onTap:(modifyInfo["birth"] == "")?showDateSelector:(){},
child: avatarItem(
2,
(modifyInfo["birth"] != null && modifyInfo["birth"] != "")
@ -239,7 +239,7 @@ class _UserInfoPage extends State<UserInfoPage> {
builder: (_) {
return CupertinoDatePickerWidget();
});
if (dateTime != null) {
if (dateTime != null ) {
modifyInfo["birth"] = DateFormat("yyyy-MM-dd").format(dateTime);
user.birth = modifyInfo["birth"];
age = AppUtils.getAge(dateTime);

14
lib/view_widget/hot_item.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/article.dart';
@ -104,7 +105,9 @@ class HotArticleItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: IconText(
child: Row(
children: [
IconText(
article != null
? (article.createTime.split(" ")[0])
: "",
@ -116,6 +119,15 @@ class HotArticleItem extends StatelessWidget {
iconSize: 10,
iconColor: Color(0xFFB2B2B2),
),
SizedBox(width: 8,),
Image.asset(
"assets/image/icon_zan.png",
width: 14.w,
height: 14.h,
),
Text("58",style: TextStyle(fontSize:10,color:Color(0xffB9B9B9)),)
],
),
flex: 1,
),
Text(

29
pubspec.lock

@ -56,7 +56,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0"
version: "2.6.1"
barcode:
dependency: transitive
description:
@ -594,7 +594,7 @@ packages:
name: path_provider_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.0.2"
path_provider_platform_interface:
dependency: transitive
description:
@ -608,7 +608,7 @@ packages:
name: path_provider_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "2.0.3"
pedantic:
dependency: transitive
description:
@ -637,13 +637,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.0"
photo_view:
dependency: "direct main"
description:
name: photo_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.11.1"
platform:
dependency: transitive
description:
@ -741,14 +734,14 @@ packages:
name: shared_preferences_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.0.2"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.0.2"
shared_preferences_platform_interface:
dependency: transitive
description:
@ -762,14 +755,14 @@ packages:
name: shared_preferences_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.0.1"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.0.2"
sharesdk_plugin:
dependency: "direct main"
description:
@ -872,7 +865,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19"
version: "0.3.0"
timing:
dependency: transitive
description:
@ -886,7 +879,7 @@ packages:
path: "."
ref: "V1.1.2"
resolved-ref: b814d62f4b82422459f786671f23dd535062d503
url: "https://github.com/TencentCloud/TPNS-Flutter-Plugin"
url: "git://github.com/TencentCloud/TPNS-Flutter-Plugin"
source: git
version: "1.1.2"
transformer_page_view:
@ -993,7 +986,7 @@ packages:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.5"
version: "2.2.5"
xdg_directories:
dependency: transitive
description:
@ -1016,5 +1009,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.13.0 <3.0.0"
flutter: ">=2.0.0"

4
pubspec.yaml

@ -32,7 +32,7 @@ dependencies:
tpns_flutter_plugin:
git:
url: https://github.com/TencentCloud/TPNS-Flutter-Plugin
url: git://github.com/TencentCloud/TPNS-Flutter-Plugin
ref: V1.1.2
# tpns_flutter_plugin: ^1.1.0
@ -85,7 +85,7 @@ dependencies:
cached_network_image: ^2.0.0
flutter_html: ^1.3.0 #2.1.0
photo_view: ^0.11.1
# photo_view: ^0.11.1
chewie: ^0.12.2
video_player: ^1.0.1

Loading…
Cancel
Save