Browse Source

android 社群更改

remove_uniapp
w-R 3 years ago
parent
commit
f09145f731
  1. 183
      lib/community/community_view/community_dynamic.dart
  2. 9
      lib/main.dart
  3. 54
      lib/mine/mine_view/wallet_coupon_view.dart
  4. 2
      lib/mine/personal_page.dart
  5. 8
      lib/retrofit/min_api.dart
  6. 2
      lib/retrofit/min_api.g.dart
  7. 8
      lib/retrofit/retrofit_api.dart
  8. 2
      lib/retrofit/retrofit_api.g.dart

183
lib/community/community_view/community_dynamic.dart

@ -151,7 +151,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
margin: EdgeInsets.only(top: 2), margin: EdgeInsets.only(top: 2),
key: globalKey, key: globalKey,
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
padding: EdgeInsets.all(16), padding: EdgeInsets.only(left: 16,top: 16,right: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
@ -333,12 +333,16 @@ class _CommunityDynamic extends State<CommunityDynamic> {
height: 5.h, height: 5.h,
), ),
if (!widget.isDetails) if (!widget.isDetails)
Row( Container(
// padding: EdgeInsets.only(bottom: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Row( child: Container(
padding: EdgeInsets.only(bottom: 16),
child:Row(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@ -361,33 +365,37 @@ class _CommunityDynamic extends State<CommunityDynamic> {
), ),
), ),
], ],
), )),
), ),
Expanded( Expanded(
child: Row( child:Container(
// mainAxisAlignment: MainAxisAlignment.center, padding: EdgeInsets.only(bottom: 16),
// crossAxisAlignment: CrossAxisAlignment.center, child:Row(
children: [ // mainAxisAlignment: MainAxisAlignment.center,
SvgPicture.asset( // crossAxisAlignment: CrossAxisAlignment.center,
"assets/svg/pinglun.svg", children: [
width: 16, SvgPicture.asset(
height: 16, "assets/svg/pinglun.svg",
), width: 16,
SizedBox( height: 16,
width: 5, ),
), SizedBox(
Text( width: 5,
"${widget.article.comments ?? 0}", ),
style: TextStyle( Text(
fontSize: 14.sp, "${widget.article.comments ?? 0}",
fontWeight: MyFontWeight.regular, style: TextStyle(
color: Color(0xFF1A1A1A), fontSize: 14.sp,
), fontWeight: MyFontWeight.regular,
), color: Color(0xFF1A1A1A),
], ),
)), ),
],
))),
Expanded( Expanded(
child: Row( child:Container(
padding: EdgeInsets.only(bottom: 16),
child:Row(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@ -408,31 +416,32 @@ class _CommunityDynamic extends State<CommunityDynamic> {
), ),
), ),
], ],
), )),
), ),
if (widget?.article?.author != widget.userId ?? "") if (widget?.article?.author != widget.userId ?? "")
Expanded( Expanded(
child: GestureDetector( child: GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
setState(() { setState(() {
choiceShowBottomSheet(); choiceShowBottomSheet();
}); });
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top:3), padding: EdgeInsets.only(top:3,bottom: 16),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( // color: Colors.red,
"...", child: Text(
style: TextStyle( "...",
fontSize: 18.sp, style: TextStyle(
fontWeight: MyFontWeight.medium, fontSize: 18.sp,
color: Colors.black, fontWeight: MyFontWeight.medium,
color: Colors.black,
),
), ),
), ))),
))),
], ],
), ),),
], ],
), ),
), ),
@ -774,45 +783,45 @@ class _CommunityDynamic extends State<CommunityDynamic> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
// GestureDetector( GestureDetector(
// onTap: () { onTap: () {
// setState(() { setState(() {
// Navigator.of(context).pop(); // Navigator.of(context).pop();
// share(); // share();
// }); });
// }, },
// child: Container( child: Container(
// child: Row( child: Row(
// children: [ children: [
// SizedBox( SizedBox(
// width: 4, width: 4,
// ), ),
// Image.asset( Image.asset(
// "assets/image/icon_share.webp", "assets/image/icon_share.webp",
// fit: BoxFit.cover, fit: BoxFit.cover,
// width: 25, width: 25,
// height: 25, height: 25,
// color: Color(0xff515151), color: Color(0xff515151),
// ), ),
// SizedBox( SizedBox(
// width: 12, width: 12,
// ), ),
// Text( Text(
// "分享", "分享",
// style: TextStyle( style: TextStyle(
// fontSize: 17.sp, fontSize: 17.sp,
// fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFF1A1A1A), color: Color(0xFF1A1A1A),
// ), ),
// ), ),
// ], ],
// ), ),
// )), )),
// Container( Container(
// margin: EdgeInsets.symmetric(vertical: 12), margin: EdgeInsets.symmetric(vertical: 12),
// height: 1.h, height: 1.h,
// color: Color(0xFFF7F7F7), color: Color(0xFFF7F7F7),
// ), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {

