Browse Source

图片优化更改

ff_new
w-R 3 years ago
parent
commit
7ac70eedbe
  1. 17
      lib/community/community_page.dart
  2. 22
      lib/community/community_view/community_dynamic.dart
  3. 185
      lib/mine/mine_page.dart
  4. 4
      lib/store/store_order.dart

17
lib/community/community_page.dart

@ -82,12 +82,17 @@ class _CommunityPage extends State<CommunityPage>
onTap: () {
_toRelease();
},
action: SvgPicture.asset(
"assets/svg/shequ_fabu.svg",
fit: BoxFit.contain,
width: 24,
height: 24,
),
action: GestureDetector(
behavior: HitTestBehavior.opaque,
child: Container(color: Colors.transparent,
padding: EdgeInsets.only(left: 20,right: 20),
child: SvgPicture.asset(
"assets/svg/shequ_fabu.svg",
fit: BoxFit.contain,
width: 24,
height: 24,
),)
)
),
body: Container(
padding: EdgeInsets.only(bottom: 76.h),

22
lib/community/community_view/community_dynamic.dart

@ -174,17 +174,13 @@ class _CommunityDynamic extends State<CommunityDynamic> {
children: [
GestureDetector(
onTap: (){
if(widget?.article?.authorHeadImg == ""){
SmartDialog.showToast("用户暂未设置头像", alignment: Alignment.center);
return;
}
Navigator.push(context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen(
images:[widget?.article?.authorHeadImg ?? ""],//list
images:[widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"],//list
index: 0,//index
), ));
},
child: MImage(
widget?.article?.authorHeadImg ?? "",
(widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg") + "?imageView2/1/w/200/h/200/format/jpg/q/75",
width: 44,
height: 44,
isCircle: true,
@ -356,11 +352,11 @@ class _CommunityDynamic extends State<CommunityDynamic> {
), ), );
},
child: MImage(
cnt["images"][0],
cnt["images"][0].replaceAll(".jpg",".jpg?imageView2/0/q/75"),
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
width: MediaQuery.of(context).size.width / 1.5,
height: MediaQuery.of(context).size.width / 1.5,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
)),
@ -390,7 +386,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
), ), );
},
child: MImage(
cnt["images"][position],
cnt["images"][position].replaceAll(".jpg",".jpg?imageView2/0/q/75"),
fit: BoxFit.cover,
aspectRatio: 1,
radius: BorderRadius.circular(1),
@ -411,7 +407,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
? (MediaQuery.of(context).size.width - 32) /
videoPlayerController.value.aspectRatio
: MediaQuery.of(context).size.width / 2,
!widget.isList ? cnt["video"] : widget.article.coverImg,
cnt["video"].replaceAll(".mp4","_poster.jpg"),
);
}
return Column(
@ -463,8 +459,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
height: height,
))
: Container(
width: width,
height: width / 7 * 5,
width: MediaQuery.of(context).size.width,
height:MediaQuery.of(context).size.width,
color: Colors.black,
child: Stack(
children: [

185
lib/mine/mine_page.dart

@ -53,12 +53,9 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
@override
void dispose() {
super.dispose();
if (_refreshController != null)
_refreshController.dispose();
if (_refreshController != null) _refreshController.dispose();
}
@override
void initState() {
super.initState();
@ -118,7 +115,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
EasyLoading.dismiss();
}
_onRefresh(){
_onRefresh() {
queryUserInfo();
querySocialInfo();
}
@ -134,7 +131,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
);
BaseData<SocialInfo> baseData =
await apiService.socialInfo().catchError((onError) {
await apiService.socialInfo().catchError((onError) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
@ -203,9 +200,12 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
tag: "vip",
ranks: ranks,
userInfo: userInfo,
rank: double.tryParse(userInfo?.expendAmount??"0").toInt(),
rankMax: userInfo?.memberRankVo?.nextOrigin??0,
createTime: userInfo?.createTime??"",
rank: double.tryParse(
userInfo?.expendAmount ?? "0")
.toInt(),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0,
createTime: userInfo?.createTime ?? "",
),
],
),
@ -309,10 +309,10 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
}
/////
Widget attention(){
Widget attention() {
return Container(
margin: EdgeInsets.only(left: 16,top: 10,right: 16),
padding: EdgeInsets.only(top: 16,bottom: 16),
margin: EdgeInsets.only(left: 16, top: 10, right: 16),
// padding: EdgeInsets.only(top: 16,bottom: 16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
@ -325,36 +325,35 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
),
],
),
child:GestureDetector(
onTap:(){
Navigator.of(context).pushNamed(
'/router/communityFollow',
arguments: {},
);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap:(){
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/communityFollow',
arguments: {},
);
},
child:
Column(
child: Container(
color: Colors.transparent,
padding: EdgeInsets.all(16),
child: Column(
children: [
Text(
infoNumber != null ?infoNumber.follow.toString() :"0",
infoNumber != null ? infoNumber.follow.toString() : "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(height:4,),
SizedBox(
height: 4,
),
Text(
S.of(context).guanzhu,
style: TextStyle(
@ -364,70 +363,86 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
),
),
],
),
)),
),
GestureDetector(
onTap:(){
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/communityFollow',
arguments: {},
);
},
child:
Column(
children: [
Text(
infoNumber != null ?infoNumber.fans.toString() :"0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(height:4,),
Text(
S.of(context).fensi,
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
child: Container(
color: Colors.transparent,
padding: EdgeInsets.all(16),
child: Column(
children: [
Text(
infoNumber != null ? infoNumber.fans.toString() : "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
height: 4,
),
Text(
S.of(context).fensi,
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)),
),
GestureDetector(
onTap:(){
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo":userInfo},
);
},
child:
Column(
children: [
Text(
infoNumber != null ?infoNumber.achievementNumber.toString() :"0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(height:4,),
Text(
"成就",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo": userInfo},
);
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.all(16),
child: Column(
children: [
Text(
infoNumber != null
? infoNumber.achievementNumber.toString()
: "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
height: 4,
),
Text(
"成就",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
],
),
),
],
),
)),
)
],
),
);
}

4
lib/store/store_order.dart

@ -243,10 +243,14 @@ class _StoreOrderPage extends State<StoreOrderPage>
stretch: false,
brightness: Brightness.light,
leading: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.transparent,
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(10),

Loading…
Cancel
Save