Procházet zdrojové kódy

1.加入高德地图SDK

tags/0.0.9
“yanghuaxuan” před 3 roky
rodič
revize
2a14840588
9 změnil soubory, kde provedl 54 přidání a 15 odebrání
  1. +5
    -1
      example/android/app/build.gradle
  2. binární
     
  3. +2
    -1
      example/android/app/src/main/AndroidManifest.xml
  4. +6
    -8
      example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
  5. +27
    -2
      lib/models/app_config_model.dart
  6. +2
    -0
      lib/pages/goods_share_page/models/goods_share_style_model.dart
  7. +6
    -2
      lib/register.dart
  8. +3
    -1
      lib/zhiying_base_widget.dart
  9. +3
    -0
      pubspec.yaml

+ 5
- 1
example/android/app/build.gradle Zobrazit soubor

@@ -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'
}
}

@@ -156,6 +156,7 @@ flutter {
source '../..'
}


dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
@@ -184,6 +185,9 @@ dependencies {
implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
implementation 'com.alibaba:fastjson:1.2.41@jar'

implementation fileTree(include: ['*.jar'], dir: 'libs')

}




binární
Zobrazit soubor


+ 2
- 1
example/android/app/src/main/AndroidManifest.xml Zobrazit soubor

@@ -36,6 +36,7 @@
<uses-permission android:name="android.permission.ACCESS_LOCATION" />



<!--&lt;!&ndash; &lt;!&ndash; Permissions options for the `ignoreBatteryOptimizations` group &ndash;&gt;&ndash;&gt;-->
<!-- <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />-->

@@ -91,7 +92,7 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/zhiying_file_path" />
</provider>
<service android:name="com.amap.api.location.APSService"></service>

</application>


+ 6
- 8
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java Zobrazit soubor

