Browse Source

dart3 修改。调整接口返回

dart3_last
fff 2 weeks ago
parent
commit
ffdf4ba69d
  1. 12
      lib/data/wx_pay.dart
  2. 2
      lib/login/new_login_page.dart
  3. 10
      lib/mine/mine_vip/mine_vip_core.dart
  4. 22
      lib/mine/recharge_page.dart
  5. 3
      lib/retrofit/retrofit_api.dart
  6. 132
      pubspec.lock

12
lib/data/wx_pay.dart

@ -20,11 +20,11 @@ class WxPay {
bool isAnyEmpty() {
return (appId?.isEmpty ?? true)
&& (nonceStr?.isEmpty ?? true)
&& (packageValue?.isEmpty ?? true)
&& (partnerId?.isEmpty ?? true)
&& (prepayId?.isEmpty ?? true)
&& (sign?.isEmpty ?? true)
&& (timeStamp?.isEmpty ?? true);
|| (nonceStr?.isEmpty ?? true)
|| (packageValue?.isEmpty ?? true)
|| (partnerId?.isEmpty ?? true)
|| (prepayId?.isEmpty ?? true)
|| (sign?.isEmpty ?? true)
|| (timeStamp?.isEmpty ?? true);
}
}

2
lib/login/new_login_page.dart

