Browse Source

订单详情更改;

平台余额更改;
社群列表更改;
订单优惠券选择更改;
社群评论列表点击事件更改;
remove_uniapp
w-R 3 years ago
parent
commit
dccf1f73dc
  1. BIN
      assets/image/2x/order_kf.webp
  2. BIN
      assets/image/3x/order_kf.webp
  3. BIN
      assets/image/order_kf.webp
  4. 39
      lib/community/community_child_page.dart
  5. 7
      lib/mine/personal_page.dart
  6. 14
      lib/order/order_detail_page.dart
  7. 2
      lib/order/order_view/order_address.dart
  8. 4
      lib/retrofit/min_api.g.dart
  9. 2
      lib/retrofit/retrofit_api.g.dart
  10. 40
      lib/settlement/settlement.dart
  11. 5
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  12. 2
      lib/settlement/settlement_view/coupon.dart
  13. 6
      lib/settlement/settlement_view/pay_method.dart
  14. 5
      lib/settlement/settlement_view/settlement_order_commodity.dart
  15. 3
      lib/store/store_order.dart
  16. 1
      lib/store/store_view/shop_goods.dart
  17. 1
      lib/view_widget/tips_dialog.dart
  18. 37
      lib/web/web_view/comment_list.dart

BIN
assets/image/2x/order_kf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
assets/image/3x/order_kf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
assets/image/order_kf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

39
lib/community/community_child_page.dart

@ -59,6 +59,7 @@ class CommunityChildPageState extends State<CommunityChildPage> with AutomaticKe
Dio(),
context: context,
token: value.getString("token"),
showLoading: false
);
}
if(isLoadMore){
@ -146,9 +147,9 @@ class CommunityChildPageState extends State<CommunityChildPage> with AutomaticKe
userId: userId,
isList: true,
exitFull: () {
setState(() {
onRefresh();
});
// setState(() {
// onRefresh();
// });
},
),
onTap: () {
@ -159,10 +160,11 @@ class CommunityChildPageState extends State<CommunityChildPage> with AutomaticKe
"userId": userId,
},
).then((value) {
onRefresh();
setState(() {});
queryDetails(articles[position].id);
// onRefresh();
// setState(() {});
});
setState(() {});
// setState(() {});
},
);
},
@ -173,6 +175,31 @@ class CommunityChildPageState extends State<CommunityChildPage> with AutomaticKe
);
}
///
queryDetails(id) async {
SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
BaseData<Article> baseData = await apiService.informationInfo(id)
.catchError((onError) {
debugPrint(onError.toString());
});
if (baseData != null && baseData.isSuccess) {
this.articles.forEach((element) {
if(element.id == id){
setState(() {
element.likes = baseData.data.likes;
element.viewers = baseData.data.viewers;
});
}
});
}
}
@override
bool get wantKeepAlive => true;
}

7
lib/mine/personal_page.dart

@ -59,7 +59,8 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addObserver(this);
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
context: context, token: value.getString('token'),
showLoading: true),
_onRefresh(),
});
}
@ -147,6 +148,10 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
refreshController.loadNoData();
}
}
else{
refreshController.refreshFailed();
refreshController.loadFailed();
}
}
///

14
lib/order/order_detail_page.dart

