Browse Source

更新后的问题修改

dart3
fff 10 months ago
parent
commit
c586d5f18c
  1. 59
      android/app/build.gradle
  2. 25
      android/app/src/main/AndroidManifest.xml
  3. 1
      android/gradle.properties
  4. 20
      android/settings.gradle
  5. 7
      android/tmpmob/assets/ShareSDK.xml
  6. 352
      lib/home/guide_page.dart
  7. 8
      lib/home/home_page.dart
  8. 2
      lib/home/home_view/welfare_core.dart
  9. 362
      lib/login/new_login_page.dart
  10. 54
      lib/main_page.dart
  11. 298
      lib/setting/about_page.dart
  12. 34
      lib/setting/treaty_page.dart
  13. 2
      lib/view_widget/round_button.dart
  14. 6
      pubspec.lock
  15. 2
      pubspec.yaml

59
android/app/build.gradle

@ -2,7 +2,7 @@ plugins {
id "com.android.application" id "com.android.application"
id "kotlin-android" id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin" id "dev.flutter.flutter-gradle-plugin"
// id 'com.huawei.agconnect' id 'com.mob.sdk'
} }
def localProperties = new Properties() def localProperties = new Properties()
@ -98,4 +98,59 @@ flutter {
source '../..' source '../..'
} }
dependencies {} dependencies {
// classpath 'com.mob.sdk:MobSDK:+'
}
MobSDK {
appKey "m33ee7650da86a"
appSecret "876f2eaebfd2a88c89d5fc294397838c"
spEdition "fp"
ShareSDK {
devInfo {
Wechat {
id 4
sortId 4
appId "wx3b269e795ed23e5f"
appSecret "64020361b8ec4c99936c0e3999a9f249"
userName "gh_afb25ac019c9"
path "pages/index/index.html?id=1"
withShareTicket true
miniprogramType 0
bypassApproval false
enable true
}
WechatMoments {
id 3
sortId 3
appId "wx3b269e795ed23e5f"
appSecret "64020361b8ec4c99936c0e3999a9f249"
bypassApproval false
enable true
}
Facebook {
id 8
sortId 8
appKey "523308712059457"
appSecret "d3a1b6377100871799d8973fbe84794a"
callbackUri "https://mob.com"
shareByAppClient true
enable true
}
Line {
id 2
sortId 2
// appKey "1656257249"
// appSecret "7f160c9686672a50b5952364a8553f99"
appKey "1656257047"
appSecret "fd93cb8f12b285b80c7c67bdee8bd091"
callbackUri "https://mob.com"
callbackscheme "huixiang"
shareByAppClient true
enable true
}
}
}
}

25
android/app/src/main/AndroidManifest.xml

@ -51,11 +51,11 @@
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" /> android:resource="@style/NormalTheme" />
<meta-data <meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" /> android:value="true" />
<meta-data <meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable" android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/> android:resource="@drawable/launch_background"/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
@ -71,8 +71,8 @@
</intent-filter> </intent-filter>
</activity> </activity>
<meta-data <meta-data
android:name="XG_SERVER_SUFFIX" android:name="XG_SERVER_SUFFIX"
android:value="tpns.sh.tencent.com" /> android:value="tpns.sh.tencent.com" />
<meta-data <meta-data
android:name="com.baidu.lbsapi.API_KEY" android:name="com.baidu.lbsapi.API_KEY"
android:value="ak123" /> android:value="ak123" />
@ -81,16 +81,15 @@
android:value="2" /> android:value="2" />
<activity <activity
android:name="com.yalantis.ucrop.UCropActivity" android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>
<meta-data <meta-data
android:name="dcloud_appkey" android:name="dcloud_appkey"
android:value="" /> android:value="" />
<meta-data <meta-data
android:name="com.amap.api.v2.apikey" android:name="com.amap.api.v2.apikey"
android:value="f39d1daa020a56f208eb2519f63e9534"/> android:value="f39d1daa020a56f208eb2519f63e9534"/>
</application> </application>

1
android/gradle.properties

@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
MobSDK.spEdition=IZNAO

20
android/settings.gradle

@ -11,9 +11,22 @@ pluginManagement {
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories { repositories {
google() // google()
mavenCentral() // mavenCentral()
gradlePluginPortal() // gradlePluginPortal()
maven {
url 'https://maven.aliyun.com/repository/google'
}
maven {
url 'https://maven.aliyun.com/repository/jcenter'
}
maven { url "https://www.jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }
maven {
url "http://mvn.mob.com/android"
allowInsecureProtocol = true
}
} }
} }
@ -21,6 +34,7 @@ plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.mob.sdk" version "+" apply false
} }
include ":app" include ":app"

7
android/tmpmob/assets/ShareSDK.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DevInfor>
<Wechat Id="4" SortId="4" AppId="wx3b269e795ed23e5f" AppSecret="64020361b8ec4c99936c0e3999a9f249" Enable="true" BypassApproval="false" UserName="gh_afb25ac019c9" Path="pages/index/index.html?id=1" WithShareTicket="true" MiniprogramType="0" />
<WechatMoments Id="3" SortId="3" AppId="wx3b269e795ed23e5f" AppSecret="64020361b8ec4c99936c0e3999a9f249" Enable="true" BypassApproval="false" />
<Facebook Id="8" SortId="8" ShareByAppClient="true" Enable="true" ConsumerKey="523308712059457" ConsumerSecret="d3a1b6377100871799d8973fbe84794a" RedirectUrl="https://mob.com" />
<Line Id="2" SortId="2" AppKey="1656257047" ShareByAppClient="true" Enable="true" Callbackscheme="huixiang" ChannelID="null" ChannelSecret="fd93cb8f12b285b80c7c67bdee8bd091" RedirectUri="https://mob.com" />
</DevInfor>