@ -1002,7 +1002,7 @@ class _NewLoginPage extends State<NewLoginPage> {
}).catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
return Future.value(null);
return BaseData()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) {
_sendCodeStatus = 1;

10
lib/mine/mine_vip/mine_vip_core.dart

@ -181,17 +181,17 @@ class _MineVipCore extends State<MineVipCore> {
// }
// }
BaseData<dynamic>? baseData = await apiService?.rankBuy(
BaseData<WxPay>? baseData = await apiService?.rankBuy(
{"buyType": 2, "rankId": ranks[checkIndex].id}).catchError((onError) {
return Future.value(null);
return BaseData<WxPay>()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) {
WxPay wxPay = WxPay.fromJson(baseData!.data);
if (wxPay?.isAnyEmpty() ?? false) {
WxPay? wxPay = baseData!.data;
if (wxPay?.isAnyEmpty() ?? true) {
return;
}
await fluwx.registerApi(
appId: wxPay.appId!,
appId: wxPay!.appId!,
doOnAndroid: true,
universalLink: "https://hx.lotus-wallet.com/app/",
);

22
lib/mine/recharge_page.dart

@ -944,19 +944,21 @@ class _RechargePage extends State<RechargePage> {
} else {
tobias.isAliPayInstalled.then((value) => {
//
if (!value)
{SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)}
else
{
if (!value) {
SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)
} else {
tobias.pay(baseData?.data["body"]).then((payRes) {
if (payRes['resultStatus'] == 9000 ||
payRes['resultStatus'] == '9000') {
SmartDialog.showToast("充值成功",
alignment: Alignment.center);
if (payRes['resultStatus'] == 9000 || payRes['resultStatus'] == '9000') {
SmartDialog.showToast(
"充值成功",
alignment: Alignment.center,
);
Navigator.of(context).pop();
} else {
SmartDialog.showToast(payRes['memo'],
alignment: Alignment.center);
SmartDialog.showToast(
payRes['memo'],
alignment: Alignment.center,
);
}
})
}

3
lib/retrofit/retrofit_api.dart

@ -65,6 +65,7 @@ import 'package:huixiang/data/vip_benefit.dart';
import 'package:huixiang/data/vip_card.dart';
import 'package:huixiang/data/vip_card_home.dart';
import 'package:huixiang/data/vip_rule_details.dart';
import 'package:huixiang/data/wx_pay.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
@ -543,7 +544,7 @@ abstract class ApiService {
///
@POST("/member/rankBuy")
Future<BaseData<dynamic>> rankBuy(@Body() Map<String, dynamic> param);
Future<BaseData<WxPay>> rankBuy(@Body() Map<String, dynamic> param);
///
@GET("/information/categoryList")

132
pubspec.lock

@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
url: "https://pub.dev"
source: hosted
version: "2.4.2"
version: "2.6.0"
asn1lib:
dependency: transitive
description:
@ -165,10 +165,10 @@ packages:
dependency: transitive
description:
name: charcode
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
@ -181,10 +181,10 @@ packages:
dependency: transitive
description:
name: chewie
sha256: "1fc84d88d3b1dc26b1fe799500e2ebcc8916af30ce62595ad802cfd965b60bc3"
sha256: d8908907084d28533fbabe4a8b7112b63caa907506e5163fe2d10a5fa7cbf3ee
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.8.7"
chewie_audio:
dependency: "direct main"
description:
@ -245,10 +245,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.6"
version: "1.0.8"
dart_style:
dependency: transitive
description:
@ -317,10 +317,10 @@ packages:
dependency: "direct main"
description:
name: encrypt
sha256: e0389e80d523df05de1494e2e70e204e2ebafeaaf387bd726622e4cd89636eb8
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
version: "5.0.3"
equatable:
dependency: transitive
description:
@ -373,26 +373,26 @@ packages:
dependency: transitive
description:
name: ffi
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "2.1.3"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "6.1.4"
version: "7.0.1"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.1"
fl_chart:
dependency: "direct main"
description:
@ -479,10 +479,10 @@ packages:
dependency: "direct main"
description:
name: flutter_pdfview
sha256: "715085f9f2c1ad5129dfe0d31a5f0e5481e2e296ce4e6ce72662de28df5456a6"
sha256: "2e3fa359524e9865ec25a64593b65092b4a9974c5871228c1a771300a003d150"
url: "https://pub.dev"
source: hosted
version: "1.3.4"
version: "1.4.0"
flutter_screenutil:
dependency: "direct main"
description:
@ -737,10 +737,10 @@ packages:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.7.1"
json_annotation:
dependency: "direct main"
description:
@ -905,18 +905,18 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: cb44f49b6e690fa766f023d5b22cac6b9affe741dd792b6ac7ad4fabe0d7b097
sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918
url: "https://pub.dev"
source: hosted
version: "6.0.0"
version: "8.0.2"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
sha256: a5ef9986efc7bf772f2696183a3992615baa76c1ffb1189318dd8803778fb05b
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.2"
path:
dependency: transitive
description:
@ -1057,10 +1057,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
version: "3.1.3"
version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
@ -1073,10 +1073,10 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: a74ed4039c152dd319514f142768d93ad3973860b240d90160cec727c8155f65
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.9.1"
pool:
dependency: transitive
description:
@ -1113,10 +1113,10 @@ packages:
dependency: transitive
description:
name: pubspec_parse
sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8
sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
pull_to_refresh:
dependency: "direct main"
description:
@ -1169,10 +1169,10 @@ packages:
dependency: "direct main"
description:
name: retrofit
sha256: "3c9885ef3dbc5dc4b3fb0a40c972ab52e4dad04d52dac9bba24dfa76cf100451"
sha256: c6cc9ad3374e6d07008343140a67afffaaa34cdf6bf08d4847d91417a99dcf45
url: "https://pub.dev"
source: hosted
version: "4.4.1"
version: "4.4.2"
retrofit_generator:
dependency: "direct dev"
description:
@ -1217,66 +1217,58 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: "78528fd87d0d08ffd3e69551173c026e8eacc7b7079c82eb6a77413957b7e394"
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
url: "https://pub.dev"
source: hosted
version: "2.0.20"
version: "2.2.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: ad423a80fe7b4e48b50d6111b3ea1027af0e959e49d485712e134863d9c1c521
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
url: "https://pub.dev"
source: hosted
version: "2.0.17"
version: "2.2.2"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "1e755f8583229f185cfca61b1d80fb2344c9d660e1c69ede5450d8f478fa5310"
sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.5.3"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "3a59ed10890a8409ad0faad7bb2957dab4b92b8fbe553257b05d30ed8af2c707"
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.4.1"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "992f0fdc46d0a3c0ac2e5859f2de0e577bbe51f78a77ee8f357cbe626a2ad32d"
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.4.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: "0dc2633f215a3d4aa3184c9b2c5766f4711e4e5a6b256e62aafee41f89f1bfb8"
sha256: "59dc807b94d29d52ddbb1b3c0d3b9d0a67fc535a64e62a5542c8db0513fcb6c2"
url: "https://pub.dev"
source: hosted
version: "2.0.6"
version: "2.4.1"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "71bcd669bb9cdb6b39f22c4a7728b6d49e934f6cba73157ffa5a54f1eed67436"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
sharesdk_plugin:
dependency: "direct main"
description:
name: sharesdk_plugin
sha256: a1a18d01f362c119df1931082e3694591a24b3b00eef2576522e00ef8da3b25e
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
source: hosted
version: "1.3.10"
version: "2.4.1"
shelf:
dependency: transitive
description:
@ -1350,18 +1342,18 @@ packages:
dependency: "direct main"
description:
name: sqflite
sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9
sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d
url: "https://pub.dev"
source: hosted
version: "2.2.8+4"
version: "2.3.3+1"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f"
sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
version: "2.4.5+1"
version: "2.5.4"
stack_trace:
dependency: transitive
description:
@ -1422,10 +1414,10 @@ packages:
dependency: transitive
description:
name: synchronized
sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60"
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.0+1"
system_info2:
dependency: transitive
description:
@ -1687,18 +1679,18 @@ packages:
dependency: transitive
description:
name: wakelock_plus
sha256: "104d94837bb28c735894dcd592877e990149c380e6358b00c04398ca1426eed4"
sha256: bf4ee6f17a2fa373ed3753ad0e602b7603f8c75af006d5b9bdade263928c0484
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.8"
wakelock_plus_platform_interface:
dependency: transitive
description:
name: wakelock_plus_platform_interface
sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16"
sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
watcher:
dependency: transitive
description:
@ -1767,26 +1759,26 @@ packages:
dependency: transitive
description:
name: win32
sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
url: "https://pub.dev"
source: hosted
version: "5.0.6"
version: "5.5.0"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9
sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.3"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
version: "1.1.0"
xml:
dependency: transitive
description:

Loading…
Cancel
Save