diff --git a/assets/image/2x/icon_idea_cj.png b/assets/image/2x/icon_idea_cj.png new file mode 100644 index 00000000..24da637a Binary files /dev/null and b/assets/image/2x/icon_idea_cj.png differ diff --git a/assets/image/2x/icon_idea_hb.png b/assets/image/2x/icon_idea_hb.png new file mode 100644 index 00000000..ae4b426e Binary files /dev/null and b/assets/image/2x/icon_idea_hb.png differ diff --git a/assets/image/2x/icon_idea_jk.png b/assets/image/2x/icon_idea_jk.png new file mode 100644 index 00000000..4406681d Binary files /dev/null and b/assets/image/2x/icon_idea_jk.png differ diff --git a/assets/image/2x/icon_idea_ya.png b/assets/image/2x/icon_idea_ya.png new file mode 100644 index 00000000..09314707 Binary files /dev/null and b/assets/image/2x/icon_idea_ya.png differ diff --git a/assets/image/2x/icon_idea_yj.png b/assets/image/2x/icon_idea_yj.png new file mode 100644 index 00000000..c733bc93 Binary files /dev/null and b/assets/image/2x/icon_idea_yj.png differ diff --git a/assets/image/2x/icon_idea_zh.png b/assets/image/2x/icon_idea_zh.png new file mode 100644 index 00000000..96ab80e0 Binary files /dev/null and b/assets/image/2x/icon_idea_zh.png differ diff --git a/assets/image/3x/icon_idea_cj.png b/assets/image/3x/icon_idea_cj.png new file mode 100644 index 00000000..bccd7982 Binary files /dev/null and b/assets/image/3x/icon_idea_cj.png differ diff --git a/assets/image/3x/icon_idea_hb.png b/assets/image/3x/icon_idea_hb.png new file mode 100644 index 00000000..71d6debe Binary files /dev/null and b/assets/image/3x/icon_idea_hb.png differ diff --git a/assets/image/3x/icon_idea_jk.png b/assets/image/3x/icon_idea_jk.png new file mode 100644 index 00000000..dd8358d5 Binary files /dev/null and b/assets/image/3x/icon_idea_jk.png differ diff --git a/assets/image/3x/icon_idea_ya.png b/assets/image/3x/icon_idea_ya.png new file mode 100644 index 00000000..aa6ea934 Binary files /dev/null and b/assets/image/3x/icon_idea_ya.png differ diff --git a/assets/image/3x/icon_idea_yj.png b/assets/image/3x/icon_idea_yj.png new file mode 100644 index 00000000..3c90cfd0 Binary files /dev/null and b/assets/image/3x/icon_idea_yj.png differ diff --git a/assets/image/3x/icon_idea_zh.png b/assets/image/3x/icon_idea_zh.png new file mode 100644 index 00000000..cca73501 Binary files /dev/null and b/assets/image/3x/icon_idea_zh.png differ diff --git a/assets/image/icon_idea_cj.png b/assets/image/icon_idea_cj.png new file mode 100644 index 00000000..d82449f7 Binary files /dev/null and b/assets/image/icon_idea_cj.png differ diff --git a/assets/image/icon_idea_hb.png b/assets/image/icon_idea_hb.png new file mode 100644 index 00000000..abcf579f Binary files /dev/null and b/assets/image/icon_idea_hb.png differ diff --git a/assets/image/icon_idea_jk.png b/assets/image/icon_idea_jk.png new file mode 100644 index 00000000..5554524a Binary files /dev/null and b/assets/image/icon_idea_jk.png differ diff --git a/assets/image/icon_idea_ya.png b/assets/image/icon_idea_ya.png new file mode 100644 index 00000000..dd3fc351 Binary files /dev/null and b/assets/image/icon_idea_ya.png differ diff --git a/assets/image/icon_idea_yj.png b/assets/image/icon_idea_yj.png new file mode 100644 index 00000000..b3b40538 Binary files /dev/null and b/assets/image/icon_idea_yj.png differ diff --git a/assets/image/icon_idea_zh.png b/assets/image/icon_idea_zh.png new file mode 100644 index 00000000..3071654a Binary files /dev/null and b/assets/image/icon_idea_zh.png differ diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 57962169..99b1cd68 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -3335,6 +3335,15 @@ class S { ); } + /// `隐私政策` + String get yinsizhengce { + return Intl.message( + '隐私政策', + name: 'yinsizhengce', + desc: '', + args: [], + ); + } /// `已领取` String get yilingqu { return Intl.message( diff --git a/lib/home/founder_story_page.dart b/lib/home/founder_story_page.dart index 14a39b7f..745bd674 100644 --- a/lib/home/founder_story_page.dart +++ b/lib/home/founder_story_page.dart @@ -46,7 +46,7 @@ class _FounderStoryPage extends State { child: Column( children: [ Container( - margin: EdgeInsets.only(bottom: 20), + // margin: EdgeInsets.only(bottom: 20), padding: EdgeInsets.only(left: 32, right: 32, top: 24), decoration: BoxDecoration( color: Colors.white, @@ -243,11 +243,11 @@ class _FounderStoryPage extends State { Row( children: [ _ideaWidget("友爱", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_ya.png"), _ideaWidget("纯净", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_cj.png"), _ideaWidget("健康", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_jk.png"), ], ), SizedBox( @@ -256,121 +256,121 @@ class _FounderStoryPage extends State { Row( children: [ _ideaWidget("有机", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_yj.png"), _ideaWidget("环保", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_hb.png"), _ideaWidget("智慧", - "https://tva1.sinaimg.cn/large/006y8mN6gy1g7aa03bmfpj3069069mx8.jpg"), + "assets/image/icon_idea_zh.png"), ], ), SizedBox( - height: 20, - ), - ], - ), - ), - Container( - // margin: EdgeInsets.only(bottom: 20), - // padding: EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0) - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(16), - child: Text("评论 (58) 喜欢 (58)", - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: Color(0xff1A1A1A))), - ), - SizedBox( - height: 600, - child: ListView.builder( - itemCount: 6, - scrollDirection: Axis.vertical, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return _commentItem(position); - }, - ), - ), - ], - ), - ), - SizedBox( - height: 12, - ), - Container( - padding: EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0) - ], - borderRadius: new BorderRadius.only( - topLeft: Radius.circular(8.0), - topRight: Radius.circular(8.0), - ), - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Container( - decoration: new BoxDecoration( - color: Color(0xffF2F2F2), - borderRadius: BorderRadius.circular(2.0)), - child: Column( - children: [ - Container( - margin: const EdgeInsets.fromLTRB(4, 0, 4, 0), - alignment: Alignment.topLeft, - child: TextField( - maxLines: 8, - minLines: 1, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "留下您精彩的评论吧~", - hintStyle: TextStyle( - fontSize: 14, - color: Color(0xffCDCCCC), - ), - ), - ), - ), - ], - ), - ), - ), - Padding( - padding: EdgeInsets.only(left: 20, right: 20), - child: Text( - "发送", - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: Color(0XFF1A1A1A)), - ), + height: 42, ), - Image.asset("assets/image/icon_like_h.png") ], ), ), + // Container( + // // margin: EdgeInsets.only(bottom: 20), + // // padding: EdgeInsets.all(16), + // decoration: BoxDecoration( + // color: Colors.white, + // boxShadow: [ + // BoxShadow( + // color: Colors.black.withAlpha(12), + // offset: Offset(0, 2), + // blurRadius: 14, + // spreadRadius: 0) + // ], + // ), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Padding( + // padding: EdgeInsets.all(16), + // child: Text("评论 (58) 喜欢 (58)", + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.bold, + // color: Color(0xff1A1A1A))), + // ), + // SizedBox( + // height: 600, + // child: ListView.builder( + // itemCount: 6, + // scrollDirection: Axis.vertical, + // physics: BouncingScrollPhysics(), + // itemBuilder: (context, position) { + // return _commentItem(position); + // }, + // ), + // ), + // ], + // ), + // ), + // SizedBox( + // height: 12, + // ), + // Container( + // padding: EdgeInsets.all(16), + // decoration: BoxDecoration( + // color: Colors.white, + // boxShadow: [ + // BoxShadow( + // color: Colors.black.withAlpha(12), + // offset: Offset(0, 2), + // blurRadius: 14, + // spreadRadius: 0) + // ], + // borderRadius: new BorderRadius.only( + // topLeft: Radius.circular(8.0), + // topRight: Radius.circular(8.0), + // ), + // ), + // child: Row( + // children: [ + // Expanded( + // flex: 1, + // child: Container( + // decoration: new BoxDecoration( + // color: Color(0xffF2F2F2), + // borderRadius: BorderRadius.circular(2.0)), + // child: Column( + // children: [ + // Container( + // margin: const EdgeInsets.fromLTRB(4, 0, 4, 0), + // alignment: Alignment.topLeft, + // child: TextField( + // maxLines: 8, + // minLines: 1, + // decoration: InputDecoration( + // border: InputBorder.none, + // hintText: "留下您精彩的评论吧~", + // hintStyle: TextStyle( + // fontSize: 14, + // color: Color(0xffCDCCCC), + // ), + // ), + // ), + // ), + // ], + // ), + // ), + // ), + // Padding( + // padding: EdgeInsets.only(left: 20, right: 20), + // child: Text( + // "发送", + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.bold, + // color: Color(0XFF1A1A1A)), + // ), + // ), + // Image.asset("assets/image/icon_like_h.png") + // ], + // ), + // ), ], ), ), @@ -400,7 +400,7 @@ class _FounderStoryPage extends State { ); } - Widget _ideaWidget(var text, var img) { + Widget _ideaWidget(var text, String img) { return Expanded( flex: 1, child: Stack( @@ -409,19 +409,35 @@ class _FounderStoryPage extends State { Container( width: 63, height: 63, - child: CircleAvatar( - radius: 100, - backgroundImage: NetworkImage(img), - child: Container( - alignment: Alignment.center, - child: Text( - text, - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.w300, - color: Colors.white), - )), + child:Stack( + alignment: Alignment.center, + children: [ + Align( + child: CircleAvatar( + child: Image.asset( + img), + radius: 100, + ), + ), + Text(text,style:TextStyle( + fontSize: 18, + fontWeight: FontWeight.w300, + color: Colors.white) ,) + ], ), + // CircleAvatar( + // radius: 100, + // backgroundImage: Image.asset(img), + // child: Container( + // alignment: Alignment.center, + // child: Text( + // text, + // style: TextStyle( + // fontSize: 18, + // fontWeight: FontWeight.w300, + // color: Colors.white), + // )), + // ), ), Container( width: 73, diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index fab0bd7c..ae8de78a 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -454,18 +454,40 @@ class _BrandPage extends State ), Column( children: [ + //理念板块 + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: buildIdea(), + // ), Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: buildIdea(), + children: [ + _ideaWidget("友爱", + "assets/image/icon_idea_ya.png"), + _ideaWidget("纯净", + "assets/image/icon_idea_cj.png"), + _ideaWidget("健康", + "assets/image/icon_idea_jk.png"), + ], ), SizedBox( height: 18, ), + //理念板块 + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: buildIdea(), + // ), Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: buildIdea(), + children: [ + _ideaWidget("有机", + "assets/image/icon_idea_yj.png"), + _ideaWidget("环保", + "assets/image/icon_idea_hb.png"), + _ideaWidget("智慧", + "assets/image/icon_idea_zh.png"), + ], ), ], ), @@ -474,13 +496,66 @@ class _BrandPage extends State ); } - List buildIdea() { - if (brandData == null) return []; - var ideas = []; - (brandData.ideals as Map).forEach((key, value) { - ideas.add(idea(key, value)); - }); - return ideas; + //理念板块 + // List buildIdea() { + // if (brandData == null) return []; + // var ideas = []; + // (brandData.ideals as Map).forEach((key, value) { + // ideas.add(idea(key, value)); + // }); + // return ideas; + // } + + Widget _ideaWidget(var text, String img) { + return Expanded( + flex: 1, + child: Stack( + alignment: Alignment.center, + children: [ + Container( + width: 63, + height: 63, + child:Stack( + alignment: Alignment.center, + children: [ + Align( + child: CircleAvatar( + child: Image.asset( + img), + radius: 100, + ), + ), + Text(text,style:TextStyle( + fontSize: 18, + fontWeight: FontWeight.w300, + color: Colors.white) ,) + ], + ), + // CircleAvatar( + // radius: 100, + // backgroundImage: Image.asset(img), + // child: Container( + // alignment: Alignment.center, + // child: Text( + // text, + // style: TextStyle( + // fontSize: 18, + // fontWeight: FontWeight.w300, + // color: Colors.white), + // )), + // ), + ), + Container( + width: 73, + height: 73, + child: CustomPaint( + painter: MyPainter( + lineColor: Color(0xff32A060), width: 2, isDividerRound: true), + ), + ) + ], + ), + ); } banner() {