Browse Source

图片优化;

下单bug更改;
ff_new
w-R 3 years ago
parent
commit
8711f4fe5b
  1. 38
      lib/community/community_child_list.dart
  2. 4
      lib/community/community_list.dart
  3. 3
      lib/community/community_view/community_dynamic.dart
  4. 9
      lib/community/new_community_details.dart
  5. 4
      lib/main.dart
  6. 12
      lib/retrofit/min_api.dart
  7. 2
      lib/retrofit/min_api.g.dart
  8. 10
      lib/retrofit/retrofit_api.dart
  9. 2
      lib/retrofit/retrofit_api.g.dart
  10. 20
      lib/store/store_order.dart
  11. 4
      lib/view_widget/new_people_reward.dart

38
lib/community/community_child_list.dart

@ -39,7 +39,7 @@ class _CommunityChildList extends State<CommunityChildList> {
}
_onRefresh() async {
setState(() {});
queryCommunity();
}
///
@ -71,23 +71,25 @@ class _CommunityChildList extends State<CommunityChildList> {
refreshController.refreshCompleted();
refreshController.loadComplete();
if (baseData.isSuccess) {
if (pageNum == 1) {
comments.clear();
}
comments.addAll(baseData.data.list);
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
refreshController.loadNoData();
}
setState(() {
if (pageNum == 1) {
comments.clear();
}
comments.addAll(baseData.data.list);
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
refreshController.loadNoData();
}
});
}
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: queryCommunity(),
builder: (context, position) {
// return FutureBuilder(
// future: queryCommunity(),
// builder: (context, position) {
return SmartRefresher(
controller: refreshController,
enablePullDown: true,
@ -102,7 +104,7 @@ class _CommunityChildList extends State<CommunityChildList> {
onRefresh: _onRefresh,
onLoading: () {
isLoadMore = true;
setState(() {});
_onRefresh();
},
scrollController: scrollController,
child: Container(
@ -119,9 +121,7 @@ class _CommunityChildList extends State<CommunityChildList> {
0,
isList: true,
exitFull: () {
setState(() {
_onRefresh();
});
_onRefresh();
},
),
],
@ -130,7 +130,7 @@ class _CommunityChildList extends State<CommunityChildList> {
),
),
);
},
);
// },
// );
}
}

4
lib/community/community_list.dart

@ -98,6 +98,10 @@ class _CommunityList extends State<CommunityList> {
// exitFull: () {
// setState(() {});
// },
}).then((value) {
widget.exitFull();
setState(() {
});
});
setState(() {});
},

3
lib/community/community_view/community_dynamic.dart

@ -406,8 +406,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
);
},
child: MImage(
cnt["images"][position]
.replaceAll(".jpg", ".jpg?imageView2/0/q/75"),
cnt["images"][position],
fit: BoxFit.cover,
aspectRatio: 1,
radius: BorderRadius.circular(1),

9
lib/community/new_community_details.dart

@ -121,7 +121,12 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
@override
Widget build(BuildContext context) {
return AnnotatedRegion<SystemUiOverlayStyle>(
return WillPopScope(
onWillPop: () async {
Navigator.of(context).pop(true);
return false;
},
child:AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: Material(child: Scaffold(
appBar: MyAppBar(
@ -318,7 +323,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
),
),
),)
);
));
}
///

4
lib/main.dart

@ -100,9 +100,9 @@ void main() async {
Locale locale;
if (sharedPreferences.containsKey("language") &&
sharedPreferences.getString("language") == "zh") {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN');
} else {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} else {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
}
ImgCachePath();
initSdk();

12
lib/retrofit/min_api.dart

@ -21,19 +21,19 @@ import 'data/shoppingCart.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
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "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 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/";

2
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.236:8765/app/';
baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
}
final Dio _dio;

10
lib/retrofit/retrofit_api.dart

@ -54,14 +54,14 @@ 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
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.159:8766/app/"; ///
// const baseUrl = "http://192.168.10.159:8766/app/"; ///
@ -70,7 +70,7 @@ const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬
// const baseUrl = "http://192.168.10.37:8766/app/";
// const base_url = "http://192.168.10.142:8766/app/";///
// const base_url = "http://192.168.10.88:8766/app/";///
// const baseUrl = "http://192.168.10.142:8766/app/";///
@RestApi(baseUrl: baseUrl)

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.236:8766/app/';
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
}
final Dio _dio;

20
lib/store/store_order.dart

@ -656,6 +656,16 @@ class _StoreOrderPage extends State<StoreOrderPage>
///
_queryMiNiDetail(String id, int count) async {
EasyLoading.show(status: S.current.zhengzaijiazai);
if(count < 0){
shopCarGoods.shoppingCartSkuItemList.forEach((element) {
if(element.productId == id){
shopCartReduce(element);
setState(() {
});
}
});
return;
}
BaseData<MiNiDetail> baseData = await minService.miNiDetail(id);
if (baseData != null && baseData.isSuccess) {
showStoreSelector(baseData.data, id, count);
@ -805,11 +815,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
BaseData<List<ShoppingCart>> baseDate =
await minService.shoppingCartSingle(shopCarTemp);
if (baseDate.isSuccess) {
EasyLoading.dismiss();
this.shopCarGoods = await queryShopCar();
if (shopCartKey != null) {
if (shopCartKey?.currentState != null) {
shopCartKey.currentState.setState(() {});
}
setState(() {});
setState(() {
});
}
return this.shopCarGoods;
}
@ -868,9 +880,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
}
ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods
.shoppingCartSkuItemList
.firstWhere((element) => skuId == element.skuId);
.firstWhere((element) => skuId == element.id);
int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList
.indexWhere((element) => skuId == element.skuId);
.indexWhere((element) => skuId == element.id);
if (shopSkuItem != null) {
if (shopSkuItem.buyNum > 1) {

4
lib/view_widget/new_people_reward.dart

@ -108,7 +108,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
Widget rewardItem(FirstLoginCouponList firstLoginCouponList) {
return Container(
height:80.h,
height:90.h,
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
@ -167,7 +167,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
Text(
firstLoginCouponList.couponName,
overflow: TextOverflow.ellipsis,
maxLines: 2,
maxLines: 1,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,

Loading…
Cancel
Save