bug
This commit is contained in:
parent
55060f137d
commit
f9d934e9ee
@ -12,6 +12,7 @@ import 'package:image_picker/image_picker.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:video_thumbnail/video_thumbnail.dart';
|
||||
|
||||
import '../../common/Widgets/base_tip_widget.dart';
|
||||
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
@ -20,6 +21,7 @@ import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/eventBus.dart';
|
||||
import '../../util/qiniu.dart';
|
||||
import '../circle/logic.dart';
|
||||
import '../dialog/UnlockCallDialog.dart';
|
||||
import '../select_circle/logic.dart';
|
||||
import 'state.dart';
|
||||
import '../../common/config.dart';
|
||||
@ -37,6 +39,8 @@ class Call_outLogic extends GetxController {
|
||||
List<MyConfigData> myConfigData = Get.arguments['numbers'];
|
||||
int vip = 0;
|
||||
|
||||
bool isZfbPrice = true;
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
super.onClose();
|
||||
@ -78,18 +82,13 @@ class Call_outLogic extends GetxController {
|
||||
quniuData, (quniuData) => QnTokenData.fromJson(quniuData));
|
||||
quToken = qiniuBean.data!.token.toString();
|
||||
|
||||
|
||||
|
||||
|
||||
StreamSubscription subscription = EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||
StreamSubscription subscription =
|
||||
EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||
vip = event.vip;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
showRechargeDialog(){
|
||||
showRechargeDialog() {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
@ -97,7 +96,6 @@ class Call_outLogic extends GetxController {
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
|
||||
}
|
||||
|
||||
sendShout() async {
|
||||
@ -110,8 +108,8 @@ class Call_outLogic extends GetxController {
|
||||
return;
|
||||
}
|
||||
if (state.imaglist.isEmpty && state.videolist.isEmpty) {
|
||||
if (textEditingController.text.length < 30) {
|
||||
showToast("您当前未添加图片或视频,请至少输入30字故事内容。");
|
||||
if (textEditingController.text.length < 10) {
|
||||
showToast("您当前未添加图片或视频,请至少输入10字喊话内容。");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -165,138 +163,42 @@ class Call_outLogic extends GetxController {
|
||||
// return;
|
||||
// }
|
||||
showToast(beandata.msg);
|
||||
var callOutBean = BaseResponse<List<String>>.fromJson(data, (jsonData) => List<String>.from(jsonData),);
|
||||
var callOutBean = BaseResponse<List<String>>.fromJson(
|
||||
data,
|
||||
(jsonData) => List<String>.from(jsonData),
|
||||
);
|
||||
|
||||
textEditingController.text =
|
||||
filterSensitiveWords(textEditingController.text, callOutBean.data!);
|
||||
print(filterSensitiveWords(textEditingController.text, callOutBean.data!));
|
||||
print(
|
||||
filterSensitiveWords(textEditingController.text, callOutBean.data!));
|
||||
update();
|
||||
} else if (beandata.code == 30505) {
|
||||
var callOutBean = BaseResponse<CirclePaymentBean>.fromJson(
|
||||
data,
|
||||
(jsonData) => CirclePaymentBean.fromJson(jsonData),
|
||||
);
|
||||
showDialog();
|
||||
// showDialog();
|
||||
print(numbers[0].id);
|
||||
|
||||
showJoinCiclePiker(numbers[0].id.toString(),callOutBean.data.amount,callOutBean.data.oldAmount,0,(payResult){
|
||||
final logic = Get.put(CircleLogic());
|
||||
logic.circle.lists.forEach((element) {
|
||||
if(element.id == numbers[0].id){
|
||||
element.is_limit = false;
|
||||
}
|
||||
});
|
||||
// widget.bean.is_limit = false;
|
||||
});
|
||||
|
||||
UnlockCallDialog().showUnlockBottomSheet(numbers[0].id);
|
||||
// tipWdiget()
|
||||
} else {
|
||||
showToast(beandata.msg);
|
||||
}
|
||||
}
|
||||
|
||||
void showDialog() {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
height: 330.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getCircleImage('add_tip_bg')))),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('close'),
|
||||
width: 24.sp,
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 24.sp,
|
||||
child: Text(
|
||||
'解锁圈子才能发布喊话',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
left: 17.sp,
|
||||
top: 64.sp,
|
||||
child: Text(
|
||||
'为什么要解锁圈子?',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
top: 98.sp,
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Text(
|
||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈;3、谢绝只会白嫖的猎奇人士。',
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 0.8),
|
||||
fontSize: 12.sp)),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 18.sp,
|
||||
child: Container(
|
||||
width: 168.sp,
|
||||
height: 42.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color(0xff0AFCFF),
|
||||
Color(0xffD739EA)
|
||||
])),
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 72.sp,
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'¥18',
|
||||
style: TextStyle(
|
||||
color: Color(0xffE845FF),
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'(原价60)',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.lineThrough,
|
||||
decorationColor: Colors.white70,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
}
|
||||
|
||||
|
||||
startSelectCircleActivity() async {
|
||||
var data = await Get.toNamed(AppRoutes.SelectCircleActivity, arguments: {
|
||||
@ -326,12 +228,12 @@ class Call_outLogic extends GetxController {
|
||||
final XFile? pickedFile = await _picker.pickImage(
|
||||
source: ImageSource.gallery,
|
||||
);
|
||||
if(null==pickedFile){
|
||||
if (null == pickedFile) {
|
||||
return;
|
||||
}
|
||||
|
||||
SmartDialog.showLoading();
|
||||
uploadImage(quToken,pickedFile!,CONFIG.CALL_OUT_IMAGE,(result){
|
||||
uploadImage(quToken, pickedFile!, CONFIG.CALL_OUT_IMAGE, (result) {
|
||||
SmartDialog.dismiss();
|
||||
state.imaglist.add(result);
|
||||
update();
|
||||
@ -378,7 +280,7 @@ class Call_outLogic extends GetxController {
|
||||
final XFile? pickedFile = await _picker.pickVideo(
|
||||
source: ImageSource.gallery,
|
||||
);
|
||||
if(null==pickedFile){
|
||||
if (null == pickedFile) {
|
||||
return;
|
||||
}
|
||||
SmartDialog.showLoading();
|
||||
@ -398,21 +300,20 @@ class Call_outLogic extends GetxController {
|
||||
}
|
||||
});
|
||||
|
||||
uploadQiniu(pickedFile.path, pickedFile.name, CONFIG.CALL_OUT_VIDEO, quToken,
|
||||
(result) {
|
||||
SmartDialog.dismiss();
|
||||
state.videolist.add(result);
|
||||
update();
|
||||
});
|
||||
uploadQiniu(
|
||||
pickedFile.path, pickedFile.name, CONFIG.CALL_OUT_VIDEO, quToken,
|
||||
(result) {
|
||||
SmartDialog.dismiss();
|
||||
state.videolist.add(result);
|
||||
update();
|
||||
});
|
||||
} else {
|
||||
SmartDialog.dismiss();
|
||||
showToast("请上传5-30秒的视频,当前视频长度为:$durationInSeconds""秒");
|
||||
showToast("请上传5-30秒的视频,当前视频长度为:$durationInSeconds" "秒");
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
|
||||
|
||||
//压缩 感觉越压越大
|
||||
//压缩 感觉越压越大
|
||||
// try {
|
||||
// final XFile? pickedFile = await _picker.pickVideo(
|
||||
// source: ImageSource.gallery,
|
||||
@ -457,7 +358,6 @@ class Call_outLogic extends GetxController {
|
||||
// } catch (e) {}
|
||||
}
|
||||
|
||||
|
||||
Future<ClosedCaptionFile> _loadCaptions(BuildContext context) async {
|
||||
final String fileContents = await DefaultAssetBundle.of(context)
|
||||
.loadString('assets/bumble_bee_captions.vtt');
|
||||
|
||||
@ -525,7 +525,7 @@ class _TIMUIKItHistoryMessageListItemState
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
navigateToUserAgreement();
|
||||
navigateToCodeOfConduct();
|
||||
},
|
||||
child: Text(
|
||||
'《文明公约》',
|
||||
@ -1287,16 +1287,16 @@ class _TIMUIKItHistoryMessageListItemState
|
||||
isSelf &&
|
||||
(message.status == MessageStatus.V2TIM_MSG_STATUS_SEND_SUCC ||
|
||||
message.status == MessageStatus.V2TIM_MSG_STATUS_SENDING))
|
||||
Container(
|
||||
padding: const EdgeInsets.only(bottom: 3),
|
||||
margin: const EdgeInsets.only(right: 6),
|
||||
child: Text(
|
||||
isPeerRead ? TIM_t("已读") : TIM_t("未读"),
|
||||
style: TextStyle(
|
||||
color: theme.chatMessageItemUnreadStatusTextColor,
|
||||
fontSize: 12),
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(bottom: 3),
|
||||
// margin: const EdgeInsets.only(right: 6),
|
||||
// child: Text(
|
||||
// isPeerRead ? TIM_t("已读") : TIM_t("未读"),
|
||||
// style: TextStyle(
|
||||
// color: theme.chatMessageItemUnreadStatusTextColor,
|
||||
// fontSize: 12),
|
||||
// ),
|
||||
// ),
|
||||
if (model.chatConfig.isShowGroupReadingStatus &&
|
||||
model.chatConfig.isShowGroupMessageReadReceipt &&
|
||||
model.conversationType == ConvType.group &&
|
||||
|
||||
@ -367,6 +367,7 @@ class _MorePanelState extends TIMUIKitState<MorePanel> {
|
||||
);
|
||||
final photos = await Permissions.checkPermission(
|
||||
context,Permission.photos.value,
|
||||
|
||||
theme,
|
||||
);
|
||||
if(!videos && !photos){
|
||||
|
||||
@ -222,11 +222,13 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
refreshData();
|
||||
refreshCircleData();
|
||||
},
|
||||
child: lists.isEmpty
|
||||
? !callOutMore
|
||||
? noResultWidget()
|
||||
: loaddingWidget(true)
|
||||
: ListView.builder(
|
||||
child:
|
||||
// lists.isEmpty
|
||||
// ? !callOutMore
|
||||
// ? noResultWidget()
|
||||
// : loaddingWidget(true)
|
||||
// :
|
||||
ListView.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
controller: scrollController,
|
||||
@ -236,7 +238,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
return Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.sp, right: 12.sp),
|
||||
height: 88.sp,
|
||||
height:urlList.length==0?47.sp: 88.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
@ -250,7 +252,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
margin: EdgeInsets.only(bottom: 7.sp),
|
||||
width: Get.width,
|
||||
height: 30.sp,
|
||||
child: HideText(text: widget.bean.intro,additionText: '查看更多',maxLines: 2,style: TextStyle(color: Colors.white, fontSize: 10.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 10.sp),onTap: () {
|
||||
child: HideText(text: widget.bean.intro,additionText: '查看更多',maxLines: 2,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () {
|
||||
_showTextContentDialog(
|
||||
context, widget.bean.intro);
|
||||
},),
|
||||
@ -263,7 +265,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
// showToast("点个鸡毛,星哥还没做");
|
||||
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
||||
},
|
||||
child: Row(
|
||||
child:urlList.length==0?Container(): Row(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
@ -1276,6 +1278,13 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
setState(() {
|
||||
|
||||
});
|
||||
// final logic = Get.put(CircleLogic());
|
||||
// logic.update();
|
||||
|
||||
}else if(data['code'] == 404){
|
||||
var logic = Get.put(CircleLogic());
|
||||
logic.circle.lists.removeAt(logic.state.index);
|
||||
logic.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import 'dart:io';
|
||||
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_core/src/get_main.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../main.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../util/util.dart';
|
||||
|
||||
class BaseDialog extends StatefulWidget {
|
||||
final bool isDismiss;
|
||||
|
||||
269
circle_app/lib/app/dialog/UnlockCallDialog.dart
Normal file
269
circle_app/lib/app/dialog/UnlockCallDialog.dart
Normal file
@ -0,0 +1,269 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
|
||||
|
||||
import '../../common/Widgets/open_vip_tip/logic.dart';
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../util/PaymentUtils.dart';
|
||||
import '../../util/util.dart';
|
||||
|
||||
class UnlockCallDialog extends GetxController {
|
||||
RxBool isZfbPrice = true.obs;
|
||||
String circleId = "";
|
||||
|
||||
void showUnlockBottomSheet(String id) {
|
||||
circleId = id;
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
height: 330.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getCircleImage('add_tip_bg')))),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('close'),
|
||||
width: 24.sp,
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 24.sp,
|
||||
child: Text(
|
||||
'解锁圈子才能发布喊话',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
left: 17.sp,
|
||||
top: 64.sp,
|
||||
child: Text(
|
||||
'为什么要解锁圈子?',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
top: 98.sp,
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Text(
|
||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈;3、谢绝只会白嫖的猎奇人士。',
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 0.8),
|
||||
fontSize: 12.sp)),
|
||||
)),
|
||||
Platform.isIOS
|
||||
? Container(
|
||||
height: 1,
|
||||
width: 1,
|
||||
)
|
||||
: Positioned(
|
||||
bottom: 108.sp,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
isZfbPrice.value = true;
|
||||
update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(() => Image.asset(
|
||||
isZfbPrice.value
|
||||
? getMineImage("icon_pay_select")
|
||||
: getMineImage(
|
||||
"icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
))
|
||||
,
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_ali'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'支付宝支付',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Image.asset(
|
||||
getMineImage(
|
||||
'icon_recommend_pay_way'),
|
||||
width: 32.0.sp,
|
||||
height: 16.0.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.0.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
isZfbPrice.value = false;
|
||||
update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(() => Image.asset(
|
||||
!isZfbPrice.value
|
||||
? getMineImage("icon_pay_select")
|
||||
: getMineImage(
|
||||
"icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
))
|
||||
,
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_wx'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'微信支付',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 18.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (Platform.isIOS) {
|
||||
} else {
|
||||
startPayment();
|
||||
// unlockingPayment(numbers[0].id, (payResult) {});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 168.sp,
|
||||
height: 42.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color(0xff0AFCFF),
|
||||
Color(0xffD739EA)
|
||||
])),
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 72.sp,
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'¥18',
|
||||
style: TextStyle(
|
||||
color: Color(0xffE845FF),
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'(原价60)',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.lineThrough,
|
||||
decorationColor: Colors.white70,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
}
|
||||
|
||||
startPayment() async {
|
||||
SmartDialog.showLoading();
|
||||
if (isZfbPrice.value) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postAliPayOrder,
|
||||
params: {"product_id": circleId, "type": 1});
|
||||
var bean = BaseResponse<PayUrlBean>.fromJson(
|
||||
data, (data) => PayUrlBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
openAliPay(bean.data.payUrl, (isSuccess, errorMsg) {
|
||||
Get.back();
|
||||
});
|
||||
} else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
} else {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postWxOrder,
|
||||
params: {"product_id": circleId, "type": 1});
|
||||
var bean = BaseResponse<PaymentData>.fromJson(
|
||||
data, (data) => PaymentData.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
openWxPay(bean.data, (bool isSuccess, String? errorMessage) {
|
||||
Get.back();
|
||||
});
|
||||
} else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -354,7 +354,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
data: controller.genderList,
|
||||
selectData: controller.state.sex.isNotEmpty
|
||||
? controller.state.sex
|
||||
: '男', onConfirm: (p, position) {
|
||||
: 'MTF', onConfirm: (p, position) {
|
||||
controller.state.sex = p;
|
||||
controller.state.genderId =
|
||||
controller.configBean.genderMap.keys.toList()[position];
|
||||
@ -401,7 +401,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
data: controller.roleList,
|
||||
selectData: controller.state.role.isNotEmpty
|
||||
? controller.state.role
|
||||
: 'Sado', onConfirm: (p, position) {
|
||||
: 'Dom', onConfirm: (p, position) {
|
||||
controller.state.role = p;
|
||||
controller.state.roleId =
|
||||
controller.configBean.roleMap.keys.toList()[position];
|
||||
@ -416,7 +416,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
data: controller.orientationList,
|
||||
selectData: controller.state.orientation.isNotEmpty
|
||||
? controller.state.orientation
|
||||
: '异性恋', onConfirm: (p, position) {
|
||||
: '双性恋', onConfirm: (p, position) {
|
||||
controller.state.orientation = p;
|
||||
controller.state.orientationId =
|
||||
controller.configBean.orientationMap.keys.toList()[position];
|
||||
|
||||
@ -38,7 +38,6 @@ class SplashLogic extends GetxController {
|
||||
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,
|
||||
bean.data!.Authorization.toString());
|
||||
});
|
||||
|
||||
Get.offNamed(AppRoutes.Home);
|
||||
return;
|
||||
} else if (bean.code == 30002) {
|
||||
|
||||
@ -78,6 +78,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
child: buildContent(logic),
|
||||
),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'dart:io';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../network/api.dart';
|
||||
@ -214,6 +215,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
||||
}
|
||||
|
||||
unlockingPayment(String cicleId, MyCallback myCallback) async {
|
||||
SmartDialog.showLoading();
|
||||
if (isZfbPrice) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postAliPayOrder, params: {"product_id": cicleId, "type": 1});
|
||||
@ -245,7 +247,9 @@ unlockingPayment(String cicleId, MyCallback myCallback) async {
|
||||
} else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
}
|
||||
|
||||
typedef void MyCallback(bool payResult);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../network/api.dart';
|
||||
@ -46,6 +47,7 @@ class Open_vip_tipLogic extends GetxController {
|
||||
final Open_vip_tipState state = Open_vip_tipState();
|
||||
|
||||
startPayment() async {
|
||||
SmartDialog.showLoading();
|
||||
if (isZfbPrice) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postAliPayOrder,
|
||||
@ -85,6 +87,7 @@ class Open_vip_tipLogic extends GetxController {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -296,15 +296,15 @@ class _MyAppState extends State<MyApp> {
|
||||
callbackValue.errorMsg!.contains("not support @all")) {
|
||||
showToast("当前群组不支持@全体成员");
|
||||
} else {
|
||||
showToast(callbackValue.errorMsg ??
|
||||
callbackValue.errorCode.toString());
|
||||
// showToast(callbackValue.errorMsg ??
|
||||
// callbackValue.errorCode.toString());
|
||||
}
|
||||
break;
|
||||
case TIMCallbackType.FLUTTER_ERROR:
|
||||
default:
|
||||
// prints the stack trace to console or shows the catch error
|
||||
if (callbackValue.catchError != null) {
|
||||
showToast(callbackValue.catchError.toString());
|
||||
// showToast(callbackValue.catchError.toString());
|
||||
} else {
|
||||
print(callbackValue.stackTrace);
|
||||
// loginIM();
|
||||
|
||||
@ -281,6 +281,17 @@ void navigateToPrivacyPolicy() {
|
||||
"url": "https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1"
|
||||
});
|
||||
}
|
||||
|
||||
//跳转到文明公约
|
||||
void navigateToCodeOfConduct() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "文明公约",
|
||||
"url": "https://docs.qq.com/doc/DZUtoZ3V0S3ltY2Zw"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//发布内容规范
|
||||
void navigateToContentGuidelines() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user