Browse Source

增加联系人,更改审核需求

remove_uniapp
w-R 3 years ago
parent
commit
3877ed531c
  1. BIN
      assets/image/2x/icon_mine_online_service.webp
  2. BIN
      assets/image/3x/icon_mine_online_service.webp
  3. BIN
      assets/image/icon_mine_online_service.webp
  4. 42
      lib/main.dart
  5. 50
      lib/main_page.dart
  6. 19
      lib/mine/mine_view/mine_item.dart
  7. 10
      lib/retrofit/retrofit_api.dart
  8. 6
      lib/retrofit/retrofit_api.g.dart
  9. 13
      lib/setting/help_feedback_page.dart

BIN
assets/image/2x/icon_mine_online_service.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/3x/icon_mine_online_service.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
assets/image/icon_mine_online_service.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 1.0 KiB

42
lib/main.dart

@ -116,7 +116,7 @@ void main() async {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
}
ImgCachePath();
initSdk();
// initSdk();
bool isFirst = sharedPreferences.getBool("isFirst");
runApp(MyApp(locale, isFirst));
@ -127,47 +127,7 @@ void main() async {
final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();
initSdk() async {
///ios startXg前需要调用此方法
xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com");
xgFlutterPlugin.setEnableDebug(true);
///iOS的appID信息Android信息在build.gradle文件中
xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22");
if (Platform.isAndroid) {
XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi();
//
androidApi.setMiPushAppId(appId: "2882303761520050452");
androidApi.setMiPushAppKey(appKey: "5582005091452");
androidApi.enableOtherPush();
androidApi.regPush();
}
ShareSDKRegister shareSDKRegister = ShareSDKRegister();
shareSDKRegister.setupWechat(
"wx3b269e795ed23e5f",
"64020361b8ec4c99936c0e3999a9f249",
"https://hx.lotus-wallet.com/app/",
);
shareSDKRegister.setupFacebook(
"523308712059457",
"d3a1b6377100871799d8973fbe84794a",
"一心回乡",
);
SharesdkPlugin.regist(shareSDKRegister);
if (Platform.isIOS) {
LocationFlutterPlugin.setApiKey("ylW2QPlsbERkho7jOgU4GQSeawmdUIoR");
BMFMapSDK.setApiKeyAndCoordType(
'ylW2QPlsbERkho7jOgU4GQSeawmdUIoR',
BMF_COORD_TYPE.COMMON,
);
} else if (Platform.isAndroid) {
BMFMapSDK.setCoordType(BMF_COORD_TYPE.COMMON);
}
}
EventBus eventBus = EventBus(sync: true);

50
lib/main_page.dart

@ -2,6 +2,8 @@ import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_bmflocation/bdmap_location_flutter_plugin.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:huixiang/community/community_page.dart';
@ -20,6 +22,9 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/native_event_handler.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
import 'package:sharesdk_plugin/sharesdk_register.dart';
import 'package:tpns_flutter_plugin/android/xg_android_api.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
import 'community/order_page.dart';
@ -81,6 +86,9 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
..userInteractions = false
..dismissOnTap = false;
initSdk();
pushRoute();
String invite = "";
@ -130,6 +138,48 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
});
queryUserInfo();
}
initSdk() async {
///ios startXg前需要调用此方法
xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com");
xgFlutterPlugin.setEnableDebug(true);
///iOS的appID信息Android信息在build.gradle文件中
xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22");
if (Platform.isAndroid) {
XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi();
//
androidApi.setMiPushAppId(appId: "2882303761520050452");
androidApi.setMiPushAppKey(appKey: "5582005091452");
androidApi.enableOtherPush();
androidApi.regPush();
}
ShareSDKRegister shareSDKRegister = ShareSDKRegister();
shareSDKRegister.setupWechat(
"wx3b269e795ed23e5f",
"64020361b8ec4c99936c0e3999a9f249",
"https://hx.lotus-wallet.com/app/",
);
shareSDKRegister.setupFacebook(
"523308712059457",
"d3a1b6377100871799d8973fbe84794a",
"一心回乡",
);
SharesdkPlugin.regist(shareSDKRegister);
if (Platform.isIOS) {
LocationFlutterPlugin.setApiKey("ylW2QPlsbERkho7jOgU4GQSeawmdUIoR");
BMFMapSDK.setApiKeyAndCoordType(
'ylW2QPlsbERkho7jOgU4GQSeawmdUIoR',
BMF_COORD_TYPE.COMMON,
);
} else if (Platform.isAndroid) {
BMFMapSDK.setCoordType(BMF_COORD_TYPE.COMMON);
}
if (Platform.isAndroid) {
xgFlutterPlugin.getXgAndroidApi().addNativeEventHandler(

19
lib/mine/mine_view/mine_item.dart

@ -157,16 +157,15 @@ class _MineItem extends State<MineItem> {
),
),),
///
// Expanded(child: InkWell(
// onTap: () {
// showCallMobile();
// },
// child: mineItem(
// "联系客服",
// "assets/image/icon_mine_online_service.png",
// ),
// ),),
Expanded(child:Container()),
Expanded(child: InkWell(
onTap: () {
showCallMobile();
},
child: mineItem(
"联系客服",
"assets/image/icon_mine_online_service.webp",
),
),),
Expanded(child:Container()),
Expanded(child:Container())
],

10
lib/retrofit/retrofit_api.dart

@ -57,14 +57,14 @@ import 'data/vip_rule_details.dart';
part 'retrofit_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
@ -382,7 +382,7 @@ abstract class ApiService {
///
@POST("/other/report")
Future<BaseData<bool>> report(@Body() Map<String, String> map);
Future<BaseData<dynamic>> report(@Body() Map<String, String> map);
///
@GET("/order/cancel/{id}")

6
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
baseUrl ??= 'http://192.168.10.236:8766/app/';
}
final Dio _dio;
@ -1167,7 +1167,7 @@ class _ApiService implements ApiService {
}
@override
Future<BaseData<bool>> report(map) async {
Future<BaseData<dynamic>> report(map) async {
ArgumentError.checkNotNull(map, 'map');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -1181,7 +1181,7 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<bool>.fromJson(
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as bool,
);

13
lib/setting/help_feedback_page.dart

@ -140,6 +140,10 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
),
InkWell(
onTap: () {
if(phoneController.text == ""){
SmartDialog.showToast("请输入有效手机号码", alignment: Alignment.center);
return;
}
report();
},
child: Container(
@ -162,17 +166,16 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
}
report() async {
var content = editingController.text;
var phone = phoneController.text;
BaseData baseData = await apiService.report({
"mobile": phone,
"reportContent": content,
"mobile": phoneController.text,
"reportContent": editingController.text,
}).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("反馈成功");
Navigator.of(context).pop();
} else {
SmartDialog.showToast("反馈失败");
SmartDialog.showToast("反馈成功");
Navigator.of(context).pop();
}
}

Loading…
Cancel
Save