352
lib/home/guide_page.dart

@ -1,8 +1,10 @@
import 'dart:io'; import 'dart:io';
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/utils/constant.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';
@ -18,12 +20,10 @@ class GuidePage extends StatefulWidget {
} }
class _GuidePage extends State<GuidePage> { class _GuidePage extends State<GuidePage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
if(Platform.isAndroid) if (Platform.isAndroid) isLogin();
isLogin();
} }
isLogin() async { isLogin() async {
@ -123,8 +123,10 @@ class _GuidePage extends State<GuidePage> {
children: [ children: [
Text( Text(
"", "",
style: style: TextStyle(
TextStyle(fontSize: 8.sp, color: Colors.black), fontSize: 8.sp,
color: Colors.black,
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
@ -132,7 +134,9 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
@ -140,7 +144,9 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
height: 108.h, height: 108.h,
@ -197,7 +203,8 @@ class _GuidePage extends State<GuidePage> {
fontSize: 16.sp, fontSize: 16.sp,
height: 1.5.h, height: 1.5.h,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0XFF727272)), color: Color(0XFF727272),
),
), ),
), ),
], ],
@ -211,15 +218,19 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
), ),
Text( Text(
"", "",
style: style: TextStyle(
TextStyle(fontSize: 8.sp, color: Colors.black), fontSize: 8.sp,
color: Colors.black,
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
@ -227,7 +238,9 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
height: 108.h, height: 108.h,
@ -245,7 +258,9 @@ class _GuidePage extends State<GuidePage> {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: 120.h, left: 19.w, right: 19.w), margin: EdgeInsets.only(
top: 120.h, left: 19.w, right: 19.w,
),
child: Stack( child: Stack(
children: [ children: [
Column( Column(
@ -284,7 +299,8 @@ class _GuidePage extends State<GuidePage> {
fontSize: 16.sp, fontSize: 16.sp,
height: 1.5.h, height: 1.5.h,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0XFF727272)), color: Color(0XFF727272),
),
), ),
), ),
], ],
@ -298,7 +314,9 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
@ -306,15 +324,19 @@ class _GuidePage extends State<GuidePage> {
Text( Text(
"", "",
style: TextStyle( style: TextStyle(
fontSize: 8.sp, color: Color(0xffB2B2B2)), fontSize: 8.sp,
color: Color(0xffB2B2B2),
),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
), ),
Text( Text(
"", "",
style: style: TextStyle(
TextStyle(fontSize: 8.sp, color: Colors.black), fontSize: 8.sp,
color: Colors.black,
),
), ),
SizedBox( SizedBox(
height: 108.h, height: 108.h,
@ -342,7 +364,9 @@ class _GuidePage extends State<GuidePage> {
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.width >= 650 ? 20.h :66.h, height: MediaQuery.of(context).size.width >= 650
? 20.h
: 66.h,
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -352,11 +376,14 @@ class _GuidePage extends State<GuidePage> {
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 24.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0XFF32A060)), color: Color(0XFF32A060),
),
), ),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.width >= 650 ? 15.h :23.h, height: MediaQuery.of(context).size.width >= 650
? 15.h
: 23.h,
), ),
Padding( Padding(
padding: EdgeInsets.only(left: 52.w, right: 52.w), padding: EdgeInsets.only(left: 52.w, right: 52.w),
@ -367,7 +394,8 @@ class _GuidePage extends State<GuidePage> {
fontSize: 16.sp, fontSize: 16.sp,
height: 1.5.h, height: 1.5.h,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0XFF727272)), color: Color(0XFF727272),
),
), ),
), ),
], ],
@ -381,7 +409,8 @@ class _GuidePage extends State<GuidePage> {
child: Container( child: Container(
height: 50.h, height: 50.h,
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 71.w, right: 71.w, bottom: 55.h), left: 71.w, right: 71.w, bottom: 55.h,
),
alignment: Alignment.center, alignment: Alignment.center,
child: BorderText( child: BorderText(
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
@ -400,165 +429,164 @@ class _GuidePage extends State<GuidePage> {
), ),
), ),
), ),
) ),
], ],
), ),
); );
} }
showAlertDialog() { showAlertDialog() {
// //
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return WillPopScope( return PopScope(
onWillPop: () async => false, canPop: true,
child:SimpleDialog( onPopInvoked: (isPop) {},
titlePadding: EdgeInsets.all(10), child: SimpleDialog(
backgroundColor: Colors.transparent, titlePadding: EdgeInsets.all(10),
elevation: 0, backgroundColor: Colors.transparent,
shape: RoundedRectangleBorder( elevation: 0,
borderRadius: BorderRadius.circular(6), shape: RoundedRectangleBorder(
), borderRadius: BorderRadius.circular(6),
children: <Widget>[ ),
Stack( children: <Widget>[
alignment: Alignment.bottomCenter, Container(
children: [ alignment: Alignment.center,
Container( width: double.infinity,
alignment: Alignment.center, height: 325.h,
width: double.infinity, padding: EdgeInsets.only(left: 16.w, right: 16.w),
height: 325.h, decoration: new BoxDecoration(
padding: EdgeInsets.only(left: 16.w, right: 16.w), color: Colors.white,
decoration: new BoxDecoration( borderRadius: BorderRadius.circular(8),
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
child: Text(
S.of(context).xieyitanchuang,
style: TextStyle(
color: Color(0xff4D4D4D),
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
),
Text.rich(
TextSpan(children: [
TextSpan(
text: S.of(context).yinsizhengce1,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.3.h,
color: Color(0xff727272),
),
),
TextSpan(
text: S.of(context).yinsixieyi,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xff32A060)),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context)
.popAndPushNamed('/router/treaty_page');
},
),
]),
),
SizedBox(
height: 10.h,
),
Text(
S.of(context).yinsizhengce2,
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.3.h,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
height: 16.h,
),
],
),
), ),
Row( child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GestureDetector( Padding(
onTap: () { padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
Navigator.of(context).pop(); child: Text(
// exit(0); S.of(context).xieyitanchuang,
}, style: TextStyle(
child: Container( color: Color(0xff4D4D4D),
height: 40.h, fontSize: 18.sp,
alignment: Alignment.bottomCenter, fontWeight: FontWeight.bold,
margin: EdgeInsets.only(bottom: 20.h),
child: BorderText(
padding: EdgeInsets.only(
top: 10.h,
bottom: 10.h,
left: 36.w,
right: 36.w,
),
text: S.of(context).jujue,
fontSize: 12.sp,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1.w,
radius: 23,
), ),
), ),
), ),
SizedBox( Expanded(
width: 21.w, child: SingleChildScrollView(
), child: Column(
Container( children: [
height: 40.h, Text.rich(
margin: EdgeInsets.only(bottom: 20.h), TextSpan(children: [
alignment: Alignment.bottomCenter, TextSpan(
child: RoundButton( text: S.of(context).yinsizhengce1,
text: S.of(context).tongyibingjixu, style: TextStyle(
textColor: Colors.white, fontWeight: MyFontWeight.medium,
fontSize: 12.sp, fontSize: 14.sp,
callback: () { height: 1.3.h,
SharedPreferences.getInstance().then((value) { color: Color(0xff727272),
value.setBool("isShowPrivacyPolicy", true); ),
}); ),
SharesdkPlugin.uploadPrivacyPermissionStatus( TextSpan(
1, text: S.of(context).yinsixieyi,
(success) => { style: TextStyle(
Navigator.of(context).pop(), fontWeight: MyFontWeight.medium,
}, fontSize: 14.sp,
); color: Color(0xff32A060),
}, ),
padding: EdgeInsets.only( recognizer: TapGestureRecognizer()
top: 10.h, ..onTap = () {
bottom: 10.h, Navigator.of(context)
left: 21.5.w, .popAndPushNamed('/router/treaty_page');
right: 21.5.w, },
),
]),
),
10.d,
Text(
S.of(context).yinsizhengce2,
textAlign: TextAlign.justify,
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.3.h,
fontWeight: MyFontWeight.medium,
),
),
],
), ),
backgroup: Color(0xff32A060),
radius: 23,
), ),
), ),
SizedBox( 16.d,
height: 20.h, Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
// Navigator.of(context).pop();
exit(0);
},
child: Container(
height: 40.h,
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 20.h),
child: BorderText(
padding: EdgeInsets.only(
top: 10.h,
bottom: 10.h,
left: 24.w,
right: 24.w,
),
text: S.of(context).jujue,
fontSize: 12.sp,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1.w,
radius: 23,
),
),
),
15.vd,
Expanded(
child: Container(
height: 40.h,
margin: EdgeInsets.only(bottom: 20.h),
alignment: Alignment.bottomCenter,
child: RoundButton(
text: S.of(context).tongyibingjixu,
textColor: Colors.white,
fontSize: 12.sp,
callback: () {
SharedPreferences.getInstance().then((value) {
value.setBool("isShowPrivacyPolicy", true);
});
SharesdkPlugin.uploadPrivacyPermissionStatus(
1,
(success) {
Navigator.of(context).pop();
},
);
},
padding: EdgeInsets.only(
top: 10.h,
bottom: 10.h,
left: 21.5.w,
right: 21.5.w,
),
backgroup: Color(0xff32A060),
radius: 23,
),
),
),
],
), ),
], ],
), ),
], ),
) ],
], ),
)); );
}, },
); );
} }

