1、支付联调

This commit is contained in:
cuiyouliang 2025-09-03 10:39:38 +08:00
parent f0fd7fa2c2
commit 4f54f0dee7
4 changed files with 32 additions and 14 deletions

View File

@ -1,5 +1,4 @@
library; library;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:loopin/service/http.dart'; import 'package:loopin/service/http.dart';
@ -7,6 +6,7 @@ import 'package:loopin/api/shop_api.dart';
import 'package:shirne_dialog/shirne_dialog.dart'; import 'package:shirne_dialog/shirne_dialog.dart';
import 'package:timer_count_down/timer_count_down.dart'; import 'package:timer_count_down/timer_count_down.dart';
import 'package:loopin/utils/wxsdk.dart'; import 'package:loopin/utils/wxsdk.dart';
import 'package:loopin/utils/index.dart';
import '../../behavior/custom_scroll_behavior.dart'; import '../../behavior/custom_scroll_behavior.dart';
@ -155,7 +155,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
children: [ children: [
Row( Row(
children: [ children: [
Wrap( /* Wrap(
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
spacing: 5.0, spacing: 5.0,
children: [ children: [
@ -165,14 +165,15 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
width: 25.0, width: 25.0,
), ),
), ),
Text('老白干自营旗舰店'), Text('${orderGoodsInfo['contactUserName']}'),
//contactUserName
Icon( Icon(
Icons.arrow_forward_ios_rounded, Icons.arrow_forward_ios_rounded,
color: Colors.grey, color: Colors.grey,
size: 12.0, size: 12.0,
), ),
], ],
), ),*/
Spacer(), Spacer(),
Text( Text(
'待付款', '待付款',
@ -184,8 +185,13 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 10.0, spacing: 10.0,
children: [ children: [
/* SvgPicture.asset(
'assets/images/svg/kefu.svg',
height: 36.0,
width: 36.0,
)*/
Image.network( Image.network(
'https://img13.360buyimg.com/n1/jfs/t1/263909/5/4187/123220/676eb220F3e481086/0cee829b1894fc4c.jpg', '${orderGoodsInfo['productInfo'][0]['pic']}',
width: 80.0, width: 80.0,
), ),
Expanded( Expanded(
@ -193,20 +199,21 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 5.0, spacing: 5.0,
children: [ children: [
// Text('${orderGoodsInfo['contactUserName']}'),
Text( Text(
'茅台MOUTAI飞天 53度 酱香型白酒 500ml*2 海外版送礼袋年货送礼', '${orderGoodsInfo['productInfo'][0]['productName']}',
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
Row( Row(
children: [ children: [
Text( Text(
'¥3800', '¥${orderGoodsInfo['productInfo'][0]['salePrice']}',
style: TextStyle(color: Colors.red), style: TextStyle(color: Colors.red),
), ),
Spacer(), Spacer(),
Text( Text(
'x10', 'x1',
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
], ],
@ -263,7 +270,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
Spacer(), Spacer(),
Text('20250125k8ffk23j4j4318', style: TextStyle(fontSize: 12.0)), Text(orderGoodsInfo['orderId'], style: TextStyle(fontSize: 12.0)),
], ],
), ),
Row( Row(
@ -273,7 +280,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
Spacer(), Spacer(),
Text('2025-01-25 17:00:28', style: TextStyle(fontSize: 12.0)), Text(orderGoodsInfo['createTime'], style: TextStyle(fontSize: 12.0)),
], ],
), ),
Row( Row(
@ -283,7 +290,9 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
Spacer(), Spacer(),
Text('10', style: TextStyle(fontSize: 12.0)), //
Text((orderGoodsInfo['productInfo'][0]['buyNum'] ?? 0).toString(),
style: TextStyle(fontSize: 12.0)),
], ],
), ),
Row( Row(
@ -293,7 +302,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
Spacer(), Spacer(),
Text('¥3800', style: TextStyle(fontSize: 12.0)), Text('¥${orderGoodsInfo['totalAmount']??'0.00'}', style: TextStyle(fontSize: 12.0)),
], ],
), ),
Row( Row(
@ -303,7 +312,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
Spacer(), Spacer(),
Text('¥38000', style: TextStyle(fontSize: 12.0)), Text('¥${orderGoodsInfo['payAmount']??'0.00'}', style: TextStyle(fontSize: 12.0)),
], ],
), ),
], ],

View File

@ -23,6 +23,7 @@ class HttpConfig {
onRequest: (options, handler) { onRequest: (options, handler) {
// Token // Token
String? token = box.read('token'); String? token = box.read('token');
print('Bearer $token');
if (token != null) { if (token != null) {
options.headers['Authorization'] = 'Bearer $token'; options.headers['Authorization'] = 'Bearer $token';
} }

View File

@ -208,4 +208,12 @@ class Utils {
} }
return count.toString(); return count.toString();
} }
//
static String fenToYuanSimple(dynamic fen) {
if (fen == null) {
return '0.00';
}
return (double.parse(fen) / 100).toStringAsFixed(2);
}
} }

View File

@ -137,7 +137,7 @@ class Wxsdk {
var miniProgram = MiniProgram( var miniProgram = MiniProgram(
username: "gh_2ffaecc5508e", // ID username: "gh_2ffaecc5508e", // ID
path: "/pages/index/index?id=$orderId", // path: "/pages/index/index?id=$orderId", //
miniProgramType: WXMiniProgramType.test, miniProgramType: WXMiniProgramType.preview,
); );
Fluwx().open(target: miniProgram); Fluwx().open(target: miniProgram);
} }