Browse Source

新版更改

zyh
w-R 3 years ago
parent
commit
9cfac68c01
  1. 6
      lib/login/new_login_page.dart
  2. 4
      lib/main_page.dart
  3. 2
      lib/mine/mine_view/mine_order.dart
  4. 1
      lib/order/order_detail_page.dart
  5. 2
      lib/retrofit/min_api.dart
  6. 4
      lib/retrofit/retrofit_api.dart
  7. 39
      lib/retrofit/retrofit_api.g.dart
  8. 33
      lib/store/store_view/shop_goods.dart

6
lib/login/new_login_page.dart

@ -337,7 +337,7 @@ class _NewLoginPage extends State<NewLoginPage> {
children: [ children: [
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16.w,top:51+ MediaQuery.of(context).padding.top,right: 12.w), padding: EdgeInsets.only(left: 16.w,top:60+ MediaQuery.of(context).padding.top,right: 12.w),
child:Column( child:Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -350,7 +350,7 @@ class _NewLoginPage extends State<NewLoginPage> {
color: Color(0xFF000000), color: Color(0xFF000000),
), ),
), ),
SizedBox(height:10.h,), SizedBox(height:20.h,),
Text( Text(
"欢迎来到一心回乡", "欢迎来到一心回乡",
style: TextStyle( style: TextStyle(
@ -359,7 +359,7 @@ class _NewLoginPage extends State<NewLoginPage> {
color: Color(0xFF000000), color: Color(0xFF000000),
), ),
), ),
SizedBox(height:40.h,), SizedBox(height:50.h,),
Text( Text(
S.of(context).shoujihao, S.of(context).shoujihao,
style: TextStyle( style: TextStyle(

4
lib/main_page.dart

@ -341,8 +341,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
PackageInfo packageInfo = await PackageInfo.fromPlatform(); PackageInfo packageInfo = await PackageInfo.fromPlatform();
BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {}); BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
baseData.data.appLastVersion = "1.0.4"; // baseData.data.appLastVersion = "1.0.4";
baseData.data.appLastVersionUp = "1.0.1"; // baseData.data.appLastVersionUp = "1.0.1";
if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion) if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion)
&& AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){ && AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){
showDialog( showDialog(

2
lib/mine/mine_view/mine_order.dart

@ -16,7 +16,7 @@ class _MineOrderView extends State<MineOrderView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w, top:20.h), margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w,),
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,

1
lib/order/order_detail_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.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/view_widget/icon_text.dart'; import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';

2
lib/retrofit/min_api.dart

@ -39,7 +39,7 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8765/app/"; // const base_url = "http://192.168.10.37:8765/app/";
const localBaseUrl = "http://192.168.10.236:8765/app/";/// const localBaseUrl = "http://192.168.10.78:8765/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

4
lib/retrofit/retrofit_api.dart

@ -70,7 +70,7 @@ part 'retrofit_api.g.dart';
// const base_url = "http://192.168.10.132:8766/app/";/// // const base_url = "http://192.168.10.132:8766/app/";///
const localBaseUrl = "http://192.168.10.236:8766/app/";/// const localBaseUrl = "http://192.168.10.78:8766/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)
@ -178,7 +178,7 @@ abstract class ApiService {
/// ///
@POST("/auth/platform/memberLogin") @POST("/auth/platform/memberLogin")
Future<BaseData<LoginInfo>> memberLogin(@Body() Map<String, dynamic> param); Future<BaseData> memberLogin(@Body() Map<String, dynamic> param);
/// ///
@GET("/auth/sendVerify/{mobile}") @GET("/auth/sendVerify/{mobile}")

39
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 ??= kReleaseMode?serviceBaseUrl:localBaseUrl; baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl;
} }
final Dio _dio; final Dio _dio;
@ -304,7 +304,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/wallet/rechargeAct', final _result = await _dio.request<Map<String, dynamic>>(
'/wallet/rechargeAct',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -314,8 +315,9 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<List<RechargeList>>.fromJson( final value = BaseData<List<RechargeList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<RechargeList>((i) => RechargeList.fromJson(i as Map<String, dynamic>)) .map<RechargeList>(
(i) => RechargeList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -888,7 +890,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<OrderInfo>.fromJson( final value = BaseData<OrderInfo>.fromJson(
_result.data, _result.data,
(json) => json==null?null:OrderInfo.fromJson(json), (json) => json == null ? null : OrderInfo.fromJson(json),
); );
return value; return value;
} }
@ -1880,7 +1882,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/detail/$id', final _result = await _dio.request<Map<String, dynamic>>(
'/member/detail/$id',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1890,19 +1893,17 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<MemberInfor>.fromJson( final value = BaseData<MemberInfor>.fromJson(
_result.data, _result.data,
(json) => MemberInfor.fromJson(json), (json) => MemberInfor.fromJson(json),
); );
return value; return value;
} }
@override @override
Future<BaseData<ActivityPos>> appPopup() async { Future<BaseData<ActivityPos>> appPopup() async {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/home/appPopup',
'/home/appPopup',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1912,7 +1913,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<ActivityPos>.fromJson( final value = BaseData<ActivityPos>.fromJson(
_result.data, _result.data,
(json) => ActivityPos.fromJson(json), (json) => ActivityPos.fromJson(json),
); );
return value; return value;
} }
@ -1922,7 +1923,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/deleteMine', final _result = await _dio.request<Map<String, dynamic>>(
'/member/deleteMine',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1932,7 +1934,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<dynamic>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => json as dynamic,
); );
return value; return value;
} }
@ -1944,7 +1946,8 @@ class _ApiService implements ApiService {
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>>('/information/complaint', final _result = await _dio.request<Map<String, dynamic>>(
'/information/complaint',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'POST', method: 'POST',
@ -1954,7 +1957,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<dynamic>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => json as dynamic,
); );
return value; return value;
} }
@ -1964,8 +1967,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/home/version',
'/home/version',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1975,9 +1977,8 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<AppUpdate>.fromJson( final value = BaseData<AppUpdate>.fromJson(
_result.data, _result.data,
(json) => AppUpdate.fromJson(json), (json) => AppUpdate.fromJson(json),
); );
return value; return value;
} }
} }

