Pārlūkot izejas kodu

1.加入高德地图SDK

tags/0.0.9
“yanghuaxuan” pirms 3 gadiem
vecāks
revīzija
2a14840588
9 mainītis faili ar 54 papildinājumiem un 15 dzēšanām
  1. +5
    -1
      example/android/app/build.gradle
  2. Binārs
     
  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 Parādīt failu

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



dependencies { dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2' 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:AlibcTradeBiz:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:nb_trade: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 'com.alibaba:fastjson:1.2.41@jar'

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

} }






Binārs
Parādīt failu


+ 2
- 1
example/android/app/src/main/AndroidManifest.xml Parādīt failu

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





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


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


</application> </application>



+ 6
- 8
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java Parādīt failu

@@ -155,11 +155,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
public Map getSetting() { public Map getSetting() {
Map map = new HashMap(); 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 // 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("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"); // map.put("token", "123465");
return map; return map;


+ 27
- 2
lib/models/app_config_model.dart Parādīt failu

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


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


static AppConfigModel _config; static AppConfigModel _config;


@@ -54,7 +54,7 @@ class AppConfigModel {
keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null; keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null;
guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null; guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null;
guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : 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() { Map<String, dynamic> toJson() {
@@ -75,6 +75,7 @@ class AppConfigKeyModel {
AppConfigKeyItemModel weixin; AppConfigKeyItemModel weixin;
AppConfigKeyItemModel jdIos; AppConfigKeyItemModel jdIos;
AppConfigKeyItemModel jdAndroid; AppConfigKeyItemModel jdAndroid;
GDModel gd;


AppConfigKeyModel({this.weibo, this.qq, this.weixin, this.jdIos, this.jdAndroid}); 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; weixin = json['weixin'] != null ? new AppConfigKeyItemModel.fromJson(json['weixin']) : null;
jdIos = json['jd_ios'] != null ? new AppConfigKeyItemModel.fromJson(json['jd_ios']) : 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; 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() { Map<String, dynamic> toJson() {
@@ -103,6 +105,10 @@ class AppConfigKeyModel {
if (this.jdAndroid != null) { if (this.jdAndroid != null) {
data['jd_android'] = this.jdAndroid.toJson(); data['jd_android'] = this.jdAndroid.toJson();
} }
if (this.gd != null) {
data['gd'] = this.gd.toJson();
}

return data; return data;
} }
} }
@@ -216,3 +222,22 @@ class AppConfigGuideModel {
return data; 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 Parādīt failu

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


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


+ 6
- 2
lib/register.dart Parādīt failu

@@ -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_detail/wallet_detail.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_income/wallet_income.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/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/util/defalut_widget_creater.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';


@@ -135,7 +136,10 @@ class BaseWidgetRegister {
SharesdkPlugin.regist(register); 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); // NetUtil.post('/api/v1/rec/kaola?page=1', method: NetMethod.GET, cache: true, showToast: false);
LoginStyleUtil.fetchNetPageData(); LoginStyleUtil.fetchNetPageData();


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


return null; return null;
}); });


+ 3
- 1
lib/zhiying_base_widget.dart Parādīt failu

@@ -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:zhiying_base_widget/pages/custom_page/bloc/background_bloc.dart';
export 'package:pull_to_refresh/pull_to_refresh.dart'; export 'package:pull_to_refresh/pull_to_refresh.dart';
export 'package:flutter_user_agent/flutter_user_agent.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 Parādīt failu

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


loading_indicator: ^1.2.0 loading_indicator: ^1.2.0


#高德定位
amap_flutter_location: ^1.0.1



mobpush_plugin: mobpush_plugin:
plugin_platform_interface: ^1.0.1 plugin_platform_interface: ^1.0.1


Notiek ielāde…
Atcelt
Saglabāt