提交 5d689120 authored 作者: maodou's avatar maodou

Merge remote-tracking branch 'origin/test' into test

......@@ -24,7 +24,7 @@ class _AnswerPageState extends State<AnswerPage> {
url: Uri.parse(widget.params['url']??''),
),
onLoadStop: (controller, url) {
String str = '${widget.params['book_id']},${widget.params['chapter_id']},${widget.params['token']},${widget.params['position']}';
String str = '$kServerUrl,${widget.params['book_id']},${widget.params['chapter_id']},${widget.params['token']},${widget.params['position']}';
Console.log('知识测评--------传给前端的参数--------------------------------$str');
controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");');
},
......
......@@ -63,7 +63,7 @@ class _BuildStudyState extends State<BuildStudy> {
// )
]
)),
Text('学习数', style: TextStyle(fontSize: 15.w,color: Colours.c9,height: 1.3)),
Text('学习数', style: TextStyle(fontSize: 15.w,color: Colours.c9,height: 1.3)),
],
),
)
......
......@@ -55,9 +55,8 @@ class BookPayController extends GetxController {
void setUseCoupon(CouponModel model){
useCouponModel = model;
print('使用优惠券。。。。。。。。。。。。。。。。${model.couponRecId}');
computeFinalPrice();
// 使用优惠券后重新获取积分
_getCreditPoints(price: finalPrice.toString(), couponRecId: useCouponModel.couponRecId.toString());
_getCreditPoints(price: originalPrice.toString(), couponRecId: useCouponModel.couponRecId.toString());
}
/// 支付方式 默认第一个
......@@ -102,6 +101,7 @@ class BookPayController extends GetxController {
required String couponRecId
}) async {
creditPointModel = await ShopAPI.creditPoints(price: price,couponRecId: useCouponModel.couponRecId.toString());
computeFinalPrice();
update();
}
/// 是否展示优惠券 和积分使用 模型
......
......@@ -67,7 +67,9 @@ class _BookPayPageState extends State<BookPayPage> {
controller.showModel.integralSwitch =='0'?const SizedBox(): GestureDetector(
child: _buildPointWidget(controller,title: '积分抵扣',icon: 'assets/images/pay_point.png',),
onTap: (){
context.pushNamed(Routes.creditPoints);
if(controller.creditPointModel.deductibleIntegral !=0){
context.pushNamed(Routes.creditPoints);
}
},
),
],
......@@ -247,7 +249,7 @@ class _BookPayPageState extends State<BookPayPage> {
GestureDetector(
child: Image.asset('assets/images/unused_coupon.png'),
onTap: (){
CouponModel model = CouponModel(couponId: 0);
CouponModel model = CouponModel(couponRecId: 0,couponId: 0);
controller.setUseCoupon(model);
},
)
......@@ -296,7 +298,7 @@ class _BookPayPageState extends State<BookPayPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
controller.useCreditPoint?Text('-¥${controller.creditPointModel.deductibleAmount}',style: TextStyle(fontSize:13.w,color: AppTheme.primary,height:1.4),)
: Text('去选择',style: TextStyle(fontSize:13.w,color: Colours.c9,height:1.4)),
: Text( controller.creditPointModel.deductibleIntegral ==0?'不可用':'去选择',style: TextStyle(fontSize:13.w,color: Colours.c9,height:1.4)),
Gaps.hGaps10,
SizedBox(
// color: Colors.cyan,
......
......@@ -89,7 +89,9 @@ class LoginController extends GetxController {
/// 测试账号
if (kDebugMode) {
phoneInput.text = '13521054068';
passwordInput.text = 'zj123456';
passwordInput.text = 'zj123456';
// phoneInput.text = '17311837355';
// passwordInput.text = '12345678';
}
super.onInit();
}
......
......@@ -93,7 +93,7 @@ class _ReadPageState extends State<ReadPage> {
'chapter_id': readController.chapterId,
'token':UserStore.to.token
};
String str = '${readController.bookId},${readController.chapterId},${UserStore.to.token}';
String str = '$kServerUrl,${readController.bookId},${readController.chapterId},${UserStore.to.token}';
Console.log('传给前端的参数--------------------------------$str');
controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");');
......
......@@ -40,7 +40,7 @@ class UserOrderCancelDetailController extends GetxController {
OrderCompletedModel(name: '支付方式',value: payWay),
OrderCompletedModel(name: '支付时间',value: model.payTime.toString()),
OrderCompletedModel(name: '下单时间',value: model.createTime.toString()),
OrderCompletedModel(name: '退款时间',value: model.refundTime.toString()),
// OrderCompletedModel(name: '退款时间',value: model.refundTime.toString()),
];
update();
......
......@@ -162,7 +162,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
'确定',
style: TextStyle(
fontSize: 15,
fontWeight: Fonts.medium,
fontWeight: Fonts.boldSemi,
color: Colours.cAB1941,
),
),
......
......@@ -93,17 +93,112 @@ class _UserSetPageState extends State<UserSetPage> {
),
GestureDetector(
onTap: () async {
final result = await AccountAPI.logout();
if (result) {
// Toast.show('退出成功');
CustomToast.loading();
await UserStore.to.logout();
CustomToast.dismiss();
if (context.mounted) {
context.goNamed(Routes.splash);
}
}
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0.w),
),
contentPadding: EdgeInsets.zero,
// 移除内容部分的内边距
content: Wrap(
children: [
Container(
margin:
EdgeInsets.only(top: 44.w, bottom: 29.w),
// 调整上下间距
child: Center(
child: Text(
'确定退出登录吗?',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
),
),
),
Container(
height: 1.w, // 设置分割线的高度
width: double.infinity, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
],
),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'取消',
style: TextStyle(
fontSize: 15,
fontWeight: Fonts.medium,
color: Colours.c6,
),
),
),
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () async {
final result = await AccountAPI.logout();
if (result) {
// Toast.show('退出成功');
CustomToast.loading();
await UserStore.to.logout();
CustomToast.dismiss();
if (context.mounted) {
context.goNamed(Routes.splash);
}
}
},
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'确定',
style: TextStyle(
fontSize: 15,
fontWeight: Fonts.boldSemi,
color: Colours.cAB1941,
),
),
),
),
],
),
],
);
},
);
},
// onTap: () async {
// final result = await AccountAPI.logout();
// if (result) {
// // Toast.show('退出成功');
// CustomToast.loading();
// await UserStore.to.logout();
// CustomToast.dismiss();
// if (context.mounted) {
// context.goNamed(Routes.splash);
// }
// }
// },
child: Container(
height: 42.w,
width: double.infinity,
......
......@@ -24,7 +24,7 @@ class _UserWrongDesPageState extends State<UserWrongDesPage> {
url: Uri.parse(kUserWrongDes),
),
onLoadStop: (controller, url) {
String str = '${widget.model.bookId},${UserStore.to.token}';
String str = '$kServerUrl,${widget.model.bookId},${UserStore.to.token}';
Console.log('传给前端的参数--------------------------------$str');
controller.evaluateJavascript(source: 'callbackInFlutterComponent("$str");');
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论