Browse Source

ios,更改

remove_uniapp
fmk 3 years ago
parent
commit
01dd1bbadd
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 2
      ios/Runner/AppDelegate.mm
  3. 4
      lib/address/edit_address_page.dart
  4. 2
      lib/home/home_page.dart
  5. 2
      lib/home/home_view/coupon.dart
  6. 2
      lib/home/points_mall_page.dart
  7. 2
      lib/mine/fans_page.dart
  8. 2
      lib/mine/manage_address_page.dart
  9. 2
      lib/mine/mine_vip/binding_assistant_card.dart
  10. 2
      lib/mine/mine_vip/legal_right_details.dart
  11. 22
      lib/mine/mine_vip/mine_vip_core.dart
  12. 2
      lib/mine/mine_vip_level_page.dart
  13. 15
      lib/mine/recharge_page.dart
  14. 2
      lib/mine/vip_detail_page.dart
  15. 14
      lib/order/exchange_order_page.dart
  16. 2
      lib/order/order_detail_page.dart
  17. 2
      lib/order/order_history_page.dart
  18. 14
      lib/order/order_utils.dart
  19. 8
      lib/retrofit/min_api.dart
  20. 2
      lib/retrofit/min_api.g.dart
  21. 8
      lib/retrofit/retrofit_api.dart
  22. 2
      lib/retrofit/retrofit_api.g.dart
  23. 2
      lib/setting/help_feedback_page.dart
  24. 17
      lib/settlement/settlement.dart
  25. 2
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  26. 15
      lib/union/union_details_page.dart
  27. 2
      lib/view_widget/hot_item.dart
  28. 2
      lib/view_widget/new_people_reward.dart
  29. 2
      lib/web/web_page.dart

12
ios/Runner.xcodeproj/project.pbxproj

@ -616,7 +616,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 75; CURRENT_PROJECT_VERSION = 78;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -666,7 +666,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.75; MARKETING_VERSION = 1.0.78;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -816,7 +816,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 75; CURRENT_PROJECT_VERSION = 78;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -866,7 +866,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.75; MARKETING_VERSION = 1.0.78;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -907,7 +907,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 75; CURRENT_PROJECT_VERSION = 78;
DEVELOPMENT_TEAM = YF3Q8DVP52; DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -957,7 +957,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 1.0.75; MARKETING_VERSION = 1.0.78;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",

2
ios/Runner/AppDelegate.mm

@ -9,8 +9,10 @@
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self]; [GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch. // Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions]; return [super application:application didFinishLaunchingWithOptions:launchOptions];
} }

4
lib/address/edit_address_page.dart

