Browse Source

更改合并u

zyh
w-R 3 years ago
parent
commit
cab48fa74d
  1. 91
      lib/mine/mine_page.dart
  2. 14
      lib/retrofit/min_api.dart
  3. 18
      lib/retrofit/min_api.g.dart
  4. 8
      lib/retrofit/retrofit_api.dart
  5. 2
      lib/retrofit/retrofit_api.g.dart

91
lib/mine/mine_page.dart

@ -53,12 +53,9 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
@override
void dispose() {
super.dispose();
if (_refreshController != null)
_refreshController.dispose();
if (_refreshController != null) _refreshController.dispose();
}
@override
void initState() {
super.initState();
@ -118,7 +115,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
EasyLoading.dismiss();
}
_onRefresh(){
_onRefresh() {
queryUserInfo();
querySocialInfo();
}
@ -134,7 +131,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
);
BaseData<SocialInfo> baseData =
await apiService.socialInfo().catchError((onError) {
await apiService.socialInfo().catchError((onError) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
@ -203,11 +200,13 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
tag: "vip",
ranks: ranks,
userInfo: userInfo,
rank: double.tryParse(userInfo?.expendAmount??"0").toInt(),
rankMax: userInfo?.memberRankVo?.nextOrigin??0,
createTime: userInfo?.createTime??"",
rank: double.tryParse(
userInfo?.expendAmount ?? "0")
.toInt(),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0,
createTime: userInfo?.createTime ?? "",
),
],
),
),
@ -310,7 +309,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
}
/////
Widget attention(){
Widget attention() {
return Container(
margin: EdgeInsets.only(left: 16, top: 10, right: 16),
// padding: EdgeInsets.only(top: 16,bottom: 16),
@ -405,43 +404,43 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
),
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo": userInfo},
);
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.all(16),
child: Column(
children: [
Text(
infoNumber != null
? infoNumber.achievementNumber.toString()
: "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo": userInfo},
);
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.all(16),
child: Column(
children: [
Text(
infoNumber != null
? infoNumber.achievementNumber.toString()
: "0",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
),
SizedBox(
height: 4,
),
Text(
"成就",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
SizedBox(
height: 4,
),
),
],
),
)),
Text(
"成就",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
))),
],
),
);

14
lib/retrofit/min_api.dart

@ -14,15 +14,21 @@ import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import 'data/activity_actRecord_details.dart';
import 'data/activity_area_list.dart';
import 'data/activity_details.dart';
import 'data/activity_order_list.dart';
import 'data/findMiNiGroupList.dart';
import 'data/home_recommend_list.dart';
import 'data/miNiDetail.dart';
import 'data/settleOrderInfo.dart';
import 'data/shoppingCart.dart';
import 'data/shopping_home_config.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 +38,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.142:8765/app/";///
// const baseUrl = "http://192.168.10.142:8765/app/";///
const base_url = "http://192.168.10.88:8765/app/";///
const baseUrl = "http://192.168.10.88:8765/app/";///
// const base_url = "http://192.168.10.37:8766/app/";

18
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 ??= 'http://192.168.10.142:8765/app/';
baseUrl ??= 'http://192.168.10.88:8765/app/';
}
final Dio _dio;
@ -176,13 +176,14 @@ class _MinApiService implements MinApiService {
}
@override
Future<BaseData<dynamic>> shoppingCartSingle(param) async {
Future<BaseData<List<ShoppingCart>>> shoppingCartSingle(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart/single',
final _result = await _dio.request<Map<String, dynamic>>(
'shoppingcart/single',
queryParameters: queryParameters,
options: RequestOptions(
method: 'PUT',
@ -190,14 +191,15 @@ class _MinApiService implements MinApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<SettleOrderInfo>> getOrderInfo(param) async {
ArgumentError.checkNotNull(param, 'param');

8
lib/retrofit/retrofit_api.dart

@ -55,8 +55,8 @@ import 'data/wx_pay.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
@ -68,8 +68,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.88:8766/app/";///
// const baseUrl = "http://192.168.10.88:8766/app/";///
const base_url = "http://192.168.10.88:8766/app/";///
const baseUrl = "http://192.168.10.88: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 ??= 'http://192.168.10.142:8766/app/';
baseUrl ??= 'http://192.168.10.88:8766/app/';
}
final Dio _dio;

Loading…
Cancel
Save