Bladeren bron

1.更新版本

tags/0.0.8
“yanghuaxuan” 3 jaren geleden
bovenliggende
commit
d65d15584b
3 gewijzigde bestanden met toevoegingen van 20 en 17 verwijderingen
  1. +2
    -1
      lib/models/base/base_setting_model.dart
  2. +13
    -15
      lib/util/alipay_util.dart
  3. +5
    -1
      pubspec.yaml

+ 2
- 1
lib/models/base/base_setting_model.dart Bestand weergeven

@@ -65,7 +65,8 @@ class BaseSettingModel {
createBaseSet(data);
return _setting;
}
} catch (err) {
} catch (err,s) {
print(s);
Logger.error(err);
}
return null;


+ 13
- 15
lib/util/alipay_util.dart Bestand weergeven

@@ -1,25 +1,23 @@
import 'package:tobias/tobias.dart' as tobias;
///支付宝支付
class AliPayUtil{

///支付宝支付
class AliPayUtil {
///orderCode 为后端返回支付Code字符串
///返回true表示支付成功,false表示支付失败
static Future<bool> toPay(String orderCode)async{

Map<dynamic,dynamic> result= await tobias.aliPay(orderCode);
print(result);
if(result!=null&&result['resultStatus']!=null&&result['resultStatus'].toString()=="9000"){
print("支付宝支付结果");
print(result);
return true;
}else{
return false;
}
static Future<bool> toPay(String orderCode) async {
Map<dynamic, dynamic> result = await tobias.aliPay(orderCode);
print(result);
if (result != null && result['resultStatus'] != null && result['resultStatus'].toString() == "9000") {
print("支付宝支付结果");
print(result);
return true;
} else {
return false;
}
}

///检查是否安装了支付宝
static Future<bool> isInstallAliPay() async {
return await tobias.isAliPayInstalled();
}

}
}

+ 5
- 1
pubspec.yaml Bestand weergeven

@@ -94,7 +94,11 @@ dependencies:
git:
url: 'http://192.168.0.138:3000/FnuoOS_ZhiYing/tobias.git'
ref: '0.0.2'
fluwx: '2.6.2'
#微信支付
fluwx:
git:
url: 'http://192.168.0.138:3000/FnuoOS_ZhiYing/fluwx.git'
ref: '0.0.1'

event_bus: 1.1.1



Laden…
Annuleren
Opslaan