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. 27
      lib/retrofit/retrofit_api.g.dart
  8. 29
      lib/store/store_view/shop_goods.dart

6
lib/login/new_login_page.dart

@ -337,7 +337,7 @@ class _NewLoginPage extends State<NewLoginPage> {
children: [
Container(
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(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -350,7 +350,7 @@ class _NewLoginPage extends State<NewLoginPage> {
color: Color(0xFF000000),
),
),
SizedBox(height:10.h,),
SizedBox(height:20.h,),
Text(
"欢迎来到一心回乡",
style: TextStyle(
@ -359,7 +359,7 @@ class _NewLoginPage extends State<NewLoginPage> {
color: Color(0xFF000000),
),
),
SizedBox(height:40.h,),
SizedBox(height:50.h,),
Text(
S.of(context).shoujihao,
style: TextStyle(

4
lib/main_page.dart

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

2
lib/mine/mine_view/mine_order.dart

@ -16,7 +16,7 @@ class _MineOrderView extends State<MineOrderView> {
@override
Widget build(BuildContext context) {
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),
decoration: BoxDecoration(
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/min_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/my_appbar.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 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/";///线

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 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/";///线
@RestApi(baseUrl: localBaseUrl)
@ -178,7 +178,7 @@ abstract class ApiService {
///
@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}")

27
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 ??= kReleaseMode?serviceBaseUrl:localBaseUrl;
baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl;
}
final Dio _dio;
@ -304,7 +304,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <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,
options: RequestOptions(
method: 'GET',
@ -315,7 +316,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<RechargeList>>.fromJson(
_result.data,
(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());
return value;
}
@ -888,7 +890,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<OrderInfo>.fromJson(
_result.data,
(json) => json==null?null:OrderInfo.fromJson(json),
(json) => json == null ? null : OrderInfo.fromJson(json),
);
return value;
}
@ -1880,7 +1882,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <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,
options: RequestOptions(
method: 'GET',
@ -1895,14 +1898,12 @@ class _ApiService implements ApiService {
return value;
}
@override
Future<BaseData<ActivityPos>> appPopup() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/home/appPopup',
final _result = await _dio.request<Map<String, dynamic>>('/home/appPopup',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -1922,7 +1923,8 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <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,
options: RequestOptions(
method: 'GET',
@ -1944,7 +1946,8 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{};
final _data = <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,
options: RequestOptions(
method: 'POST',
@ -1964,8 +1967,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/home/version',
final _result = await _dio.request<Map<String, dynamic>>('/home/version',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -1979,5 +1981,4 @@ class _ApiService implements ApiService {
);
return value;
}
}

29
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';
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)
reduce;
@ -43,7 +43,7 @@ class _ShopGoods extends State<ShopGoods> {
bottom: 10.h,
top: 10.h,
),
child:Row(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
@ -59,7 +59,6 @@ class _ShopGoods extends State<ShopGoods> {
height: 70,
radius: BorderRadius.circular(4),
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
@ -139,7 +138,9 @@ class _ShopGoods extends State<ShopGoods> {
fontWeight: MyFontWeight.medium,
),
),
SizedBox(width: 2.w,),
SizedBox(
width: 2.w,
),
Container(
width: 44.w,
height: 18.h,
@ -160,7 +161,8 @@ class _ShopGoods extends State<ShopGoods> {
],
),
Spacer(),
if (!widget.isShopCart && (widget.productListBean?.attrStyle??0) == 1)
if (!widget.isShopCart &&
(widget.productListBean?.attrStyle ?? 0) == 1)
Stack(
children: [
Container(
@ -179,8 +181,8 @@ class _ShopGoods extends State<ShopGoods> {
widget.productListBean != null
? widget.productListBean.id
: 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(
onTap: () {
widget.reduce(widget.shoppingCartSkuItemListBean);
@ -213,7 +216,8 @@ class _ShopGoods extends State<ShopGoods> {
height: 22,
),
),
if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0)
if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
Container(
width: 30,
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(
onTap: () {
widget.add(widget.shoppingCartSkuItemListBean);
@ -239,7 +244,9 @@ class _ShopGoods extends State<ShopGoods> {
),
],
),
SizedBox(height: 4.h,),
SizedBox(
height: 4.h,
),
Text(
"¥191.00",
style: TextStyle(

Loading…
Cancel
Save