Browse Source

.sw,bug处理

ff_new
w-R 3 years ago
parent
commit
3b6845c547
  1. BIN
      assets/image/2x/activity_q.png
  2. BIN
      assets/image/3x/activity_q.png
  3. BIN
      assets/image/activity_q.png
  4. 30
      lib/community/headlines/activity_top_list.dart
  5. 16
      lib/community/headlines/article_page.dart
  6. 3
      lib/community/headlines/headlines_column_details.dart
  7. 13
      lib/home/home_page.dart
  8. 4
      lib/home/home_view/featured_acticvity.dart
  9. 6
      lib/message/system_details.dart
  10. 203
      lib/view_widget/activity_coupons.dart
  11. 11
      lib/view_widget/login_tips.dart
  12. 4
      lib/view_widget/new_people_reward.dart
  13. 7
      lib/view_widget/text_image_dialog.dart

BIN
assets/image/2x/activity_q.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
assets/image/3x/activity_q.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

BIN
assets/image/activity_q.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

30
lib/community/headlines/activity_top_list.dart

@ -60,7 +60,7 @@ class _ActivityTopList extends State<ActivityTopList> {
Widget headlinesCollectionItem(Article articles, index) {
return Container(
width: 320.w,
width: 340.w,
height: 220.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
@ -77,7 +77,9 @@ class _ActivityTopList extends State<ActivityTopList> {
margin: EdgeInsets.symmetric(
horizontal: 6,
),
child: Stack(
child:Column(
children: [
Stack(
alignment: Alignment.bottomLeft,
children: [
Stack(
@ -87,7 +89,7 @@ class _ActivityTopList extends State<ActivityTopList> {
opacity: 0.8,
child: MImage(
widget?.articleTop[index]?.coverImg ?? "",
width: 320.w,
width: 340.w,
height: 220.h,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
@ -129,9 +131,7 @@ class _ActivityTopList extends State<ActivityTopList> {
)),
],
),
Positioned(
top:130,
left: 12,
Padding(padding:EdgeInsets.only(left: 12.w, right: 12.w, bottom: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -140,26 +140,30 @@ class _ActivityTopList extends State<ActivityTopList> {
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 14.sp,
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.white,
),
),
Text(
SizedBox(height: 5.h),
Opacity(opacity:0.8,
child: Text(
widget?.articleTop[index]?.viceTitle ?? "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.white,
),
),
],
))
),)
],
)),
],
),
],
)
);
}
}

16
lib/community/headlines/article_page.dart

@ -18,6 +18,7 @@ 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/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
@ -247,6 +248,21 @@ class _ArticlePage extends State<ArticlePage>
SizedBox(height: 28),
Container(
width: double.infinity,
margin: EdgeInsets.only(left: 16,bottom:5),
child:Text(
"文章专栏",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.black,
),
)
),
///
HeadlinesCollection(headlines, articles),

3
lib/community/headlines/headlines_column_details.dart

@ -79,7 +79,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
"state": 1,
"type": 2,
"categoryId": categoryId,
"isHot":"",
"isHot":false,
}).catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();
@ -114,6 +114,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
children: [
Positioned(
child: Container(
color: Colors.white,
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,

13
lib/home/home_page.dart

@ -26,6 +26,7 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/activity_coupons.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/invite_success_dialog.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
@ -302,6 +303,8 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/system_msg_page');
///
// activityShowAlertDialog();
},
child: Container(
height: 24,
@ -523,6 +526,16 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
}
activityShowAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return ActivityCoupons();
},
);
}
@override
bool get wantKeepAlive => true;
}

4
lib/home/home_view/featured_acticvity.dart

@ -86,7 +86,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
image: NetworkImage(
activityList[0].coverImg,
),
fit: BoxFit.fill,
fit: BoxFit.cover,
),
),
),
@ -114,7 +114,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
image: NetworkImage(
activityList[1].coverImg,
),
fit: BoxFit.fill,
fit: BoxFit.cover,
),
),
),

6
lib/message/system_details.dart

