Compare commits
4 Commits
ec96a96be2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a2c7683b7 | |||
| 8e79d8039c | |||
| 2523899ec4 | |||
| 853a9135c8 |
@@ -127,8 +127,9 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation
|
||||
private String token;
|
||||
private String plateNumber;
|
||||
|
||||
private String mDebugUrl = "https://beta-esg.api.lnh2e.com/appointment/";
|
||||
private String mReleaseUrl = "";
|
||||
// private String mDebugUrl = "https://beta-esg.api.lnh2e.com/appointment/";
|
||||
//线上环境
|
||||
private String mDebugUrl = "http://47.101.201.13:8443/api/appointment/";
|
||||
|
||||
// 存储货车路线算法接口返回的数据
|
||||
private TruckRouteData truckRouteData;
|
||||
@@ -575,7 +576,6 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation
|
||||
tvPhone.setText("联系方式:" + liaisonPhone);
|
||||
|
||||
|
||||
|
||||
aMap.animateCamera(CameraUpdateFactory.newLatLngZoom(endPoint, 13f));
|
||||
|
||||
|
||||
@@ -743,7 +743,7 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation
|
||||
*/
|
||||
private void fetchTruckRouteAlgorithm(AMapLocation loc) {
|
||||
if (plateNumber == null || plateNumber.isEmpty()) {
|
||||
Toast.makeText(mActivity,"请先绑定车辆后进行导航",Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(mActivity, "请先绑定车辆后进行导航", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
showLoading();
|
||||
@@ -930,7 +930,7 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation
|
||||
// 简化逻辑,直接设置文本
|
||||
endInput.post(() -> {
|
||||
try {
|
||||
endInput.setText(district != null && !district.isEmpty() ? (name + " " + district ): name);
|
||||
endInput.setText(district != null && !district.isEmpty() ? (name + " " + district) : name);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to set text to endInput", e);
|
||||
}
|
||||
|
||||
@@ -27,23 +27,15 @@
|
||||
|
||||
#pragma mark - url
|
||||
///获取站点列表
|
||||
#define kGetStationListUrl @"https://beta-esg.api.lnh2e.com/appointment/station/getNearbyHydrogenStationsByLocation"
|
||||
#define kGetStationListUrl @"http://47.101.201.13:8443/api/appointment/station/getNearbyHydrogenStationsByLocation"
|
||||
|
||||
///单个站点详情
|
||||
#define kGetStationDetailtUrl @"https://beta-esg.api.lnh2e.com/appointment/station/getStationInfoByArea"
|
||||
#define kGetStationDetailtUrl @"http://47.101.201.13:8443/api/appointment/station/getStationInfoByArea"
|
||||
|
||||
|
||||
///获取途经点
|
||||
/**
|
||||
请求方式:post 暂时调不通
|
||||
{
|
||||
"longitude":"121.254139",
|
||||
"latitude":"31.214628",
|
||||
"plateNumber":"浙F32111F",
|
||||
"hydrogenSiteId":""//加氢站DI}
|
||||
|
||||
*/
|
||||
#define kGetRoutePointtUrl @"https://beta-esg.api.lnh2e.com/appointment/truck/truckRouteAlgorithm"
|
||||
#define kGetRoutePointtUrl @"http://47.101.201.13:8443/api/appointment/truck/truckRouteAlgorithm"
|
||||
|
||||
|
||||
#import "ANavPointModel.h"
|
||||
|
||||
@@ -180,7 +180,10 @@
|
||||
dic2[@"latitude"] = [NSString stringWithFormat:@"%f" , self.latitude];
|
||||
dic2[@"plateNumber"] = carNo;
|
||||
dic2[@"hydrogenSiteId"] = [NSString stringWithFormat:@"%@" , self.pointModel.stationID];
|
||||
|
||||
|
||||
NSLog(@"🔍 Route API Request Params: %@", dic2);
|
||||
NSLog(@"🔍 Request URL: %@", kGetRoutePointtUrl);
|
||||
|
||||
NSDictionary * headDic = @{
|
||||
@"Content-Type":@"application/json; charset=UTF-8",
|
||||
@"asoco-token" : token
|
||||
@@ -192,10 +195,17 @@
|
||||
|
||||
NSString * url = kGetRoutePointtUrl;
|
||||
[AMapNavHttpUtil postRequestWithURL:url parameters:dic2 requestHeader:headDic successHandler:^(NSDictionary * _Nonnull data, NSURLResponse * _Nonnull response) {
|
||||
|
||||
|
||||
NSLog(@"🔍 Route API Response: %@", data);
|
||||
|
||||
ATripCalcResponse * resp = [ATripCalcResponse mj_objectWithKeyValues:data];
|
||||
NSLog(@"🔍 Parsed resp.code: %ld", (long)resp.code);
|
||||
NSLog(@"🔍 Parsed resp.data: %@", resp.data);
|
||||
|
||||
if (resp.code == 200 && resp.data) {
|
||||
self.tjdPathInfoModel = resp.data;
|
||||
NSLog(@"🔍 Parsed algorithmPath: %@", self.tjdPathInfoModel.algorithmPath);
|
||||
NSLog(@"🔍 Parsed hydrogenCost: %@", self.tjdPathInfoModel.algorithmPath.hydrogenCost);
|
||||
|
||||
if (blk) {
|
||||
blk(resp.data);
|
||||
@@ -1150,8 +1160,10 @@
|
||||
}
|
||||
|
||||
self.stationDetailPopup.pointModel = navPoint;
|
||||
|
||||
|
||||
///费用
|
||||
NSLog(@"🔍 Debug algorithmPath: %@", self.tjdPathInfoModel.algorithmPath);
|
||||
NSLog(@"🔍 Debug hydrogenCost: %@", self.tjdPathInfoModel.algorithmPath.hydrogenCost);
|
||||
self.stationDetailPopup.estimatedCost = self.tjdPathInfoModel.algorithmPath.hydrogenCost;
|
||||
///时间
|
||||
self.stationDetailPopup.estimatedTime = [NSString stringWithFormat:@"%.f" , self.tjdPathInfoModel.pathDto.duration / 60.0];
|
||||
|
||||
@@ -80,5 +80,22 @@
|
||||
</array>
|
||||
<key>uses</key>
|
||||
<string></string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>47.101.201.13</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
<key>NSExceptionMinimumTLSVersion</key>
|
||||
<string>TLSv1.0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -8,11 +8,11 @@ class AppTheme {
|
||||
static const Color themeColor = Color(0xFF017137);
|
||||
|
||||
//是否开放域名切换
|
||||
static const bool is_show_host = true;
|
||||
static const bool is_show_host = false;
|
||||
|
||||
//http://192.168.110.222:8080/
|
||||
//http://192.168.110.44:8080/
|
||||
static String test_service_url = "https://beta-esg.api.lnh2e.com/";
|
||||
static String test_service_url = "http://47.101.201.13:8443/api/";
|
||||
static const String release_service_url = "";
|
||||
|
||||
//加氢站相关查询
|
||||
|
||||
@@ -17,7 +17,7 @@ void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
WidgetsBinding widgetsBinding = await init(
|
||||
isDebug: true,
|
||||
isDebug: false,
|
||||
logTag: '小羚羚',
|
||||
supportedLocales: [const Locale('zh', 'CN')],
|
||||
);
|
||||
@@ -35,7 +35,7 @@ void main() async {
|
||||
// 设计稿尺寸 单位:dp
|
||||
designSize: const Size(390, 844),
|
||||
// Getx Log
|
||||
enableLog: true,
|
||||
enableLog: false,
|
||||
// 默认的跳转动画
|
||||
defaultTransition: Transition.rightToLeft,
|
||||
// 主题模式
|
||||
|
||||
Reference in New Issue
Block a user