8
lib/home/home_page.dart

@ -475,8 +475,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}), }),
///广 ///广
if(activityBannerData.length > 0) if (activityBannerData.length > 0)
spread(), spread(),
// /// // ///
// SignView(isSigned, (value) { // SignView(isSigned, (value) {
@ -571,7 +571,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
), ),
autoplay: true, autoplay: true,
duration: 1000, duration: 1000,
autoplayDelay: 2000, autoplayDelay: 3000,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return InkWell( return InkWell(
@ -668,7 +668,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
), ),
autoplay: true, autoplay: true,
duration: 1000, duration: 1000,
autoplayDelay: 2000, autoplayDelay: 2500,
itemBuilder: (context, position) { itemBuilder: (context, position) {
return InkWell( return InkWell(
onTap: () { onTap: () {

2
lib/home/home_view/welfare_core.dart

@ -71,7 +71,7 @@ class _WelfareCore extends State<WelfareCore> {
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 75.h, height: 76.h,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,

362
lib/login/new_login_page.dart

@ -12,7 +12,6 @@ import 'package:huixiang/data/channels.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/examine_instance.dart'; import 'package:huixiang/data/examine_instance.dart';
import 'package:huixiang/data/login_info.dart';
import 'package:huixiang/data/user_entity.dart'; import 'package:huixiang/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';
@ -65,15 +64,16 @@ class _NewLoginPage extends State<NewLoginPage> {
isLogin(); isLogin();
} }
queryChannels() async{ queryChannels() async {
BaseData<Channels>? baseData = await apiService?.appChannels().catchError((error) { BaseData<Channels>? baseData =
await apiService?.appChannels().catchError((error) {
print(error.message); print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center); alignment: Alignment.center);
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
channelsList = baseData!.data; channelsList = baseData!.data;
setState((){}); setState(() {});
} else { } else {
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center);
} }
@ -216,9 +216,11 @@ class _NewLoginPage extends State<NewLoginPage> {
"mobile": mobile, "mobile": mobile,
"invite": invite, "invite": invite,
"areaCode": area, "areaCode": area,
"regChannel":channelName ?? "" "regChannel": channelName ?? ""
}; };
EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); EasyLoading.show(
status: S.of(context).zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
BaseData? value = await apiService?.memberLogin(param).catchError((error) { BaseData? value = await apiService?.memberLogin(param).catchError((error) {
print(error.message); print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
@ -227,7 +229,8 @@ class _NewLoginPage extends State<NewLoginPage> {
// EasyLoading.show(status: S.of(context).zhengzaijiazai); // EasyLoading.show(status: S.of(context).zhengzaijiazai);
if (value?.isSuccess ?? false) { if (value?.isSuccess ?? false) {
var userInfo = value!.data; var userInfo = value!.data;
ExamineInstance.instance.isExamine = userInfo.authInfo?.account == "13800138000"; ExamineInstance.instance.isExamine =
userInfo.authInfo?.account == "13800138000";
saveUserJson(userInfo.authInfo?.toJson()); saveUserJson(userInfo.authInfo?.toJson());
eventBus.fire(EventType(3)); eventBus.fire(EventType(3));
@ -265,7 +268,8 @@ class _NewLoginPage extends State<NewLoginPage> {
if (sharedPreferences.containsKey('token') && if (sharedPreferences.containsKey('token') &&
sharedPreferences.getString("token") != null && sharedPreferences.getString("token") != null &&
sharedPreferences.getString("token") != "") { sharedPreferences.getString("token") != "") {
ExamineInstance.instance.isExamine = sharedPreferences.getString("mobile") == "13800138000"; ExamineInstance.instance.isExamine =
sharedPreferences.getString("mobile") == "13800138000";
Navigator.of(context).popAndPushNamed('/router/main_page'); Navigator.of(context).popAndPushNamed('/router/main_page');
} else { } else {
apiService = ApiService(Dio(), context: context); apiService = ApiService(Dio(), context: context);
@ -275,7 +279,6 @@ class _NewLoginPage extends State<NewLoginPage> {
} }
} }
@override @override
void dispose() { void dispose() {
if (_timer?.isActive ?? true) { if (_timer?.isActive ?? true) {
@ -287,51 +290,52 @@ class _NewLoginPage extends State<NewLoginPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
body: GestureDetector( body: GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
onTap: () { onTap: () {
FocusScope.of(context).requestFocus(FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
}, },
child: AnimatedCrossFade( child: AnimatedCrossFade(
firstChild: Container( firstChild: Container(
color: Colors.white, color: Colors.white,
child: Image.asset( child: Image.asset(
"assets/image/ic_splash_bg.webp", "assets/image/ic_splash_bg.webp",
fit: BoxFit.fill, fit: BoxFit.fill,
),
), ),
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) {
return Stack(
clipBehavior: Clip.none,
children: <Widget>[
Positioned(
key: keySecond,
left: 0.0,
top: 0.0,
right: 0.0,
bottom: 0.0,
child: widgetSecond,
),
Positioned(
key: keyFirst,
left: 0.0,
top: 0.0,
right: 0.0,
bottom: 0.0,
child: widgetFirst,
),
],
);
},
secondChild: substance(),
firstCurve: Curves.easeInQuart,
secondCurve: Curves.easeInQuart,
crossFadeState: isShowLogin
? CrossFadeState.showSecond
: CrossFadeState.showFirst,
duration: Duration(milliseconds: Platform.isIOS ? 1000 : 1000),
), ),
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) {
return Stack(
clipBehavior: Clip.none,
children: <Widget>[
Positioned(
key: keySecond,
left: 0.0,
top: 0.0,
right: 0.0,
bottom: 0.0,
child: widgetSecond,
),
Positioned(
key: keyFirst,
left: 0.0,
top: 0.0,
right: 0.0,
bottom: 0.0,
child: widgetFirst,
),
],
);
},
secondChild: substance(),
firstCurve: Curves.easeInQuart,
secondCurve: Curves.easeInQuart,
crossFadeState:
isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst,
duration: Duration(milliseconds: Platform.isIOS ? 1000 : 1000),
), ),
),
); );
} }
@ -353,9 +357,10 @@ class _NewLoginPage extends State<NewLoginPage> {
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16.w, left: 16.w,
top: 45.h + MediaQuery.of(context).padding.top, top: 45.h + MediaQuery.of(context).padding.top,
right: 12.w), right: 12.w,
),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -395,24 +400,25 @@ class _NewLoginPage extends State<NewLoginPage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed('/router/phone_address_page') .pushNamed('/router/phone_address_page')
.then((value) { .then((value) {
if (value != null) if (value != null)
setState(() { setState(() {
area = value as String; area = value as String;
}); });
}); });
}, },
child: Text( child: Text(
area, area,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFF1A1A1A), color: Color(0xFF1A1A1A),
), ),
)), ),
),
Icon( Icon(
Icons.keyboard_arrow_right, Icons.keyboard_arrow_right,
size: 18, size: 18,
@ -421,7 +427,9 @@ class _NewLoginPage extends State<NewLoginPage> {
Container( Container(
height: 30.h, height: 30.h,
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:5.h), margin: EdgeInsets.only(
bottom: Platform.isIOS ? 10.h : 5.h,
),
child: TextField( child: TextField(
style: TextStyle( style: TextStyle(
height: 1.h, height: 1.h,
@ -598,50 +606,59 @@ class _NewLoginPage extends State<NewLoginPage> {
height: 30.h, height: 30.h,
), ),
if (channelsList?.isOpen ?? false) if (channelsList?.isOpen ?? false)
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/login_store_select',arguments: { '/router/login_store_select',
"channelsList":channelsList, arguments: {
}, "channelsList": channelsList,
).then((value) => { },
setState(() { ).then((value) => {
if (value != null) { setState(() {
channelName = value as String; if (value != null) {
} channelName = value as String;
}) }
}); })
}, });
child:Container( },
padding: EdgeInsets.only( child: Container(
left: 12.w, right: 12.w, top: 16.h, bottom: 16.h padding: EdgeInsets.only(
), left: 12.w,
margin: EdgeInsets.only(bottom:30.h), right: 12.w,
decoration: BoxDecoration( top: 16.h,
color: Color(0xFFF1F1F1), bottom: 16.h,
borderRadius: BorderRadius.circular(4), ),
), margin: EdgeInsets.only(bottom: 30.h),
child: Row( decoration: BoxDecoration(
children: [ color: Color(0xFFF1F1F1),
SizedBox(width: 3.w,), borderRadius: BorderRadius.circular(4),
Expanded( ),
child:Text( child: Row(
channelName ?? "邀请来源(选填)", children: [
style: TextStyle( SizedBox(
fontWeight: MyFontWeight.regular, width: 3.w,
fontSize: channelName == null ? 12.sp : 13.sp,
color:channelName == null ? Color(0xFF868686) : Color(0xFF1A1A1A),
), ),
), Expanded(
), child: Text(
Icon( channelName ?? "邀请来源(选填)",
Icons.arrow_forward_ios, style: TextStyle(
size: 16, fontWeight: MyFontWeight.regular,
), fontSize:
], channelName == null ? 12.sp : 13.sp,
color: channelName == null
? Color(0xFF868686)
: Color(0xFF1A1A1A),
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 16,
),
],
),
), ),
), ),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -654,58 +671,63 @@ class _NewLoginPage extends State<NewLoginPage> {
}); });
}, },
checkColor: Color(0xFFFFFFFF), checkColor: Color(0xFFFFFFFF),
fillColor: MaterialStateProperty.all(Color(0xFF32A060)), hoverColor: Colors.white,
activeColor: Color(0xFF32A060),
focusColor: Colors.white,
overlayColor:
MaterialStateProperty.all(Colors.white),
), ),
Expanded( Expanded(
child: Text.rich( child: Text.rich(
TextSpan(children: [
TextSpan(
text: S.of(context).privacy_policy1,
style: TextStyle(
fontSize: 11.sp,
color: Color(0xFF010101),
),
),
TextSpan( TextSpan(
// text: S.of(context).privacy_policy2, children: [
text: "《海峡姐妹用户协议》", TextSpan(
recognizer: TapGestureRecognizer() text: S.of(context).privacy_policy1,
..onTap = () { style: TextStyle(
Navigator.of(context).pushNamed( fontSize: 11.sp,
'/router/user_service_page'); color: Color(0xFF010101),
}, ),
style: TextStyle( ),
fontSize: 11.sp, TextSpan(
color: Color(0xFF32A060), // text: S.of(context).privacy_policy2,
), text: "《海峡姐妹用户协议》",
), recognizer: TapGestureRecognizer()
TextSpan( ..onTap = () {
text: "", Navigator.of(context).pushNamed(
style: TextStyle( '/router/user_service_page');
fontSize: 11.sp, },
color: Colors.black, style: TextStyle(
), fontSize: 11.sp,
), color: Color(0xFF32A060),
TextSpan( ),
text: S.of(context).privacy_policy3, ),
recognizer: tapGestureRecognizer, TextSpan(
style: TextStyle( text: "",
fontSize: 11.sp, style: TextStyle(
color: Color(0xFF32A060), fontSize: 11.sp,
), color: Colors.black,
), ),
TextSpan( ),
text: S.of(context).privacy_policy4, TextSpan(
style: TextStyle( text: S.of(context).privacy_policy3,
fontSize: 11.sp, recognizer: tapGestureRecognizer,
height: 1.2, style: TextStyle(
color: Color(0xFF010101), fontSize: 11.sp,
), color: Color(0xFF32A060),
),
),
TextSpan(
text: S.of(context).privacy_policy4,
style: TextStyle(
fontSize: 11.sp,
height: 1.2,
color: Color(0xFF010101),
),
),
],
), ),
],
), ),
), ),
),
SizedBox( SizedBox(
width: 30, width: 30,
) )
@ -843,9 +865,9 @@ class _NewLoginPage extends State<NewLoginPage> {
TextSpan( TextSpan(
text: S.of(context).yinsixieyi, text: S.of(context).yinsixieyi,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xff32A060), color: Color(0xff32A060),
), ),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
..onTap = () { ..onTap = () {
@ -955,8 +977,7 @@ class _NewLoginPage extends State<NewLoginPage> {
} }
// //
loadingBlockPuzzle(BuildContext context, loadingBlockPuzzle(BuildContext context, {barrierDismissible = true}) {
{barrierDismissible = true}) {
showDialog<Null>( showDialog<Null>(
context: context, context: context,
barrierDismissible: barrierDismissible, barrierDismissible: barrierDismissible,
@ -973,10 +994,15 @@ class _NewLoginPage extends State<NewLoginPage> {
); );
} }
sendSms(v) async{ sendSms(v) async {
BaseData? baseData = await apiService?.sendVerify({"areaCode":area, "mobile": mobile, "verification": v}).catchError((onError) { BaseData? baseData = await apiService?.sendVerify({
"areaCode": area,
"mobile": mobile,
"verification": v
}).catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);}); alignment: Alignment.center);
});
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
_sendCodeStatus = 1; _sendCodeStatus = 1;
countdown(); countdown();

