Browse Source

版本提交优化

dart3_last
w-R 2 years ago
parent
commit
44c8b1c6e5
  1. 4
      lib/home/guide_page.dart
  2. 10
      lib/login/new_login_page.dart
  3. 2
      lib/main.dart
  4. 10
      lib/main_page.dart
  5. 5
      lib/mine/mine_page.dart
  6. 44
      lib/mine/mine_wallet_page.dart
  7. 31
      lib/retrofit/data/examine_instance.dart
  8. 4
      lib/retrofit/min_api.dart
  9. 4
      lib/retrofit/retrofit_api.dart
  10. 4
      lib/union/union_list.dart
  11. 3
      lib/web/web_page.dart
  12. 2
      pubspec.yaml

4
lib/home/guide_page.dart

@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
@ -23,7 +24,8 @@ class _GuidePage extends State<GuidePage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
// isLogin(); if(Platform.isAndroid&&!ExamineInstance.instance.isExamine)
isLogin();
} }
isLogin() async { isLogin() async {

10
lib/login/new_login_page.dart

@ -9,25 +9,18 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.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:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/retrofit/data/login_info.dart'; import 'package:huixiang/retrofit/data/login_info.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/user_entity.dart'; import 'package:huixiang/retrofit/data/user_entity.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart';
@ -223,6 +216,7 @@ class _NewLoginPage extends State<NewLoginPage> {
// EasyLoading.show(status: S.of(context).zhengzaijiazai); // EasyLoading.show(status: S.of(context).zhengzaijiazai);
if (value != null && value.isSuccess) { if (value != null && value.isSuccess) {
var userInfo = LoginInfo.fromJson(value.data); var userInfo = LoginInfo.fromJson(value.data);
ExamineInstance.instance.isExamine = userInfo.authInfo.account == "13800138000";
saveUserJson(userInfo.authInfo.toJson()); saveUserJson(userInfo.authInfo.toJson());
eventBus.fire(EventType(3)); eventBus.fire(EventType(3));

2
lib/main.dart

@ -46,6 +46,7 @@ import 'package:huixiang/order/write_off_success_page.dart';
import 'package:huixiang/qr/invite_friends.dart'; import 'package:huixiang/qr/invite_friends.dart';
import 'package:huixiang/qr/qr_code_scan.dart'; import 'package:huixiang/qr/qr_code_scan.dart';
import 'package:huixiang/qr/qr_share.dart'; import 'package:huixiang/qr/qr_share.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/setting/about_page.dart'; import 'package:huixiang/setting/about_page.dart';
import 'package:huixiang/setting/account_security_page.dart'; import 'package:huixiang/setting/account_security_page.dart';
import 'package:huixiang/setting/help_feedback_page.dart'; import 'package:huixiang/setting/help_feedback_page.dart';
@ -164,6 +165,7 @@ class MyApp extends StatelessWidget {
designSize: Size(375, 812), designSize: Size(375, 812),
builder: () => MaterialApp( builder: () => MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: Platform.isAndroid ? (ExamineInstance.instance.isExamine?"一心回乡":""):"",
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
textTheme: TextTheme( textTheme: TextTheme(

10
lib/main_page.dart

@ -14,6 +14,7 @@ import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_page.dart'; import 'package:huixiang/mine/mine_page.dart';
import 'package:huixiang/retrofit/data/app_update.dart'; import 'package:huixiang/retrofit/data/app_update.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.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/union/union_page.dart'; import 'package:huixiang/union/union_page.dart';
@ -127,9 +128,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
},invite:invite,interviewCouponList:interviewCouponList,firstLoginCouponList:firstLoginCouponList,), },invite:invite,interviewCouponList:interviewCouponList,firstLoginCouponList:firstLoginCouponList,),
// MainHomePage(), // MainHomePage(),
UnionPage(unionPageKey,0), UnionPage(unionPageKey,0),
// (Theme.of(context).platform == TargetPlatform.android) ? OrderPage() :CommunityPage(), Platform.isAndroid ? (ExamineInstance.instance.isExamine?OrderPage():CommunityPage()) :CommunityPage(),
CommunityPage(), // CommunityPage(),
// OrderPage(),
MinePage(minePageKey), MinePage(minePageKey),
]; ];
@ -424,8 +424,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
// bottomNavigationBigItem(S.of(context).pinpai, 0), // bottomNavigationBigItem(S.of(context).pinpai, 0),
bottomNavigationItem(S.of(context).main_menu1, 0), bottomNavigationItem(S.of(context).main_menu1, 0),
bottomNavigationItem(S.of(context).main_menu2, 1), bottomNavigationItem(S.of(context).main_menu2, 1),
bottomNavigationItem(S.of(context).main_menu3 , 2), // bottomNavigationItem(S.of(context).main_menu3 , 2),
// bottomNavigationItem("订单", 2), bottomNavigationItem(Platform.isAndroid ? (ExamineInstance.instance.isExamine?"订单":S.of(context).main_menu3) :S.of(context).main_menu3, 2),
bottomNavigationItem(S.of(context).main_menu4, 3), bottomNavigationItem(S.of(context).main_menu4, 3),
], ],
), ),