9
lib/main.dart

@ -131,6 +131,8 @@ final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();
EventBus eventBus = EventBus(sync: true); EventBus eventBus = EventBus(sync: true);
Route lastRoutePage;//
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
final Locale appLocale; final Locale appLocale;
final bool isFirst; final bool isFirst;
@ -186,6 +188,12 @@ class MyApp extends StatelessWidget {
), ),
onGenerateRoute: (settings) { onGenerateRoute: (settings) {
final String name = settings.name; final String name = settings.name;
if(lastRoutePage?.settings?.name == name){//
if(lastRoutePage?.settings?.name == "/router/personal_page"//
&& lastRoutePage.navigator != null)//退
lastRoutePage.navigator.pop();//退退,
}
final Function pageContentBuilder = routers[name]; final Function pageContentBuilder = routers[name];
if (pageContentBuilder != null) { if (pageContentBuilder != null) {
final Route route = CupertinoPageRoute( final Route route = CupertinoPageRoute(
@ -195,6 +203,7 @@ class MyApp extends StatelessWidget {
}, },
settings: settings, settings: settings,
); );
lastRoutePage = route;
return route; return route;
} }
return MaterialPageRoute( return MaterialPageRoute(

54
lib/mine/mine_view/wallet_coupon_view.dart

@ -31,7 +31,59 @@ class _WalletCoupon extends State<WalletCoupon> {
), ),
], ],
), ),
child: Row( child: (Theme.of(context).platform == TargetPlatform.android)
? GestureDetector(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/roll_center_page');
});
},
child: Row(
children: [
Image.asset(
"assets/image/icon_mine_invoice_assistant.webp",
width: 48.h,
height: 48.h,
),
SizedBox(
width: 12.w,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).lingquanzhongxin,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Color(0xFF353535),
),
),
SizedBox(
height: 3,
),
Text(
"联盟下单享不停、海量优惠券等你来领!",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
color: Color(0xFF7B7B7B),
),
),
],
),
)
],
))
: Row(
children: [ children: [
Expanded( Expanded(
flex: 1, flex: 1,

2
lib/mine/personal_page.dart

@ -4,7 +4,6 @@ import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart';
import 'package:huixiang/community/photo_view_gallery_screen.dart'; import 'package:huixiang/community/photo_view_gallery_screen.dart';
@ -14,7 +13,6 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/comunity_comment.dart'; import 'package:huixiang/retrofit/data/comunity_comment.dart';
import 'package:huixiang/retrofit/data/member_Infor.dart'; import 'package:huixiang/retrofit/data/member_Infor.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/social_info.dart';
import 'package:huixiang/retrofit/data/upload_result.dart'; import 'package:huixiang/retrofit/data/upload_result.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';

8
lib/retrofit/min_api.dart

@ -21,15 +21,15 @@ import 'data/shoppingCart.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
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";/// // const base_url = "http://192.168.10.236:8775/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";/// // const baseUrl = "http://192.168.10.236:8775/app/";///
// const base_url = "http://192.168.10.143:8765/app/";/// // const base_url = "http://192.168.10.143:8765/app/";///

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.236:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

8
lib/retrofit/retrofit_api.dart

@ -58,14 +58,14 @@ import 'data/vip_rule_details.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
const base_url = "http://192.168.10.236:8776/app/"; /// // const base_url = "http://192.168.10.236:8776/app/"; ///
const baseUrl = "http://192.168.10.236:8776/app/"; /// // const baseUrl = "http://192.168.10.236:8776/app/"; ///
// 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/";

2
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.236:8776/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

Loading…
Cancel
Save