54
lib/main_page.dart

@ -31,6 +31,7 @@ import 'package:permission_handler/permission_handler.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';
import 'package:sharesdk_plugin/sharesdk_register.dart'; import 'package:sharesdk_plugin/sharesdk_register.dart';
import 'package:tpns_flutter_plugin/android/native_event_handler.dart';
import 'package:tpns_flutter_plugin/android/xg_android_api.dart'; import 'package:tpns_flutter_plugin/android/xg_android_api.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
// import 'package:umeng_common_sdk/umeng_common_sdk.dart'; // import 'package:umeng_common_sdk/umeng_common_sdk.dart';
@ -215,6 +216,57 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
///iOS的appID信息Android信息在build.gradle文件中 ///iOS的appID信息Android信息在build.gradle文件中
xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22"); xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22");
// xgFlutterPlugin.addEventHandler(
// onReceiveMessage: (Map<String, dynamic> event) async {
// print("onReceiveMessage: ${event.toString()}");
// return true;
// },
// onReceiveNotificationResponse: (Map<String, dynamic> event) async {
// print("onReceiveNotificationResponse: ${event.toString()}");
// return true;
// },
// xgPushDidBindWithIdentifier: (Map<String, dynamic> event) async {
// print("xgPushDidBindWithIdentifier: ${event.toString()}");
// return true;
// },
// xgPushDidUnbindWithIdentifier: (Map<String, dynamic> event) async {
// print("xgPushDidUnbindWithIdentifier: ${event.toString()}");
// return true;
// },
// xgPushDidUpdatedBindedIdentifier: (Map<String, dynamic> event) async {
// print("xgPushDidUpdatedBindedIdentifier: ${event.toString()}");
// return true;
// },
// xgPushClickAction: (Map<String, dynamic> event) async {
// print("xgPushClickAction: ${event.toString()}");
// return true;
// },
// xgPushDidClearAllIdentifiers: (Map<String, dynamic> event) async {
// print("xgPushDidClearAllIdentifiers: ${event.toString()}");
// return true;
// },
// onRegisteredDeviceToken: (String res) async {
// print("onRegisteredDeviceToken: ${res}");
// return true;
// },
// onRegisteredDone: (String res) async {
// print("onRegisteredDone: ${res}");
// return true;
// },
// unRegistered: (String res) async {
// print("unRegistered: ${res}");
// return true;
// },
// xgPushNetworkConnected: (String res) async {
// print("xgPushNetworkConnected: ${res}");
// return true;
// },
// xgPushDidSetBadge: (String res) async {
// print("xgPushDidSetBadge: ${res}");
// return true;
// },
// );
if (Platform.isAndroid) { if (Platform.isAndroid) {
XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi(); XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi();
// //
@ -225,6 +277,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
androidApi.regPush(); androidApi.regPush();
} }
// ===========================TPNS====
ShareSDKRegister shareSDKRegister = ShareSDKRegister(); ShareSDKRegister shareSDKRegister = ShareSDKRegister();
shareSDKRegister.setupWechat( shareSDKRegister.setupWechat(
"wx3b269e795ed23e5f", "wx3b269e795ed23e5f",

298
lib/setting/about_page.dart

@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/constant.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
@ -43,10 +44,10 @@ class _AboutPage extends State<AboutPage> {
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Color(0xffF7F7F7), color: Color(0xffF7F7F7),
width: 0.0, width: 0.0,
), ),
), ),
color: Color(0xffF7F7F7), color: Color(0xffF7F7F7),
), ),
@ -54,87 +55,92 @@ class _AboutPage extends State<AboutPage> {
alignment: Alignment.center, alignment: Alignment.center,
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child:Column( child: Column(
children: [ children: [
Image.asset( Image.asset(
"assets/image/icon_about_logo.webp", "assets/image/icon_about_logo.webp",
width: 130, width: 130,
height: 130, height: 130,
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 32, bottom: 5), padding: {
child: Text( 't': 32,
S.of(context).yixinhuixiang, 'b': 5,
style: TextStyle( 'l': 15,
fontSize: 30, 'r': 15,
color: Color(0xFF30415B), }.mpOnly,
child: Text(
S.of(context).yixinhuixiang,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
maxLines: 1,
style: TextStyle(
fontSize: 30,
color: Color(0xFF30415B),
),
), ),
), ),
), Text(
Text( S.of(context).guojiankangyoujishenghuo,
S.of(context).guojiankangyoujishenghuo, overflow: TextOverflow.ellipsis,
style: TextStyle( textAlign: TextAlign.center,
fontSize: 16, maxLines: 1,
style: TextStyle(
fontSize: 16,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xffB2B2B2), color: Color(0xffB2B2B2),
),
), ),
), SizedBox(
SizedBox( height: 20,
height: 20, ),
), GestureDetector(
GestureDetector( onTap: () {
onTap: (){
// updateApp(); // updateApp();
}, },
child:settingItem( child: settingItem(
S.of(context).dangqianbanben, S.of(context).dangqianbanben,
S.of(context).banben(version), S.of(context).banben(version),
) ),
), ),
// textItem(S.of(context).tebieshengming), // textItem(S.of(context).tebieshengming),
if (!Platform.isAndroid) if (!Platform.isAndroid)
GestureDetector(
child: settingSingleItem(S.of(context).geiwopingfen),
onTap: () {
// Bridge.toAppStore().then((value) {
// if (Platform.isAndroid && value == "0") {
// SmartDialog.showToast("手机没有安装应用市场app",
// alignment: Alignment.center);
// }
// });
},
),
GestureDetector( GestureDetector(
child: settingSingleItem(S.of(context).geiwopingfen), child: settingSingleItem(S.of(context).yinsishengming),
onTap: () { onTap: () {
// Bridge.toAppStore().then((value) { Navigator.of(context).pushNamed('/router/treaty_page');
// if (Platform.isAndroid && value == "0") {
// SmartDialog.showToast("手机没有安装应用市场app",
// alignment: Alignment.center);
// }
// });
}, },
), ),
GestureDetector( GestureDetector(
child: settingSingleItem(S.of(context).yinsishengming), child: settingSingleItem("用户协议"),
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/treaty_page'); Navigator.of(context)
}, .pushNamed('/router/user_service_page');
), },
GestureDetector(
child: settingSingleItem("用户协议"),
onTap: () {
Navigator.of(context).pushNamed('/router/user_service_page');
},
),
GestureDetector(
child: settingSingleItem("注销账户"),
onTap: () {
Navigator.of(context).pushNamed('/router/logout_page');
},
),
Padding(
padding: EdgeInsets.only(left: 20, right: 20),
child: Divider(
height: 10.0,
indent: 0.0,
color: Colors.grey,
), ),
), GestureDetector(
SizedBox( child: settingSingleItem("注销账户"),
height:100, onTap: () {
), Navigator.of(context).pushNamed('/router/logout_page');
], },
),) ),
SizedBox(
height: 100,
),
],
),
),
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 23), margin: EdgeInsets.only(bottom: 23),
@ -178,11 +184,11 @@ class _AboutPage extends State<AboutPage> {
} }
updateApp() async { updateApp() async {
String url = Platform.isIOS Uri url = Uri.parse(Platform.isIOS
? "itms-apps://itunes.apple.com/app/id1575124838" ? "itms-apps://itunes.apple.com/app/id1575124838"
: "http://application.lotus-wallet.com/huixiang?release_id="; : "http://application.lotus-wallet.com/huixiang?release_id=");
if (await canLaunch(url)) { if (await canLaunchUrl(url)) {
await launch(url); await launchUrl(url);
} else { } else {
throw 'Could not launch $url'; throw 'Could not launch $url';
} }
@ -191,38 +197,29 @@ class _AboutPage extends State<AboutPage> {
Widget settingSingleItem(right) { Widget settingSingleItem(right) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 0, 16, 0), margin: EdgeInsets.fromLTRB(16, 0, 16, 0),
child: Column( child: Padding(
children: [ padding: EdgeInsets.only(top: 15, bottom: 15),
Divider( child: Row(
height: 10.0, children: [
indent: 0.0, Expanded(
color: Colors.grey, child: Text(
), right,
Padding( style: TextStyle(
padding: EdgeInsets.only(top: 15, bottom: 15), fontSize: 16,
child: Row( color: Color(0xFF353535),
children: [ fontWeight: MyFontWeight.medium,
Expanded( ),
child: Text(
right,
style: TextStyle(
fontSize: 16,
color: Color(0xFF353535),
fontWeight: MyFontWeight.medium,
),
),
),
SizedBox(
width: 16,
),
Icon(
Icons.keyboard_arrow_right,
size: 24,
),
],
), ),
), ),
], SizedBox(
width: 16,
),
Icon(
Icons.keyboard_arrow_right,
size: 24,
),
],
),
), ),
); );
} }
@ -230,40 +227,31 @@ class _AboutPage extends State<AboutPage> {
Widget settingItem(left, right) { Widget settingItem(left, right) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 0, 16, 0), margin: EdgeInsets.fromLTRB(16, 0, 16, 0),
child: Column( child: Padding(
children: [ padding: EdgeInsets.only(top: 15, bottom: 15),
Divider( child: Row(
height: 10.0, children: [
indent: 0.0, Expanded(
color: Colors.grey, child: Text(
), left,
Padding( style: TextStyle(
padding: EdgeInsets.only(top: 15, bottom: 15), fontWeight: MyFontWeight.medium,
child: Row( fontSize: 16,
children: [ color: Color(0xFF353535),
Expanded( ),
child: Text(
left,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16,
color: Color(0xFF353535),
),
),
flex: 1,
),
Text(
right,
style: TextStyle(
fontSize: 16,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),
],
), ),
), flex: 1,
], ),
Text(
right,
style: TextStyle(
fontSize: 16,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),
],
),
), ),
); );
} }
@ -273,26 +261,16 @@ class _AboutPage extends State<AboutPage> {
width: double.infinity, width: double.infinity,
// padding: EdgeInsets.fromLTRB(20, 16, 20, 16), // padding: EdgeInsets.fromLTRB(20, 16, 20, 16),
margin: EdgeInsets.fromLTRB(16, 0, 16, 0), margin: EdgeInsets.fromLTRB(16, 0, 16, 0),
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.only(top: 15, bottom: 15),
children: [ child: Text(
Divider( text,
height: 10.0, style: TextStyle(
indent: 0.0, fontWeight: MyFontWeight.medium,
color: Colors.grey, fontSize: 16,
), color: Color(0xFF353535),
Padding(
padding: EdgeInsets.only(top: 15, bottom: 15),
child: Text(
text,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16,
color: Color(0xFF353535),
),
),
), ),
], ),
), ),
); );
} }

