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