提交 2120066e authored 作者: yueweilu's avatar yueweilu

【APK-书架】不使用积分支付问题

上级 78bfdbc4
...@@ -185,11 +185,13 @@ class BookPayController extends GetxController { ...@@ -185,11 +185,13 @@ class BookPayController extends GetxController {
} }
} }
final result = await ShopAPI.createOrder( final result = await ShopAPI.createOrder(
bookIdsList:jsonEncode(bookIdsList) , bookIdsList:jsonEncode(bookIdsList) ,
totalPrice: finalPrice.toString(), totalPrice: finalPrice.toString(),
couponRecId: useCouponModel.couponRecId.toString(), couponRecId: useCouponModel.couponRecId.toString(),
integral: creditPointModel.deductibleIntegral.toString(), integral: useCreditPoint?creditPointModel.deductibleIntegral.toString():'0',
type: payModel.type.toString() type: payModel.type.toString()
); );
payOrderModel = result; payOrderModel = result;
......
...@@ -54,7 +54,7 @@ class BuildCounter extends StatelessWidget { ...@@ -54,7 +54,7 @@ class BuildCounter extends StatelessWidget {
if (controller.num > 0){ if (controller.num > 0){
final result = await context.pushNamed(Routes.bookPay,extra: controller.buy); final result = await context.pushNamed(Routes.bookPay,extra: controller.buy);
if (result == true) { if (result == true) {
controller.getCart(); controller.onRefresh();
} }
} }
}, },
......
...@@ -84,7 +84,7 @@ class _ReadPageState extends State<ReadPage> { ...@@ -84,7 +84,7 @@ class _ReadPageState extends State<ReadPage> {
}, },
onConsoleMessage: (controller, consoleMessage) { onConsoleMessage: (controller, consoleMessage) {
// 接收从 WebView 发送的消息 // 接收从 WebView 发送的消息
print("Received message from WebView: ${consoleMessage.message}"); Console.log("Received message from WebView-----------------------------: ${consoleMessage.message}");
}, },
onLoadStop: (controller, url) { onLoadStop: (controller, url) {
// flutter 主动给 js 传参数 // flutter 主动给 js 传参数
...@@ -94,6 +94,7 @@ class _ReadPageState extends State<ReadPage> { ...@@ -94,6 +94,7 @@ class _ReadPageState extends State<ReadPage> {
'token':UserStore.to.token 'token':UserStore.to.token
}; };
String str = '${readController.bookId},${readController.chapterId},${UserStore.to.token}'; String str = '${readController.bookId},${readController.chapterId},${UserStore.to.token}';
Console.log('传给前端的参数--------------------------------$str');
controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");'); controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");');
// 添加单击事件 // 添加单击事件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论