34
lib/setting/treaty_page.dart

@ -59,23 +59,23 @@ class _TreatyPage extends State<TreatyPage> {
try { try {
_webViewController = WebViewController() _webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted) ..setJavaScriptMode(JavaScriptMode.unrestricted)
// ..setNavigationDelegate( ..setNavigationDelegate(
// NavigationDelegate( NavigationDelegate(
// onProgress: (int progress) {}, onProgress: (int progress) {},
// onPageStarted: (String url) {}, onPageStarted: (String url) {},
// onPageFinished: (String url) { onPageFinished: (String url) {
// EasyLoading.dismiss(); EasyLoading.dismiss();
// }, },
// onWebResourceError: (WebResourceError error) {}, onWebResourceError: (WebResourceError error) {},
// onNavigationRequest: (NavigationRequest request) { onNavigationRequest: (NavigationRequest request) {
// // if (request.url.startsWith('https://www.youtube.com/')) { // if (request.url.startsWith('https://www.youtube.com/')) {
// // return NavigationDecision.prevent; // return NavigationDecision.prevent;
// // } // }
// return NavigationDecision.navigate; return NavigationDecision.navigate;
// }, },
// ), ),
// ) )
..loadRequest(Uri.parse("https://huixiang.lotus-wallet.com/Privacy.html")); ..loadRequest(Uri.parse("http://huixiang.lotus-wallet.com/Privacy.html"));
res = WebViewWidget(controller: _webViewController!); res = WebViewWidget(controller: _webViewController!);
} catch (error) { } catch (error) {
res = Text("加载失败"); res = Text("加载失败");

2
lib/view_widget/round_button.dart

@ -51,6 +51,7 @@ class RoundButton extends StatelessWidget {
Widget buildText() { Widget buildText() {
Widget textWidget = Text( Widget textWidget = Text(
text ?? "", text ?? "",
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
fontSize: fontSize, fontSize: fontSize,
@ -71,6 +72,7 @@ class RoundButton extends StatelessWidget {
} else { } else {
return Row( return Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
textWidget, textWidget,
], ],

6
pubspec.lock

@ -1342,11 +1342,11 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: "V1.1.6" ref: "V1.2.8"
resolved-ref: a7e45d151171f9ec4b56bc97a720f545aa4a8722 resolved-ref: "74309ee04cada555cb4eaa22da06a0b9d0bb86e4"
url: "https://github.com/TencentCloud/TPNS-Flutter-Plugin" url: "https://github.com/TencentCloud/TPNS-Flutter-Plugin"
source: git source: git
version: "1.1.6" version: "1.2.8"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:

2
pubspec.yaml

@ -44,7 +44,7 @@ dependencies:
tpns_flutter_plugin: tpns_flutter_plugin:
git: git:
url: https://github.com/TencentCloud/TPNS-Flutter-Plugin url: https://github.com/TencentCloud/TPNS-Flutter-Plugin
ref: V1.1.6 ref: V1.2.8
umeng_common_sdk: ^1.2.7 umeng_common_sdk: ^1.2.7
like_button: ^2.0.5 like_button: ^2.0.5

Loading…
Cancel
Save