代码提交
This commit is contained in:
parent
aacd7a0db3
commit
85c5e81283
@ -71,8 +71,8 @@ android {
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 121
|
||||
versionName "2.7.1"
|
||||
versionCode 278
|
||||
versionName "2.7.8"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -375,6 +375,8 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
@ -402,6 +404,7 @@
|
||||
MARKETING_VERSION = 2.1.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
@ -526,6 +529,8 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
@ -553,6 +558,7 @@
|
||||
MARKETING_VERSION = 2.1.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
@ -571,6 +577,8 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
@ -598,6 +606,7 @@
|
||||
MARKETING_VERSION = 2.1.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
|
||||
@ -82,47 +82,31 @@ class Call_outLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
var arg = Get.arguments;
|
||||
try {
|
||||
if (arg != null) {
|
||||
if (arg is Map) {
|
||||
List<MyConfigData> myConfigData = Get.arguments['numbers'];
|
||||
numbers.addAll(myConfigData);
|
||||
|
||||
if (arg != null) {
|
||||
if (arg is Map) {
|
||||
List<MyConfigData> myConfigData = Get.arguments['numbers'];
|
||||
numbers.addAll(myConfigData);
|
||||
var result = await DioManager.instance.get(
|
||||
url: "/up-service/interest/${numbers.first.id}",
|
||||
);
|
||||
|
||||
var result = await DioManager.instance.get(
|
||||
url: "/up-service/interest/${numbers.first.id}",
|
||||
);
|
||||
if (result['code'] == 200) {
|
||||
isLocal = result['data']['isLocal'];
|
||||
localNumberList.addAll(myConfigData);
|
||||
}
|
||||
|
||||
if (result['code'] == 200) {
|
||||
isLocal = result['data']['isLocal'];
|
||||
localNumberList.addAll(myConfigData);
|
||||
if (numbers.length > 0 && !isLocal) {
|
||||
circleName = numbers[0].name;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
if (numbers.length > 0 && !isLocal) {
|
||||
circleName = numbers[0].name;
|
||||
}
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
// var data = await DioManager.instance
|
||||
// .get(url: Api.getMyCircleInterests, params: {"page": 1,'page_size':20});
|
||||
//
|
||||
// var bean = BaseResponse<InterestsBean>.fromJson(
|
||||
// data, (data) => InterestsBean.fromJson(data));
|
||||
//
|
||||
// InterestsBean info = bean.data;
|
||||
//
|
||||
// if (info.lists.isNotEmpty) {
|
||||
// Circle circle = info.lists.first;
|
||||
// MyConfigData configData = MyConfigData(circle.id.toString(),circle.title,true);
|
||||
// numbers.add(configData);
|
||||
// if(numbers.length>0){
|
||||
// circleName = numbers[0].name;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// update();
|
||||
// }
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
HomeLogic logic = Get.find<HomeLogic>();
|
||||
|
||||
if ((logic.model!.vip ?? 0) == 2) {
|
||||
|
||||
@ -488,10 +488,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -1021,10 +1018,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -1316,10 +1316,7 @@ class _TIMUIKItHistoryMessageListItemState
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -4,6 +4,7 @@ import 'dart:math';
|
||||
import 'package:circle_app/circle_app/chat/TIMUIKitChat/TIMUIKitTextField/tim_uikit_text_field_layout/narrow.dart';
|
||||
import 'package:circle_app/circle_app/chat/logic.dart';
|
||||
import 'package:circle_app/circle_app/home/logic.dart';
|
||||
import 'package:circle_app/commons/colors/app_color.dart';
|
||||
import 'package:circle_app/main.dart';
|
||||
import 'package:circle_app/net/api.dart';
|
||||
import 'package:circle_app/net/dio_manager.dart';
|
||||
@ -169,6 +170,8 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
|
||||
UserBean? userInfoBean;
|
||||
|
||||
UserBean? otherUserInfoBean;
|
||||
|
||||
setCurrentCursor(int? value) {
|
||||
currentCursor = value;
|
||||
}
|
||||
@ -266,25 +269,66 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
}
|
||||
|
||||
Future checkImStatus() async {
|
||||
if (widget.conversationID.contains('qpqz_prod_10_')) {
|
||||
return true;
|
||||
}
|
||||
List<String> pressionStr =
|
||||
'微信、QQ、加Q、+V、地球号、绿泡泡、公众号、网站、app、视频、手机号、id、企鹅、门槛、收费、加群'.split('、');
|
||||
'好友位、多少米、思溜、儿把、儿思、旧儿、把吴、散思、思儿、灵期、溜灵、耳溜、姨思、一思、思留、尔伊、伊思、张定、张一小时、见面付、要加、微信、QQ、地球号、绿泡泡、公众号、网站、app、视频、手机、号码、id、企鵝、门槛、收费、加群、加裙、加👗、进群、进裙、进👗、🚪、💰、不免费、找我、线下、➕、+、加扣、加微、加v、加Q、家扣、家微、家v、家Q、家v、佳扣、佳微、佳v、佳Q、佳v、私v、加你、加我、架q、架你、架我、玩就加、玩就佳、🎞、可V、我Q、伟心、嘉伟、佳v、喂信、q👗、q裙、q群、v👗、v裙、v群、换地方聊、换个地方、这里不能、这里好像不能、这里有限制、家不了、q月、q哦、ᨾ、聊不了、被限制'
|
||||
.split('、');
|
||||
|
||||
if (textEditingController.text.isNotEmpty &&
|
||||
(userInfoBean?.contact?.isEmpty ?? true)) {
|
||||
if (textEditingController.text.isNotEmpty) {
|
||||
bool isContain = false;
|
||||
String sendText = textEditingController.text.toUpperCase();
|
||||
for (String text in pressionStr) {
|
||||
if (sendText.contains(text)) {
|
||||
sendText = sendText.replaceAll(text, text.length == 2 ? '**' : '***');
|
||||
sendText = sendText.replaceAll(text, text.length == 2 ? '**' : '***');
|
||||
isContain = true;
|
||||
}
|
||||
}
|
||||
if (isContain) {
|
||||
await showAddWxPicker(
|
||||
userInfoBean!.contact!.isNotEmpty ?? false,
|
||||
isHidden: userInfoBean!.contact!.isNotEmpty ?? false,
|
||||
isWxHidden: userInfoBean!.hide_wx_num == 1,
|
||||
);
|
||||
if (userInfoBean?.contact.isEmpty ?? false) {
|
||||
SharedPreferencesHelper sp =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
if (await sp.isShowContact()) {
|
||||
await showAddWxPicker(
|
||||
userInfoBean!.contact!.isNotEmpty ?? false,
|
||||
isHidden: userInfoBean!.contact!.isNotEmpty ?? false,
|
||||
isWxHidden: userInfoBean!.hide_wx_num == 1,
|
||||
);
|
||||
}
|
||||
} else if (otherUserInfoBean?.contact.isEmpty ?? false) {
|
||||
if (!userContactMap.containsKey(userInfoBean!.id.toString() +
|
||||
otherUserInfoBean!.id!.toString())) {
|
||||
Get.bottomSheet(
|
||||
KindTipsDialog(
|
||||
call: () async {
|
||||
var result = await DioManager().get(
|
||||
url: Api.noticeWxNum +
|
||||
widget.conversationID.split('_').last,
|
||||
);
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('已发消息通知TA了');
|
||||
} else {
|
||||
showOKToast(result['msg']);
|
||||
}
|
||||
},
|
||||
leftAction: '放弃',
|
||||
rightAction: '想要联系方式',
|
||||
title: '想建立更深的关系,除了您填写联系方式让TA解锁之外,您也可以要TA的联系方式哦'),
|
||||
isScrollControlled: true);
|
||||
userContactMap[userInfoBean!.id.toString() +
|
||||
otherUserInfoBean!.id!.toString()] = 1;
|
||||
}
|
||||
} else if (otherUserInfoBean?.contact.isNotEmpty ?? false) {
|
||||
if (!userContactMap.containsKey(userInfoBean!.id.toString() +
|
||||
otherUserInfoBean!.id!.toString())) {
|
||||
EventBusManager.fire(
|
||||
UnLockContactTip(widget.conversationID.split("_").last));
|
||||
userContactMap[userInfoBean!.id.toString() +
|
||||
otherUserInfoBean!.id!.toString()] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// imStatusOK = false;
|
||||
textEditingController.text = sendText;
|
||||
return false;
|
||||
@ -304,7 +348,7 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,'chat'),
|
||||
body: Open_vip_tipPage(false, 'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
@ -320,12 +364,16 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,'chat'),
|
||||
body: Open_vip_tipPage(false, 'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
} else if (code == 4005) {
|
||||
Get.bottomSheet(BanDialog(time:data['data'],),isScrollControlled:true);
|
||||
Get.bottomSheet(
|
||||
BanDialog(
|
||||
time: data['data'],
|
||||
),
|
||||
isScrollControlled: true);
|
||||
} else {
|
||||
showOKToast(data['msg']);
|
||||
}
|
||||
@ -595,9 +643,11 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
|
||||
HomeLogic logic = Get.find<HomeLogic>();
|
||||
|
||||
if (!isContain && !(widget.conversationID.contains('qpqz_prod_10_') || (logic.model?.id ?? 0) < 1000)) {
|
||||
var data = await DioManager.instance
|
||||
.post(url: Api.shieldWordCheck, params: {'text': text, 'type': 2});
|
||||
if (!isContain &&
|
||||
!(widget.conversationID.contains('qpqz_prod_10_') ||
|
||||
(logic.model?.id ?? 0) < 1000)) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.shieldWordCheck, params: {'text': text, 'type': 2});
|
||||
if (data['data']['code'] == 10000) {
|
||||
words = data['data']['words'];
|
||||
if (words.isNotEmpty) {
|
||||
@ -641,9 +691,11 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
EventBusManager.fire(MsgSendSuccess());
|
||||
if (Get.isRegistered<ChatLogic>()) {
|
||||
ChatLogic logic = Get.find<ChatLogic>();
|
||||
if (logic.hotInfo['isFirstChat'] == 1 && !chatHotIdList.contains(widget.conversationID.split('_').last)) {
|
||||
if (logic.hotInfo['isFirstChat'] == 1 &&
|
||||
!chatHotIdList.contains(widget.conversationID.split('_').last)) {
|
||||
chatHotIdList.add(widget.conversationID.split('_').last);
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
SharedPreferencesHelper sp =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
bool status = await sp.isFirstTashTip();
|
||||
if (status) {
|
||||
showOKToast('右上角🎁进度到100%免费领取100小票~');
|
||||
@ -651,7 +703,6 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
}
|
||||
logic.loadHotValueData();
|
||||
}
|
||||
|
||||
} else {
|
||||
showOKToast('请输入消息内容');
|
||||
isSending = false;
|
||||
@ -659,6 +710,9 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
}
|
||||
|
||||
loadIsShowSendGiftDialogData() async {
|
||||
if (widget.conversationID.contains('qpqz_prod_10_')) {
|
||||
return true;
|
||||
}
|
||||
V2TimConversation con = Get.arguments;
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.isShow_give_gift + widget.conversationID.split('_').last);
|
||||
@ -1071,6 +1125,7 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
StreamSubscription? commentBlackEvent = null;
|
||||
bool isBlack = false;
|
||||
bool isSending = false;
|
||||
|
||||
getBlack() async {
|
||||
isBlack = widget.isBlack!;
|
||||
EventBusManager.fire(CommentBlackMoreEvent());
|
||||
@ -1361,7 +1416,135 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
|
||||
if (bean.isSuccess()) {
|
||||
userInfoBean = bean.data.user;
|
||||
loadOtherUserData();
|
||||
}
|
||||
}
|
||||
|
||||
void loadOtherUserData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url:
|
||||
"${Api.getUserInfoTA + widget.conversationID.split('_').last}/home",
|
||||
params: {'2': 1});
|
||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
otherUserInfoBean = bean.data.user;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class KindTipsDialog extends StatefulWidget {
|
||||
Function call;
|
||||
String leftAction;
|
||||
String rightAction;
|
||||
String title;
|
||||
|
||||
KindTipsDialog(
|
||||
{super.key,
|
||||
required this.call,
|
||||
required this.leftAction,
|
||||
required this.rightAction,
|
||||
required this.title});
|
||||
|
||||
@override
|
||||
_KindTipsDialogState createState() => new _KindTipsDialogState();
|
||||
}
|
||||
|
||||
class _KindTipsDialogState extends State<KindTipsDialog> {
|
||||
// TODO: add state variables and methods
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Center(
|
||||
child: Container(
|
||||
width: Get.width - 60.sp,
|
||||
height: 220.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(getMineImage('im_neglect')),
|
||||
fit: BoxFit.fill)),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.sp, bottom: 10.sp),
|
||||
child: Text('温馨提示',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 18.sp))),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 30.sp, right: 30.sp),
|
||||
child: Text(widget.title,
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
letterSpacing: 2.0,
|
||||
color: Colors.white,
|
||||
fontSize: 15.sp))),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
height: 1.sp,
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
),
|
||||
Container(
|
||||
height: 50.sp,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
widget.leftAction,
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
widget.call();
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomRight: Radius.circular(10.sp)),
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
// color: AppColor.mainColor,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
widget.rightAction,
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class UnLockContactTip {
|
||||
UnLockContactTip(this.userId);
|
||||
|
||||
String userId;
|
||||
}
|
||||
|
||||
@ -46,6 +46,7 @@ import '../../../../userinfo/logic.dart';
|
||||
import '../../../view.dart';
|
||||
import '../../../widget/chat_circle_share_dialog.dart';
|
||||
import '../../../widget/chat_gift_pannel.dart';
|
||||
import '../tim_uikit_text_field.dart';
|
||||
|
||||
GlobalKey<_TIMTextFieldLayoutNarrowState> TIMnarrowTextFieldKey = GlobalKey();
|
||||
|
||||
@ -186,6 +187,9 @@ class _TIMTextFieldLayoutNarrowState
|
||||
var sub1;
|
||||
|
||||
var actionSub;
|
||||
|
||||
var unClockSub;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@ -202,6 +206,66 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
});
|
||||
|
||||
unClockSub = EventBusManager.on<UnLockContactTip>().listen((event) async {
|
||||
if (widget.conversationID.contains(event.userId)) {
|
||||
if (unLockWxNum != 1) {
|
||||
var result = await DioManager().post(
|
||||
url: Api.unlockStatus,
|
||||
params: {'targetUserId': userInfoBean!.id!});
|
||||
if (result['code'] == 200) {
|
||||
int price = result['data']['unlockPrice'];
|
||||
int residueUnlockNum = result['data']['residueUnlockNum'];
|
||||
if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) {
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, false),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
loadUserData();
|
||||
}
|
||||
});
|
||||
} else if (price > 0) {
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, true),
|
||||
isScrollControlled: true,
|
||||
enableDrag: true)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
loadUserData();
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var result = await DioManager().post(
|
||||
url: Api.unlockWx,
|
||||
params: {'targetUserId': userInfoBean!.id});
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('解锁成功');
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
loadUserData();
|
||||
} else {
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, true),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
loadUserData();
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (widget.controller != null) {
|
||||
widget.controller?.addListener(() {
|
||||
final actionType = widget.controller?.actionType;
|
||||
@ -226,6 +290,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
actionSub.cancel();
|
||||
unClockSub.cancel();
|
||||
sub1.cancel();
|
||||
print("TIMTextFieldLayoutNarrow解绑");
|
||||
if (null != commentBlackEvent) {
|
||||
@ -1592,7 +1658,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
void loadUserData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url:
|
||||
"${Api.getUserInfoTA + widget.conversationID.split('_').last}/home");
|
||||
"${Api.getUserInfoTA + widget.conversationID.split('_').last}/home",params: {'1':1});
|
||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
|
||||
|
||||
@ -115,7 +115,9 @@ class Chat {
|
||||
if (json['users'] != null) {
|
||||
users = <Users>[];
|
||||
json['users'].forEach((v) {
|
||||
users!.add(new Users.fromJson(v));
|
||||
if (users?.length != 2) {
|
||||
users!.add(new Users.fromJson(v));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -168,7 +170,8 @@ class User {
|
||||
int? role;
|
||||
int vip = 0;
|
||||
String? onlineFlag;
|
||||
|
||||
String? contact;
|
||||
int? contactType;
|
||||
User(
|
||||
{this.avatar,
|
||||
this.city,
|
||||
@ -187,6 +190,8 @@ class User {
|
||||
|
||||
User.fromJson(Map<String, dynamic> json) {
|
||||
avatar = json['avatar'];
|
||||
contact = json['contact'] ?? '';
|
||||
contactType = json['contactType'] ?? 4;
|
||||
city = (json['city'] ?? '').toString().replaceAll('市', '');
|
||||
gender = json['gender'];
|
||||
mark = json['mark'] ?? 0;
|
||||
|
||||
@ -1405,10 +1405,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(list.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -1843,10 +1840,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -1193,10 +1193,7 @@ class _LikeViewState extends State<LikeView>
|
||||
lists.interest!['id'].toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -1595,10 +1592,7 @@ class _LikeViewState extends State<LikeView>
|
||||
lists.interest!['id'].toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -405,10 +405,8 @@ class _VideoPlayerWidgetState extends State<VideoPlayerWidget> with RouteAware {
|
||||
widget.user.user!.imId!.toString(),
|
||||
widget.user.user!.nickname ?? '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.sp,
|
||||
))
|
||||
child:chatWidget(widget.user?.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -1140,10 +1140,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -1634,10 +1631,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -2394,10 +2394,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(list.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -2982,10 +2979,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(list.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -40,9 +40,10 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
return widget.isDismiss;
|
||||
},
|
||||
child: Dialog(
|
||||
insetPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24.0),
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 317.sp + (isShowWeb ? 40.sp : 0),
|
||||
height: 400.sp + (isShowWeb ? 40.sp : 0),
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
@ -89,7 +90,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(
|
||||
height: 215.sp,
|
||||
height: 280.sp,
|
||||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
@ -107,6 +108,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
isDownload
|
||||
? GestureDetector(
|
||||
onTap: () async {
|
||||
@ -148,7 +150,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
),
|
||||
),
|
||||
) : Container(
|
||||
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
||||
margin: EdgeInsets.only(top: 10.sp,bottom: 15.sp),
|
||||
child: CircularProgressIndicator(
|
||||
value: myProgress,
|
||||
backgroundColor: Colors.grey,
|
||||
@ -171,7 +173,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
}
|
||||
},
|
||||
child:Container(
|
||||
margin: EdgeInsets.only(top: 0.sp),
|
||||
margin: EdgeInsets.only(bottom: 10.sp),
|
||||
child: Text(
|
||||
"下载太慢或安装不成功?前往官网下载安装哈",
|
||||
style: TextStyle(
|
||||
@ -225,7 +227,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
},
|
||||
child: Container(
|
||||
width: 200.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
margin: EdgeInsets.only(bottom: 12.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
|
||||
@ -187,7 +187,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
() {},
|
||||
img: 'edit'),
|
||||
// if (isShowWx)
|
||||
wxFuncWidget('联系方式',
|
||||
wxFuncWidget('联系方式(选填)',
|
||||
TextField(
|
||||
controller: controller.state.wxEditingController,
|
||||
maxLength: 19,
|
||||
@ -204,7 +204,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
counterText: '',
|
||||
hintText: '请输入联系信息',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
|
||||
@ -30,7 +30,10 @@ class LoginLogic extends GetxController {
|
||||
int loginType = 0;
|
||||
bool isGetCode = false;
|
||||
bool isPhone = false;
|
||||
|
||||
String clipboardStr = '';
|
||||
String source = 'kuaishou1';
|
||||
|
||||
bool isShowPwd = false;
|
||||
|
||||
bool isLogining = false;
|
||||
@ -284,7 +287,8 @@ class LoginLogic extends GetxController {
|
||||
SmartDialog.showLoading(msg: '正在登录中...');
|
||||
Map<String, dynamic> params = {
|
||||
'operatorAccessToken': accessToken,
|
||||
'ydToken': token
|
||||
'ydToken': token,
|
||||
'source':source
|
||||
};
|
||||
if (clipboardStr.isNotEmpty) {
|
||||
params['inviteCode'] = clipboardStr;
|
||||
@ -440,6 +444,7 @@ class LoginLogic extends GetxController {
|
||||
params['username'] = phoneEditingController.text;
|
||||
}
|
||||
|
||||
params['source'] = source;
|
||||
var data = await DioManager.instance
|
||||
.post(url: loginType == 0 ? phoneEditingController.text.contains("@") ? Api.emailLogin : Api.login : Api.new_login, params: params);
|
||||
isLogining = false;
|
||||
|
||||
@ -337,33 +337,6 @@ class LoginPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (logic.showOthner)
|
||||
Container(
|
||||
width: 280.sp,
|
||||
margin:
|
||||
EdgeInsets.only(top: 15.sp, right: 0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
logic.showOthner = false;
|
||||
// logic.loginType = logic.loginType == 0 ? 1 : 0;
|
||||
logic.update();
|
||||
},
|
||||
child: Text(
|
||||
'其他方式登录',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!logic.showOthner)
|
||||
Container(
|
||||
width: 280.sp,
|
||||
margin: EdgeInsets.only(top: 15.sp, right: 0.sp),
|
||||
@ -397,7 +370,7 @@ class LoginPage extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (logic.showOthner)
|
||||
if (logic.loginType == 1)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (!logic.check) {
|
||||
@ -434,7 +407,7 @@ class LoginPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (!logic.showOthner)
|
||||
if ( logic.loginType == 0 )
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (!logic.check) {
|
||||
@ -498,7 +471,7 @@ class LoginPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!logic.showOthner)
|
||||
if ( logic.loginType == 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 15.sp),
|
||||
child: Row(
|
||||
|
||||
@ -294,7 +294,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (logic.myInfoBean!.contact.isNotEmpty) {
|
||||
showUpdateWxPicker();
|
||||
await showUpdateWxPicker();
|
||||
} else {
|
||||
await showAddWxPicker(
|
||||
logic.myInfoBean!.contact!.isNotEmpty ?? false,
|
||||
@ -304,8 +304,9 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
isWxHidden:
|
||||
logic.myInfoBean!.contact.contains('*'),
|
||||
);
|
||||
logic.fetchUserInfo(Api.getUserInfo);
|
||||
|
||||
}
|
||||
logic.fetchUserInfo(Api.getUserInfo);
|
||||
},
|
||||
child: Container(
|
||||
// margin: EdgeInsets.only(right: 5.sp),
|
||||
@ -983,11 +984,10 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 5.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Center(
|
||||
Expanded(
|
||||
child: Text(
|
||||
controller.userInfoBean != null
|
||||
? controller.userInfoBean!.signature ?? ''
|
||||
@ -2891,11 +2891,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
}
|
||||
|
||||
showRechargeDialog(MinefragmentLogic ctr) async {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(true, ''),
|
||||
),
|
||||
Get.bottomSheet(Open_vip_tipPage(true, ''),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
|
||||
@ -304,10 +304,16 @@ class My_assetsPage extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
||||
height: 380.sp + (Platform.isIOS ? 0 : 15.sp),
|
||||
width: Get.width,
|
||||
child: RechargeScreenDialog(isShowBalance: false,source: '',),
|
||||
),
|
||||
if (!logic.isProxy)
|
||||
Container(
|
||||
// height: 400.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp,left: 15.sp,right: 15.sp),
|
||||
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.sp,
|
||||
right: 12.sp,
|
||||
@ -461,12 +467,7 @@ class My_assetsPage extends StatelessWidget {
|
||||
// ],
|
||||
// )),
|
||||
// ),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
height: 401.sp,
|
||||
width: Get.width,
|
||||
child: RechargeScreenDialog(isShowBalance: false,source: '',),
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
|
||||
|
||||
@ -42,9 +42,8 @@ class Reset_pwdLogic extends GetxController {
|
||||
|
||||
Future<void> getCode() async {
|
||||
SmartDialog.showLoading(msg: '正在发送中');
|
||||
var sp = await SharedPreferencesHelper.getInstance();
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.sendCode, params: {"phone": sp.getString(SharedPreferencesHelper.LOGINPHONE)});
|
||||
url: Api.phoneOrEmailSendCode);
|
||||
var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data));
|
||||
|
||||
SmartDialog.dismiss();
|
||||
|
||||
@ -82,7 +82,7 @@ class SetupPage extends StatelessWidget {
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (mineLogic.isUpdateVersion) {
|
||||
if (mineLogic.isUpdate) {
|
||||
logic.checkVersion();
|
||||
} else {
|
||||
showOKToast('当前已经是最新版本!');
|
||||
|
||||
@ -392,26 +392,45 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
_showBottomSheet(context, controller);
|
||||
},
|
||||
child: Image(
|
||||
image: AssetImage(getMineImage("icon_like")),
|
||||
image: AssetImage(getMsgImage("msg_share")),
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
),
|
||||
);
|
||||
|
||||
final likeText = Text(
|
||||
controller.isLike ? "取消喜欢" : "喜欢",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
final likeText = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (!controller.isLike)
|
||||
Container(margin: EdgeInsets.only(right: 4),child: Icon(Icons.add,color: Colors.white,size: 20,)),
|
||||
Text(
|
||||
controller.isLike ? "取消喜欢" : "喜欢",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
final chatText = Text(
|
||||
"私聊",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
final chatText = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(margin: EdgeInsets.only(right: 4),child:Image.asset(
|
||||
getCircleImage(
|
||||
'chat_icon',
|
||||
),
|
||||
height: 20.sp,
|
||||
color: Colors.white,
|
||||
),),
|
||||
Text(
|
||||
"私聊",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
final gradientDecoration = BoxDecoration(
|
||||
|
||||
@ -1003,9 +1003,6 @@ class _SysItemWidgetState extends State<SysItemWidget> {
|
||||
width: Get.width - 120.sp,
|
||||
margin: EdgeInsets.only(top: 8.sp),
|
||||
decoration: BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// fit: BoxFit.fill,
|
||||
// image: AssetImage(getCircleImage('normal_bg'))),
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
border: list!.isQueen!
|
||||
? GradientBoxBorder(
|
||||
@ -1014,13 +1011,11 @@ class _SysItemWidgetState extends State<SysItemWidget> {
|
||||
)
|
||||
: Border.all(
|
||||
color: Colors.white.withOpacity(0.1), width: 1.sp)),
|
||||
// height: widgetAllHeight + wordsHeight,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
atWidget,
|
||||
Container(
|
||||
decoration: BoxDecoration(),
|
||||
margin: EdgeInsets.only(
|
||||
top: 10.sp, bottom: 10.sp, left: 10.sp, right: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
|
||||
@ -295,6 +295,8 @@ class User {
|
||||
int? userType;
|
||||
int? vip;
|
||||
int? realAuth;
|
||||
int? contactType;
|
||||
String? contact;
|
||||
|
||||
User(
|
||||
{this.age,
|
||||
@ -332,6 +334,8 @@ class User {
|
||||
city = json['city'];
|
||||
createTime = json['createTime'];
|
||||
gender = json['gender'];
|
||||
contactType = json['contactType'] ?? 4;
|
||||
contact = json['contact'] ?? '';
|
||||
id = json['id'];
|
||||
imId = json['imId'];
|
||||
realAuth = json['realAuth'] ?? 0;
|
||||
|
||||
@ -130,9 +130,9 @@ class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
if (widget.isShowBalance)
|
||||
Container(width: Get.width,height: Get.height,),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.sp,right: 20.sp),
|
||||
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
padding: EdgeInsets.all(20.sp),
|
||||
height: widget.isShowBalance ? 441.sp + (!Platform.isAndroid ? 0 : 15.sp) : 390.sp + (!Platform.isAndroid ? 0 : 50.sp),
|
||||
height: widget.isShowBalance ? 441.sp + (!Platform.isAndroid ? 0 : 15.sp) : 370.sp + (!Platform.isAndroid ? 0 : 25.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF393949),
|
||||
borderRadius: BorderRadius.circular(10.sp)
|
||||
|
||||
@ -1702,10 +1702,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
),
|
||||
child:chatWidget(lists.user?.contactType ?? 4)
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -2115,10 +2112,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.sp,
|
||||
)
|
||||
chatWidget(lists.user?.contactType ?? 4)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@ -14,6 +17,11 @@ import 'state.dart';
|
||||
|
||||
class Open_vip_tipLogic extends GetxController {
|
||||
List<PriceBean> priceBean = [];
|
||||
|
||||
List<PriceBean> renewPriceBean = [];
|
||||
|
||||
ScrollController scrollController = ScrollController();
|
||||
|
||||
bool isZfbPrice = true;
|
||||
bool isYean = false;
|
||||
|
||||
@ -41,7 +49,14 @@ class Open_vip_tipLogic extends GetxController {
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
||||
loadData() async {
|
||||
if (Platform.isIOS) {
|
||||
await loadRenewData();
|
||||
}
|
||||
|
||||
|
||||
var data = await DioManager.instance.get(url: Api.getVipPrice, params: {});
|
||||
var vipPriceList = BaseResponse<List<PriceBean>>.fromJson(
|
||||
data,
|
||||
@ -49,17 +64,37 @@ class Open_vip_tipLogic extends GetxController {
|
||||
List<PriceBean>.from(data.map((item) => PriceBean.fromJson(item))),
|
||||
);
|
||||
priceBean = vipPriceList.data;
|
||||
|
||||
if (Platform.isIOS && renewPriceBean.isNotEmpty) {
|
||||
priceBean.insert(priceBean.length == 4 ? 1 : 0, renewPriceBean.first);
|
||||
}
|
||||
if (isYean) {
|
||||
setYean();
|
||||
Future.delayed(Duration(microseconds: 500),() {
|
||||
scrollController.jumpTo(100);
|
||||
});
|
||||
}
|
||||
if (priceBean.length == 4 && await loadStatus()) {
|
||||
isShowDialog = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
isLoad = false;
|
||||
update();
|
||||
}
|
||||
|
||||
loadRenewData() async {
|
||||
var data = await DioManager.instance.get(url: Api.vipProductInfo, params: {});
|
||||
if (data['code'] == 200) {
|
||||
var vipPriceList = BaseResponse<List<PriceBean>>.fromJson(
|
||||
data,
|
||||
(data) =>
|
||||
List<PriceBean>.from(data.map((item) => PriceBean.fromJson(item))),
|
||||
);
|
||||
renewPriceBean = vipPriceList.data;
|
||||
}
|
||||
}
|
||||
|
||||
loadStatus() async {
|
||||
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
|
||||
if (sharedPreferences.containsKey(SharedPreferencesHelper.vipDayTip)) {
|
||||
|
||||
@ -18,7 +18,8 @@ import 'logic.dart';
|
||||
class Open_vip_tipPage extends StatefulWidget {
|
||||
bool isYean;
|
||||
String source;
|
||||
Open_vip_tipPage(this.isYean,this.source);
|
||||
|
||||
Open_vip_tipPage(this.isYean, this.source);
|
||||
|
||||
@override
|
||||
State<Open_vip_tipPage> createState() => _Open_vip_tipPageState();
|
||||
@ -29,27 +30,24 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
final homelogic = Get.find<HomeLogic>();
|
||||
final state = Get.find<Open_vip_tipLogic>().state;
|
||||
|
||||
ScrollController scrollController = ScrollController();
|
||||
|
||||
|
||||
Map<String,String> vipImgMap = {
|
||||
Map<String, String> vipImgMap = {
|
||||
"至尊喊话": 'vip_fun_4',
|
||||
"权重提升": 'vip_fun_14',
|
||||
"取向筛选": 'vip_fun_10',
|
||||
"排序靠前": 'vip_fun_13',
|
||||
|
||||
"身份标识" : 'vip_fun_1',
|
||||
"身份标识": 'vip_fun_1',
|
||||
"专属客服": 'vip_fun_2',
|
||||
"无限畅聊": 'vip_fun_3',
|
||||
|
||||
"图片私聊": 'vip_fun_5',
|
||||
"视频私聊": 'vip_fun_6',
|
||||
"看谁喜欢你": 'vip_fun_7',
|
||||
"看谁看过你": 'vip_fun_8',
|
||||
"缘分匹配": 'vip_fun_9',
|
||||
|
||||
"角色筛选": 'vip_fun_11',
|
||||
"查看附近": 'vip_fun_12',
|
||||
|
||||
};
|
||||
|
||||
@override
|
||||
@ -73,7 +71,6 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
"身份标识",
|
||||
"专属客服",
|
||||
"无限畅聊",
|
||||
|
||||
"图片私聊",
|
||||
"视频私聊",
|
||||
"看谁喜欢你",
|
||||
@ -86,8 +83,6 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
// 查看附近-
|
||||
// 角色筛选-
|
||||
|
||||
|
||||
|
||||
List vipDescList = [
|
||||
"发布的喊话在圈内凸显",
|
||||
'年会员权重直接提升数倍',
|
||||
@ -107,274 +102,304 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
// for (int i = 1; i < 10; i++) {
|
||||
//
|
||||
// }
|
||||
if(widget.isYean){
|
||||
if (widget.isYean) {
|
||||
logic.setYean();
|
||||
}
|
||||
return GetBuilder(builder: (Open_vip_tipLogic controller) {
|
||||
|
||||
return Scaffold(
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SizedBox(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Center(
|
||||
child: logic.isLoad ? loaddingWidget(true) : logic.isShowDialog ? tipWidget() : Container(
|
||||
width: 339.sp,
|
||||
height: (Platform.isAndroid ? 483.sp : 440.sp) + (logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getCircleImage('open_vip_bg')))),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// EventBusManager.fire(CommentVipEvent(1));
|
||||
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(
|
||||
top: 44.sp,
|
||||
child: SizedBox(
|
||||
width: Get.width,
|
||||
height: 180.sp,
|
||||
child: Swiper(
|
||||
itemCount: vipFuncList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return funcItem(vipFuncList[index],
|
||||
vipDescList[index], index + 1);
|
||||
},
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
pagination: SwiperPagination(
|
||||
builder: DotSwiperPaginationBuilder(
|
||||
color: const Color(0x99FFFFFF),
|
||||
size: 4.sp,
|
||||
activeColor: const Color(0xFF00FFD2),
|
||||
activeSize: 4.sp)), //如果不填则不显示指示点
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 227.sp,
|
||||
child: controller.priceBean.isEmpty
|
||||
? Container()
|
||||
: Container(
|
||||
width: 339.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: controller.priceBean.length == 4 ? [
|
||||
typeItem(
|
||||
controller, controller.index == 0, 0,controller.priceBean[0].firstPresentBean),
|
||||
typeItem(
|
||||
controller, controller.index == 1, 1,controller.priceBean[1].firstPresentBean),
|
||||
typeItem(
|
||||
controller, controller.index == 2, 2,controller.priceBean[2].firstPresentBean),
|
||||
typeItem(
|
||||
controller, controller.index == 3, 3,controller.priceBean[3].firstPresentBean),
|
||||
] : [ typeItem(
|
||||
controller, controller.index == 0, 0,controller.priceBean[0].firstPresentBean),
|
||||
typeItem(
|
||||
controller, controller.index == 1, 1,controller.priceBean[1].firstPresentBean),
|
||||
typeItem(
|
||||
controller, controller.index == 2, 2,controller.priceBean[2].firstPresentBean),
|
||||
],
|
||||
),
|
||||
))),
|
||||
Platform.isIOS ? Container() : Positioned(
|
||||
bottom: 108.sp + (logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// 处理支付宝支付逻辑
|
||||
controller.isZfbPrice = true;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
controller.isZfbPrice?
|
||||
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,
|
||||
body: GetBuilder(builder: (Open_vip_tipLogic controller) {
|
||||
return SizedBox(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Center(
|
||||
child: logic.isLoad
|
||||
? loaddingWidget(true)
|
||||
: logic.isShowDialog
|
||||
? tipWidget()
|
||||
: Container(
|
||||
width: 339.sp,
|
||||
height: (Platform.isAndroid ? 483.sp : 440.sp) +
|
||||
(logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(
|
||||
getCircleImage('open_vip_bg')))),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// EventBusManager.fire(CommentVipEvent(1));
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('close'),
|
||||
width: 24.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: () {
|
||||
controller.isZfbPrice = false;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
!controller.isZfbPrice?
|
||||
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(
|
||||
'微信支付',
|
||||
)),
|
||||
Positioned(
|
||||
top: 24.sp,
|
||||
child: Text(
|
||||
'十几种专属会员特权',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
top: 44.sp,
|
||||
child: SizedBox(
|
||||
width: Get.width,
|
||||
height: 180.sp,
|
||||
child: Swiper(
|
||||
itemCount: vipFuncList.length,
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return funcItem(vipFuncList[index],
|
||||
vipDescList[index], index + 1);
|
||||
},
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
pagination: SwiperPagination(
|
||||
builder: DotSwiperPaginationBuilder(
|
||||
color: const Color(0x99FFFFFF),
|
||||
size: 4.sp,
|
||||
activeColor:
|
||||
const Color(0xFF00FFD2),
|
||||
activeSize: 4.sp)), //如果不填则不显示指示点
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 227.sp,
|
||||
child: controller.priceBean.isEmpty
|
||||
? Container()
|
||||
: Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp),
|
||||
child:SizedBox(
|
||||
width: 339.sp,
|
||||
height: 110.sp,
|
||||
child: ListView.builder(itemBuilder: (ctx,index) {
|
||||
return typeItem(
|
||||
controller,
|
||||
controller.index == index,
|
||||
index,
|
||||
controller
|
||||
.priceBean[index]
|
||||
.firstPresentBean);
|
||||
},itemCount: controller
|
||||
.priceBean.length,scrollDirection: Axis.horizontal,),
|
||||
))
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
Platform.isIOS
|
||||
? Container()
|
||||
: Positioned(
|
||||
bottom: 108.sp +
|
||||
(logic.isShowInviteTip
|
||||
? 30.sp
|
||||
: 0.sp),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// 处理支付宝支付逻辑
|
||||
controller.isZfbPrice = true;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
controller.isZfbPrice
|
||||
? 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: () {
|
||||
controller.isZfbPrice = false;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
!controller.isZfbPrice
|
||||
? 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: 48.sp +
|
||||
(logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (Platform.isIOS) {
|
||||
IOSPayment.instance.iosPay(
|
||||
controller
|
||||
.priceBean[controller.index]
|
||||
.iosItem,
|
||||
controller
|
||||
.priceBean[controller.index].id
|
||||
.toString(),
|
||||
2,
|
||||
source: widget.source);
|
||||
} else {
|
||||
controller.startPayment(widget.source);
|
||||
}
|
||||
},
|
||||
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(
|
||||
logic.isVip ? '续费特权' : '领取特权',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 17.sp +
|
||||
(logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'点击${logic.isVip ? '续费特权' : '领取特权'}即表示同意',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
navigateToPartnerAgreement();
|
||||
},
|
||||
child: Text(
|
||||
'《会员协议》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
if (logic.isShowInviteTip)
|
||||
Positioned(
|
||||
bottom: 17.sp,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'可通过邀请免费成为会员,点击进入',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.InvitePage);
|
||||
},
|
||||
child: Text(
|
||||
homelogic.inventStr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 48.sp + (logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
if(Platform.isIOS){
|
||||
IOSPayment.instance.iosPay(controller.priceBean[controller.index].iosItem,controller.priceBean[controller.index].id.toString(), 2,source: widget.source);
|
||||
}else{
|
||||
controller.startPayment(widget.source);
|
||||
}
|
||||
},
|
||||
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(
|
||||
logic.isVip ? '续费特权' : '领取特权',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),)),
|
||||
Positioned(
|
||||
bottom: 17.sp + (logic.isShowInviteTip ? 30.sp : 0.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'点击${logic.isVip ? '续费特权' : '领取特权'}即表示同意',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
navigateToPartnerAgreement();
|
||||
},
|
||||
child: Text(
|
||||
'《会员协议》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
if (logic.isShowInviteTip )
|
||||
Positioned(
|
||||
bottom: 17.sp ,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'可通过邀请免费成为会员,点击进入',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Get.toNamed(Routes.InvitePage); },
|
||||
child: Text(
|
||||
homelogic.inventStr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
tipWidget() {
|
||||
return Container(
|
||||
width: Get.width,
|
||||
@ -384,31 +409,33 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 180.sp
|
||||
),
|
||||
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
padding: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
constraints: BoxConstraints(maxHeight: 180.sp),
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
gradient: AppColor.bgHorLinearGradient
|
||||
// gradient: LinearGradient(colors: [Color(0xFF4C3E5F),Color(0xFF324140)]),
|
||||
// border: Gra0ientBoxBorder(
|
||||
// gradient:
|
||||
// AppColor.mainVerLinearGradient,
|
||||
// width: 1.sp,
|
||||
// ),
|
||||
),
|
||||
// gradient: LinearGradient(colors: [Color(0xFF4C3E5F),Color(0xFF324140)]),
|
||||
// border: Gra0ientBoxBorder(
|
||||
// gradient:
|
||||
// AppColor.mainVerLinearGradient,
|
||||
// width: 1.sp,
|
||||
// ),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(height: 20.sp,),
|
||||
SizedBox(
|
||||
height: 20.sp,
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'温馨提示',
|
||||
style: TextStyle(color: Colors.white.withOpacity(0.75), fontSize: 17.sp,),
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 17.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@ -421,12 +448,16 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp,),
|
||||
margin: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(width: 180.sp,),
|
||||
Container(
|
||||
width: 180.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.isShowDialog = false;
|
||||
@ -439,8 +470,7 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
),
|
||||
gradient: AppColor.mainVerLinearGradient),
|
||||
child: Text(
|
||||
'立即开通',
|
||||
style: TextStyle(
|
||||
@ -450,20 +480,24 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(top: 0,right: 10,child: Container(
|
||||
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red.withOpacity(0.75),
|
||||
borderRadius: BorderRadius.circular(8.sp)
|
||||
),
|
||||
child: Text('限时福利',style: TextStyle(color: Colors.white,fontSize: 14.sp),),
|
||||
))
|
||||
Positioned(
|
||||
top: 0,
|
||||
right: 10,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red.withOpacity(0.75),
|
||||
borderRadius: BorderRadius.circular(8.sp)),
|
||||
child: Text(
|
||||
'限时福利',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -483,22 +517,22 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
typeItem(Open_vip_tipLogic controller, bool isSelected, int index,int count) {
|
||||
typeItem(
|
||||
Open_vip_tipLogic controller, bool isSelected, int index, int count) {
|
||||
//double pricePerDay = controller.priceBean[index].amount / 30;
|
||||
// String formattedPricePerDay = '${pricePerDay.toStringAsFixed(2)}元/天';
|
||||
// String formattedPricePerDay = '${pricePerDay.toStringAsFixed(2)}元/天';
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// if(!widget.isYean){
|
||||
controller.index = index;
|
||||
controller.update();
|
||||
controller.index = index;
|
||||
controller.update();
|
||||
// }else{
|
||||
// showOKToast("只有年会员才可使用该功能哦~");
|
||||
// }
|
||||
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: controller.priceBean.length == 4 ? 4.sp : 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
right: controller.priceBean.length == 4 ? 4.sp : 10.sp),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@ -520,7 +554,9 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
SizedBox(height: 0.1.sp,),
|
||||
SizedBox(
|
||||
height: 0.1.sp,
|
||||
),
|
||||
Text(
|
||||
controller.priceBean[index].title,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
@ -534,7 +570,8 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
children: [
|
||||
Text(
|
||||
'${controller.priceBean[index].amount.toInt()}',
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
@ -562,16 +599,23 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
// ) :Container(),
|
||||
if (count > 0)
|
||||
Positioned(
|
||||
top: 0.sp,left: 0.sp,
|
||||
top: 0.sp,
|
||||
left: 0.sp,
|
||||
child: Container(
|
||||
height: 20.sp,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 3.sp,right: 3.sp),
|
||||
padding: EdgeInsets.only(left: 3.sp, right: 3.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.bgColor.withOpacity(0.6),
|
||||
borderRadius: BorderRadius.circular(4.sp)
|
||||
borderRadius: BorderRadius.circular(4.sp)),
|
||||
child: Text(
|
||||
'送${count}小票',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
child: Text('送${count}小票',style: TextStyle(color: Colors.white,fontSize: 12.sp,fontWeight: FontWeight.bold),),))
|
||||
))
|
||||
],
|
||||
),
|
||||
));
|
||||
@ -589,10 +633,14 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
width: 70.sp,
|
||||
),
|
||||
if (index < 5)
|
||||
Positioned(top: 0,child: Container(decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(9.sp)
|
||||
),child: UserTagWidget(3)),),
|
||||
Positioned(
|
||||
top: 0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(9.sp)),
|
||||
child: UserTagWidget(3)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
@ -616,6 +664,4 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.sp, right: 20.sp),
|
||||
padding: EdgeInsets.all(15.sp),
|
||||
height: Platform.isAndroid ? (!widget.isMore ? 190.sp : 310.sp + (prices.length > 0 ? prices.length * 50.sp - 50.sp : 0.sp)) : (!widget.isMore ? 190.sp :280.sp + (prices.length > 0 ? prices.length * 50.sp - 50.sp : 0.sp)) ,
|
||||
height: 40.sp + (Platform.isAndroid ? (!widget.isMore ? 190.sp : 310.sp + (prices.length > 0 ? prices.length * 50.sp - 50.sp : 0.sp)) : (!widget.isMore ? 190.sp :280.sp + (prices.length > 0 ? prices.length * 50.sp - 50.sp : 0.sp))),
|
||||
// 460.sp : 430.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF393949),
|
||||
@ -248,7 +248,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
'立即解锁(一次解锁·永久查看)',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp),
|
||||
@ -256,6 +256,11 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 15.sp),
|
||||
child: Text('如果TA不同意加好友,平台对应退还,您放心解锁',style: TextStyle(color: Colors.white,fontSize: 13.sp),),
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@ -35,6 +36,15 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
String content = '';
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
wxEditingController.dispose();
|
||||
descEditingController.dispose();
|
||||
moneyEditingController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
@ -334,6 +344,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
bool isPass = false;
|
||||
SmartDialog.showLoading(msg: '正在提交...');
|
||||
if (type == 2) {
|
||||
if (wxEditingController.text.length == 11) {
|
||||
RegExp exp = RegExp(
|
||||
@ -348,13 +359,16 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg
|
||||
.hasMatch(wxEditingController.text)) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('请输入正确的微信号');
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (type == 3) {
|
||||
isPass = isValidQQ(wxEditingController.text);
|
||||
if (!isPass) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('请输入正确的QQ号');
|
||||
return;
|
||||
}
|
||||
@ -366,6 +380,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
exp.hasMatch(wxEditingController.text);
|
||||
}
|
||||
if (!isPass) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('请输入正确的手机号');
|
||||
return;
|
||||
}
|
||||
@ -374,6 +389,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
if (moneyEditingController.text.isNotEmpty) {
|
||||
if (int.parse(moneyEditingController.text) <=
|
||||
0) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('请设置联系方式解锁金额大于零');
|
||||
return;
|
||||
} else if (int.parse(
|
||||
@ -381,6 +397,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
520 ||
|
||||
int.parse(moneyEditingController.text) <
|
||||
10) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('请填写解锁金额在10元-520元之间');
|
||||
return;
|
||||
}
|
||||
@ -388,8 +405,10 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
if (wxInfo.containsKey('10034')) {
|
||||
showOKToast(wxInfo['10034']);
|
||||
SmartDialog.dismiss();
|
||||
return;
|
||||
} else if (wxInfo.containsKey('10595')) {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast(wxInfo['10595']);
|
||||
}
|
||||
Map<String, dynamic> params = {
|
||||
@ -407,6 +426,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
var result = await DioManager()
|
||||
.postBody(url: Api.confset, params: params);
|
||||
SmartDialog.dismiss();
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('已设置成功,快去邀请圈友解锁呗~');
|
||||
Get.back();
|
||||
|
||||
@ -310,14 +310,19 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
}
|
||||
break;
|
||||
case TIMCallbackType.FLUTTER_ERROR:
|
||||
{
|
||||
if (callbackValue.catchError != null) {
|
||||
FlutterBugly.uploadException(
|
||||
message: callbackValue.catchError.toString(),
|
||||
detail: callbackValue.stackTrace.toString());
|
||||
} else {
|
||||
FlutterBugly.uploadException(
|
||||
message: 'TIMCallbackType.FLUTTER_ERROR',
|
||||
detail: callbackValue.stackTrace.toString());
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// prints the stack trace to console or shows the catch error
|
||||
if (callbackValue.catchError != null) {
|
||||
// showToast(callbackValue.catchError.toString());
|
||||
} else {
|
||||
print(callbackValue.stackTrace);
|
||||
// loginIM();
|
||||
}
|
||||
}
|
||||
},
|
||||
// [建议配置,详见此部分](https://cloud.tencent.com/document/product/269/70746#callback)
|
||||
|
||||
@ -8,6 +8,9 @@ class Api {
|
||||
// 获取验证码
|
||||
static const sendCode = 'msg-service/sms/code/send';
|
||||
|
||||
//安全校验验证码接口
|
||||
static const phoneOrEmailSendCode = '/msg-service/secure/code/phoneOrEmail/send';
|
||||
|
||||
//开屏页
|
||||
static const fetchOpenPageAO = 'user-service/app/config';
|
||||
// 手机号登录
|
||||
@ -224,6 +227,9 @@ class Api {
|
||||
//苹果支付
|
||||
static const applePayCallBack = 'mall-service/payment/apple/notify';
|
||||
|
||||
//苹果续费回调
|
||||
static const applePayRenewCallBack = '/mall-service/payment/apple/renew/notify';
|
||||
|
||||
//邀请好友主页
|
||||
static const inviteMainPage = 'user-service/invite/mainPage';
|
||||
|
||||
@ -807,4 +813,7 @@ class Api {
|
||||
//指引新人
|
||||
static var guideNewUser = '/user-service/newUser/guide/';
|
||||
|
||||
//订阅产品
|
||||
static var vipProductInfo = '/mall-service/vips/renew';
|
||||
|
||||
}
|
||||
|
||||
@ -249,6 +249,7 @@ class DioManager {
|
||||
'OsVersion': await getDeviceId(),
|
||||
'Imei': await getImei(),
|
||||
'Brand': await getBrand(),
|
||||
'Channel':'kuaishou1'
|
||||
});
|
||||
} else {
|
||||
options = Options(method: methodValues[method], headers: {
|
||||
@ -256,6 +257,7 @@ class DioManager {
|
||||
'VersionName': await getVersionName(),
|
||||
'VersionCode': await getVersionCode(),
|
||||
'Platform': Platform.isIOS ? '1' : '0',
|
||||
'Channel':'kuaishou'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,10 @@ class SharedPreferencesHelper {
|
||||
|
||||
static const vipDayTip = 'vipDayTip';
|
||||
|
||||
static const FirstContact = 'FirstContact';
|
||||
|
||||
|
||||
|
||||
static SharedPreferencesHelper? _instance;
|
||||
static SharedPreferences? _preferences;
|
||||
|
||||
@ -250,6 +254,21 @@ class SharedPreferencesHelper {
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<bool> isShowContact() async {
|
||||
String time = preferences!.getString(FirstContact) ?? '';
|
||||
if (time.isNotEmpty) {
|
||||
DateTime dateTime = DateTime.parse(time);
|
||||
bool isShow = !isSameDay(dateTime,DateTime.now());
|
||||
if (isShow) {
|
||||
preferences!.setString(FirstContact, DateTime.now().toString());
|
||||
}
|
||||
return isShow;
|
||||
} else {
|
||||
preferences!.setString(FirstContact, DateTime.now().toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
setFirstPeopleSendCallOut() {
|
||||
preferences!.setString(FirstPeopleSendCallOut, DateTime.now().toString());
|
||||
}
|
||||
|
||||
@ -82,62 +82,79 @@ class IOSPayment {
|
||||
showOKToast('支付发生错误');
|
||||
SmartDialog.dismiss();
|
||||
} else if (purchaseDetails.status == PurchaseStatus.purchased) {
|
||||
Map<String,dynamic> params = {
|
||||
'payload': purchaseDetails.verificationData.serverVerificationData,
|
||||
'transaction_id': purchaseDetails.purchaseID,
|
||||
'type': type,
|
||||
'source':_source,
|
||||
'product_id': int.parse(typeId)
|
||||
};
|
||||
|
||||
if (type == 3) {
|
||||
params['target_id'] = target_id;
|
||||
} else if (target_id.isNotEmpty) {
|
||||
params['target_id'] = target_id;
|
||||
}
|
||||
if (purchaseDetails.productID == 'group_renew_month_vip') {
|
||||
Map<String,dynamic> params = {
|
||||
'payload': purchaseDetails.verificationData.serverVerificationData,
|
||||
'transaction_id': purchaseDetails.purchaseID,
|
||||
'source':_source,
|
||||
};
|
||||
var result = await DioManager.getInstance()
|
||||
.post(url: Api.applePayRenewCallBack, params:params);
|
||||
SmartDialog.dismiss();
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('包月会员开通成功');
|
||||
EventBusManager.fire(CommentVipEvent(1));
|
||||
}
|
||||
} else {
|
||||
Map<String,dynamic> params = {
|
||||
'payload': purchaseDetails.verificationData.serverVerificationData,
|
||||
'transaction_id': purchaseDetails.purchaseID,
|
||||
'type': type,
|
||||
'source':_source,
|
||||
'product_id': int.parse(typeId)
|
||||
};
|
||||
|
||||
if (type == 3) {
|
||||
params['target_id'] = target_id;
|
||||
} else if (target_id.isNotEmpty) {
|
||||
params['target_id'] = target_id;
|
||||
}
|
||||
|
||||
|
||||
var result = await DioManager.getInstance()
|
||||
.post(url: Api.applePayCallBack, params:params);
|
||||
SmartDialog.dismiss();
|
||||
if (result['code'] == 200) {
|
||||
|
||||
try {
|
||||
if (type != 4) {
|
||||
Get.back();
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
if (type == 1) {
|
||||
showOKToast('解锁圈子成功');
|
||||
if (Get.isRegistered<CircleLogic>()) {
|
||||
var logic = Get.find<CircleLogic>();
|
||||
for (var element in logic.circle.lists) {
|
||||
if (element.id == int.parse(typeId)) {
|
||||
element.is_limit = false;
|
||||
element.isJoin = true;
|
||||
}
|
||||
var result = await DioManager.getInstance()
|
||||
.post(url: Api.applePayCallBack, params:params);
|
||||
SmartDialog.dismiss();
|
||||
if (result['code'] == 200) {
|
||||
try {
|
||||
if (type != 4) {
|
||||
Get.back();
|
||||
}
|
||||
logic.update();
|
||||
}
|
||||
EventBusManager.fire(CircleInfoRefresh(typeId));
|
||||
} else if (type == 2) {
|
||||
if (target_id.isNotEmpty) {
|
||||
showOKToast('赠送会员成功');
|
||||
sendHotAction(6, target_id);
|
||||
target_id = '';
|
||||
} catch (e) {}
|
||||
|
||||
if (type == 1) {
|
||||
showOKToast('解锁圈子成功');
|
||||
if (Get.isRegistered<CircleLogic>()) {
|
||||
var logic = Get.find<CircleLogic>();
|
||||
for (var element in logic.circle.lists) {
|
||||
if (element.id == int.parse(typeId)) {
|
||||
element.is_limit = false;
|
||||
element.isJoin = true;
|
||||
}
|
||||
}
|
||||
logic.update();
|
||||
}
|
||||
EventBusManager.fire(CircleInfoRefresh(typeId));
|
||||
} else if (type == 2) {
|
||||
if (target_id.isNotEmpty) {
|
||||
showOKToast('赠送会员成功');
|
||||
sendHotAction(6, target_id);
|
||||
target_id = '';
|
||||
} else {
|
||||
showOKToast('开通会员成功');
|
||||
EventBusManager.fire(CommentVipEvent(1));
|
||||
}
|
||||
} else if (type == 4) {
|
||||
showOKToast('充值成功');
|
||||
EventBusManager.fire(AssestEvent());
|
||||
} else {
|
||||
showOKToast('开通会员成功');
|
||||
EventBusManager.fire(CommentVipEvent(1));
|
||||
showOKToast('解锁联系方式成功');
|
||||
unLockWxSuccessResult(target_id);
|
||||
}
|
||||
} else if (type == 4) {
|
||||
showOKToast('充值成功');
|
||||
EventBusManager.fire(AssestEvent());
|
||||
} else {
|
||||
showOKToast('解锁联系方式成功');
|
||||
unLockWxSuccessResult(target_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await _inAppPurchase.completePurchase(purchaseDetails);
|
||||
} else if (purchaseDetails.status == PurchaseStatus.canceled ||
|
||||
purchaseDetails.status == PurchaseStatus.error) {
|
||||
|
||||
@ -24,6 +24,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_z_location/flutter_z_location.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:gradient_borders/gradient_borders.dart';
|
||||
import 'package:oktoast/oktoast.dart';
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
@ -59,9 +60,10 @@ List<String> pageList = [];
|
||||
|
||||
List<String> routeList = [];
|
||||
|
||||
|
||||
List<String> unclockUserList = [];
|
||||
|
||||
Map userContactMap = {};
|
||||
|
||||
String lastPage = '';
|
||||
|
||||
bool isShowVoiceOverLay = false;
|
||||
@ -820,7 +822,7 @@ void navigateToContentGuidelines() {
|
||||
//合伙人协议
|
||||
void navigateToPartnerAgreement() {
|
||||
Get.toNamed(Routes.WebViewPage, arguments: {
|
||||
'title': "合伙人协议",
|
||||
'title': "会员协议",
|
||||
"url": Platform.isIOS
|
||||
? "https://docs.qq.com/doc/DZUpwWFdNcGlsYld4"
|
||||
: "https://iquanpai.com/app-h5/4_166.html"
|
||||
@ -3012,3 +3014,45 @@ bool isNextDay(String dateString) {
|
||||
tomorrow.month == now.month &&
|
||||
tomorrow.day == now.day;
|
||||
}
|
||||
|
||||
|
||||
Widget chatWidget(int type) {
|
||||
return Container(
|
||||
height: 24.sp,
|
||||
margin: EdgeInsets.only(right: 2.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(24/2),
|
||||
border: GradientBoxBorder(
|
||||
gradient:
|
||||
AppColor.mainVerLinearGradient,
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(left: 2.sp,right: 2.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (type < 4)
|
||||
Image.asset(
|
||||
getMineImage(type == 1
|
||||
? 'phone_icon'
|
||||
: type == 3
|
||||
? 'qq'
|
||||
: 'wx'),
|
||||
height: 16.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
type == 1
|
||||
? '手机聊'
|
||||
: type == 3
|
||||
? 'QQ聊'
|
||||
: type == 2 ? '微信聊' : '私聊',
|
||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -45,10 +45,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: app_settings
|
||||
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
|
||||
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.4"
|
||||
version: "4.3.1"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -638,6 +638,14 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
flutter_install_app:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_install_app
|
||||
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
flutter_intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -113,9 +113,9 @@ dependencies:
|
||||
#边框渐变
|
||||
gradient_borders: ^1.0.0
|
||||
#系统设置 安卓4.3.1 苹果4.0.4
|
||||
app_settings: 4.0.4
|
||||
app_settings: 4.3.1
|
||||
#安装apk
|
||||
# flutter_install_app: 1.3.0
|
||||
flutter_install_app: 1.3.0
|
||||
#通知权限
|
||||
notification_permissions: ^0.6.1
|
||||
#分帧
|
||||
|
||||
Loading…
Reference in New Issue
Block a user