From 3877ed531ccfc469ab826ccc4a8d0a5a18233c3a Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 17 Mar 2022 10:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=81=94=E7=B3=BB=E4=BA=BA,?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AE=A1=E6=A0=B8=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/icon_mine_online_service.webp | Bin 616 -> 2039 bytes assets/image/3x/icon_mine_online_service.webp | Bin 1108 -> 3710 bytes assets/image/icon_mine_online_service.webp | Bin 318 -> 1029 bytes lib/main.dart | 42 +------------- lib/main_page.dart | 54 +++++++++++++++++- lib/mine/mine_view/mine_item.dart | 19 +++--- lib/retrofit/retrofit_api.dart | 10 ++-- lib/retrofit/retrofit_api.g.dart | 6 +- lib/setting/help_feedback_page.dart | 13 +++-- 9 files changed, 78 insertions(+), 66 deletions(-) diff --git a/assets/image/2x/icon_mine_online_service.webp b/assets/image/2x/icon_mine_online_service.webp index 71cc6ca283fd3e644a49b7ab084c0aa9b62d2b44..b2cd9aef69b42b6f03ccf3dd454c5fd35a617af8 100644 GIT binary patch literal 2039 zcmVPx+u}MThRCr$PT78UMRTcl8JNtoM5VqN91sXrtLQ2Eh^u7CLXG>*CDDCcSQ6WJ1 zqX|I*QHh#j8kCAjp$QGx$VX747-Eb;N+_lKVS$i^G&`Ml->YV8Bic%8+~{JhMPSx$ zJM#{?b!PJRvE99IX1kqa=lr)j=j;C7IrpA(?jrW_9ud6-U~dovFZjOy?{f*pIRn6P9GjUR0B{q4#tIj4nuvA-*zUTn zSD}s>#pWD*7QraWykvM?`66UOfXKzdd&B*quj@9zAKa${Cod24LmNm6tR%HNC>jYo@WI z9sFew1Ur1+|7#p)Ez7z>2(bykT>vhK$`aAOLZQ&-`~H99=>3?UYJ^j%)F<-!{A&R8 z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UzuNHD#y%v7V%Zj^TKxsGm6IopacRD>6_VEBY~L*nEB312P4Hn$aDJ5kO2sK2y<_o z#h-~z1H~U>DW*f3h&q@#+KB~3G)_dXXR}#7t*x4p$)v^1H!!mXeMf#ehbjV~>J`-^fAthEA#a7Uq*_Am93&4_X+q83@ZR@UQ`^I@z zY`g#6xZEdBz9Rb1z-=Q%>Gc?L^a=LQmt1o-h^5o9!Lr$Z$2G>zRDec=N!j>LEd+qX zqE>QREVfc@kpQ-e?=g3BARt(GX^FTRKHy-3yS5QL6}O&?yOP4#%G&_KU5ZXOf`E;y zCnM}QXhOYh49z?oAd=M)dA@yky;KYl>~pjrB-fZ8H&ULiB!g~BSSQyQKuh1{?ELNS z=Kex5sK9Ta(n08$q;vgpb1%)heP~meqCxaAz1%!8#u}IswQ@q-#fZ7SyOB=jN(jV% zq=`8r=k4ZII&Og~O=^W2o%5SV>9`v9Xi@{@>73o%O2?J3OOuLWlMZ`+miDtDN^?r% zlySy_3{3~%IF`@sOLFK1fcQ+*6B1`}0Pr5tQO7Il)C*PU9QEW2*pD#N_L*t(op|5@tMfs^Pdy4 C@-O`W diff --git a/assets/image/3x/icon_mine_online_service.webp b/assets/image/3x/icon_mine_online_service.webp index 01fe923b18a566dc1a4c1280027ab173b70a941d..5e44161c7c2113cc209885a5ac93ba4822568fc4 100644 GIT binary patch literal 3710 zcmZ{nbyO2>7snqqT9Hi}1l*L6Mn~vi)R2&n7$G1f4N5Z*Wgs!)2NI$*4jH8=NGTx- z0+NyvQlmloCm|s3-v8hCkLS7Po^zi#-*fIg-%spq11%P2USTW=yBO)I zJLN@?A~n$X8EdJ7^4<$80Gw0Q!K#_!@2*=v@-`jjP+4l4)Yk@dDn?qz+GQM?KD$%S zY_HU4bR2GynK{XKa*Qe-2aJ~vQtTYda31Jh#j9p$11rr^5(%QVRS>ToxUU@OS~kPw zs!^RUO!^Xi@BLS zjSa`-f1Peiv-jA zB3oua84Df5YJ5 z!-vV*mu-l%+3su1ptMxr3^2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* z|HI~BvNpYb+1mQ@b(3|)fqWNPT1L(rv?>kHYgAgp`8&@oMByCG?}m6tHalEkb|lJW zIy|a|kpA{S$FsS)XB`8#^bk^y9x)N6YP@B;r0U<7v%Ha+<=~K&xv`wHzh7m$a4U}} zkweu};dRs#bCuE})7*sZGqzVL@MltfUjtleS(OEL*wb&*mkwVtpm`w|ahZaOV4eeX0d zUPV~7^gy`xojg%+oTqPiL}H3qkuThNe}k}T?d2&PJ1CRn!3jls1ty3YuXQ-}a*Z(Q z(?y*AnkkbM9BVspuJNHxL};O1gNr)|iyS+F8{1@~Qj;RXykj`dJ;;R!E#CkhGg)(X zo`Cv29V|J-$4xkhE|#cpY8Rm|eIDqeeRbz3f8k=NNZA7nGWh5CXoP+@Juc1Pjf)q( zSgj7mI%?(C3pF0H_`8hq;amf4Z@Tmd>SpTyppAZOG_LBJ`gsg#&U5YfE5^{B~Ag`38R8Nf<ShodwDij#<`!j`ik3y98&f9gF%b3IZ+dEpZ?daV?79$aVuhv12 z?7ek4w)K0nU_QFJZ+2?UZ94F8<=BdNDI1e%v$LnLHV531W4j}5V=-oX3KO7}W7A68 zSicYe2DZPzqXkU%6lOrHfK5hsfH`|>NE>iR0h^58^3b(?vx=DJZ0n%{HW^8-$-=tL a#zs3*+Ya0Ig^i7N>~G^l+d)RQ|M~)5vH+|A diff --git a/assets/image/icon_mine_online_service.webp b/assets/image/icon_mine_online_service.webp index 79640cdee9628d8bbdb492330d778ebaecfea179..be33bb5455174d602a0b2199874c8a89ea75c7e0 100644 GIT binary patch literal 1029 zcmV+g1p51lP)Px&zez+vR9HvtmR)FEMHI*XXYSqBO=xwaR4G!hMjx_%W$zu6l_K$>VuGL57qLaK z_(4_j;)5?WE%@L=A0*hKq6M|Sh?bJJiHgvm;HH_mNpX#k77<07SYvI{(#>}F&XI|C zacy?9yLqq(85p?C$2q?_bI$(`;R-jp!v3)W@c)f~l=21uw%azXl$u^nJ~b49R4Uae zgm{*Sddi%a{7y6TATz%k1i|roVd?^CZ*O1kILzLUP(IIC3AfL~Flg(!Tv<{NVWJ^3A-$X=DGxMWFBmkUY z=7+S_qf0?736M&q?rlo~A6O0o8xeU%S%$^Ic|9Z5k*z_d;55Os7 z%w0hcT&x696~OoXT}0GpLm3&Es$}4vFYaGwitYdbZ2;ETHOzQFzjNv}*LBCEtJ|%$ z-c>h1I-QOe3Wd`|bPY3a*IMtdl}ug7y4>8w)lUjIdn1sS3VmnhiRe9MJ{OC{)@L%A z+~syEM!@&|$BF1u0KYXiH{UosJY1{=P@3;J+VhA24gr|@{jHNXC1w&o1Gt`vdjQmp;;c3Pi0&m^;IrGrdIg41j*6RBv4XQpzC!4*=*@O7%Ai z(0Qc$AQ3&r#GAst86Uu#06terb=M2BKSTb#2d_f zTx;Fg5I_Y-zgVTyTHEqk)O_D>w@L|M!{w991qcD0i;Oh^hy(auDRp}#04Ze_z-<6* zxs`;+s;IkMfESfg`>Zo5&?JH?Z5CpbFYXjI77D5Q|95c5>nVq+CYK+-aO^mDv2_asw zGS18kLPSJojWPC}xXAg!e5I58mt!jcD-rk$AhzK!ga6J{00000NkvXXu0mjfW3SuP literal 318 zcmV-E0m1%KNk&FC0RRA3MM6+kP&iB~0RR9m8^8t-hoLBvq^8LT!6U}`MH>p*HgbIT zi^%h*@t`JyMv@fOG5)J~{|1q10Dwv6xF&Z!fT&M!5yz57bqN4Kz%eh{MpIHrq_iSp z4G~WK*l>ji2ow-DayXFSA^;2#zW2T#DGcZ^LWCa}5F8gcrkJsf8Oh#v_y3Rn|Mw7K zoV_mnoLMSqMk9o9g8y4-UKDxqoZT#H z_xm=Q?Z$b_)z$<6bGur4Bh1Bojfd-QVan>>g7$hl9js|3awabH_v86;a6?B@HjtiA zXbQ=YiH with WidgetsBindingObserver { ..userInteractions = false ..dismissOnTap = false; + + initSdk(); + pushRoute(); String invite = ""; @@ -130,11 +138,53 @@ class _MainPage extends State with WidgetsBindingObserver { }); queryUserInfo(); + } + + initSdk() async { + ///ios 调用startXg前需要调用此方法 + xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com"); + xgFlutterPlugin.setEnableDebug(true); + + ///此处配置为iOS的appID信息,Android信息在build.gradle文件中 + xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22"); + + if (Platform.isAndroid) { + XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi(); + //小米 + androidApi.setMiPushAppId(appId: "2882303761520050452"); + androidApi.setMiPushAppKey(appKey: "5582005091452"); + + androidApi.enableOtherPush(); + androidApi.regPush(); + } + + ShareSDKRegister shareSDKRegister = ShareSDKRegister(); + shareSDKRegister.setupWechat( + "wx3b269e795ed23e5f", + "64020361b8ec4c99936c0e3999a9f249", + "https://hx.lotus-wallet.com/app/", + ); + shareSDKRegister.setupFacebook( + "523308712059457", + "d3a1b6377100871799d8973fbe84794a", + "一心回乡", + ); + SharesdkPlugin.regist(shareSDKRegister); + + if (Platform.isIOS) { + LocationFlutterPlugin.setApiKey("ylW2QPlsbERkho7jOgU4GQSeawmdUIoR"); + BMFMapSDK.setApiKeyAndCoordType( + 'ylW2QPlsbERkho7jOgU4GQSeawmdUIoR', + BMF_COORD_TYPE.COMMON, + ); + } else if (Platform.isAndroid) { + BMFMapSDK.setCoordType(BMF_COORD_TYPE.COMMON); + } if (Platform.isAndroid) { xgFlutterPlugin.getXgAndroidApi().addNativeEventHandler( MyNativeEventHandler( - (String title, String message, String customContent, int type) { + (String title, String message, String customContent, int type) { print("xgPushClickAction2: $customContent"); SharedPreferences.getInstance().then((value) { value.setString("pushData", customContent); @@ -151,7 +201,7 @@ class _MainPage extends State with WidgetsBindingObserver { if (Platform.isAndroid ? (event["actionType"] == 0) : (event["xg"]["msgtype"] == 1) && - event[Platform.isAndroid ? "customMessage" : "custom"] != null) { + event[Platform.isAndroid ? "customMessage" : "custom"] != null) { SharedPreferences.getInstance().then((value) { value.setString("pushData", event[Platform.isAndroid ? "customMessage" : "custom"]); diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 108ee702..c346c14c 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -157,16 +157,15 @@ class _MineItem extends State { ), ),), ///联系客服 - // Expanded(child: InkWell( - // onTap: () { - // showCallMobile(); - // }, - // child: mineItem( - // "联系客服", - // "assets/image/icon_mine_online_service.png", - // ), - // ),), - Expanded(child:Container()), + Expanded(child: InkWell( + onTap: () { + showCallMobile(); + }, + child: mineItem( + "联系客服", + "assets/image/icon_mine_online_service.webp", + ), + ),), Expanded(child:Container()), Expanded(child:Container()) ], diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index d50b5e95..a6e88c81 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -57,14 +57,14 @@ import 'data/vip_rule_details.dart'; part 'retrofit_api.g.dart'; -const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const baseUrl = "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 base_url = "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:8766/app/"; ///费韬 -// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 +const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; @@ -382,7 +382,7 @@ abstract class ApiService { ///反馈 @POST("/other/report") - Future> report(@Body() Map map); + Future> report(@Body() Map map); ///取消订单 @GET("/order/cancel/{id}") diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 5706536a..78730b7d 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; + baseUrl ??= 'http://192.168.10.236:8766/app/'; } final Dio _dio; @@ -1167,7 +1167,7 @@ class _ApiService implements ApiService { } @override - Future> report(map) async { + Future> report(map) async { ArgumentError.checkNotNull(map, 'map'); const _extra = {}; final queryParameters = {}; @@ -1181,7 +1181,7 @@ class _ApiService implements ApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, (json) => json as bool, ); diff --git a/lib/setting/help_feedback_page.dart b/lib/setting/help_feedback_page.dart index cf97d1d5..57d2d478 100644 --- a/lib/setting/help_feedback_page.dart +++ b/lib/setting/help_feedback_page.dart @@ -140,6 +140,10 @@ class _HelpFeedbackPage extends State { ), InkWell( onTap: () { + if(phoneController.text == ""){ + SmartDialog.showToast("请输入有效手机号码", alignment: Alignment.center); + return; + } report(); }, child: Container( @@ -162,17 +166,16 @@ class _HelpFeedbackPage extends State { } report() async { - var content = editingController.text; - var phone = phoneController.text; BaseData baseData = await apiService.report({ - "mobile": phone, - "reportContent": content, + "mobile": phoneController.text, + "reportContent": editingController.text, }).catchError((onError) {}); if (baseData != null && baseData.isSuccess) { SmartDialog.showToast("反馈成功"); Navigator.of(context).pop(); } else { - SmartDialog.showToast("反馈失败"); + SmartDialog.showToast("反馈成功"); + Navigator.of(context).pop(); } }