@ -110,7 +110,7 @@ class _SystemDetails extends State<SystemDetails> {
///
_reply(messageRelational) {
var messageRelational = jsonDecode(messages[indexMsg].relational);
messageRelational["mid"].toString();
messageRelational["additionId"].toString();
hintText = S.of(context).huifu_("${messageRelational["nickname"]}");
}
@ -119,13 +119,11 @@ class _SystemDetails extends State<SystemDetails> {
var messageRelational = jsonDecode(messages[indexMsg].relational);
BaseData baseData = await apiService.memberComment({
"content": content,
"parentId": messageRelational["mid"].toString(),
"parentId": messageRelational["additionId"].toString(),
"relationalId":messageRelational["businessId"].toString(),
"relationalType":4
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
// CommentListState state = commentKey.currentState;
// state.queryMemberCommentList();
commentTextController.text = "";
FocusScope.of(context).unfocus();
Navigator.of(context).pop();

203
lib/view_widget/activity_coupons.dart

@ -0,0 +1,203 @@
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/retrofit/data/login_info.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
class ActivityCoupons extends StatefulWidget {
// final List<NewUserCouponList> newUserCouponList;
//
// ActivityCoupons(this.newUserCouponList);
@override
State<StatefulWidget> createState() {
return _ActivityCoupons();
}
}
class _ActivityCoupons extends State<ActivityCoupons> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top:150.h),
height: MediaQuery.of(context).size.height / 2,
child: Column(
children: [
Container(
width: double.infinity,
height:MediaQuery.of(context).size.height / 2,
padding: EdgeInsets.only(top: 210.h),
margin: EdgeInsets.only(top: 20.h, left: 20, right: 20),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/activity_q.png"),
),
),
child: Column(
children: [
Expanded(
child: reward(),
),
GestureDetector(
onTap: () {
Navigator.of(context).pop();
SmartDialog.showToast("领取成功",alignment: Alignment.center);
},
child: Container(
margin: EdgeInsets.only(
left: 60.w, right: 60.w, top: 20.h, bottom:20.h),
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFFDCA1),
Color(0xFFFAE4C0),
]),
borderRadius: BorderRadius.circular(22.5),
),
width: MediaQuery.of(context).size.width,
height: 40,
alignment: Alignment.center,
child: Text(
"立即领取",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF4A4748),
),
),
),
),
],
),
),
SizedBox(height: 35),
GestureDetector(
onTap: () {
setState(() {
Navigator.of(context).pop();
});
},
child: Image.asset(
"assets/image/yq_qx.png",
width: 34,
height: 34,
),
)
],
),
);
}
Widget reward() {
return ListView.builder(
padding: EdgeInsets.zero,
itemCount: 4,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: rewardItem(),
);
},
);
}
Widget rewardItem() {
return Container(
height: 69.h,
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/xin_rq.png"),
),
),
margin: EdgeInsets.symmetric(horizontal: 60, vertical: 5),
padding: EdgeInsets.only(left: 16.w, right: 25.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "¥",
style: TextStyle(
fontSize: 25.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFDE5F3B),
),
),
TextSpan(
// text: double.tryParse(
// "${newUserCouponList.discountAmount}" ?? "0")
// .toInt()
// .toString() ??
// "",
text: "10",
style: TextStyle(
fontSize: 35.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFDE5F3B),
),
),
],
),
),
Expanded(child:Padding(
padding: EdgeInsets.only(top: 4, bottom: 4,left:10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"海峡姐妹茶吧",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF181818),
),
),
Text(
"10元代金劵一张",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFD3623D),
),
),
Text(
// "有效期至:${(newUserCouponList.useEndTime != null && newUserCouponList.useEndTime != "")
// ? newUserCouponList.useEndTime.split(" ")[0]
// : "$newUserCouponList.useEndTime"}",
"有效期至:2021-07-30",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
)
],
))),
],
),
);
}
}

11
lib/view_widget/login_tips.dart

@ -19,8 +19,11 @@ class LoginTips extends StatelessWidget {
type: MaterialType.transparency,
child: Center(
child: Container(
width: 0.7867.sw,
height: 0.7867.sw / (Platform.isAndroid ? 0.86 : 0.9),
// width: 0.7867.sw,
// height: 0.7867.sw / (Platform.isAndroid ? 0.86 : 0.9),
width:double.infinity,
height:MediaQuery.of(context).size.width / 1,
margin: EdgeInsets.symmetric(horizontal:16.w),
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 24.w),
decoration: BoxDecoration(
color: Colors.white,
@ -33,8 +36,8 @@ class LoginTips extends StatelessWidget {
children: [
Image.asset(
"assets/image/icon_login_tips.png",
width: 0.7867.sw * 0.6,
height: 0.7867.sw * 0.6 * 0.7,
// width: 0.7867.sw * 0.6,
// height: 0.7867.sw * 0.6 * 0.7,
fit: BoxFit.fill,
),
SizedBox(

4
lib/view_widget/new_people_reward.dart

@ -1,12 +1,8 @@
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/retrofit/data/login_info.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
class NewPeopleReward extends StatefulWidget {
final List<NewUserCouponList> newUserCouponList;

7
lib/view_widget/text_image_dialog.dart

@ -37,7 +37,8 @@ class _TextImageWidget extends State<TextImageWidget> {
type: MaterialType.transparency,
child: Center(
child: Container(
width: widget.width ?? 0.7867.sw,
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal:16.w),
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 24.w),
decoration: BoxDecoration(
color: Colors.white,
@ -50,8 +51,8 @@ class _TextImageWidget extends State<TextImageWidget> {
children: [
Image.asset(
widget.src,
width: 0.7867.sw * 0.9,
height: 0.7867.sw * 0.9 * 0.7,
// width: 0.7867.sw * 0.9,
// height: 0.7867.sw * 0.9 * 0.7,
fit: BoxFit.fill,
),
SizedBox(

Loading…
Cancel
Save