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 @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
if (_refreshController != null) if (_refreshController != null) _refreshController.dispose();
_refreshController.dispose();
} }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -118,7 +115,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
_onRefresh(){ _onRefresh() {
queryUserInfo(); queryUserInfo();
querySocialInfo(); querySocialInfo();
} }
@ -134,7 +131,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
); );
BaseData<SocialInfo> baseData = BaseData<SocialInfo> baseData =
await apiService.socialInfo().catchError((onError) { await apiService.socialInfo().catchError((onError) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
}); });
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
@ -203,11 +200,13 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
tag: "vip", tag: "vip",
ranks: ranks, ranks: ranks,
userInfo: userInfo, userInfo: userInfo,
rank: double.tryParse(userInfo?.expendAmount??"0").toInt(), rank: double.tryParse(
rankMax: userInfo?.memberRankVo?.nextOrigin??0, userInfo?.expendAmount ?? "0")
createTime: userInfo?.createTime??"", .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( return Container(
margin: EdgeInsets.only(left: 16, top: 10, right: 16), margin: EdgeInsets.only(left: 16, top: 10, right: 16),
// padding: EdgeInsets.only(top: 16,bottom: 16), // padding: EdgeInsets.only(top: 16,bottom: 16),
@ -405,43 +404,43 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
), ),
), ),
Expanded( Expanded(
child: GestureDetector( child: GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/mine_attainment_page', '/router/mine_attainment_page',
arguments: {"userInfo": userInfo}, arguments: {"userInfo": userInfo},
); );
}, },
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Column( child: Column(
children: [ children: [
Text( Text(
infoNumber != null infoNumber != null
? infoNumber.achievementNumber.toString() ? infoNumber.achievementNumber.toString()
: "0", : "0",
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xFF000000),
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
),
), ),
), SizedBox(
SizedBox( height: 4,
height: 4,
),
Text(
"成就",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
), ),
), 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:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.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/findMiNiGroupList.dart';
import 'data/home_recommend_list.dart';
import 'data/miNiDetail.dart'; import 'data/miNiDetail.dart';
import 'data/settleOrderInfo.dart'; import 'data/settleOrderInfo.dart';
import 'data/shoppingCart.dart'; import 'data/shoppingCart.dart';
import 'data/shopping_home_config.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 +38,8 @@ const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式
// 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.142:8765/app/";/// const base_url = "http://192.168.10.88:8765/app/";///
// const baseUrl = "http://192.168.10.142:8765/app/";/// const baseUrl = "http://192.168.10.88:8765/app/";///
// const base_url = "http://192.168.10.37:8766/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 { 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.142:8765/app/'; baseUrl ??= 'http://192.168.10.88:8765/app/';
} }
final Dio _dio; final Dio _dio;
@ -176,13 +176,14 @@ class _MinApiService implements MinApiService {
} }
@override @override
Future<BaseData<dynamic>> shoppingCartSingle(param) async { Future<BaseData<List<ShoppingCart>>> shoppingCartSingle(param) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
_data.addAll(param ?? <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, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'PUT', method: 'PUT',
@ -190,14 +191,15 @@ class _MinApiService implements MinApiService {
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => (json as List<dynamic>)
); .map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value; return value;
} }
@override @override
Future<BaseData<SettleOrderInfo>> getOrderInfo(param) async { Future<BaseData<SettleOrderInfo>> getOrderInfo(param) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');

8
lib/retrofit/retrofit_api.dart

@ -55,8 +55,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
@ -68,8 +68,8 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式
// 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.88:8766/app/";///
// const baseUrl = "http://192.168.10.88:8766/app/";/// const baseUrl = "http://192.168.10.88: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.142:8766/app/'; baseUrl ??= 'http://192.168.10.88:8766/app/';
} }
final Dio _dio; final Dio _dio;

Loading…
Cancel
Save