Browse Source

Merge branch 'remove_uniapp' into dev

# Conflicts:
#	lib/main.dart
zyh
w-R 3 years ago
parent
commit
2f815cc3e2
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 45
      lib/community/community_view/community_dynamic.dart
  3. 93
      lib/community/photo_view_gallery_screen.dart
  4. 2
      lib/community/release_dynamic.dart
  5. 2
      lib/integral/intergra_view/integral_vip.dart
  6. 3
      lib/integral_store/integral_store_details_page.dart
  7. 11
      lib/main.dart
  8. 6
      lib/mine/fans_page.dart
  9. 21
      lib/mine/mine_page.dart
  10. 59
      lib/mine/mine_view/mine_view.dart
  11. 201
      lib/mine/mine_vip/mine_vip_core.dart
  12. 3
      lib/mine/user_info_page.dart
  13. 8
      lib/retrofit/min_api.dart
  14. 2
      lib/retrofit/min_api.g.dart
  15. 8
      lib/retrofit/retrofit_api.dart
  16. 8
      lib/retrofit/retrofit_api.g.dart
  17. 2
      lib/view_widget/hot_item.dart
  18. 4
      lib/view_widget/icon_text.dart
  19. 4
      lib/view_widget/message_item.dart
  20. 1
      lib/view_widget/mine_vip_view.dart
  21. 2
      pubspec.lock
  22. 2
      pubspec.yaml

12
ios/Runner.xcodeproj/project.pbxproj

@ -930,7 +930,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 54; CURRENT_PROJECT_VERSION = 59;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -980,7 +980,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.54; MARKETING_VERSION = 1.0.59;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -1168,7 +1168,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 54; CURRENT_PROJECT_VERSION = 59;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -1218,7 +1218,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.54; MARKETING_VERSION = 1.0.59;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -1297,7 +1297,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 54; CURRENT_PROJECT_VERSION = 59;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -1347,7 +1347,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.54; MARKETING_VERSION = 1.0.59;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",

45
lib/community/community_view/community_dynamic.dart