33
lib/store/store_view/shop_goods.dart

@ -8,7 +8,7 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
class ShopGoods extends StatefulWidget { class ShopGoods extends StatefulWidget {
final Function(String id,int count) queryMiNiDetail; final Function(String id, int count) queryMiNiDetail;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add; final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean)
reduce; reduce;
@ -43,7 +43,7 @@ class _ShopGoods extends State<ShopGoods> {
bottom: 10.h, bottom: 10.h,
top: 10.h, top: 10.h,
), ),
child:Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@ -53,13 +53,12 @@ class _ShopGoods extends State<ShopGoods> {
widget.productListBean != null widget.productListBean != null
? widget.productListBean.imgPath ? widget.productListBean.imgPath
: (widget.shoppingCartSkuItemListBean != null : (widget.shoppingCartSkuItemListBean != null
? widget.shoppingCartSkuItemListBean.skuImg ? widget.shoppingCartSkuItemListBean.skuImg
: ""), : ""),
width: 70, width: 70,
height: 70, height: 70,
radius: BorderRadius.circular(4), radius: BorderRadius.circular(4),
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
), ),
@ -139,7 +138,9 @@ class _ShopGoods extends State<ShopGoods> {
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox(width: 2.w,), SizedBox(
width: 2.w,
),
Container( Container(
width: 44.w, width: 44.w,
height: 18.h, height: 18.h,
@ -160,7 +161,8 @@ class _ShopGoods extends State<ShopGoods> {
], ],
), ),
Spacer(), Spacer(),
if (!widget.isShopCart && (widget.productListBean?.attrStyle??0) == 1) if (!widget.isShopCart &&
(widget.productListBean?.attrStyle ?? 0) == 1)
Stack( Stack(
children: [ children: [
Container( Container(
@ -179,8 +181,8 @@ class _ShopGoods extends State<ShopGoods> {
widget.productListBean != null widget.productListBean != null
? widget.productListBean.id ? widget.productListBean.id
: widget.shoppingCartSkuItemListBean : widget.shoppingCartSkuItemListBean
.productId,0 .productId,
); 0);
}, },
), ),
), ),
@ -202,7 +204,8 @@ class _ShopGoods extends State<ShopGoods> {
), ),
], ],
), ),
if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0) if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.reduce(widget.shoppingCartSkuItemListBean); widget.reduce(widget.shoppingCartSkuItemListBean);
@ -213,7 +216,8 @@ class _ShopGoods extends State<ShopGoods> {
height: 22, height: 22,
), ),
), ),
if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0) if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
Container( Container(
width: 30, width: 30,
alignment: Alignment.center, alignment: Alignment.center,
@ -226,7 +230,8 @@ class _ShopGoods extends State<ShopGoods> {
), ),
), ),
), ),
if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0) if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector( GestureDetector(
onTap: () { onTap: () {
widget.add(widget.shoppingCartSkuItemListBean); widget.add(widget.shoppingCartSkuItemListBean);
@ -239,7 +244,9 @@ class _ShopGoods extends State<ShopGoods> {
), ),
], ],
), ),
SizedBox(height: 4.h,), SizedBox(
height: 4.h,
),
Text( Text(
"¥191.00", "¥191.00",
style: TextStyle( style: TextStyle(

Loading…
Cancel
Save