@@ -155,11 +155,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
public Map getSetting() {
Map map = new HashMap();
// ///测试
// 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://inapi.izhyin.cn/");//"http://120.76.175.204:8989");http://47.114.51.254:80 http://inapi.izhyin.cn/
map.put("master_id", "123456");
map.put("secret_key", "123456");

///正式
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
@@ -167,9 +165,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
// map.put("secret_key", "123456");

//客户测试
map.put("domain", "http://api.zhiyingos.com/");//45678910,api.zhios.cn84198689
map.put("master_id", "80685217");
map.put("secret_key", "123456");
// map.put("domain", "http://api.zhiyingos.com/");//45678910,api.zhios.cn84198689
// map.put("master_id", "13376168");
// map.put("secret_key", "123456");

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


+ 27
- 2
lib/models/app_config_model.dart Zobrazit soubor

@@ -15,7 +15,7 @@ class AppConfigModel {
///新引导页参数
GuideData guideData;

static String appStartDelay="0.5";
static String appStartDelay = "0.5";

static AppConfigModel _config;

@@ -54,7 +54,7 @@ class AppConfigModel {
keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null;
guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null;
guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : null;
appStartDelay=json['app_start_delay']!=null?json['app_start_delay']:'0.5';
appStartDelay = json['app_start_delay'] != null ? json['app_start_delay'] : '0.5';
}

Map<String, dynamic> toJson() {
@@ -75,6 +75,7 @@ class AppConfigKeyModel {
AppConfigKeyItemModel weixin;
AppConfigKeyItemModel jdIos;
AppConfigKeyItemModel jdAndroid;
GDModel gd;

AppConfigKeyModel({this.weibo, this.qq, this.weixin, this.jdIos, this.jdAndroid});

@@ -84,6 +85,7 @@ class AppConfigKeyModel {
weixin = json['weixin'] != null ? new AppConfigKeyItemModel.fromJson(json['weixin']) : null;
jdIos = json['jd_ios'] != null ? new AppConfigKeyItemModel.fromJson(json['jd_ios']) : null;
jdAndroid = json['jd_android'] != null ? new AppConfigKeyItemModel.fromJson(json['jd_android']) : null;
gd = json['gd'] != null ? GDModel.fromJson(json['gd']) : null;
}

Map<String, dynamic> toJson() {
@@ -103,6 +105,10 @@ class AppConfigKeyModel {
if (this.jdAndroid != null) {
data['jd_android'] = this.jdAndroid.toJson();
}
if (this.gd != null) {
data['gd'] = this.gd.toJson();
}

return data;
}
}
@@ -216,3 +222,22 @@ class AppConfigGuideModel {
return data;
}
}

class GDModel {
String androidKey;
String iosKey;

GDModel({this.androidKey, this.iosKey});

GDModel.fromJson(Map<String, dynamic> json) {
androidKey = json['android_key'];
iosKey = json['ios_key'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['android_key'] = this.androidKey;
data['ios_key'] = this.iosKey;
return data;
}
}

+ 2
- 0
lib/pages/goods_share_page/models/goods_share_style_model.dart Zobrazit soubor

@@ -11,6 +11,7 @@ class GoodsShareStyleModel {
Map<String, dynamic> shareImage;
GoodsShareTempEditorModel editTemplate;
Map<String, dynamic> shareLink;
Map<String, dynamic> shareMini;

GoodsShareStyleModel(
{this.unChooseColor,
@@ -33,6 +34,7 @@ class GoodsShareStyleModel {
rewardText = json['reward_text'];
shareImage = json['share_image'];
shareLink=json['share_link'];
shareMini=json['share_mini'];
if (json['edit_template'] != null) {
editTemplate = GoodsShareTempEditorModel.fromJson(
Map<String, dynamic>.from(json['edit_template']));


+ 6
- 2
lib/register.dart Zobrazit soubor

@@ -70,6 +70,7 @@ import 'package:zhiying_base_widget/widgets/wallet/wallet_data/wallet_data.dart'
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_income/wallet_income.dart';
import 'package:zhiying_base_widget/widgets/wallet_bil_detail/wallet_bil_detail.dart';
import 'package:zhiying_base_widget/zhiying_base_widget.dart';
import 'package:zhiying_comm/util/defalut_widget_creater.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

@@ -135,7 +136,10 @@ class BaseWidgetRegister {
SharesdkPlugin.regist(register);

///微信支付初始化
registerWxApi(appId: config?.keys?.weixin?.appId,universalLink: config?.keys?.weixin?.universalLink);
registerWxApi(appId: config?.keys?.weixin?.appId, universalLink: config?.keys?.weixin?.universalLink);

///高德定位注册
AMapFlutterLocation.setApiKey(config?.keys?.gd?.androidKey ?? "", config?.keys?.gd?.iosKey);

});

@@ -161,7 +165,7 @@ class BaseWidgetRegister {
// NetUtil.post('/api/v1/rec/kaola?page=1', method: NetMethod.GET, cache: true, showToast: false);
LoginStyleUtil.fetchNetPageData();

FlutterUserAgent.init(force: true);
FlutterUserAgent.init(force: true);

return null;
});


+ 3
- 1
lib/zhiying_base_widget.dart Zobrazit soubor

@@ -6,4 +6,6 @@ export 'package:zhiying_base_widget/pages/main_page/model/background_model.dart'
export 'package:zhiying_base_widget/pages/custom_page/bloc/background_bloc.dart';
export 'package:pull_to_refresh/pull_to_refresh.dart';
export 'package:flutter_user_agent/flutter_user_agent.dart';
export 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart';
export 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart';
export 'package:amap_flutter_location/amap_flutter_location.dart';
export 'package:amap_flutter_location/amap_location_option.dart';

+ 3
- 0
pubspec.yaml Zobrazit soubor

@@ -51,6 +51,9 @@ dependencies:

loading_indicator: ^1.2.0

#高德定位
amap_flutter_location: ^1.0.1


mobpush_plugin:
plugin_platform_interface: ^1.0.1


Načítá se…
Zrušit
Uložit