@ -14,9 +14,13 @@ import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:image_pickers/image_pickers.dart'; import 'package:image_pickers/image_pickers.dart';
import 'package:photo_view/photo_view.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:video_player/video_player.dart'; import 'package:video_player/video_player.dart';
import '../photo_view_gallery_screen.dart';
class CommunityDynamic extends StatefulWidget { class CommunityDynamic extends StatefulWidget {
final int itemCount; final int itemCount;
final Function(double height) heightFun; final Function(double height) heightFun;
@ -166,14 +170,22 @@ class _CommunityDynamic extends State<CommunityDynamic> {
height: 44, height: 44,
child: Row( child: Row(
children: [ children: [
MImage( GestureDetector(
widget?.comment?.memberInfo?.avatar ?? "", onTap: (){
width: 44, Navigator.push(context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen(
height: 44, images:[widget?.comment?.memberInfo?.avatar ?? ""],//list
isCircle: true, index: 0,//index
fit: BoxFit.cover, ), ), );
errorSrc: "assets/image/default_1.png", },
fadeSrc: "assets/image/default_1.png", child: MImage(
widget?.comment?.memberInfo?.avatar ?? "",
width: 44,
height: 44,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
), ),
SizedBox( SizedBox(
width: 8, width: 8,
@ -221,11 +233,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
width: 56.w, width: 56.w,
height: 25.h, height: 25.h,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(11.w),
color: Color(0xFF32A060),
),
child: RoundButton( child: RoundButton(
height: 25.h,
backgroup: (widget.comment.selfFollow ?? false) backgroup: (widget.comment.selfFollow ?? false)
? Color(0xFFE6E6E6) ? Color(0xFFE6E6E6)
: Color(0xFF32A060), : Color(0xFF32A060),
@ -334,10 +343,15 @@ class _CommunityDynamic extends State<CommunityDynamic> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
ImagePickers.previewImages(subjectInfo.images,0); ImagePickers.previewImages(subjectInfo.images,0);
// Navigator.push(context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen(
// images:subjectInfo.images,//list
// index: 0,//index
// ), ), );
}, },
child: MImage( child: MImage(
subjectInfo.images[0], subjectInfo.images[0],
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(2),
width: MediaQuery.of(context).size.width / 1.5, width: MediaQuery.of(context).size.width / 1.5,
height: MediaQuery.of(context).size.width / 1.5, height: MediaQuery.of(context).size.width / 1.5,
errorSrc: "assets/image/default_2_1.png", errorSrc: "assets/image/default_2_1.png",
@ -362,12 +376,17 @@ class _CommunityDynamic extends State<CommunityDynamic> {
return Container( return Container(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
ImagePickers.previewImages(subjectInfo.images, position); // ImagePickers.previewImages(subjectInfo.images, position);
Navigator.push(context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen(
images:subjectInfo.images,//list
index: position,//index
), ), );
}, },
child: MImage( child: MImage(
subjectInfo.images[position], subjectInfo.images[position],
fit: BoxFit.cover, fit: BoxFit.cover,
aspectRatio: 1, aspectRatio: 1,
radius: BorderRadius.circular(1),
errorSrc: "assets/image/default_2_1.png", errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png",
), ),

93
lib/community/photo_view_gallery_screen.dart

@ -0,0 +1,93 @@
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';
class PhotoViewGalleryScreen extends StatefulWidget {
List images=[];
int index=0;
String heroTag;
PageController controller;
PhotoViewGalleryScreen({Key key,@required this.images,this.index,this.controller,this.heroTag}) : super(key: key){
controller=PageController(initialPage: index);
}
@override
_PhotoViewGalleryScreenState createState() => _PhotoViewGalleryScreenState();
}
class _PhotoViewGalleryScreenState extends State<PhotoViewGalleryScreen> {
int currentIndex=0;
@override
void initState() {
// TODO: implement initState
super.initState();
currentIndex=widget.index;
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
Positioned(
top: 0,
left: 0,
bottom: 0,
right: 0,
child: Container(
child: PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions(
imageProvider: NetworkImage(widget.images[index]),
);
},
itemCount: widget.images.length,
loadingBuilder: (context, progress) => Center(
child: Container(
width: 20.0,
height: 20.0,
child: CircularProgressIndicator(
value: progress == null
? null
: progress.cumulativeBytesLoaded /
progress.expectedTotalBytes,
),
),
),
backgroundDecoration: null,
pageController: widget.controller,
enableRotation: true,
onPageChanged: (index){
setState(() {
currentIndex=index;
});
},
)
),
),
Positioned(//index显示
top: MediaQuery.of(context).padding.top+15,
width: MediaQuery.of(context).size.width,
child: Center(
child: Text("${currentIndex+1}/${widget.images.length}",style: TextStyle(color: Colors.white,fontSize: 16)),
),
),
Positioned(//
right: 10,
top: MediaQuery.of(context).padding.top,
child: IconButton(
icon: Icon(Icons.close,size: 30,color: Colors.white,),
onPressed: (){
Navigator.of(context).pop();
},
),
),
],
),
);
}
}

2
lib/community/release_dynamic.dart

@ -186,7 +186,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
} else { } else {
thumbnail = await Thumbnails.getThumbnail( thumbnail = await Thumbnails.getThumbnail(
videoFile: file.path, videoFile: file.path,
imageType: ThumbFormat.WEBP, imageType: ThumbFormat.JPEG,
quality: 10, quality: 10,
); );
} }

2
lib/integral/intergra_view/integral_vip.dart

@ -44,7 +44,7 @@ class _IntegralVip extends State<IntegralVip> {
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15.w), margin: EdgeInsets.only(left: 15.w),
height: 50.h, height: 53.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

3
lib/integral_store/integral_store_details_page.dart

@ -12,6 +12,7 @@ import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -296,7 +297,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return goods == null return goods == null
? Container() ? Container()
: Image.network( : MImage(
goods.viceImgPaths.elementAt(position), goods.viceImgPaths.elementAt(position),
fit: BoxFit.cover, fit: BoxFit.cover,
) )

11
lib/main.dart

@ -51,14 +51,6 @@ import 'package:huixiang/setting/help_feedback_page.dart';
import 'package:huixiang/setting/permission_setting_page.dart'; import 'package:huixiang/setting/permission_setting_page.dart';
import 'package:huixiang/setting/setting_page.dart'; import 'package:huixiang/setting/setting_page.dart';
import 'package:huixiang/setting/treaty_page.dart'; import 'package:huixiang/setting/treaty_page.dart';
import 'package:huixiang/store/shopping/activity_prefecture_details.dart';
import 'package:huixiang/store/shopping/shopping_cart/shopping_cart_page.dart';
import 'package:huixiang/store/shopping/shopping_goods_details.dart';
import 'package:huixiang/store/shopping/shopping_home/bargain_details.dart';
import 'package:huixiang/store/shopping/shopping_home/group_details.dart';
import 'package:huixiang/store/shopping/shopping_home/group_page_details.dart';
import 'package:huixiang/store/shopping/shopping_home/search_page.dart';
import 'package:huixiang/store/shopping/shopping_mall_home.dart';
import 'package:huixiang/store/store_order.dart'; import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/settlement/settlement.dart'; import 'package:huixiang/settlement/settlement.dart';
import 'package:huixiang/test_page.dart'; import 'package:huixiang/test_page.dart';
@ -78,6 +70,7 @@ import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'community/community_view/class_details.dart'; import 'community/community_view/class_details.dart';
import 'community/headlines/headlines_column_details.dart'; import 'community/headlines/headlines_column_details.dart';
import 'community/photo_view_gallery_screen.dart';
import 'home/guide_page.dart'; import 'home/guide_page.dart';
import 'home/home_view/activity_list.dart'; import 'home/home_view/activity_list.dart';
import 'main_page.dart'; import 'main_page.dart';
@ -350,4 +343,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
BargainDetails(), BargainDetails(),
'/router/group_page_details': (context, {arguments}) => '/router/group_page_details': (context, {arguments}) =>
GroupPageDetails(), GroupPageDetails(),
'/router/photo_view_gallery_screen': (context, {arguments}) =>
PhotoViewGalleryScreen(),
}; };

6
lib/mine/fans_page.dart

@ -167,9 +167,9 @@ class _FansPage extends State<FansPage> {
width: 56.w, width: 56.w,
height: 25.h, height: 25.h,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(11.w), // borderRadius: BorderRadius.circular(11.w),
), // ),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {

21
lib/mine/mine_page.dart

@ -7,9 +7,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_order.dart'; import 'package:huixiang/mine/mine_view/mine_order.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/comunity_comment.dart';
import 'package:huixiang/retrofit/data/rank.dart'; import 'package:huixiang/retrofit/data/rank.dart';
import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/retrofit/data/social_info.dart'; import 'package:huixiang/retrofit/data/social_info.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
@ -55,9 +53,12 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
if (_refreshController != null) _refreshController.dispose(); if (_refreshController != null)
_refreshController.dispose();
} }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -117,6 +118,11 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
_onRefresh(){
queryUserInfo();
querySocialInfo();
}
///(//) ///(//)
querySocialInfo() async { querySocialInfo() async {
SharedPreferences value = await SharedPreferences.getInstance(); SharedPreferences value = await SharedPreferences.getInstance();
@ -128,9 +134,12 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
); );
BaseData<SocialInfo> baseData = BaseData<SocialInfo> baseData =
await apiService.socialInfo().catchError((onError) {}); await apiService.socialInfo().catchError((onError) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
infoNumber = baseData.data; infoNumber = baseData.data;
_refreshController.refreshCompleted();
} }
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
@ -150,7 +159,9 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
header: MyHeader(), header: MyHeader(),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
onRefresh: () { onRefresh: () {
setState(() {}); setState(() {
_onRefresh();
});
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(

59
lib/mine/mine_view/mine_view.dart

@ -98,7 +98,12 @@ class _MineView extends State<MineView> {
String tableId = uri.queryParameters["tableId"]; String tableId = uri.queryParameters["tableId"];
String tenantCode = uri.queryParameters["tenantCode"]; String tenantCode = uri.queryParameters["tenantCode"];
String shopId = uri.queryParameters["shopId"]; String shopId = uri.queryParameters["shopId"];
if (tableId != null && tableId != "" && tenantCode != null && tenantCode != "" && shopId != null && shopId != "") { if (tableId != null &&
tableId != "" &&
tenantCode != null &&
tenantCode != "" &&
shopId != null &&
shopId != "") {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/store_order', '/router/store_order',
arguments: { arguments: {
@ -156,7 +161,7 @@ class _MineView extends State<MineView> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(
height: 50.h, height: 53.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
@ -211,7 +216,7 @@ class _MineView extends State<MineView> {
: Text( : Text(
widget.userInfo == null widget.userInfo == null
? "" ? ""
: "NO.${widget.userInfo.vipNo}", : "我的积分:${widget.userInfo.points}",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -236,28 +241,34 @@ class _MineView extends State<MineView> {
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
height: 50.h, height: 50.h,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
widget.toIntegralPage(); widget.toIntegralPage();
}, },
child: Row( child: Container(
mainAxisAlignment: MainAxisAlignment.end, padding: EdgeInsets.only(top: 4, bottom: 4, right: 16,left: 7),
children: [ decoration: BoxDecoration(
Text( color: Color(0xFF87E8B0),
S.of(context).jifenxiangqing, borderRadius: BorderRadius.only(topLeft: Radius.circular(100),bottomLeft:Radius.circular(100)),
style: TextStyle( ),
color: Colors.black, child: Row(
fontSize: 12.sp, mainAxisAlignment: MainAxisAlignment.end,
fontWeight: MyFontWeight.semi_bold, children: [
), Text(
S.of(context).jifenxiangqing,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
Icon(
Icons.keyboard_arrow_right,
size: 16,
color: Colors.black,
)
],
), ),
Icon( )),
Icons.keyboard_arrow_right,
size: 16,
color: Colors.black,
)
],
),
),
), ),
], ],
), ),

201
lib/mine/mine_vip/mine_vip_core.dart

@ -152,28 +152,30 @@ class _MineVipCore extends State<MineVipCore> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
children: [ color: Color(0xFFF7F7F7),
Container( child: Stack(
// padding: EdgeInsets.only(top: 40.h), children: [
height:260.h, Container(
decoration: BoxDecoration( // padding: EdgeInsets.only(top: 40.h),
gradient: new LinearGradient( height:260.h,
begin: Alignment.bottomCenter, decoration: BoxDecoration(
end: Alignment.topCenter, gradient: new LinearGradient(
colors: [ begin: Alignment.bottomCenter,
Color(0xFF000000), end: Alignment.topCenter,
Color(0xFF585858), colors: [
]), Color(0xFF000000),
// border: Border.all(color: Colors.white,width: 0.5), Color(0xFF585858),
shape: BoxShape.rectangle, ]),
borderRadius: BorderRadius.only( // border: Border.all(color: Colors.white,width: 0.5),
bottomRight: Radius.circular(35), shape: BoxShape.rectangle,
bottomLeft: Radius.circular(35), borderRadius: BorderRadius.only(
bottomRight: Radius.circular(35),
bottomLeft: Radius.circular(35),
),
),
), ),
), Column(
),
Column(
children: [ children: [
SizedBox(height: 40), SizedBox(height: 40),
Container( Container(
@ -232,48 +234,49 @@ class _MineVipCore extends State<MineVipCore> {
child: Column( child: Column(
children: [ children: [
/// ///
Container( if(ranks.length > 0)
height: (MediaQuery.of(context).size.width) / Container(
1.78 * height: (MediaQuery.of(context).size.width) /
AppUtils.textScale(context), 1.78 *
child: Swiper( AppUtils.textScale(context),
viewportFraction: 0.95, child: Swiper(
loop: false, viewportFraction: 0.95,
physics: BouncingScrollPhysics(), loop: false,
controller: controller, physics: BouncingScrollPhysics(),
onIndexChanged: (index) { controller: controller,
setState(() { onIndexChanged: (index) {
checkIndex = index; setState(() {
}); checkIndex = index;
}, });
itemBuilder: (context, position) { },
return MineVipView( itemBuilder: (context, position) {
vipLevel: !(ranks != null && ranks.isNotEmpty) return MineVipView(
? widget.arguments["rankLevel"] vipLevel: !(ranks != null && ranks.isNotEmpty)
: position + 1, ? widget.arguments["rankLevel"]
curLevel: widget.arguments["rankLevel"], : position + 1,
tag: (widget.arguments["rankLevel"] == (position + 1) || curLevel: widget.arguments["rankLevel"],
!(ranks != null && ranks.isNotEmpty)) tag: (widget.arguments["rankLevel"] == (position + 1) ||
? "vip" !(ranks != null && ranks.isNotEmpty))
: "", ? "vip"
padding: 6.w, : "",
// rank: !(ranks != null && ranks.isNotEmpty) padding: 6.w,
// ? 0 // rank: !(ranks != null && ranks.isNotEmpty)
// : widget.arguments["expendAmount"] ?? 0, // ? 0
rankMax: !(ranks != null && ranks.isNotEmpty) // : widget.arguments["expendAmount"] ?? 0,
? 0 rankMax: !(ranks != null && ranks.isNotEmpty)
: ranks[position].rankOrigin, ? 0
createTime: widget.arguments["createTime"], : ranks[position].rankOrigin,
showRank: false, createTime: widget.arguments["createTime"],
price: !(ranks != null && ranks.isNotEmpty) showRank: false,
? "0" price: !(ranks != null && ranks.isNotEmpty)
: ranks[position].price, ? "0"
); : ranks[position].price,
}, );
itemCount: },
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1, itemCount:
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1,
),
), ),
),
/// ///
Container( Container(
@ -528,45 +531,47 @@ class _MineVipCore extends State<MineVipCore> {
)), )),
], ],
), ),
if (ranks.length > checkIndex && if (ranks.length > checkIndex &&
widget.arguments["rankLevel"] < ranks[checkIndex].level && widget.arguments["rankLevel"] < ranks[checkIndex].level &&
ranks[checkIndex].price != "0.00") ranks[checkIndex].price != "0.00")
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
buyRank(); buyRank();
}); });
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( gradient: new LinearGradient(
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
colors: [ colors: [
Color(0xFFFFDCA1), Color(0xFFFFDCA1),
Color(0xFFFAE4C0), Color(0xFFFAE4C0),
]), ]),
), ),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
height: 54, height: 54,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"${S.of(context).lijikaitong}${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久", "${S.of(context).lijikaitong}${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFF4A4748), color: Color(0xFF4A4748),
),
),
), ),
), ),
), )
),
) ],
),
);
],
);
} }