5
lib/mine/mine_page.dart

@ -1,4 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -8,6 +9,7 @@ import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart'; import 'package:huixiang/mine/mine_view/mine_calendar.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/examine_instance.dart';
import 'package:huixiang/retrofit/data/msg_stats.dart'; import 'package:huixiang/retrofit/data/msg_stats.dart';
import 'package:huixiang/retrofit/data/rank.dart'; import 'package:huixiang/retrofit/data/rank.dart';
import 'package:huixiang/retrofit/data/social_info.dart'; import 'package:huixiang/retrofit/data/social_info.dart';
@ -50,7 +52,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
.pushNamed('/router/new_login_page', arguments: {"login": "login"}); .pushNamed('/router/new_login_page', arguments: {"login": "login"});
return; return;
} }
// await Navigator.of(context).pushNamed('/router/user_info_page'); (Platform.isAndroid&&ExamineInstance.instance.isExamine)?
await Navigator.of(context).pushNamed('/router/user_info_page'):
await Navigator.of(context).pushNamed('/router/personal_page',arguments:{"memberId":"0",}); await Navigator.of(context).pushNamed('/router/personal_page',arguments:{"memberId":"0",});
setState(() {}); setState(() {});
} }

44
lib/mine/mine_wallet_page.dart

@ -1,10 +1,12 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flare_flutter/base/actor_ellipse.dart'; import 'package:flare_flutter/base/actor_ellipse.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/user_bill.dart'; import 'package:huixiang/retrofit/data/user_bill.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
@ -446,14 +448,14 @@ class _MineWalletPage extends State<MineWalletPage> {
//24.w, 24.h, 24.w, 24.h //24.w, 24.h, 24.w, 24.h
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 24, left: 24.w,
top: 24, top: 24.h,
), ),
child: Text( child: Text(
S.of(context).zongzichanyuan, S.of(context).zongzichanyuan,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 16, fontSize: 16.sp,
), ),
), ),
), ),
@ -462,13 +464,13 @@ class _MineWalletPage extends State<MineWalletPage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
width: 24, width: 24.w,
), ),
Text( Text(
"$pBalance", "$pBalance",
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 50, fontSize: 50.sp,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -501,7 +503,7 @@ class _MineWalletPage extends State<MineWalletPage> {
child: Text( child: Text(
S.of(context).chongzhi, S.of(context).chongzhi,
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
@ -517,11 +519,11 @@ class _MineWalletPage extends State<MineWalletPage> {
flex: 1, flex: 1,
), ),
SizedBox( SizedBox(
height: 22, height: 22.h,
), ),
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 24, horizontal: 24.w,
), ),
child: Row( child: Row(
children: [ children: [
@ -531,20 +533,20 @@ class _MineWalletPage extends State<MineWalletPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
S.of(context).yue, "${S.of(context).yue}(含活动)",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
), ),
SizedBox( SizedBox(
height: 4, height: 4.h,
), ),
Text( Text(
"$mBalance", "$mBalance",
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
@ -553,7 +555,7 @@ class _MineWalletPage extends State<MineWalletPage> {
), ),
), ),
SizedBox( SizedBox(
height: 8, height: 8.h,
), ),
Expanded( Expanded(
flex: 1, flex: 1,
@ -563,18 +565,18 @@ class _MineWalletPage extends State<MineWalletPage> {
Text( Text(
S.of(context).huodongyue, S.of(context).huodongyue,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
), ),
SizedBox( SizedBox(
height: 4, height: 4.h,
), ),
Text( Text(
"$activityMoney", "$activityMoney",
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
@ -583,7 +585,7 @@ class _MineWalletPage extends State<MineWalletPage> {
), ),
), ),
SizedBox( SizedBox(
height: 8, height: 8.h,
), ),
Expanded( Expanded(
flex: 1, flex: 1,
@ -593,18 +595,18 @@ class _MineWalletPage extends State<MineWalletPage> {
Text( Text(
S.of(context).lvbiyue, S.of(context).lvbiyue,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
), ),
SizedBox( SizedBox(
height: 4, height: 4.h,
), ),
Text( Text(
"$mgreenMoney", "$mgreenMoney",
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Colors.white,
), ),
@ -616,7 +618,7 @@ class _MineWalletPage extends State<MineWalletPage> {
), ),
), ),
SizedBox( SizedBox(
height: 24, height: 24.h,
), ),
], ],
), ),

31
lib/retrofit/data/examine_instance.dart

@ -0,0 +1,31 @@
class ExamineInstance{
factory ExamineInstance() => _getInstance();
static ExamineInstance get instance => _getInstance();
static ExamineInstance _instance;
bool _isExamine = true;
bool get isExamine =>
_isExamine;
set isExamine(bool value) {
this._isExamine = value;
}
ExamineInstance._internal(){
//
}
static ExamineInstance _getInstance(){
if(_instance == null){
_instance = ExamineInstance._internal();
}
return _instance;
}
}

4
lib/retrofit/min_api.dart

@ -26,8 +26,8 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const localBaseUrl = "http://192.168.10.129:8765/app/";/// const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

4
lib/retrofit/retrofit_api.dart

@ -61,8 +61,8 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const localBaseUrl = "http://192.168.10.129:8765/app/";/// const localBaseUrl = "http://192.168.10.78:8766/app/";///
const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)

4
lib/union/union_list.dart

@ -155,7 +155,7 @@ class _UnionList extends State<UnionList> {
) )
]), ]),
width: double.infinity, width: double.infinity,
height: 228.h, height: 235.h,
child: Stack( child: Stack(
children: [ children: [
Positioned( Positioned(
@ -187,7 +187,7 @@ class _UnionList extends State<UnionList> {
left: 12.w, left: 12.w,
right: 12.w, right: 12.w,
child: Container( child: Container(
height: 100.h, height: 107.h,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

3
lib/web/web_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/article.dart'; import 'package:huixiang/retrofit/data/article.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/share_dialog.dart'; import 'package:huixiang/view_widget/share_dialog.dart';
@ -276,6 +277,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
), ),
/// ///
if(Platform.isAndroid&&!ExamineInstance.instance.isExamine)
CommentList( CommentList(
commentKey, commentKey,
article?.likes ?? activity?.likes ?? 0, article?.likes ?? activity?.likes ?? 0,
@ -300,6 +302,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
), ),
/// ///
if(Platform.isAndroid&&!ExamineInstance.instance.isExamine)
InputComment( InputComment(
inputKey, inputKey,
hintText, hintText,

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.0.38+26 version: 3.1.4+28
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save