@ -40,7 +40,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
SharedPreferences.getInstance().then((value) {
apiService = ApiService(
Dio(),
showLoading: true,
context: context,
token: value.getString("token"),
);
@ -67,7 +66,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
);
minService = MinApiService(
Dio(),
showLoading:true,
// showLoading:true,
context: context,
token: minToken,
tenant: tenant,
@ -85,6 +84,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
int refundStatus = 0;
queryDetails() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
}
BaseData<OrderInfo> baseData = await apiService
.orderDetail(widget.arguments["id"])
.catchError((error) {});
@ -214,7 +222,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
payResult(BaseData baseData) {
queryDetails();
SmartDialog.showToast("订单支付成功");
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
}
statusTitle() {

2
lib/order/order_view/order_address.dart

@ -144,7 +144,7 @@ class _OrderAddress extends State<OrderAddress> {
} else if (widget.payStatus < 4) {
SmartDialog.show(
widget: TextImageWidget(
"assets/image/icon_empty.webp",
"assets/image/order_kf.webp",
S.of(context).ruxutuikuanqingyumendianlianxi,
"",
S.of(context).zhidianmendian,

4
lib/retrofit/min_api.g.dart

@ -100,7 +100,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => json==null?null:(json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
@ -241,7 +241,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<MinOrderInfo>.fromJson(
_result.data,
(json) => MinOrderInfo.fromJson(json),
(json) => json==null?null:MinOrderInfo.fromJson(json),
);
return value;
}

2
lib/retrofit/retrofit_api.g.dart

@ -887,7 +887,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<OrderInfo>.fromJson(
_result.data,
(json) => OrderInfo.fromJson(json),
(json) => json==null?null:OrderInfo.fromJson(json),
);
return value;
}

40
lib/settlement/settlement.dart

@ -133,7 +133,6 @@ class _Settlement extends State<Settlement> {
"orderId": orderId,
"promotionId": promotionId,
"payChannel": payChannel
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
@ -152,7 +151,9 @@ class _Settlement extends State<Settlement> {
print("ididididididid: $id");
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": id,
}).catchError((error) {});
}).catchError((error) {
print(error);
});
if (baseData != null && baseData.isSuccess) {
setState(() {
minOrderInfo = baseData.data;
@ -263,11 +264,13 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0)
? promotion.id
: widget.arguments["pid"] ?? "";
: "";
// : widget.arguments["pid"] ?? "";
placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0)
? couponListBean.id
: widget.arguments["cid"] ?? "";
: "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -294,23 +297,18 @@ class _Settlement extends State<Settlement> {
} else {
///
BaseData<dynamic> baseData;
if (parentId == "") {
//
if (placeOrder) {
//
querySettlement();
} else {
}
else{
if (parentId == "") {
//
baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
}
} else {
if (placeOrder) {
//
querySettlement();
} else {
//
baseData = await minService
@ -470,8 +468,8 @@ class _Settlement extends State<Settlement> {
couponCart,
activityCart,
settleOrderInfo,
coupons,
promotions,
payChannel == 4 ? null : coupons,
payChannel == 4 ? null : promotions,
couponCount(),
placeOrder,
remakers,
@ -564,9 +562,9 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
payChannel == 4 ? null : couponListBean?.id,
0,
promotion?.id,
payChannel == 4 ? null : promotion?.id,
payChannel
);
}
@ -601,10 +599,11 @@ class _Settlement extends State<Settlement> {
couponBean: couponListBean);
},
);
// if (couponBean != null) {
if (couponBean != null) {
this.couponListBean = couponBean;
coupons = couponListBean?.promotionName ?? "";
promotions = "";
this.promotion = null;
queryOrderInfo(
address?.id,
selectedBtn,
@ -613,7 +612,7 @@ class _Settlement extends State<Settlement> {
null,
payChannel
);
// }
}
}
///
@ -626,10 +625,11 @@ class _Settlement extends State<Settlement> {
return SettlementActivity(settleOrderInfo, storeInfo);
},
);
// if (pro != null) {
if (pro != null) {
this.promotion = pro;
promotions = promotion?.name ?? "";
coupons = "";
this.couponListBean = null;
queryOrderInfo(
address?.id,
selectedBtn,
@ -638,6 +638,6 @@ class _Settlement extends State<Settlement> {
promotion?.id,
payChannel
);
// }
}
}
}

5
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -46,8 +46,8 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
boxShadow: [
BoxShadow(
color: Color(0x0D000000),
offset: Offset(0, 3),
blurRadius: 14,
offset: Offset(0, 1),
blurRadius: 8,
spreadRadius: 0,
),
],
@ -58,6 +58,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
left: 16,
right: 16,
top: 15,
bottom: 14
),
padding: EdgeInsets.only(
left: 16,

2
lib/settlement/settlement_view/coupon.dart

@ -167,7 +167,7 @@ class _CouponWidget extends State<CouponWidget> {
margin: EdgeInsets.only(right: 23.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(widget.selected ? null : widget.couponList);
Navigator.of(context).pop(widget.couponList);
},
child: Image.asset(
widget.selected

6
lib/settlement/settlement_view/pay_method.dart

@ -41,7 +41,7 @@ class _PayMethod extends State<PayMethod> {
left: 16.w,
right: 16.w,
top: 12.h,
bottom: 4.h,
bottom: 16.h,
),
padding: EdgeInsets.only(
left: 16.w,
@ -53,8 +53,8 @@ class _PayMethod extends State<PayMethod> {
boxShadow: [
BoxShadow(
color: Color(0x000000).withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12.0,
offset: Offset(0, 2),
blurRadius: 3,
),
],
color: Colors.white,

5
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -125,6 +125,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
width: 44,
height: 44,
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
@ -259,8 +260,8 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
)
],

3
lib/store/store_order.dart

@ -753,6 +753,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
setState(() {});
});
}
else {
SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center);
}
}
}

