1、支付联调
This commit is contained in:
parent
f0fd7fa2c2
commit
4f54f0dee7
@ -1,5 +1,4 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.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:timer_count_down/timer_count_down.dart';
|
||||
import 'package:loopin/utils/wxsdk.dart';
|
||||
import 'package:loopin/utils/index.dart';
|
||||
|
||||
import '../../behavior/custom_scroll_behavior.dart';
|
||||
|
||||
@ -155,7 +155,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Wrap(
|
||||
/* Wrap(
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
spacing: 5.0,
|
||||
children: [
|
||||
@ -165,14 +165,15 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
width: 25.0,
|
||||
),
|
||||
),
|
||||
Text('老白干自营旗舰店'),
|
||||
Text('${orderGoodsInfo['contactUserName']}'),
|
||||
//contactUserName
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
color: Colors.grey,
|
||||
size: 12.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),*/
|
||||
Spacer(),
|
||||
Text(
|
||||
'待付款',
|
||||
@ -184,8 +185,13 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 10.0,
|
||||
children: [
|
||||
/* SvgPicture.asset(
|
||||
'assets/images/svg/kefu.svg',
|
||||
height: 36.0,
|
||||
width: 36.0,
|
||||
)*/
|
||||
Image.network(
|
||||
'https://img13.360buyimg.com/n1/jfs/t1/263909/5/4187/123220/676eb220F3e481086/0cee829b1894fc4c.jpg',
|
||||
'${orderGoodsInfo['productInfo'][0]['pic']}',
|
||||
width: 80.0,
|
||||
),
|
||||
Expanded(
|
||||
@ -193,20 +199,21 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 5.0,
|
||||
children: [
|
||||
// Text('${orderGoodsInfo['contactUserName']}'),
|
||||
Text(
|
||||
'茅台(MOUTAI)飞天 53度 酱香型白酒 500ml*2 海外版送礼袋年货送礼',
|
||||
'${orderGoodsInfo['productInfo'][0]['productName']}',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'¥3800',
|
||||
'¥${orderGoodsInfo['productInfo'][0]['salePrice']}',
|
||||
style: TextStyle(color: Colors.red),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'x10',
|
||||
'x1',
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
],
|
||||
@ -263,7 +270,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
Spacer(),
|
||||
Text('20250125k8ffk23j4j4318', style: TextStyle(fontSize: 12.0)),
|
||||
Text(orderGoodsInfo['orderId'], style: TextStyle(fontSize: 12.0)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@ -273,7 +280,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
Spacer(),
|
||||
Text('2025-01-25 17:00:28', style: TextStyle(fontSize: 12.0)),
|
||||
Text(orderGoodsInfo['createTime'], style: TextStyle(fontSize: 12.0)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@ -283,7 +290,9 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
Spacer(),
|
||||
Text('10', style: TextStyle(fontSize: 12.0)),
|
||||
// 添加空值安全检查
|
||||
Text((orderGoodsInfo['productInfo'][0]['buyNum'] ?? 0).toString(),
|
||||
style: TextStyle(fontSize: 12.0)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@ -293,7 +302,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
Spacer(),
|
||||
Text('¥3800', style: TextStyle(fontSize: 12.0)),
|
||||
Text('¥${orderGoodsInfo['totalAmount']??'0.00'}', style: TextStyle(fontSize: 12.0)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@ -303,7 +312,7 @@ class _OrderDetailState extends State<OrderDetail> with SingleTickerProviderStat
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
Spacer(),
|
||||
Text('¥38000', style: TextStyle(fontSize: 12.0)),
|
||||
Text('¥${orderGoodsInfo['payAmount']??'0.00'}', style: TextStyle(fontSize: 12.0)),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -23,6 +23,7 @@ class HttpConfig {
|
||||
onRequest: (options, handler) {
|
||||
// Token
|
||||
String? token = box.read('token');
|
||||
print('Bearer $token');
|
||||
if (token != null) {
|
||||
options.headers['Authorization'] = 'Bearer $token';
|
||||
}
|
||||
|
@ -208,4 +208,12 @@ class Utils {
|
||||
}
|
||||
return count.toString();
|
||||
}
|
||||
// 分转换为元
|
||||
static String fenToYuanSimple(dynamic fen) {
|
||||
if (fen == null) {
|
||||
return '0.00';
|
||||
}
|
||||
|
||||
return (double.parse(fen) / 100).toStringAsFixed(2);
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ class Wxsdk {
|
||||
var miniProgram = MiniProgram(
|
||||
username: "gh_2ffaecc5508e", // 小程序原始ID
|
||||
path: "/pages/index/index?id=$orderId", // 打开时带的路径参数
|
||||
miniProgramType: WXMiniProgramType.test,
|
||||
miniProgramType: WXMiniProgramType.preview,
|
||||
);
|
||||
Fluwx().open(target: miniProgram);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user