3
lib/mine/user_info_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/cupertino_date_picker.dart'; import 'package:huixiang/view_widget/cupertino_date_picker.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:image_pickers/image_pickers.dart'; import 'package:image_pickers/image_pickers.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -410,7 +411,7 @@ class _UserInfoPage extends State<UserInfoPage> {
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
child: filePath == null || filePath == "" child: filePath == null || filePath == ""
? (modifyInfo["headimg"] != null && modifyInfo["headimg"] != "" ? (modifyInfo["headimg"] != null && modifyInfo["headimg"] != ""
? Image.network( ? MImage(
modifyInfo["headimg"], modifyInfo["headimg"],
width: 42, width: 42,
height: 42, height: 42,

8
lib/retrofit/min_api.dart

@ -25,8 +25,8 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.api.lotus-wallet.com/app/"; /// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
@ -38,8 +38,8 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
const base_url = "http://192.168.10.142:8765/app/";/// // const base_url = "http://192.168.10.142:8765/app/";///
const baseUrl = "http://192.168.10.142:8765/app/";/// // const baseUrl = "http://192.168.10.142:8765/app/";///
/// ///
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.142:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

8
lib/retrofit/retrofit_api.dart

@ -54,8 +54,8 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
@ -67,8 +67,8 @@ part 'retrofit_api.g.dart';
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
const base_url = "http://192.168.10.142:8766/app/";/// // const base_url = "http://192.168.10.142:8766/app/";///
const baseUrl = "http://192.168.10.142:8766/app/";/// // const baseUrl = "http://192.168.10.142:8766/app/";///
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)
abstract class ApiService { abstract class ApiService {

8
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.142:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;
@ -23,10 +23,14 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = FormData(); final _data = FormData();
String fileName = data.path.split(Platform.pathSeparator).last;
if(!fileName.contains(".jpeg") && !fileName.contains(".mp4") && !fileName.contains(".png"))
fileName += ".jpeg";
_data.files.add(MapEntry( _data.files.add(MapEntry(
'file', 'file',
MultipartFile.fromFileSync(data.path, MultipartFile.fromFileSync(data.path,
filename: data.path.split(Platform.pathSeparator).last))); filename: fileName)));
print("filename:$fileName");
if (folderId != null) { if (folderId != null) {
_data.fields.add(MapEntry('folderId', folderId.toString())); _data.fields.add(MapEntry('folderId', folderId.toString()));
} }

2
lib/view_widget/hot_item.dart

@ -176,7 +176,7 @@ class _HotArticleItem extends State<HotArticleItem> {
child:Stack( child:Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
Image.network( MImage(
widget.article?.coverImg ?? "", widget.article?.coverImg ?? "",
fit: BoxFit.fill, fit: BoxFit.fill,
height: double.infinity, height: double.infinity,

4
lib/view_widget/icon_text.dart

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'custom_image.dart';
class IconText extends StatelessWidget { class IconText extends StatelessWidget {
final String leftImage; final String leftImage;
final String rightImage; final String rightImage;
@ -48,7 +50,7 @@ class IconText extends StatelessWidget {
widgets.add(Padding( widgets.add(Padding(
padding: EdgeInsets.only(left: 2), padding: EdgeInsets.only(left: 2),
child: leftImage.startsWith("http") child: leftImage.startsWith("http")
? Image.network( ? MImage(
leftImage, leftImage,
width: iconSize, width: iconSize,
height: iconSize, height: iconSize,

4
lib/view_widget/message_item.dart

@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'custom_image.dart';
class MessageItem extends StatefulWidget { class MessageItem extends StatefulWidget {
final int stStatus; final int stStatus;
@ -19,7 +21,7 @@ class _MessageItemState extends State<MessageItem> {
if (widget.stStatus != 0) checkView(), if (widget.stStatus != 0) checkView(),
Container( Container(
margin: EdgeInsets.only(left: widget.stStatus == 0 ? 16 : 0), margin: EdgeInsets.only(left: widget.stStatus == 0 ? 16 : 0),
child: Image.network( child: MImage(
"https://t7.baidu.com/it/u=1297102096,3476971300&fm=193&f=GIF", "https://t7.baidu.com/it/u=1297102096,3476971300&fm=193&f=GIF",
width: 44.w, width: 44.w,
fit: BoxFit.cover, fit: BoxFit.cover,

1
lib/view_widget/mine_vip_view.dart

@ -331,7 +331,6 @@ class MineVipView extends StatelessWidget {
.pushNamed('/router/mine_vip_core', arguments: { .pushNamed('/router/mine_vip_core', arguments: {
"rankLevel": curLevel, "rankLevel": curLevel,
"userInfo":userInfo.masterCardRankName, "userInfo":userInfo.masterCardRankName,
"createTime": (userInfo != null) ? "${userInfo.createTime}" : "", "createTime": (userInfo != null) ? "${userInfo.createTime}" : "",
"expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(), "expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(),
}); });

2
pubspec.lock

@ -531,7 +531,7 @@ packages:
name: photo_view name: photo_view
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.11.1" version: "0.13.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:

2
pubspec.yaml

@ -70,7 +70,7 @@ dependencies:
flutter_html: ^2.1.5 #2.1.0 flutter_html: ^2.1.5 #2.1.0
chewie_audio: ^1.1.2 chewie_audio: ^1.1.2
photo_view: ^0.11.1 photo_view: ^0.13.0
video_player: ^2.2.3 video_player: ^2.2.3
thumbnails: ^1.0.1 thumbnails: ^1.0.1
# media_info: ^0.9.0 # media_info: ^0.9.0

Loading…
Cancel
Save