1
lib/store/store_view/shop_goods.dart

@ -57,6 +57,7 @@ class _ShopGoods extends State<ShopGoods> {
: ""),
width: 70,
height: 70,
radius: BorderRadius.circular(4),
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",

1
lib/view_widget/tips_dialog.dart

@ -57,6 +57,7 @@ class _Tips extends State<Tips> {
child: InkWell(
onTap: () {
SmartDialog.dismiss();
widget.tips();
},
child: Container(
width: double.infinity,

37
lib/web/web_view/comment_list.dart

@ -16,7 +16,6 @@ import 'package:like_button/like_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
class CommentList extends StatefulWidget {
final bool isKeyBoardShow;
final Function reply;
final Function delCommentTips;
@ -27,7 +26,8 @@ class CommentList extends StatefulWidget {
final Function requestApiFinish;
CommentList(Key key, this.like, this.relationalId, this.relationalType,
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,{this.requestApiFinish})
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,
{this.requestApiFinish})
: super(key: key);
@override
@ -59,7 +59,6 @@ class CommentListState extends State<CommentList> {
} else {
element.likes += 1;
element.liked = true;
}
}
});
@ -129,8 +128,8 @@ class CommentListState extends State<CommentList> {
color: Colors.white,
child: InkWell(
onTap: () {
showPressMenu(memberList[position].createUser,
memberList[position]);
// showPressMenu(memberList[position].createUser,
// memberList[position]);
},
child: commentItem(memberList[position]),
),
@ -198,8 +197,7 @@ class CommentListState extends State<CommentList> {
//
queryMemberCommentList() async {
if(widget?.relationalId == null || widget.relationalId.isEmpty)
return;
if (widget?.relationalId == null || widget.relationalId.isEmpty) return;
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
@ -263,15 +261,27 @@ class CommentListState extends State<CommentList> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MImage(
GestureDetector(
onTap: () {
setState(() {
Navigator.of(context)
.pushNamed('/router/personal_page', arguments: {
"memberId": memberList.createUser,
});
});
},
behavior: HitTestBehavior.opaque,
child: MImage(
memberList.userAvatarUrl ?? "",
fit: BoxFit.cover,
isCircle: true,
width: 40,
height: 40,
radius: BorderRadius.circular(4),
fadeSrc: "assets/image/default_user.webp",
errorSrc: "assets/image/default_user.webp",
),
),
SizedBox(
width: 12.w,
),
@ -366,6 +376,15 @@ class CommentListState extends State<CommentList> {
],
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
showPressMenu(memberList.createUser,
memberList);
});
},
child:
Container(
padding: EdgeInsets.only(
left: 68.w,
@ -383,7 +402,7 @@ class CommentListState extends State<CommentList> {
),
),
),
),
)),
SizedBox(
height: 12.h,
),

Loading…
Cancel
Save