fmk
3 years ago
72 changed files with 5768 additions and 1635 deletions
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 924 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 274 B |
@ -0,0 +1,176 @@
|
||||
import 'package:dio/dio.dart'; |
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/retrofit/data/article.dart'; |
||||
import 'package:huixiang/retrofit/data/banner.dart'; |
||||
import 'package:huixiang/retrofit/data/base_data.dart'; |
||||
import 'package:huixiang/retrofit/data/page.dart'; |
||||
import 'package:huixiang/retrofit/retrofit_api.dart'; |
||||
import 'package:huixiang/utils/font_weight.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'; |
||||
import 'package:huixiang/view_widget/my_appbar.dart'; |
||||
import 'package:huixiang/view_widget/my_footer.dart'; |
||||
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
||||
import 'package:shared_preferences/shared_preferences.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
|
||||
class ArticleList extends StatefulWidget { |
||||
final List<Article> articles; |
||||
|
||||
ArticleList(this.articles,); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ArticleList(); |
||||
} |
||||
} |
||||
|
||||
class _ArticleList extends State<ArticleList> { |
||||
ApiService apiService; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
|
||||
SharedPreferences.getInstance().then((value) => { |
||||
apiService = ApiService(Dio(), |
||||
context: context, token: value.getString("token")), |
||||
}); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Container( |
||||
margin: EdgeInsets.only(top:20,left:16,right: 16), |
||||
child:Column( |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
children: [ |
||||
Padding(padding:EdgeInsets.only(bottom: 12), |
||||
child:Text( |
||||
"最新文章", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 2, |
||||
style: TextStyle( |
||||
fontSize: 15.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.black, |
||||
), |
||||
)), |
||||
ListView.builder( |
||||
padding: EdgeInsets.zero, |
||||
itemCount: widget.articles.length, |
||||
scrollDirection: Axis.vertical, |
||||
shrinkWrap: true, |
||||
physics: NeverScrollableScrollPhysics(), |
||||
itemBuilder: (context, position) { |
||||
return GestureDetector( |
||||
onTap: () { |
||||
Navigator.of(context).pushNamed( |
||||
'/router/web_page', |
||||
arguments: {"articleId": widget.articles[position].id}); |
||||
widget.articles[position].viewers = (widget.articles[position].viewers + 1); |
||||
setState(() {}); |
||||
}, |
||||
child: articleItem(widget.articles[position],position), |
||||
); |
||||
}, |
||||
), |
||||
], |
||||
)); |
||||
} |
||||
|
||||
Widget articleItem(Article articles,position) { |
||||
return Container( |
||||
width: double.infinity, |
||||
padding: EdgeInsets.all(16), |
||||
margin: EdgeInsets.only(bottom: 12), |
||||
color: Colors.white, |
||||
child:Row( |
||||
children: [ |
||||
Expanded(child: Column( |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
children: [ |
||||
Text( |
||||
widget?.articles[position]?.mainTitle ?? "", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 1, |
||||
style: TextStyle( |
||||
fontSize: 14.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.black, |
||||
), |
||||
), |
||||
SizedBox(height:5), |
||||
Text( |
||||
widget?.articles[position]?.viceTitle ?? "", |
||||
// overflow: TextOverflow.ellipsis, |
||||
// maxLines: 1, |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
SizedBox(height: 10), |
||||
Row( |
||||
children: [ |
||||
Text( |
||||
(widget.articles[position] != null && |
||||
widget.articles[position].author != null) |
||||
? widget.articles[position].author.name |
||||
: "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Color(0xFF8E8E8E), |
||||
), |
||||
), |
||||
SizedBox(width:8), |
||||
Image.asset( |
||||
"assets/image/browse.png", |
||||
width: 14, |
||||
height: 14, |
||||
color: Color(0xFF808080), |
||||
), |
||||
Expanded(child: Text( |
||||
"${widget?.articles[position]?.viewers}" |
||||
?? "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF8D8D8D), |
||||
), |
||||
)), |
||||
Text( |
||||
widget?.articles[position]?.createTime?.split(" ")[0] |
||||
?? "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF8D8D8D), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
], |
||||
),), |
||||
SizedBox(width:12), |
||||
MImage( |
||||
widget?.articles[position]?.coverImg ?? "", |
||||
fit: BoxFit.cover, |
||||
radius: BorderRadius.all(Radius.circular(2)), |
||||
width:96, |
||||
height:96, |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,239 @@
|
||||
import 'package:dio/dio.dart'; |
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter/rendering.dart'; |
||||
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
||||
import 'package:huixiang/community/headlines/headlines_banner.dart'; |
||||
import 'package:huixiang/community/headlines/headlines_collection.dart'; |
||||
import 'package:huixiang/main.dart'; |
||||
import 'package:huixiang/retrofit/data/article.dart'; |
||||
import 'package:huixiang/retrofit/data/banner.dart'; |
||||
import 'package:huixiang/retrofit/data/base_data.dart'; |
||||
import 'package:huixiang/retrofit/data/brand.dart'; |
||||
import 'package:huixiang/retrofit/data/category_select_list.dart'; |
||||
import 'package:huixiang/retrofit/data/collect_class_list.dart'; |
||||
import 'package:huixiang/retrofit/data/course_list.dart'; |
||||
import 'package:huixiang/retrofit/data/headlines_list.dart'; |
||||
import 'package:huixiang/retrofit/data/headlines_list_details.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/classic_header.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:huixiang/view_widget/store_title_tab.dart'; |
||||
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
||||
import 'package:shared_preferences/shared_preferences.dart'; |
||||
|
||||
import 'article_list.dart'; |
||||
|
||||
class ArticlePage extends StatefulWidget { |
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ArticlePage(); |
||||
} |
||||
} |
||||
|
||||
class _ArticlePage extends State<ArticlePage> |
||||
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { |
||||
final ScrollController scrollController = ScrollController(); |
||||
final RefreshController refreshController = RefreshController(); |
||||
|
||||
ApiService apiService; |
||||
List<GlobalKey> globaKeys = []; |
||||
List<Brand> brands = []; |
||||
List<BannerData> bannerData = []; |
||||
List<Article> articles = []; |
||||
List<HeadlinesList> headlines = []; |
||||
int pageNum = 1; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
|
||||
eventBus.on<EventType>().listen((event) { |
||||
print("object: ArticlePage"); |
||||
if (event.type < 3) { |
||||
setState(() {}); |
||||
} |
||||
}); |
||||
queryArticleList(); |
||||
queryHeadlinesBanner(); |
||||
queryHeadlinesList(); |
||||
} |
||||
|
||||
@override |
||||
void dispose() { |
||||
super.dispose(); |
||||
refreshController.dispose(); |
||||
} |
||||
|
||||
///banner |
||||
queryHeadlinesBanner() async { |
||||
if (apiService == null) { |
||||
SharedPreferences value = await SharedPreferences.getInstance(); |
||||
apiService = ApiService( |
||||
Dio(), |
||||
context: context, |
||||
token: value.getString("token"), |
||||
); |
||||
} |
||||
BaseData<PageInfo<BannerData>> baseData = |
||||
await apiService.queryBanner({ |
||||
"model": {"type": "INFORMATION"}, |
||||
}).catchError((onError) { |
||||
refreshController.refreshFailed(); |
||||
}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
bannerData.clear(); |
||||
bannerData.addAll(baseData.data.records); |
||||
refreshController.refreshCompleted(); |
||||
} else { |
||||
refreshController.refreshFailed(); |
||||
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
||||
} |
||||
EasyLoading.dismiss(); |
||||
} |
||||
|
||||
///文章列表 |
||||
queryArticleList() async { |
||||
if (apiService == null) { |
||||
SharedPreferences value = await SharedPreferences.getInstance(); |
||||
apiService = ApiService( |
||||
Dio(), |
||||
context: context, |
||||
token: value.getString("token"), |
||||
); |
||||
} |
||||
BaseData<PageInfo<Article>> baseData = await apiService.queryArticle({ |
||||
"pageNum": pageNum, |
||||
"pageSize": 10, |
||||
"searchKey": "", |
||||
"state": 1, |
||||
"type": 2 |
||||
}).catchError((onError){ |
||||
refreshController.refreshFailed(); |
||||
refreshController.loadFailed(); |
||||
}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
refreshController.refreshCompleted(); |
||||
refreshController.loadComplete(); |
||||
if(pageNum == 1) { |
||||
articles.clear(); |
||||
} |
||||
articles.addAll(baseData.data.list); |
||||
if (baseData.data.pageNum == baseData.data.pages) { |
||||
refreshController.loadNoData(); |
||||
} else { |
||||
pageNum += 1; |
||||
} |
||||
setState(() {}); |
||||
} else { |
||||
refreshController.refreshFailed(); |
||||
refreshController.loadFailed(); |
||||
} |
||||
} |
||||
|
||||
///文章合集列表 |
||||
queryHeadlinesList() async { |
||||
if (apiService == null) { |
||||
SharedPreferences value = await SharedPreferences.getInstance(); |
||||
apiService = ApiService( |
||||
Dio(), |
||||
context: context, |
||||
token: value.getString("token"), |
||||
); |
||||
} |
||||
BaseData<List<HeadlinesList>> baseData = await apiService.headlinesList().catchError((onError) {}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
setState(() { |
||||
headlines.clear(); |
||||
headlines.addAll(baseData.data); |
||||
headlines.forEach((element) { |
||||
// collectCourse(element.id); |
||||
}); |
||||
}); |
||||
} |
||||
EasyLoading.dismiss(); |
||||
} |
||||
|
||||
_onRefresh(){ |
||||
queryHeadlinesBanner(); |
||||
queryHeadlinesList();//分类列表 |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
super.build(context); |
||||
return |
||||
Stack( |
||||
children: [ |
||||
Positioned( |
||||
child: Container( |
||||
child: SmartRefresher( |
||||
controller: refreshController, |
||||
enablePullDown: true, |
||||
enablePullUp: false, |
||||
header: MyHeader(), |
||||
physics: ClampingScrollPhysics(), |
||||
onRefresh: _onRefresh, |
||||
scrollController: scrollController, |
||||
child: Container( |
||||
child: SingleChildScrollView( |
||||
physics: NeverScrollableScrollPhysics(), |
||||
child: Container( |
||||
color: Color(0xFFF7F7F7), |
||||
margin: EdgeInsets.only(top: 16.h), |
||||
child: Column( |
||||
children: classChildItem(), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
bottom:0, |
||||
top: 0, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
if (brands != null && brands.length > 0) |
||||
Positioned( |
||||
child: Container( |
||||
color: Colors.white, |
||||
child: StoreTitleTab( |
||||
brands, |
||||
globaKeys, |
||||
scrollController, |
||||
isScroll: true, |
||||
), |
||||
), |
||||
top: 0, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
], |
||||
); |
||||
} |
||||
|
||||
List<Widget> classChildItem() { |
||||
var widgets = <Widget>[ |
||||
///课程banner |
||||
HeadlinesBanner(bannerData,), |
||||
|
||||
SizedBox(height: 28), |
||||
|
||||
///头条合集列表 |
||||
HeadlinesCollection(headlines,articles), |
||||
|
||||
///文章列表 |
||||
ArticleList(articles), |
||||
|
||||
|
||||
]; |
||||
|
||||
return widgets; |
||||
} |
||||
|
||||
@override |
||||
bool get wantKeepAlive => true; |
||||
} |
@ -0,0 +1,119 @@
|
||||
|
||||
import 'dart:convert'; |
||||
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_swiper/flutter_swiper.dart'; |
||||
import 'package:huixiang/retrofit/data/banner.dart'; |
||||
import 'package:huixiang/retrofit/data/base_data.dart'; |
||||
import 'package:huixiang/retrofit/data/page.dart'; |
||||
import 'package:huixiang/retrofit/retrofit_api.dart'; |
||||
import 'package:huixiang/view_widget/custom_image.dart'; |
||||
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
||||
|
||||
class HeadlinesBanner extends StatefulWidget { |
||||
|
||||
final List<BannerData> bannerData; |
||||
|
||||
HeadlinesBanner(this.bannerData); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _HeadlinesBanner(); |
||||
} |
||||
|
||||
} |
||||
|
||||
class _HeadlinesBanner extends State<HeadlinesBanner> { |
||||
ApiService apiService; |
||||
final RefreshController refreshController = RefreshController(); |
||||
List<BannerData> bannerData = []; |
||||
|
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Container( |
||||
child: AspectRatio( |
||||
aspectRatio: 2.08, |
||||
child: Swiper( |
||||
viewportFraction: 0.88, |
||||
scale: 0.93, |
||||
pagination: SwiperPagination( |
||||
alignment: Alignment.bottomCenter, |
||||
builder: DotSwiperPaginationBuilder( |
||||
size: 8, |
||||
activeSize: 8, |
||||
space: 5, |
||||
activeColor: Colors.black, |
||||
color: Colors.black.withAlpha(76), |
||||
), |
||||
), |
||||
physics: BouncingScrollPhysics(), |
||||
itemBuilder: (context, position) { |
||||
return InkWell( |
||||
onTap: () { |
||||
bannerClick(widget.bannerData[position]); |
||||
}, |
||||
child: MImage( |
||||
(widget.bannerData != null && position < widget.bannerData.length) |
||||
? widget.bannerData[position].imgUrl |
||||
: "", |
||||
fit: BoxFit.cover, |
||||
radius: BorderRadius.circular(8), |
||||
errorSrc: "assets/image/default_2_1.png", |
||||
fadeSrc: "assets/image/default_2_1.png", |
||||
), |
||||
); |
||||
}, |
||||
itemCount: (widget.bannerData != null && widget.bannerData.length > 0) |
||||
? widget.bannerData.length |
||||
: 1), |
||||
), |
||||
); |
||||
} |
||||
|
||||
/// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,4:页面跳转,5:课程) |
||||
bannerClick(BannerData bannerData) async { |
||||
switch (bannerData.contentType) { |
||||
case 1: |
||||
Navigator.of(context).pushNamed('/router/integral_store_page', |
||||
arguments: {"goodsId": bannerData.content}); |
||||
break; |
||||
case 2: |
||||
Navigator.of(context) |
||||
.pushNamed('/router/web_page', arguments: { |
||||
"activityId": bannerData.content, |
||||
}); |
||||
break; |
||||
case 3: |
||||
Navigator.of(context) |
||||
.pushNamed('/router/web_page', arguments: { |
||||
"articleId": bannerData.content, |
||||
}); |
||||
break; |
||||
case 4: |
||||
String router = bannerData.content; |
||||
if (router.contains("?")) { |
||||
String params = router.substring(router.indexOf("?")); |
||||
params = params.replaceAll("?", ""); |
||||
Map map = jsonDecode(params); |
||||
Navigator.of(context).pushNamed(router, arguments: map); |
||||
} else { |
||||
Navigator.of(context).pushNamed(router); |
||||
} |
||||
break; |
||||
case 5: |
||||
Navigator.of(context) |
||||
.pushNamed('/router/class_details', arguments: { |
||||
"id": bannerData.content, |
||||
}); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,166 @@
|
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; |
||||
import 'package:huixiang/retrofit/data/article.dart'; |
||||
import 'package:huixiang/retrofit/data/collect_class_list.dart'; |
||||
import 'package:huixiang/retrofit/data/course_list.dart'; |
||||
import 'package:huixiang/retrofit/data/headlines_list.dart'; |
||||
import 'package:huixiang/retrofit/retrofit_api.dart'; |
||||
import 'package:huixiang/utils/font_weight.dart'; |
||||
import 'package:huixiang/view_widget/custom_image.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
|
||||
class HeadlinesCollection extends StatefulWidget { |
||||
final List<HeadlinesList> headlines; |
||||
final List<Article> articles; |
||||
|
||||
HeadlinesCollection(this.headlines,this.articles); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _HeadlinesCollection(); |
||||
} |
||||
} |
||||
|
||||
class _HeadlinesCollection extends State<HeadlinesCollection> { |
||||
ApiService apiService; |
||||
BMFCoordinate latLng; |
||||
|
||||
final TextEditingController editingController = TextEditingController(); |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Container( |
||||
height: 100, |
||||
margin: EdgeInsets.only(top:10), |
||||
child: ListView.builder( |
||||
scrollDirection: Axis.horizontal, |
||||
physics: BouncingScrollPhysics(), |
||||
padding: EdgeInsets.symmetric(horizontal: 10), |
||||
itemCount:widget.headlines == null ? 0 : widget.headlines.length, |
||||
itemBuilder: (context, position) { |
||||
return GestureDetector( |
||||
onTap: () { |
||||
Navigator.of(context).pushNamed( |
||||
'/router/headlines_column_details', |
||||
arguments: {"id":widget.headlines[position].id, |
||||
"articles":widget.articles}); |
||||
}, |
||||
child: headlinesCollectionItem(widget.headlines[position]), |
||||
); |
||||
}, |
||||
), |
||||
); |
||||
} |
||||
|
||||
Widget headlinesCollectionItem(HeadlinesList headlines) { |
||||
return Container( |
||||
width: 225.w, |
||||
height:110.h, |
||||
decoration: BoxDecoration( |
||||
borderRadius: BorderRadius.circular(4), |
||||
boxShadow: [ |
||||
BoxShadow( |
||||
color: Colors.black.withAlpha(10), |
||||
offset: Offset(0, 3), |
||||
blurRadius: 14, |
||||
spreadRadius: 0, |
||||
) |
||||
], |
||||
color: Colors.black, |
||||
), |
||||
margin: EdgeInsets.symmetric( |
||||
horizontal:6, |
||||
), |
||||
child: Stack( |
||||
children: [ |
||||
ClipRRect( |
||||
child: Opacity( |
||||
opacity: 0.8, |
||||
child: MImage( |
||||
headlines?.coverImg ?? "", |
||||
width: 225.w, |
||||
height: 110.h, |
||||
fit: BoxFit.fill, |
||||
errorSrc: "assets/image/default_1.png", |
||||
fadeSrc: "assets/image/default_1.png", |
||||
), |
||||
), |
||||
borderRadius: BorderRadius.vertical( |
||||
top: Radius.circular(4), |
||||
), |
||||
), |
||||
Container( |
||||
padding: EdgeInsets.all(12), |
||||
child: Column(children: [ |
||||
Expanded(child: Row( |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
children: [ |
||||
Container( |
||||
margin: EdgeInsets.only(right:4), |
||||
padding:EdgeInsets.only(left:2,right:2), |
||||
height: 16.h, |
||||
alignment: Alignment.center, |
||||
decoration: BoxDecoration( |
||||
borderRadius: |
||||
BorderRadius.circular(2), |
||||
color: Color(0xFF32A060), |
||||
), |
||||
child: Text( |
||||
"专栏", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
), |
||||
Expanded(child:Text( |
||||
headlines?.name ?? "", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 2, |
||||
style: TextStyle( |
||||
fontSize: 15.sp, |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
color: Colors.white, |
||||
), |
||||
),), |
||||
],)), |
||||
Row( |
||||
children: [ |
||||
Expanded(child:Text( |
||||
"更新3篇", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.white, |
||||
), |
||||
)), |
||||
Text( |
||||
"查看专栏", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
SizedBox(width: 2), |
||||
Image.asset( |
||||
"assets/image/t_right.png", |
||||
width: 14, |
||||
height: 14, |
||||
), |
||||
],), |
||||
],), |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,344 @@
|
||||
import 'package:dio/dio.dart'; |
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
||||
import 'package:huixiang/retrofit/data/article.dart'; |
||||
import 'package:huixiang/retrofit/data/base_data.dart'; |
||||
import 'package:huixiang/retrofit/data/headlines_list.dart'; |
||||
import 'package:huixiang/retrofit/data/headlines_list_details.dart'; |
||||
import 'package:huixiang/retrofit/retrofit_api.dart'; |
||||
import 'package:huixiang/utils/font_weight.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:huixiang/view_widget/custom_image.dart'; |
||||
import 'package:shared_preferences/shared_preferences.dart'; |
||||
|
||||
class HeadlinesColumnDetails extends StatefulWidget { |
||||
final Map<String, dynamic> arguments; |
||||
|
||||
HeadlinesColumnDetails({this.arguments}); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _HeadlinesColumnDetails(); |
||||
} |
||||
} |
||||
|
||||
class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails> |
||||
with WidgetsBindingObserver { |
||||
ApiService apiService; |
||||
List<Article> articles; |
||||
HeadlinesListDetails headlinesListDetails; |
||||
List<HeadlinesList> headlines = []; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
articles = widget.arguments["articles"]; |
||||
WidgetsBinding.instance.addObserver(this); |
||||
queryHeadlinesDetails(widget.arguments["id"]); |
||||
queryHeadlinesList(widget.arguments["id"]); |
||||
} |
||||
|
||||
///文章合集详情 |
||||
queryHeadlinesDetails(id) async { |
||||
if (apiService == null) { |
||||
SharedPreferences value = await SharedPreferences.getInstance(); |
||||
apiService = ApiService( |
||||
Dio(), |
||||
context: context, |
||||
token: value.getString("token"), |
||||
); |
||||
} |
||||
BaseData<HeadlinesListDetails> baseData = |
||||
await apiService.headlinesDetails(id).catchError((error) {}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
setState(() { |
||||
headlinesListDetails = baseData.data; |
||||
}); |
||||
} |
||||
} |
||||
|
||||
///文章合集列表 |
||||
queryHeadlinesList(id) async { |
||||
if (apiService == null) { |
||||
SharedPreferences value = await SharedPreferences.getInstance(); |
||||
apiService = ApiService( |
||||
Dio(), |
||||
context: context, |
||||
token: value.getString("token"), |
||||
); |
||||
} |
||||
BaseData<List<HeadlinesList>> baseData = await apiService.headlinesList().catchError((onError) {}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
setState(() { |
||||
headlines.clear(); |
||||
headlines.addAll(baseData.data); |
||||
headlines.forEach((element) { |
||||
// collectCourse(element.id); |
||||
}); |
||||
}); |
||||
} |
||||
EasyLoading.dismiss(); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Scaffold( |
||||
body: Container( |
||||
child: Column( |
||||
children: [ |
||||
Expanded( |
||||
child: SingleChildScrollView( |
||||
physics: BouncingScrollPhysics(), |
||||
child: Column( |
||||
children: [ |
||||
Stack( |
||||
alignment: Alignment.bottomCenter, |
||||
children: [ |
||||
Stack( |
||||
children: [ |
||||
Positioned(child: |
||||
MImage( |
||||
headlinesListDetails?.coverImg ?? "", |
||||
width:double.infinity, |
||||
height: 260.h, |
||||
fit: BoxFit.cover, |
||||
errorSrc: "assets/image/default_1.png", |
||||
fadeSrc: "assets/image/default_1.png", |
||||
), |
||||
), |
||||
Container( |
||||
margin: EdgeInsets.only( |
||||
top: 50.h, left: 16.w, right: 16.w), |
||||
decoration: BoxDecoration( |
||||
color: Colors.transparent, |
||||
), |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
GestureDetector( |
||||
child: Image.asset( |
||||
"assets/image/integral_return.png", |
||||
width: 24, |
||||
height: 24, |
||||
), |
||||
onTap: () { |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
), |
||||
], |
||||
), |
||||
), |
||||
], |
||||
), |
||||
Container( |
||||
child: Column( |
||||
children: [ |
||||
Padding(padding:EdgeInsets.only(left: 16), |
||||
child:Row( |
||||
children: [ |
||||
Container( |
||||
margin: EdgeInsets.only(right:4), |
||||
padding:EdgeInsets.only(left:2,right:2), |
||||
height:20.h, |
||||
alignment: Alignment.center, |
||||
decoration: BoxDecoration( |
||||
borderRadius: |
||||
BorderRadius.circular(2), |
||||
color: Color(0xFF32A060), |
||||
), |
||||
child: Text( |
||||
"专栏", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
), |
||||
SizedBox( |
||||
width: 6.w, |
||||
), |
||||
Expanded( |
||||
child: Text( |
||||
headlinesListDetails?.name ?? "", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 2, |
||||
style: TextStyle( |
||||
fontSize: 18.sp, |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
flex: 1, |
||||
) |
||||
], |
||||
),), |
||||
Container( |
||||
width: double.infinity, |
||||
decoration: BoxDecoration( |
||||
border: Border.all( |
||||
width: 0, |
||||
color: Colors.white, |
||||
), |
||||
color: Colors.white, |
||||
borderRadius: new BorderRadius.only( |
||||
topLeft: Radius.circular(8.0), |
||||
topRight: Radius.circular(8.0), |
||||
), |
||||
), |
||||
margin: EdgeInsets.only(top: 16), |
||||
// padding: EdgeInsets.all(16), |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
children: [ |
||||
Padding(padding:EdgeInsets.all(16), |
||||
child: Text( |
||||
"简介:${headlinesListDetails?.introduce ?? ""}", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 2, |
||||
style: TextStyle( |
||||
fontSize: 14.sp, |
||||
fontWeight: MyFontWeight.medium , |
||||
color: Colors.black, |
||||
), |
||||
)), |
||||
], |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
], |
||||
), |
||||
ListView.builder( |
||||
padding: EdgeInsets.zero, |
||||
itemCount:headlines == null ? 0 : headlines.length, |
||||
scrollDirection: Axis.vertical, |
||||
shrinkWrap: true, |
||||
physics: NeverScrollableScrollPhysics(), |
||||
itemBuilder: (context, position) { |
||||
return GestureDetector( |
||||
onTap: () { |
||||
Navigator.of(context).pushNamed( |
||||
'/router/web_page', |
||||
arguments: {"articleId": articles[position].id}); |
||||
articles[position].viewers = (articles[position].viewers + 1); |
||||
setState(() {} |
||||
); |
||||
}, |
||||
child: articleColumnItem(articles[position]), |
||||
); |
||||
}, |
||||
), |
||||
], |
||||
), |
||||
), |
||||
flex: 1, |
||||
), |
||||
], |
||||
), |
||||
), |
||||
); |
||||
} |
||||
|
||||
Widget articleColumnItem(Article articles) { |
||||
return Container( |
||||
width: double.infinity, |
||||
// padding: EdgeInsets.all(16), |
||||
color: Colors.white, |
||||
child:Column( |
||||
children: [ |
||||
Container( |
||||
// margin: EdgeInsets.only(top: 16,bottom: 16), |
||||
width: double.infinity, |
||||
height: 0.5.h, |
||||
color: Color(0xFFF5F5F5), |
||||
), |
||||
Padding(padding: EdgeInsets.all(16), |
||||
child:Row( |
||||
children: [ |
||||
Expanded(child: Column( |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
mainAxisAlignment: MainAxisAlignment.spaceAround, |
||||
children: [ |
||||
Text( |
||||
articles?.mainTitle ?? "", |
||||
overflow: TextOverflow.ellipsis, |
||||
maxLines: 1, |
||||
style: TextStyle( |
||||
fontSize: 14.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Colors.black, |
||||
), |
||||
), |
||||
SizedBox(height:5), |
||||
Text( |
||||
articles?.viceTitle ?? "", |
||||
// overflow: TextOverflow.ellipsis, |
||||
// maxLines: 1, |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
SizedBox(height: 10), |
||||
Row( |
||||
children: [ |
||||
Text( |
||||
(articles != null && |
||||
articles.author != null) |
||||
? articles.author.name |
||||
: "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Color(0xFF8E8E8E), |
||||
), |
||||
), |
||||
SizedBox(width:8), |
||||
Image.asset( |
||||
"assets/image/browse.png", |
||||
width: 14, |
||||
height: 14, |
||||
color: Color(0xFF808080), |
||||
), |
||||
Expanded(child: Text( |
||||
"${articles?.viewers}" |
||||
?? "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF8D8D8D), |
||||
), |
||||
)), |
||||
Text( |
||||
articles?.createTime ?? "", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFF8D8D8D), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
], |
||||
),), |
||||
SizedBox(width:12), |
||||
MImage( |
||||
articles?.coverImg ?? "", |
||||
fit: BoxFit.cover, |
||||
radius: BorderRadius.all(Radius.circular(2)), |
||||
width:96, |
||||
height:96, |
||||
), |
||||
], |
||||
)), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,290 @@
|
||||
import 'package:barcode_widget/barcode_widget.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/retrofit/data/exchange_order.dart'; |
||||
import 'package:huixiang/utils/font_weight.dart'; |
||||
import 'package:huixiang/view_widget/my_appbar.dart'; |
||||
import 'package:huixiang/view_widget/separator.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:qr_flutter/qr_flutter.dart'; |
||||
|
||||
class ExchangeWriteOffPage extends StatefulWidget { |
||||
final arguments; |
||||
|
||||
ExchangeWriteOffPage({this.arguments}); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ExchangeWriteOffPage(); |
||||
} |
||||
} |
||||
|
||||
class _ExchangeWriteOffPage extends State<ExchangeWriteOffPage> { |
||||
ExchangeOrder exchangeOrder; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
|
||||
exchangeOrder = ExchangeOrder.fromJson(widget.arguments["exchangeOrder"]); |
||||
if (mounted) setState(() {}); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Scaffold( |
||||
backgroundColor: Color(0xFF32A060), |
||||
appBar: MyAppBar( |
||||
title: S.of(context).hexiaomaxiangqing, |
||||
titleSize: 18.sp, |
||||
titleColor: Colors.white, |
||||
background: Color(0xFF32A060), |
||||
leadingColor: Colors.white, |
||||
), |
||||
body: Container( |
||||
alignment: Alignment.topCenter, |
||||
child: Stack( |
||||
alignment: Alignment.topCenter, |
||||
children: [ |
||||
Image.asset( |
||||
"assets/image/icon_write_off_bg.png", |
||||
width: MediaQuery.of(context).size.width * 0.912, |
||||
fit: BoxFit.fill, |
||||
), |
||||
LayoutBuilder(builder: (context, constraints) { |
||||
return Container( |
||||
width: constraints.constrainWidth() * 0.912, |
||||
child: Column( |
||||
children: [ |
||||
Expanded( |
||||
child: Container( |
||||
child: Column( |
||||
children: [ |
||||
Text( |
||||
exchangeOrder != null ? exchangeOrder.creditOrderDetailList[0].name : "", |
||||
style: TextStyle( |
||||
fontSize: 16.sp, |
||||
fontWeight: FontWeight.bold, |
||||
color: Color(0xFF353535)), |
||||
), |
||||
SizedBox( |
||||
height: 8.h, |
||||
), |
||||
Text( |
||||
(exchangeOrder.updateTime == null) ? "" : S.of(context).youxiaoqi( |
||||
"${exchangeOrder.updateTime}"), |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
], |
||||
mainAxisAlignment: MainAxisAlignment.center, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
), |
||||
alignment: Alignment.center, |
||||
), |
||||
flex: 6, |
||||
), |
||||
Container( |
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w), |
||||
child: MySeparator( |
||||
width: 5.w, |
||||
height: 1.h, |
||||
color: Color(0xFFA29E9E), |
||||
), |
||||
), |
||||
Expanded( |
||||
child: Container( |
||||
alignment: Alignment.center, |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.center, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
Text( |
||||
exchangeOrder != null |
||||
? "${exchangeOrder.id.substring(0, 4)} " |
||||
"${exchangeOrder.id.substring(4, 8)} " |
||||
"${exchangeOrder.id.substring(8, 12)} " |
||||
"${exchangeOrder.id.substring(12, 16)} " |
||||
"${exchangeOrder.id.substring(16, exchangeOrder.id.length)}" |
||||
: "", |
||||
style: TextStyle( |
||||
fontSize: 14.sp, |
||||
wordSpacing: exchangeOrder == null |
||||
? 10 |
||||
: (MediaQuery.of(context).size.width - |
||||
64.w) / |
||||
(((exchangeOrder.id.length) * 4)), |
||||
letterSpacing: exchangeOrder == null |
||||
? 8 |
||||
: (MediaQuery.of(context).size.width - |
||||
64.w) / |
||||
(((exchangeOrder.id.length) * 4)), |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
SizedBox( |
||||
height: 12.h, |
||||
), |
||||
BarcodeWidget( |
||||
barcode: Barcode.code128(useCode128C: true), |
||||
data: exchangeOrder != null ? exchangeOrder.id : "", |
||||
height: 72.h, |
||||
color: Colors.black, |
||||
drawText: false, |
||||
), |
||||
SizedBox( |
||||
height: 16.h, |
||||
), |
||||
Expanded(child: QrImage( |
||||
data: exchangeOrder != null ? exchangeOrder.id : "", |
||||
version: QrVersions.auto, |
||||
size: 200.w, |
||||
gapless: true, |
||||
),), |
||||
SizedBox( |
||||
height: 35.h, |
||||
), |
||||
], |
||||
), |
||||
margin: EdgeInsets.symmetric(horizontal: 20.w), |
||||
), |
||||
flex: 27, |
||||
), |
||||
Container( |
||||
child: MySeparator( |
||||
width: 5.w, |
||||
height: 1.h, |
||||
color: Color(0xFFA29E9E), |
||||
), |
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w), |
||||
), |
||||
Expanded( |
||||
child: Container( |
||||
padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 24.h), |
||||
child: Column( |
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
Container( |
||||
width: 3.w, |
||||
height: 15.h, |
||||
margin: |
||||
EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h), |
||||
decoration: BoxDecoration( |
||||
borderRadius: BorderRadius.circular(3), |
||||
color: Color(0xFF20662A), |
||||
), |
||||
), |
||||
Text( |
||||
S.of(context).shiyongtiaojian, |
||||
style: TextStyle( |
||||
fontWeight: FontWeight.bold, |
||||
fontSize: 14.sp, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
SizedBox( |
||||
width: 11.w, |
||||
), |
||||
Expanded( |
||||
child: Text( |
||||
S |
||||
.of(context) |
||||
.qianwanghuixiangmendianduihuanhexiao, |
||||
style: TextStyle( |
||||
textBaseline: TextBaseline.alphabetic, |
||||
fontSize: 14.sp, |
||||
color: Color(0xFF353535)), |
||||
), |
||||
flex: 1, |
||||
), |
||||
], |
||||
), |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
Container( |
||||
width: 3.w, |
||||
height: 15.h, |
||||
margin: EdgeInsets.fromLTRB(4, 7, 4, 7), |
||||
decoration: BoxDecoration( |
||||
borderRadius: BorderRadius.circular(3), |
||||
color: Color(0xFF20662A), |
||||
), |
||||
), |
||||
Text( |
||||
S.of(context).shiyongshuoming, |
||||
style: TextStyle( |
||||
fontWeight: FontWeight.bold, |
||||
fontSize: 14.sp, |
||||
color: Color(0xFF353535)), |
||||
), |
||||
], |
||||
), |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
SizedBox( |
||||
width: 11.w, |
||||
), |
||||
Text( |
||||
S.of(context).zitiduihuanquan, |
||||
style: TextStyle( |
||||
textBaseline: TextBaseline.alphabetic, |
||||
fontSize: 14.sp, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
Row( |
||||
mainAxisAlignment: MainAxisAlignment.start, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
SizedBox( |
||||
width: 11.w, |
||||
), |
||||
Text( |
||||
S.of(context).huixiangrenyimendian, |
||||
style: TextStyle( |
||||
textBaseline: TextBaseline.alphabetic, |
||||
fontSize: 14.sp, |
||||
color: Color(0xFF353535), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
], |
||||
), |
||||
), |
||||
flex: 13, |
||||
), |
||||
Expanded( |
||||
child: Container(), |
||||
flex: 3, |
||||
), |
||||
], |
||||
), |
||||
); |
||||
}) |
||||
], |
||||
), |
||||
), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,248 @@
|
||||
/// id : "1460450874352317701" |
||||
/// createTime : "2021-11-12 11:42:08" |
||||
/// createUser : "123" |
||||
/// updateTime : "2021-11-19 13:59:36" |
||||
/// updateUser : "1" |
||||
/// categoryId : "1460904379451179008" |
||||
/// name : "青铜" |
||||
/// level : 0 |
||||
/// icon : "https://pos.upload.gznl.top/MDAwMA==/2021/11/dd1bd6f1-6079-46ab-8d0f-6a946048db9d.png" |
||||
/// score : 1 |
||||
/// actived : true |
||||
/// sort : 0 |
||||
/// isDelete : 0 |
||||
/// lessScore : "1" |
||||
/// rewardList : [{"id":"1464064141143572480","createTime":"2021-11-26 10:51:07","createUser":"1","updateTime":"2021-11-26 10:51:07","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":2,"refId":"10","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null},{"id":"1464064181471805440","createTime":"2021-11-26 10:51:17","createUser":"1","updateTime":"2021-11-26 10:51:17","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":2,"refId":"20","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null},{"id":"1464136057103581184","createTime":"2021-11-26 15:36:53","createUser":"1","updateTime":"2021-11-26 15:36:53","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":1,"refId":"888","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null}] |
||||
/// max : false |
||||
/// get : false |
||||
|
||||
class AchievementDetailList { |
||||
AchievementDetailList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String categoryId, |
||||
String name, |
||||
int level, |
||||
String icon, |
||||
int score, |
||||
bool actived, |
||||
int sort, |
||||
int isDelete, |
||||
String lessScore, |
||||
List<RewardList> rewardList, |
||||
bool max, |
||||
bool get,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_categoryId = categoryId; |
||||
_name = name; |
||||
_level = level; |
||||
_icon = icon; |
||||
_score = score; |
||||
_actived = actived; |
||||
_sort = sort; |
||||
_isDelete = isDelete; |
||||
_lessScore = lessScore; |
||||
_rewardList = rewardList; |
||||
_max = max; |
||||
_get = get; |
||||
} |
||||
|
||||
AchievementDetailList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_categoryId = json['categoryId']; |
||||
_name = json['name']; |
||||
_level = json['level']; |
||||
_icon = json['icon']; |
||||
_score = json['score']; |
||||
_actived = json['actived']; |
||||
_sort = json['sort']; |
||||
_isDelete = json['isDelete']; |
||||
_lessScore = json['lessScore']; |
||||
if (json['rewardList'] != null) { |
||||
_rewardList = []; |
||||
json['rewardList'].forEach((v) { |
||||
_rewardList.add(RewardList.fromJson(v)); |
||||
}); |
||||
} |
||||
_max = json['max']; |
||||
_get = json['get']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _categoryId; |
||||
String _name; |
||||
int _level; |
||||
String _icon; |
||||
int _score; |
||||
bool _actived; |
||||
int _sort; |
||||
int _isDelete; |
||||
String _lessScore; |
||||
List<RewardList> _rewardList; |
||||
bool _max; |
||||
bool _get; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get categoryId => _categoryId; |
||||
String get name => _name; |
||||
int get level => _level; |
||||
String get icon => _icon; |
||||
int get score => _score; |
||||
bool get actived => _actived; |
||||
int get sort => _sort; |
||||
int get isDelete => _isDelete; |
||||
String get lessScore => _lessScore; |
||||
List<RewardList> get rewardList => _rewardList; |
||||
bool get max => _max; |
||||
bool get get => _get; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['categoryId'] = _categoryId; |
||||
map['name'] = _name; |
||||
map['level'] = _level; |
||||
map['icon'] = _icon; |
||||
map['score'] = _score; |
||||
map['actived'] = _actived; |
||||
map['sort'] = _sort; |
||||
map['isDelete'] = _isDelete; |
||||
map['lessScore'] = _lessScore; |
||||
if (_rewardList != null) { |
||||
map['rewardList'] = _rewardList.map((v) => v.toJson()).toList(); |
||||
} |
||||
map['max'] = _max; |
||||
map['get'] = _get; |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// id : "1464064141143572480" |
||||
/// createTime : "2021-11-26 10:51:07" |
||||
/// createUser : "1" |
||||
/// updateTime : "2021-11-26 10:51:07" |
||||
/// updateUser : "1" |
||||
/// categoryId : "1460904379451179008" |
||||
/// achievementId : "1460450874352317701" |
||||
/// rewardType : 2 |
||||
/// refId : "10" |
||||
/// isDelete : 0 |
||||
/// achievementCategoryName : null |
||||
/// achievementName : null |
||||
/// couponName : null |
||||
|
||||
class RewardList { |
||||
RewardList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String categoryId, |
||||
String achievementId, |
||||
int rewardType, |
||||
String refId, |
||||
int isDelete, |
||||
dynamic achievementCategoryName, |
||||
dynamic achievementName, |
||||
dynamic couponName,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_categoryId = categoryId; |
||||
_achievementId = achievementId; |
||||
_rewardType = rewardType; |
||||
_refId = refId; |
||||
_isDelete = isDelete; |
||||
_achievementCategoryName = achievementCategoryName; |
||||
_achievementName = achievementName; |
||||
_couponName = couponName; |
||||
} |
||||
|
||||
RewardList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_categoryId = json['categoryId']; |
||||
_achievementId = json['achievementId']; |
||||
_rewardType = json['rewardType']; |
||||
_refId = json['refId']; |
||||
_isDelete = json['isDelete']; |
||||
_achievementCategoryName = json['achievementCategoryName']; |
||||
_achievementName = json['achievementName']; |
||||
_couponName = json['couponName']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _categoryId; |
||||
String _achievementId; |
||||
int _rewardType; |
||||
String _refId; |
||||
int _isDelete; |
||||
dynamic _achievementCategoryName; |
||||
dynamic _achievementName; |
||||
dynamic _couponName; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get categoryId => _categoryId; |
||||
String get achievementId => _achievementId; |
||||
int get rewardType => _rewardType; |
||||
String get refId => _refId; |
||||
int get isDelete => _isDelete; |
||||
dynamic get achievementCategoryName => _achievementCategoryName; |
||||
dynamic get achievementName => _achievementName; |
||||
dynamic get couponName => _couponName; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['categoryId'] = _categoryId; |
||||
map['achievementId'] = _achievementId; |
||||
map['rewardType'] = _rewardType; |
||||
map['refId'] = _refId; |
||||
map['isDelete'] = _isDelete; |
||||
map['achievementCategoryName'] = _achievementCategoryName; |
||||
map['achievementName'] = _achievementName; |
||||
map['couponName'] = _couponName; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,99 @@
|
||||
/// id : "1463790611994771456" |
||||
/// createTime : "2021-11-25 16:44:12" |
||||
/// createUser : "1" |
||||
/// updateTime : "2021-11-25 16:45:55" |
||||
/// updateUser : "1" |
||||
/// name : "一心回乡" |
||||
/// introduce : "22" |
||||
/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/899b578b-f594-42f7-91e1-cebc5dbc39da.png" |
||||
/// bannerImg : "https://pos.upload.gznl.top/0000/2021/11/7a41ebe2-d3b1-44ea-9cda-2e952b58d54c.png" |
||||
/// sort : 0 |
||||
/// isDelete : 0 |
||||
/// tenantCode : "admin" |
||||
|
||||
class HeadlinesList { |
||||
HeadlinesList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String name, |
||||
String introduce, |
||||
String coverImg, |
||||
String bannerImg, |
||||
int sort, |
||||
int isDelete, |
||||
String tenantCode,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_name = name; |
||||
_introduce = introduce; |
||||
_coverImg = coverImg; |
||||
_bannerImg = bannerImg; |
||||
_sort = sort; |
||||
_isDelete = isDelete; |
||||
_tenantCode = tenantCode; |
||||
} |
||||
|
||||
HeadlinesList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_name = json['name']; |
||||
_introduce = json['introduce']; |
||||
_coverImg = json['coverImg']; |
||||
_bannerImg = json['bannerImg']; |
||||
_sort = json['sort']; |
||||
_isDelete = json['isDelete']; |
||||
_tenantCode = json['tenantCode']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _name; |
||||
String _introduce; |
||||
String _coverImg; |
||||
String _bannerImg; |
||||
int _sort; |
||||
int _isDelete; |
||||
String _tenantCode; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get name => _name; |
||||
String get introduce => _introduce; |
||||
String get coverImg => _coverImg; |
||||
String get bannerImg => _bannerImg; |
||||
int get sort => _sort; |
||||
int get isDelete => _isDelete; |
||||
String get tenantCode => _tenantCode; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['name'] = _name; |
||||
map['introduce'] = _introduce; |
||||
map['coverImg'] = _coverImg; |
||||
map['bannerImg'] = _bannerImg; |
||||
map['sort'] = _sort; |
||||
map['isDelete'] = _isDelete; |
||||
map['tenantCode'] = _tenantCode; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,99 @@
|
||||
/// id : "1463790611994771456" |
||||
/// createTime : "2021-11-25 16:44:12" |
||||
/// createUser : "1" |
||||
/// updateTime : "2021-11-25 16:45:55" |
||||
/// updateUser : "1" |
||||
/// name : "一心回乡" |
||||
/// introduce : "22" |
||||
/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/899b578b-f594-42f7-91e1-cebc5dbc39da.png" |
||||
/// bannerImg : "https://pos.upload.gznl.top/0000/2021/11/7a41ebe2-d3b1-44ea-9cda-2e952b58d54c.png" |
||||
/// sort : 0 |
||||
/// isDelete : 0 |
||||
/// tenantCode : "admin" |
||||
|
||||
class HeadlinesListDetails { |
||||
HeadlinesListDetails({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String name, |
||||
String introduce, |
||||
String coverImg, |
||||
String bannerImg, |
||||
int sort, |
||||
int isDelete, |
||||
String tenantCode,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_name = name; |
||||
_introduce = introduce; |
||||
_coverImg = coverImg; |
||||
_bannerImg = bannerImg; |
||||
_sort = sort; |
||||
_isDelete = isDelete; |
||||
_tenantCode = tenantCode; |
||||
} |
||||
|
||||
HeadlinesListDetails.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_name = json['name']; |
||||
_introduce = json['introduce']; |
||||
_coverImg = json['coverImg']; |
||||
_bannerImg = json['bannerImg']; |
||||
_sort = json['sort']; |
||||
_isDelete = json['isDelete']; |
||||
_tenantCode = json['tenantCode']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _name; |
||||
String _introduce; |
||||
String _coverImg; |
||||
String _bannerImg; |
||||
int _sort; |
||||
int _isDelete; |
||||
String _tenantCode; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get name => _name; |
||||
String get introduce => _introduce; |
||||
String get coverImg => _coverImg; |
||||
String get bannerImg => _bannerImg; |
||||
int get sort => _sort; |
||||
int get isDelete => _isDelete; |
||||
String get tenantCode => _tenantCode; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['name'] = _name; |
||||
map['introduce'] = _introduce; |
||||
map['coverImg'] = _coverImg; |
||||
map['bannerImg'] = _bannerImg; |
||||
map['sort'] = _sort; |
||||
map['isDelete'] = _isDelete; |
||||
map['tenantCode'] = _tenantCode; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,73 @@
|
||||
/// id : "1438426197401796608" |
||||
/// phone : "18672306891" |
||||
/// nickname : "冬天的秘密" |
||||
/// headimg : "" |
||||
|
||||
class SecondCardList { |
||||
SecondCardList({ |
||||
String id, |
||||
String phone, |
||||
String nickname, |
||||
String headimg, |
||||
bool isAdd, |
||||
}) { |
||||
_id = id; |
||||
_phone = phone; |
||||
_nickname = nickname; |
||||
_headimg = headimg; |
||||
_isAdd = isAdd; |
||||
} |
||||
|
||||
SecondCardList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_phone = json['phone']; |
||||
_nickname = json['nickname']; |
||||
_headimg = json['headimg']; |
||||
} |
||||
|
||||
String _id; |
||||
String _phone; |
||||
String _nickname; |
||||
String _headimg; |
||||
bool _isAdd; |
||||
|
||||
String get id => _id; |
||||
|
||||
String get phone => _phone; |
||||
|
||||
String get nickname => _nickname; |
||||
|
||||
String get headimg => _headimg; |
||||
|
||||
bool get isAdd => _isAdd; |
||||
|
||||
set id(String value) { |
||||
_id = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['phone'] = _phone; |
||||
map['nickname'] = _nickname; |
||||
map['headimg'] = _headimg; |
||||
return map; |
||||
} |
||||
|
||||
set phone(String value) { |
||||
_phone = value; |
||||
} |
||||
|
||||
set nickname(String value) { |
||||
_nickname = value; |
||||
} |
||||
|
||||
set headimg(String value) { |
||||
_headimg = value; |
||||
} |
||||
|
||||
set isAdd(bool value) { |
||||
_isAdd = value; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,147 @@
|
||||
/// id : "1460164746211753984" |
||||
/// createTime : "2021-11-15 16:36:19" |
||||
/// createUser : "1" |
||||
/// updateTime : "2021-11-17 11:39:54" |
||||
/// updateUser : "1" |
||||
/// name : "签到" |
||||
/// eachReward : 8 |
||||
/// code : "SIGN" |
||||
/// icon : "https://pos.upload.gznl.top/admin/2021/11/93853f8d-ca0e-4c75-855b-d6245e4f6743.jpg" |
||||
/// actived : true |
||||
/// sort : 0 |
||||
/// isDelete : 0 |
||||
|
||||
class VipBadgesList { |
||||
VipBadgesList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String name, |
||||
int eachReward, |
||||
String code, |
||||
String icon, |
||||
bool actived, |
||||
int sort, |
||||
int isDelete,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_name = name; |
||||
_eachReward = eachReward; |
||||
_code = code; |
||||
_icon = icon; |
||||
_actived = actived; |
||||
_sort = sort; |
||||
_isDelete = isDelete; |
||||
} |
||||
|
||||
VipBadgesList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_name = json['name']; |
||||
_eachReward = json['eachReward']; |
||||
_code = json['code']; |
||||
_icon = json['icon']; |
||||
_actived = json['actived']; |
||||
_sort = json['sort']; |
||||
_isDelete = json['isDelete']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _name; |
||||
int _eachReward; |
||||
String _code; |
||||
String _icon; |
||||
bool _actived; |
||||
int _sort; |
||||
int _isDelete; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get name => _name; |
||||
int get eachReward => _eachReward; |
||||
String get code => _code; |
||||
String get icon => _icon; |
||||
bool get actived => _actived; |
||||
int get sort => _sort; |
||||
int get isDelete => _isDelete; |
||||
|
||||
|
||||
set id(String value) { |
||||
_id = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['name'] = _name; |
||||
map['eachReward'] = _eachReward; |
||||
map['code'] = _code; |
||||
map['icon'] = _icon; |
||||
map['actived'] = _actived; |
||||
map['sort'] = _sort; |
||||
map['isDelete'] = _isDelete; |
||||
return map; |
||||
} |
||||
|
||||
set createTime(String value) { |
||||
_createTime = value; |
||||
} |
||||
|
||||
set createUser(String value) { |
||||
_createUser = value; |
||||
} |
||||
|
||||
set updateTime(String value) { |
||||
_updateTime = value; |
||||
} |
||||
|
||||
set updateUser(String value) { |
||||
_updateUser = value; |
||||
} |
||||
|
||||
set name(String value) { |
||||
_name = value; |
||||
} |
||||
|
||||
set eachReward(int value) { |
||||
_eachReward = value; |
||||
} |
||||
|
||||
set code(String value) { |
||||
_code = value; |
||||
} |
||||
|
||||
set icon(String value) { |
||||
_icon = value; |
||||
} |
||||
|
||||
set actived(bool value) { |
||||
_actived = value; |
||||
} |
||||
|
||||
set sort(int value) { |
||||
_sort = value; |
||||
} |
||||
|
||||
set isDelete(int value) { |
||||
_isDelete = value; |
||||
} |
||||
} |
@ -0,0 +1,127 @@
|
||||
/// id : "5" |
||||
/// createTime : "2021-11-18 14:11:34" |
||||
/// createUser : "1" |
||||
/// updateTime : "2021-11-24 14:37:30" |
||||
/// updateUser : "1" |
||||
/// code : "DEPUTY" |
||||
/// name : "副卡" |
||||
/// icon : "https://pos.upload.gznl.top/MDAwMA==/2021/11/fb1e46d2-6213-4164-abbc-9aa24da24faf.png" |
||||
/// iconGrey : "https://pos.upload.gznl.top/MDAwMA==/2021/11/f50d211a-3d52-4663-bf8a-c4dff4f79310.png" |
||||
/// introduce : "<p>用户在成为金卡会员/共创会员之后, 即可经行副卡绑定。点击添加新副卡,输入需要绑定的用户手机号,输入需要绑定用户的手机号,输入验证码,验证通过后,即可绑定成功。点击头像右下方的解除,出现提示弹窗,点击确认即可解除绑定。</p>" |
||||
/// describes : "<ul>\n<li>副卡用户必须为平台注册用户</li>\n<li>每位主卡用户只可绑定5位副卡用户,同时,只能解绑3次</li>\n<li>副卡享受主卡的部分权益,主卡会员失效之后,副卡也失效</li>\n<li>副卡成为金卡会员后,自动与主卡解绑</li>\n</ul>" |
||||
/// actived : false |
||||
/// sort : 4 |
||||
/// isDelete : 0 |
||||
/// have : true |
||||
/// config : "5" |
||||
|
||||
class VipBenefitList { |
||||
VipBenefitList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String code, |
||||
String name, |
||||
String icon, |
||||
String iconGrey, |
||||
String introduce, |
||||
String describes, |
||||
bool actived, |
||||
int sort, |
||||
int isDelete, |
||||
bool have, |
||||
String config,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_code = code; |
||||
_name = name; |
||||
_icon = icon; |
||||
_iconGrey = iconGrey; |
||||
_introduce = introduce; |
||||
_describes = describes; |
||||
_actived = actived; |
||||
_sort = sort; |
||||
_isDelete = isDelete; |
||||
_have = have; |
||||
_config = config; |
||||
} |
||||
|
||||
VipBenefitList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_code = json['code']; |
||||
_name = json['name']; |
||||
_icon = json['icon']; |
||||
_iconGrey = json['iconGrey']; |
||||
_introduce = json['introduce']; |
||||
_describes = json['describes']; |
||||
_actived = json['actived']; |
||||
_sort = json['sort']; |
||||
_isDelete = json['isDelete']; |
||||
_have = json['have']; |
||||
_config = json['config']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _code; |
||||
String _name; |
||||
String _icon; |
||||
String _iconGrey; |
||||
String _introduce; |
||||
String _describes; |
||||
bool _actived; |
||||
int _sort; |
||||
int _isDelete; |
||||
bool _have; |
||||
String _config; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get code => _code; |
||||
String get name => _name; |
||||
String get icon => _icon; |
||||
String get iconGrey => _iconGrey; |
||||
String get introduce => _introduce; |
||||
String get describes => _describes; |
||||
bool get actived => _actived; |
||||
int get sort => _sort; |
||||
int get isDelete => _isDelete; |
||||
bool get have => _have; |
||||
String get config => _config; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['code'] = _code; |
||||
map['name'] = _name; |
||||
map['icon'] = _icon; |
||||
map['iconGrey'] = _iconGrey; |
||||
map['introduce'] = _introduce; |
||||
map['describes'] = _describes; |
||||
map['actived'] = _actived; |
||||
map['sort'] = _sort; |
||||
map['isDelete'] = _isDelete; |
||||
map['have'] = _have; |
||||
map['config'] = _config; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,57 @@
|
||||
/// rule : "" |
||||
/// contrast : "" |
||||
/// qa : "" |
||||
|
||||
class VipRuleDetails { |
||||
VipRuleDetails({ |
||||
String rule, |
||||
String contrast, |
||||
String qa, |
||||
String recharge,}){ |
||||
_rule = rule; |
||||
_contrast = contrast; |
||||
_qa = qa; |
||||
_recharge = recharge; |
||||
} |
||||
|
||||
VipRuleDetails.fromJson(dynamic json) { |
||||
_rule = json['rule']; |
||||
_contrast = json['contrast']; |
||||
_qa = json['qa']; |
||||
_recharge = json['recharge']; |
||||
} |
||||
String _rule; |
||||
String _contrast; |
||||
String _qa; |
||||
String _recharge; |
||||
|
||||
String get rule => _rule; |
||||
String get contrast => _contrast; |
||||
String get qa => _qa; |
||||
String get recharge => _recharge; |
||||
|
||||
|
||||
set rule(String value) { |
||||
_rule = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['rule'] = _rule; |
||||
map['contrast'] = _contrast; |
||||
map['qa'] = _qa; |
||||
return map; |
||||
} |
||||
|
||||
set contrast(String value) { |
||||
_contrast = value; |
||||
} |
||||
|
||||
set qa(String value) { |
||||
_qa = value; |
||||
} |
||||
|
||||
set recharge(String value) { |
||||
_recharge = value; |
||||
} |
||||
} |
@ -0,0 +1,104 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/utils/flutter_utils.dart'; |
||||
import 'package:huixiang/utils/font_weight.dart'; |
||||
import 'package:huixiang/view_widget/round_button.dart'; |
||||
|
||||
import 'custom_image.dart'; |
||||
import 'my_appbar.dart'; |
||||
|
||||
class BadgeAttainmentDialog extends StatefulWidget { |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _BadgeAttainmentDialog(); |
||||
} |
||||
|
||||
} |
||||
|
||||
class _BadgeAttainmentDialog extends State<BadgeAttainmentDialog> { |
||||
Widget build(BuildContext context) { |
||||
return Scaffold( |
||||
backgroundColor:Colors.transparent, |
||||
appBar: MyAppBar( |
||||
title:"", |
||||
titleColor: Colors.white, |
||||
leadingColor: Colors.white, |
||||
background: Colors.transparent, |
||||
), |
||||
body: Container( |
||||
alignment:Alignment.center, |
||||
child: Column( |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
mainAxisAlignment: MainAxisAlignment.center, |
||||
children: [ |
||||
Text( |
||||
"恭喜您解锁新成就", |
||||
style: TextStyle( |
||||
color: Color(0xFFFFFFFF), |
||||
fontSize: 20.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
), |
||||
), |
||||
MImage( |
||||
"assets/image/by_badge.png", |
||||
width: 248, |
||||
height: 248, |
||||
// fit: BoxFit.cover, |
||||
errorSrc: "assets/image/default_1.png", |
||||
fadeSrc: "assets/image/default_1.png", |
||||
), |
||||
Text( |
||||
"累计消费¥500", |
||||
style: TextStyle( |
||||
color: Color(0xFFFFFFFF), |
||||
fontSize: 24.sp, |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
), |
||||
), |
||||
Text( |
||||
"获得消费白银徽章", |
||||
style: TextStyle( |
||||
color: Color(0xFFFFFFFF), |
||||
fontSize: 16.sp, |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
), |
||||
), |
||||
Container( |
||||
margin: EdgeInsets.only(top:16), |
||||
width: 76, |
||||
height: 26.h, |
||||
alignment: Alignment.center, |
||||
decoration: BoxDecoration( |
||||
borderRadius: |
||||
BorderRadius.circular(18), |
||||
color: Colors.white, |
||||
), |
||||
child: Row( |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
mainAxisAlignment: MainAxisAlignment.center, |
||||
children: [ |
||||
Image.asset( |
||||
"assets/image/icon_gold_coin.png", |
||||
width: 20, |
||||
height: 20, |
||||
), |
||||
Text( |
||||
"+10", |
||||
style: TextStyle( |
||||
fontSize: 12.sp, |
||||
fontWeight: MyFontWeight.medium, |
||||
color: Color(0xFF634815), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,131 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
||||
import 'package:huixiang/generated/l10n.dart'; |
||||
import 'package:huixiang/utils/flutter_utils.dart'; |
||||
import 'package:huixiang/utils/font_weight.dart'; |
||||
import 'package:huixiang/view_widget/round_button.dart'; |
||||
|
||||
import 'custom_image.dart'; |
||||
import 'my_appbar.dart'; |
||||
|
||||
class ReceivingMethodDialog extends StatefulWidget { |
||||
final int takeType; |
||||
final Function changeTakeType; |
||||
|
||||
ReceivingMethodDialog(this.takeType,this.changeTakeType); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ReceivingMethodDialog(); |
||||
} |
||||
|
||||
} |
||||
|
||||
class _ReceivingMethodDialog extends State<ReceivingMethodDialog> { |
||||
|
||||
|
||||
Widget build(BuildContext context) { |
||||
return Container( |
||||
alignment:Alignment.bottomCenter, |
||||
child: Column( |
||||
crossAxisAlignment: CrossAxisAlignment.end, |
||||
mainAxisAlignment: MainAxisAlignment.end, |
||||
children: [ |
||||
Container( |
||||
margin: |
||||
EdgeInsets.only(top: 26, bottom: 8), |
||||
// alignment: Alignment.center, |
||||
padding: EdgeInsets.only(top: 20,bottom:20), |
||||
decoration: BoxDecoration( |
||||
color: Colors.white, |
||||
boxShadow: [ |
||||
BoxShadow( |
||||
color: Colors.black.withAlpha(12), |
||||
offset: Offset(0, 3), |
||||
blurRadius: 14, |
||||
spreadRadius: 0, |
||||
) |
||||
], |
||||
borderRadius: BorderRadius.all(Radius.circular(8)), |
||||
), |
||||
child: Column( |
||||
children: [ |
||||
Text( |
||||
"请选择商品的领取方式", |
||||
style: TextStyle( |
||||
fontSize: 14.sp, |
||||
fontWeight: MyFontWeight.regular, |
||||
color: Color(0xFFA29E9E), |
||||
), |
||||
), |
||||
Container( |
||||
margin: EdgeInsets.only(top:20,bottom: 20), |
||||
height:1, |
||||
color:Color(0xFFF4F4F4), |
||||
), |
||||
GestureDetector( |
||||
onTap:(){ |
||||
widget.changeTakeType(1); |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child: Text( |
||||
S.of(context).ziti, |
||||
style: TextStyle( |
||||
fontSize: 16.sp, |
||||
fontWeight: widget.takeType == 1 ? MyFontWeight.semi_bold : MyFontWeight.medium, |
||||
color: widget.takeType == 1 ? Color(0xFF32A060):Color(0xFFA29E9E), |
||||
), |
||||
), |
||||
), |
||||
Container( |
||||
margin: EdgeInsets.only(top: 20,bottom: 20), |
||||
height:1, |
||||
color:Color(0xFFF4F4F4), |
||||
), |
||||
GestureDetector( |
||||
onTap:(){ |
||||
widget.changeTakeType(2); |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child:Text( |
||||
"物流配送", |
||||
style: TextStyle( |
||||
fontSize: 16.sp, |
||||
fontWeight: widget.takeType == 2 ? MyFontWeight.semi_bold : MyFontWeight.medium, |
||||
color: widget.takeType == 2 ? Color(0xFF32A060):Color(0xFFA29E9E), |
||||
), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
GestureDetector( |
||||
onTap: (){ |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child:Container( |
||||
margin: EdgeInsets.only(top:16), |
||||
height:68.h, |
||||
alignment: Alignment.center, |
||||
decoration: BoxDecoration( |
||||
borderRadius: |
||||
BorderRadius.circular(18), |
||||
color: Color(0xFF32A060), |
||||
), |
||||
child: |
||||
Text( |
||||
S.of(context).quxiao, |
||||
style: TextStyle( |
||||
fontSize: 18.sp, |
||||
fontWeight: MyFontWeight.semi_bold, |
||||
color: Colors.white, |
||||
), |
||||
) |
||||
), |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
} |
Loading…
Reference in new issue