@ -65,8 +65,8 @@ class _EditAddressPage extends State<EditAddressPage> {
child: Column( child: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(bottom: 26.h), margin: EdgeInsets.only(bottom: 23.h),
padding: EdgeInsets.only(top: 16.h, bottom: 16.h), padding: EdgeInsets.only(top: 16.h, bottom: 15.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [

2
lib/home/home_page.dart

@ -283,7 +283,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
token: value.getString("token"), token: value.getString("token"),
); );
} }
BaseData baseData = await apiService.wiped(memberCouponId); BaseData baseData = await apiService.wiped(memberCouponId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("核销成功", alignment: Alignment.center); SmartDialog.showToast("核销成功", alignment: Alignment.center);
} else { } else {

2
lib/home/home_view/coupon.dart

@ -277,7 +277,7 @@ class _CouponView extends State<CouponView> {
} }
receiveCoupon(couponId) async { receiveCoupon(couponId) async {
BaseData baseData = await apiService.receiveCoupon(couponId); BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
queryCoupon(); queryCoupon();
showAlertDialog(); showAlertDialog();

2
lib/home/points_mall_page.dart

@ -72,7 +72,7 @@ class _PointsMallPage extends State<PointsMallPage>
queryUser() async { queryUser() async {
BaseData<PageInfo<BannerData>> banner = await client.queryBanner({ BaseData<PageInfo<BannerData>> banner = await client.queryBanner({
"model": {"type": "CREDIT_INDEX"}, "model": {"type": "CREDIT_INDEX"},
}); }).catchError((onError) {});
if (banner != null && if (banner != null &&
banner.isSuccess && banner.isSuccess &&

2
lib/mine/fans_page.dart

@ -83,7 +83,7 @@ class _FansPage extends State<FansPage> {
/// ///
_vipFollow(followId,isFollow) async { _vipFollow(followId,isFollow) async {
BaseData baseData = await apiService.follow(followId); BaseData baseData = await apiService.follow(followId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
widget.refresh(); widget.refresh();
_queryFollowList(); _queryFollowList();

2
lib/mine/manage_address_page.dart

@ -271,7 +271,7 @@ class _ManageAddressPage extends State<ManageAddressPage> {
return AlertDialog( return AlertDialog(
content: Container( content: Container(
width: MediaQuery.of(context).size.width - 84, width: MediaQuery.of(context).size.width - 84,
height: 110.h, height: 120.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

2
lib/mine/mine_vip/binding_assistant_card.dart

@ -45,7 +45,7 @@ class _BindingAssistantCard extends State<BindingAssistantCard> {
token: value.getString("token"), token: value.getString("token"),
); );
} }
BaseData baseData = await apiService.bindSecondCard(phone); BaseData baseData = await apiService.bindSecondCard(phone).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("绑定成功", alignment: Alignment.center); SmartDialog.showToast("绑定成功", alignment: Alignment.center);
Navigator.of(context).pop(true); Navigator.of(context).pop(true);

2
lib/mine/mine_vip/legal_right_details.dart

@ -88,7 +88,7 @@ class _LegalRightDetails extends State<LegalRightDetails> {
token: value.getString("token"), token: value.getString("token"),
); );
} }
BaseData baseData = await apiService.unbindSecondCard(phone); BaseData baseData = await apiService.unbindSecondCard(phone).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
querySecondCardList(); querySecondCardList();
SmartDialog.showToast("解绑成功", alignment: Alignment.center); SmartDialog.showToast("解绑成功", alignment: Alignment.center);

22
lib/mine/mine_vip/mine_vip_core.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,6 +17,7 @@ import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/mine_vip_view.dart'; import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -80,7 +83,7 @@ class _MineVipCore extends State<MineVipCore> {
} }
queryVipLevel() async { queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList(); BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {});
if (rankData != null && rankData.isSuccess) { if (rankData != null && rankData.isSuccess) {
ranks.clear(); ranks.clear();
ranks.addAll(rankData.data); ranks.addAll(rankData.data);
@ -120,15 +123,18 @@ class _MineVipCore extends State<MineVipCore> {
/// ///
buyRank() async { buyRank() async {
// if (!(await Min.isInitialize())) {
// app的充值支付使用同一个WXPayEntryActivity回调 if(Platform.isAndroid) {
// getPackage空指针 if (!(await Min.isInitialize())) {
// //app的充值支付使用同一个WXPayEntryActivity回调
// await Min.initialize(); //getPackage空指针
// } //
await Min.initialize();
}
}
BaseData<dynamic> baseData = await apiService BaseData<dynamic> baseData = await apiService
.rankBuy({"buyType": 2, "rankId": ranks[checkIndex].id}); .rankBuy({"buyType": 2, "rankId": ranks[checkIndex].id}).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
WxPay wxPay = WxPay.fromJson(baseData.data); WxPay wxPay = WxPay.fromJson(baseData.data);
await registerWxApi( await registerWxApi(

2
lib/mine/mine_vip_level_page.dart

@ -42,7 +42,7 @@ class _MineVipLevelPage extends State<MineVipLevelPage> {
} }
queryVipLevel() async { queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList(); BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {});
if (rankData != null && rankData.isSuccess) { if (rankData != null && rankData.isSuccess) {
ranks.clear(); ranks.clear();
ranks.addAll(rankData.data); ranks.addAll(rankData.data);

15
lib/mine/recharge_page.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -50,10 +52,10 @@ class _RechargePage extends State<RechargePage> {
Navigator.of(context).pop(); Navigator.of(context).pop();
SmartDialog.showToast("充值成功", alignment: Alignment.center); SmartDialog.showToast("充值成功", alignment: Alignment.center);
} }
else{ // else{
SmartDialog.showToast("充值失败", alignment: Alignment.center); // SmartDialog.showToast("充值失败", alignment: Alignment.center);
return; // return;
} // }
}); });
} }
@ -387,15 +389,16 @@ class _RechargePage extends State<RechargePage> {
return; return;
} }
if(Platform.isAndroid){
if (!(await Min.isInitialize())) { if (!(await Min.isInitialize())) {
// app的充值支付使用同一个WXPayEntryActivity回调 // app的充值支付使用同一个WXPayEntryActivity回调
// getPackage空指针 // getPackage空指针
// //
await Min.initialize(); await Min.initialize();
} }}
BaseData<dynamic> baseData = BaseData<dynamic> baseData =
await apiService.recharge({"amount": amount, "rechargeType": 2}); await apiService.recharge({"amount": amount, "rechargeType": 2}).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
WxPay wxPay = WxPay.fromJson(baseData.data); WxPay wxPay = WxPay.fromJson(baseData.data);
await registerWxApi( await registerWxApi(

2
lib/mine/vip_detail_page.dart

@ -83,7 +83,7 @@ class _VipDetailPage extends State<VipDetailPage> {
"id": widget.arguments["id"], "id": widget.arguments["id"],
"latitude": "$latitude", "latitude": "$latitude",
"longitude": "$longitude", "longitude": "$longitude",
}); }).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
vipCard = baseData.data; vipCard = baseData.data;
refreshController.loadComplete(); refreshController.loadComplete();

14
lib/order/exchange_order_page.dart

@ -1,4 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,6 +13,7 @@ import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/receiving_method_dialog.dart'; import 'package:huixiang/view_widget/receiving_method_dialog.dart';
@ -1084,11 +1086,13 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
(widget.arguments["payType"] == 2 && (widget.arguments["payType"] == 2 &&
widget.arguments["money"] != "0.00")) && widget.arguments["money"] != "0.00")) &&
checkIndex == 3) { checkIndex == 3) {
// if (!(await Min.isInitialize())) { // if(Platform.isAndroid){
// app的充值支付使用同一个WXPayEntryActivity回调 // if (!(await Min.isInitialize())) {
// getPackage空指针 // // app的充值支付使用同一个WXPayEntryActivity回调
// // // getPackage空指针
// await Min.initialize(); // //
// await Min.initialize();
// }
// } // }
WxPay wxPay = WxPay.fromJson(baseDate.data); WxPay wxPay = WxPay.fromJson(baseDate.data);
await registerWxApi( await registerWxApi(

2
lib/order/order_detail_page.dart

@ -497,7 +497,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
_orderCancel() async { _orderCancel() async {
BaseData baseData = await apiService.orderCancel(widget.arguments["id"]); BaseData baseData = await apiService.orderCancel(widget.arguments["id"]).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功"); SmartDialog.showToast("订单取消成功");
Future.delayed(Duration(milliseconds: 300), () { Future.delayed(Duration(milliseconds: 300), () {

2
lib/order/order_history_page.dart

@ -536,7 +536,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
} }
orderCancel(String orderId) async { orderCancel(String orderId) async {
BaseData baseData = await apiService.orderCancel(orderId); BaseData baseData = await apiService.orderCancel(orderId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功"); SmartDialog.showToast("订单取消成功");
_onRefresh(); _onRefresh();

14
lib/order/order_utils.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
@ -37,11 +39,13 @@ class OrderUtils {
placeOrderFirst.tableId = orderInfo.tableId; placeOrderFirst.tableId = orderInfo.tableId;
if (placeOrderFirst.payChannel == 1) { if (placeOrderFirst.payChannel == 1) {
if (!(await Min.isInitialize())) { if(Platform.isAndroid){
// app的充值支付使用同一个WXPayEntryActivity回调 if (!(await Min.isInitialize())) {
// getPackage空指针 // app的充值支付使用同一个WXPayEntryActivity回调
// // getPackage空指针
await Min.initialize(); //
await Min.initialize();
}
} }
BaseData<WxPay> baseData = await minService BaseData<WxPay> baseData = await minService
.settlementWx(placeOrderFirst.toJson()) .settlementWx(placeOrderFirst.toJson())

8
lib/retrofit/min_api.dart

@ -21,8 +21,8 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "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 baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
@ -32,8 +32,8 @@ part 'min_api.g.dart';
// const baseUrl = "http://192.168.10.236:8765/app/";/// // const baseUrl = "http://192.168.10.236:8765/app/";///
const base_url = "http://192.168.10.88:8765/app/";/// // const base_url = "http://192.168.10.143:8765/app/";///
const baseUrl = "http://192.168.10.88:8765/app/";/// // const baseUrl = "http://192.168.10.143:8765/app/";///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.88:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

8
lib/retrofit/retrofit_api.dart

@ -56,8 +56,8 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "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 baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
@ -69,8 +69,8 @@ part 'retrofit_api.g.dart';
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
const base_url = "http://192.168.10.88:8766/app/";/// // const base_url = "http://192.168.10.143:8766/app/";///
const baseUrl = "http://192.168.10.88:8766/app/";/// // const baseUrl = "http://192.168.10.143:8766/app/";///
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)
abstract class ApiService { abstract class ApiService {

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.88:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

2
lib/setting/help_feedback_page.dart

@ -167,7 +167,7 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
BaseData baseData = await apiService.report({ BaseData baseData = await apiService.report({
"mobile": phone, "mobile": phone,
"reportContent": content, "reportContent": content,
}); }).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("反馈成功"); SmartDialog.showToast("反馈成功");
Navigator.of(context).pop(); Navigator.of(context).pop();

17
lib/settlement/settlement.dart

@ -284,8 +284,9 @@ class _Settlement extends State<Settlement> {
this.downOrder = baseData.data; this.downOrder = baseData.data;
querySettlement(); querySettlement();
} else { } else {
SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center); baseData?.isSuccess ?? false ?
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center) :
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} else { } else {
/// ///
@ -333,11 +334,13 @@ class _Settlement extends State<Settlement> {
? minOrderInfo.orderProductVOList ? minOrderInfo.orderProductVOList
: downOrder.orderProductVOList; : downOrder.orderProductVOList;
if (placeOrderFirst.payChannel == 1) { if (placeOrderFirst.payChannel == 1) {
if (!(await Min.isInitialize())) { if(Platform.isAndroid){
// app的充值支付使用同一个WXPayEntryActivity回调 if (!(await Min.isInitialize())) {
// getPackage空指针 // app的充值支付使用同一个WXPayEntryActivity回调
// // getPackage空指针
await Min.initialize(); //
await Min.initialize();
}
} }
BaseData<WxPay> baseData = await minService BaseData<WxPay> baseData = await minService
.settlementWx(placeOrderFirst.toJson()) .settlementWx(placeOrderFirst.toJson())

2
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -200,7 +200,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
Expanded( Expanded(
child: Text( child: Text(
widget.remark != ""? widget.remark:"口味、面包硬度等", widget.remark != "" ? widget.remark:"点击添加备注",
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,

15
lib/union/union_details_page.dart

@ -170,7 +170,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
/// ///
_receiveCoupon(couponId) async { _receiveCoupon(couponId) async {
BaseData baseData = await apiService.receiveCoupon(couponId); BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
queryStoreInfo(); queryStoreInfo();
showAlertDialog(); showAlertDialog();
@ -192,7 +192,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
///VIP ///VIP
_receiveVip() async { _receiveVip() async {
BaseData baseData = await apiService.minLogin(storeInfo.id); BaseData baseData = await apiService.minLogin(storeInfo.id).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast(S.of(context).lingquchenggong, SmartDialog.showToast(S.of(context).lingquchenggong,
alignment: Alignment.center); alignment: Alignment.center);
@ -217,7 +217,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
alignment: Alignment.center); alignment: Alignment.center);
return; return;
} }
BaseData baseData = await apiService.minLogin(storeInfo.id); BaseData baseData = await apiService.minLogin(storeInfo.id).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
UserEntity userEntity = UserEntity.fromJson(baseData.data); UserEntity userEntity = UserEntity.fromJson(baseData.data);
startMin(userEntity.token, userEntity.userId); startMin(userEntity.token, userEntity.userId);
@ -227,8 +227,13 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
startMin(token, userId) async { startMin(token, userId) async {
if (storeInfo == null) return; if (storeInfo == null) return;
if (storeInfo.mini == null) return; if (storeInfo.mini == null) return;
if (!(await Min.isInitialize())) { if(Platform.isAndroid){
await Min.initialize(); if (!(await Min.isInitialize())) {
// app的充值支付使用同一个WXPayEntryActivity回调
// getPackage空指针
//
await Min.initialize();
}
} }
printMin(); printMin();
String miniAppId = storeInfo.mini.miniAppId; String miniAppId = storeInfo.mini.miniAppId;

2
lib/view_widget/hot_item.dart

@ -38,7 +38,7 @@ class _HotArticleItem extends State<HotArticleItem> {
//// ////
_vipFollow(followId) async { _vipFollow(followId) async {
BaseData baseData = await apiService.follow(followId); BaseData baseData = await apiService.follow(followId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("关注成功"); SmartDialog.showToast("关注成功");
} }

2
lib/view_widget/new_people_reward.dart

@ -108,7 +108,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
Widget rewardItem(FirstLoginCouponList firstLoginCouponList) { Widget rewardItem(FirstLoginCouponList firstLoginCouponList) {
return Container( return Container(
height:90.h, // height:90.h,
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(

2
lib/web/web_page.dart

@ -318,7 +318,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
/// ///
delComment() async { delComment() async {
BaseData baseData = await apiService.delComment( BaseData baseData = await apiService.delComment(
widget.arguments["activityId"] ?? widget.arguments["articleId"]); widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
CommentListState _commentList = commentKey.currentState; CommentListState _commentList = commentKey.currentState;
_commentList.queryMemberCommentList(); _commentList.queryMemberCommentList();

Loading…
Cancel
Save