Kaynağa Gözat

1.修复ios支付回调问题

tags/0.0.8
“yanghuaxuan” 3 yıl önce
ebeveyn
işleme
e96455afa8
6 değiştirilmiş dosya ile 48 ekleme ve 37 silme
  1. +26
    -26
      example/android/app/build.gradle
  2. +11
    -4
      example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
  3. +6
    -3
      example/ios/Runner/AppDelegate.m
  4. +1
    -1
      example/ios/Runner/Info.plist
  5. +2
    -2
      example/lib/main.dart
  6. +2
    -1
      lib/pages/launch_page/launch_page.dart

+ 26
- 26
example/android/app/build.gradle Dosyayı Görüntüle

@@ -54,7 +54,7 @@ android {
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
// abiFilters 'armeabi-v7a','x86_64'
//abiFilters 'armeabi-v7a','x86_64'
}
}

@@ -109,19 +109,19 @@ android {


// 应用信息配置
// productFlavors {
// // 智夜生活
// zhiying {
// applicationId "cn.zhios.zhiying"
// versionCode 52
// dimension "app"
// versionName '1.3.12'
// // 签名信息
// signingConfig signingConfigs.zhiying
// }
// }
//
// // 打包脚本
productFlavors {
// 智夜生活
zhiying {
applicationId "cn.zhios.zhiying"
versionCode 53
dimension "app"
versionName '1.3.13'
// 签名信息
signingConfig signingConfigs.zhiying
}
}
// 打包脚本
// android.applicationVariants.all { variant ->
// if (variant.buildType.name != "debug") {
// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk")
@@ -136,18 +136,18 @@ android {
// }
// }
// }
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.3'
}
}
resolutionStrategy.force 'com.android.support:support-v4:28.0.0'
}
}
//
// configurations.all {
// resolutionStrategy.eachDependency { DependencyResolveDetails details ->
// def requested = details.requested
// if (requested.group == 'com.android.support') {
// if (!requested.name.startsWith("multidex")) {
// details.useVersion '28.0.3'
// }
// }
// resolutionStrategy.force 'com.android.support:support-v4:28.0.0'
// }
// }


}


+ 11
- 4
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java Dosyayı Görüntüle

@@ -154,11 +154,18 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
@Override
public Map getSetting() {
Map map = new HashMap();
map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989");
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
//map.put("domain", "http://192.168.0.88:5000/");
map.put("master_id", "123456");
// ///测试
// map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989");http://47.114.51.254:80 http://inapi.izhyin.cn/
// //map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
// //map.put("domain", "http://192.168.0.88:5000/");
// map.put("master_id", "123456");
// map.put("secret_key", "123456");

///正式
map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
map.put("master_id", "99813608");
map.put("secret_key", "123456");

// map.put("token", "123465");
return map;
}


+ 6
- 3
example/ios/Runner/AppDelegate.m Dosyayı Görüntüle

@@ -41,7 +41,7 @@
if (![[AlibcTradeSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
return YES;
}
return NO;
return [super application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}


@@ -51,15 +51,18 @@
if (@available(iOS 9.0, *)) {
__unused BOOL isHandledByALBBSDK=[[AlibcTradeSDK sharedInstance] application:application openURL:url options:options];
return isHandledByALBBSDK;
if (isHandledByALBBSDK)
return isHandledByALBBSDK;
} else {
// Fallback on earlier versions
}//处理其他app跳转到自己的app,如果百川处理过会返回YES
return NO;
return [super application:application openURL:url options:options];
}




@end

+ 1
- 1
example/ios/Runner/Info.plist Dosyayı Görüntüle

@@ -105,7 +105,7 @@
<string>alipay</string>
<key>CFBundleURLSchemes</key>
<array>
<string>tobiasexample</string>
<string>alisdkdemo</string>
</array>
</dict>
</array>


+ 2
- 2
example/lib/main.dart Dosyayı Görüntüle

@@ -47,12 +47,12 @@ class _MyAppState extends State<MyApp> {
}
return Center(
child: Text(
"走神了~"+erroStr,
""+erroStr,
style: Theme
.of(context)
.textTheme
.title
.copyWith(color: Colors.redAccent),
.copyWith(color: Colors.grey[200]),
),
);
}


+ 2
- 1
lib/pages/launch_page/launch_page.dart Dosyayı Görüntüle

@@ -76,7 +76,8 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
// CupertinoPageRoute(builder: (context) => HomePage()));
Navigator.of(context).pushReplacementNamed('/homePage');
}
}).catchError((err) async {
}).catchError((err,s) async {
print(s);
// if (err.toString().contains("BaseSettingModel")) {
// await showDialog(
// context: context,


Yükleniyor…
İptal
Kaydet