Browse Source

Merge remote-tracking branch 'origin/remove_uniapp' into remove_uniapp

remove_uniapp
fmk 3 years ago
parent
commit
226830eae1
  1. 2
      lib/main.dart
  2. 3
      lib/main_page.dart
  3. 10
      lib/retrofit/min_api.dart
  4. 8
      lib/retrofit/min_api.g.dart
  5. 8
      lib/retrofit/retrofit_api.dart
  6. 2
      lib/retrofit/retrofit_api.g.dart
  7. 2
      lib/setting/about_page.dart
  8. 6
      lib/setting/logout_ing.dart
  9. 6
      lib/setting/setting_page.dart
  10. 3
      lib/setting/treaty_page.dart
  11. 15
      lib/settlement/settlement.dart

2
lib/main.dart

@ -125,7 +125,7 @@ void main() async {
// FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6");
}
final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();
// final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();

3
lib/main_page.dart

@ -139,8 +139,9 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
queryUserInfo();
}
final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();
initSdk() async {
xgFlutterPlugin.stopXg();
///ios startXg前需要调用此方法
xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com");
xgFlutterPlugin.setEnableDebug(true);

10
lib/retrofit/min_api.dart

@ -21,8 +21,8 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart';
const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
@ -32,8 +32,8 @@ const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式
// const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.139:8765/app/";///
// const baseUrl = "http://192.168.10.139:8765/app/";///
const base_url = "http://192.168.10.104:8765/app/";///
const baseUrl = "http://192.168.10.104:8765/app/";///
// const base_url = "http://192.168.10.37:8766/app/";
@ -183,7 +183,7 @@ abstract class MinApiService {
///
@POST("order/placeOrderFirst")
Future<BaseData<DownOrder>> placeOrderFirst(@Body() Map<String, dynamic> param);
Future<BaseData<dynamic>> placeOrderFirst(@Body() Map<String, dynamic> param);
///
@POST("order/addOrder")

8
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
baseUrl ??= 'http://192.168.10.104:8765/app/';
}
final Dio _dio;
@ -269,7 +269,7 @@ class _MinApiService implements MinApiService {
}
@override
Future<BaseData<DownOrder>> placeOrderFirst(param) async {
Future<BaseData<dynamic>> placeOrderFirst(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -284,9 +284,9 @@ class _MinApiService implements MinApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<DownOrder>.fromJson(
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => DownOrder.fromJson(json),
(json) => json,
);
return value;
}

8
lib/retrofit/retrofit_api.dart

@ -58,8 +58,8 @@ 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
@ -71,8 +71,8 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式
// const baseUrl = "http://192.168.10.37:8766/app/";
// const base_url = "http://192.168.10.139:8766/app/";///
// const baseUrl = "http://192.168.10.139:8766/app/";///
const base_url = "http://192.168.10.104:8766/app/";///
const baseUrl = "http://192.168.10.104:8766/app/";///
@RestApi(baseUrl: baseUrl)
abstract class ApiService {

2
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.104:8766/app/';
}
final Dio _dio;

2
lib/setting/about_page.dart

@ -84,7 +84,7 @@ class _AboutPage extends State<AboutPage> {
S.of(context).dangqianbanben,
S.of(context).banben(version),
),
textItem(S.of(context).tebieshengming),
// textItem(S.of(context).tebieshengming),
InkWell(
onTap: () {
Navigator.of(context)

6
lib/setting/logout_ing.dart

@ -452,8 +452,8 @@ class _LogoutIng extends State<LogoutIng> {
Navigator.of(context)
.pushNamedAndRemoveUntil('/router/login_page', (route) => false);
if (xgFlutterPlugin != null) {
xgFlutterPlugin.stopXg();
}
// if (xgFlutterPlugin != null) {
// xgFlutterPlugin.stopXg();
// }
}
}

6
lib/setting/setting_page.dart

@ -243,9 +243,9 @@ class _SettingPage extends State<SettingPage> {
Navigator.of(context)
.pushNamedAndRemoveUntil('/router/login_page', (route) => false);
if (xgFlutterPlugin != null) {
xgFlutterPlugin.stopXg();
}
// if (xgFlutterPlugin != null) {
// xgFlutterPlugin.stopXg();
// }
}
Widget settingItem(left, right) {

3
lib/setting/treaty_page.dart

@ -36,7 +36,8 @@ class _TreatyPage extends State<TreatyPage> {
background: Colors.transparent,
leadingColor: Colors.black,
),
body: Container(
body:
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,

15
lib/settlement/settlement.dart

@ -274,23 +274,21 @@ class _Settlement extends State<Settlement> {
if (tableId == 0) {
///
BaseData<DownOrder> baseData = await minService
BaseData<dynamic> baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
if (baseData != null && baseData.isSuccess) {
placeOrder = true;
this.downOrder = baseData.data;
this.downOrder = DownOrder.fromJson(baseData.data);
querySettlement();
} else {
baseData?.isSuccess ?? false ?
SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center) :
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
}
} else {
///
BaseData<DownOrder> baseData;
BaseData<dynamic> baseData;
if (parentId == "") {
//
if (placeOrder) {
@ -319,11 +317,14 @@ class _Settlement extends State<Settlement> {
}
if (baseData != null && baseData.isSuccess) {
placeOrder = true;
this.downOrder = baseData.data;
this.downOrder = DownOrder.fromJson(baseData.data);
queryOrderDetails(
(parentId == null || parentId == "") ? baseData.data.id : parentId);
setState(() {});
}
else {
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
}
}
}

Loading…
Cancel
Save