feat:现金支付
This commit is contained in:
1 parent
2abf3b3e95
commit
9539cd5cb5
4 files changed
+41
-8
No files matched your search
@@ -205,7 +205,7 @@ abstract class SyncProductTool {
|
||||
int currentPage = 1;
|
||||
Set<String> serviceCodes = {};
|
||||
while (true) {
|
||||
final pa = {"current": currentPage, "size": 50};
|
||||
final pa = {"current": currentPage, "size": 100};
|
||||
final supermarket = await ProductApi.supermarketSpu(pa);
|
||||
if (supermarket == null) break;
|
||||
if (ObjectUtil.isEmptyList(supermarket.records)) break;
|
||||
|
||||
@@ -12,7 +12,7 @@ class Constants {
|
||||
/// 服务 url
|
||||
// static const apiUrl = 'https://stgl.pj.gov.cn/api';
|
||||
|
||||
static const apiUrl = 'http://192.168.101.125:9999';
|
||||
static const apiUrl = 'http://192.168.101.132:9999';
|
||||
|
||||
/// 静态资源 url
|
||||
static const ossUrl = apiUrl;
|
||||
|
||||
@@ -138,6 +138,9 @@ class SelectPayTypeDialogController extends GetxController {
|
||||
case OrderPayDisplayType.face:
|
||||
await _dispatchFace();
|
||||
break;
|
||||
case OrderPayDisplayType.cash:
|
||||
await _dispatchCash();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
onRecognition?.call();
|
||||
@@ -369,6 +372,28 @@ class SelectPayTypeDialogController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
// **************************************************************************
|
||||
// 现金支付 start
|
||||
// **************************************************************************
|
||||
Future<void> _dispatchCash() async {
|
||||
orderPayType.value = OrderPayType.CASH;
|
||||
orderType = OrderType.BELOW;
|
||||
payUser.value = ServiceUser(
|
||||
userId: "-1",
|
||||
username: "未知用户",
|
||||
deptId: "-1",
|
||||
userMobile: "??????",
|
||||
userAvatar: "",
|
||||
walletId: "-1",
|
||||
walletTypeId: "-1",
|
||||
walletBalance: 1000 * 100,
|
||||
);
|
||||
onDiscernUser?.call(payUser.value);
|
||||
}
|
||||
// **************************************************************************
|
||||
// 现金支付 end
|
||||
// **************************************************************************
|
||||
|
||||
// android人脸识别成功回调
|
||||
Future<void> _faceDiscernAfter(FaceStream event) async {
|
||||
try {
|
||||
@@ -432,11 +457,17 @@ class SelectPayTypeDialogController extends GetxController {
|
||||
|
||||
/// 校验二维码类型是否符合
|
||||
_validateQrCodeType(OrderPayType type) {
|
||||
const success = [
|
||||
OrderPayType.WALLET_QR_CODE,
|
||||
OrderPayType.STRIDE_DEPT_QR_CODE,
|
||||
OrderPayType.FOREIGN_TICKET_QR_CODE,
|
||||
];
|
||||
List<OrderPayType> success = [];
|
||||
// 超市扫码只能用二维码支付
|
||||
if (appSetting.sysType == SysType.SUPERMARKET) {
|
||||
success = [OrderPayType.WALLET_QR_CODE];
|
||||
} else if (appSetting.sysType == SysType.CANTEEN) {
|
||||
success = [
|
||||
OrderPayType.WALLET_QR_CODE,
|
||||
OrderPayType.STRIDE_DEPT_QR_CODE,
|
||||
OrderPayType.FOREIGN_TICKET_QR_CODE,
|
||||
];
|
||||
}
|
||||
return success.contains(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,9 @@ Future<void> _bindServiceDialog(BuildContext context, SysSetting sys) async {
|
||||
// 正式环境-新县府02
|
||||
// uniqueCodeC.text = "1887466308336488450";
|
||||
// 测试环境-测试设备
|
||||
uniqueCodeC.text = "1877592554489143298";
|
||||
// uniqueCodeC.text = "1877592554489143298";
|
||||
// 测试少年宫测试
|
||||
uniqueCodeC.text = "1927932460185784321";
|
||||
// 测试环境-食堂-浦阳
|
||||
// uniqueCodeC.text = "1914567628657778690";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user