2.4.7代码提交
This commit is contained in:
parent
afd30dc5bd
commit
55c87008da
@ -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 89
|
versionCode 92
|
||||||
versionName "2.4.4"
|
versionName "2.4.7"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
@ -26,7 +26,7 @@ allprojects {
|
|||||||
maven { url "https://storage.googleapis.com/download.flutter.io" }
|
maven { url "https://storage.googleapis.com/download.flutter.io" }
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url 'https://mvn.getui.com/nexus/content/repositories/releases' }
|
maven { url 'https://mvn.getui.com/nexus/content/repositories/releases' }
|
||||||
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
|
// maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
maven {url 'https://developer.huawei.com/repo/'}
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
maven { url 'https://developer.hihonor.com/repo/' }
|
maven { url 'https://developer.hihonor.com/repo/' }
|
||||||
|
|||||||
BIN
circle_app/data/img/mine/bubble_icon.png
Normal file
BIN
circle_app/data/img/mine/bubble_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
BIN
circle_app/data/img/mine/hand_icon.png
Normal file
BIN
circle_app/data/img/mine/hand_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@ -1,5 +1,6 @@
|
|||||||
import 'package:circle_app/circle_app/userinfo/logic.dart';
|
import 'package:circle_app/circle_app/userinfo/logic.dart';
|
||||||
import 'package:circle_app/commons/colors/app_color.dart';
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
|
import 'package:circle_app/commons/widgets/base_tip_widget.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -8,6 +9,8 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|||||||
|
|
||||||
import '../../router/routers.dart';
|
import '../../router/routers.dart';
|
||||||
import '../../utils/util.dart';
|
import '../../utils/util.dart';
|
||||||
|
import '../circle_list/logic.dart';
|
||||||
|
import '../home/logic.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class BillPage extends StatefulWidget {
|
class BillPage extends StatefulWidget {
|
||||||
@ -160,7 +163,42 @@ class _BillState extends State<BillPage> with SingleTickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: noResultWidget();
|
: noResultWidget(tip:type == 2 ? "正在等待被填充~" : '',action: type == 3 ? '申请圈子代理人快速增加收入' : type == 1 ? '首充可送小票/经验值/会员' : '',callBack: () async {
|
||||||
|
if (type == 3) {
|
||||||
|
Get.until((route) {
|
||||||
|
return route.isFirst;
|
||||||
|
});
|
||||||
|
var logic = Get.find<HomeLogic>();
|
||||||
|
logic.updateIndex(1);
|
||||||
|
|
||||||
|
LikeLogic likeLogic;
|
||||||
|
if (Get.isRegistered<LikeLogic>()) {
|
||||||
|
likeLogic = Get.find<LikeLogic>();
|
||||||
|
if (likeLogic.mycircle.lists.isEmpty) {
|
||||||
|
await likeLogic.loadMyCircleData();
|
||||||
|
}
|
||||||
|
if (likeLogic.mycircle.lists.isNotEmpty) {
|
||||||
|
likeLogic.currentIndex = 0;
|
||||||
|
|
||||||
|
likeLogic.update();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Future.delayed(Duration(milliseconds: 2500),() async {
|
||||||
|
likeLogic = Get.find<LikeLogic>();
|
||||||
|
if (likeLogic.mycircle.lists.isEmpty) {
|
||||||
|
await likeLogic.loadMyCircleData();
|
||||||
|
}
|
||||||
|
if (likeLogic.mycircle.lists.isNotEmpty) {
|
||||||
|
likeLogic.currentIndex = 0;
|
||||||
|
likeLogic.update();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (type == 1){
|
||||||
|
showRechargeScreenDialog('');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onRefresh(int type, int page) async {
|
onRefresh(int type, int page) async {
|
||||||
@ -290,7 +328,7 @@ class ListItemWidget extends StatelessWidget {
|
|||||||
type == 2
|
type == 2
|
||||||
? '-' + item.amount.toString() + '小票'
|
? '-' + item.amount.toString() + '小票'
|
||||||
: '+' +
|
: '+' +
|
||||||
'${type == 3 ? (item.amount * 0.01).toStringAsFixed(2) + '元' : item.amount.toString() + '小票'}',
|
'${type == 3 ? (item.amount).toString() + '小票' : item.amount.toString() + '小票'}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xffefd84e),
|
color: const Color(0xffefd84e),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
|
|||||||
@ -1251,7 +1251,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
var status = await checkCameraStatus();
|
var status = await checkCameraStatus();
|
||||||
if (!status) return;
|
if (!status) return;
|
||||||
} else {
|
} else {
|
||||||
await requestStoragePermission();
|
// await requestStoragePermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
XFile? pickedFile;
|
XFile? pickedFile;
|
||||||
@ -1366,7 +1366,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
if (!isOK) {
|
if (!isOK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await requestStoragePermission();
|
// await requestStoragePermission();
|
||||||
var status = await checkCameraStatus();
|
var status = await checkCameraStatus();
|
||||||
if (!status) return;
|
if (!status) return;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import '../../commons/config.dart';
|
|||||||
import '../../commons/widgets/refresh_list_manager.dart';
|
import '../../commons/widgets/refresh_list_manager.dart';
|
||||||
import '../../net/api.dart';
|
import '../../net/api.dart';
|
||||||
import '../../net/dio_manager.dart';
|
import '../../net/dio_manager.dart';
|
||||||
|
import '../../utils/SharedPreferencesHelper.dart';
|
||||||
import '../../utils/eventBus.dart';
|
import '../../utils/eventBus.dart';
|
||||||
import '../../utils/newbie_guide_tip.dart';
|
import '../../utils/newbie_guide_tip.dart';
|
||||||
import '../../utils/qiniu.dart';
|
import '../../utils/qiniu.dart';
|
||||||
@ -219,12 +220,12 @@ final ScrollController nearScrollController = ScrollController();
|
|||||||
|
|
||||||
loadCircleListData() async {
|
loadCircleListData() async {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: Api.getCircleInterests, params: {"page": page, 'page_size': 20});
|
url: Api.getCircleInterests, params: {"page": page, 'page_size': 10});
|
||||||
var bean = BaseResponse<InterestsBean>.fromJson(
|
var bean = BaseResponse<InterestsBean>.fromJson(
|
||||||
data, (data) => InterestsBean.fromJson(data));
|
data, (data) => InterestsBean.fromJson(data));
|
||||||
if (bean.data is InterestsBean && bean.isSuccess()) {
|
if (bean.data is InterestsBean && bean.isSuccess()) {
|
||||||
circle = bean.data!;
|
circle = bean.data!;
|
||||||
if (circle.lists.length < 20) {
|
if (circle.lists.isEmpty) {
|
||||||
isMore = false;
|
isMore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,9 +647,15 @@ final ScrollController nearScrollController = ScrollController();
|
|||||||
position = await getCurrentPosition();
|
position = await getCurrentPosition();
|
||||||
await getCurrentCity();
|
await getCurrentCity();
|
||||||
} else if (isShowLocationDialogEd == false && isShowLocationDialog == false) {
|
} else if (isShowLocationDialogEd == false && isShowLocationDialog == false) {
|
||||||
|
|
||||||
|
SharedPreferencesHelper helper =
|
||||||
|
await SharedPreferencesHelper.getInstance();
|
||||||
|
if (!(await helper.isShowNearLocation())) {
|
||||||
isShowLocationDialogEd = true;
|
isShowLocationDialogEd = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,8 @@ class Lists {
|
|||||||
int? userTop;
|
int? userTop;
|
||||||
String? create_time;
|
String? create_time;
|
||||||
String? at;
|
String? at;
|
||||||
|
Map? topInteractType;
|
||||||
|
int? isInteract;
|
||||||
Lists(
|
Lists(
|
||||||
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
|
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
|
||||||
|
|
||||||
@ -46,10 +48,12 @@ class Lists {
|
|||||||
: null;
|
: null;
|
||||||
showType = json['showType'];
|
showType = json['showType'];
|
||||||
interest = json['interest'] ?? {};
|
interest = json['interest'] ?? {};
|
||||||
|
topInteractType = json['topInteractType'] ?? {};
|
||||||
create_time = json['createTime'] ?? json['create_time'];
|
create_time = json['createTime'] ?? json['create_time'];
|
||||||
// "createTime" -> "2024-12-04 22:00"
|
// "createTime" -> "2024-12-04 22:00"
|
||||||
isQueen = json['is_queen'];
|
isQueen = json['is_queen'];
|
||||||
userTop = json['userTop'] ?? 0;
|
userTop = json['userTop'] ?? 0;
|
||||||
|
isInteract = json['interactedType'] ?? 0;
|
||||||
user = json['user'] != null ? new User.fromJson(json['user']) : null;
|
user = json['user'] != null ? new User.fromJson(json['user']) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -417,11 +417,12 @@ class _DiscoverState extends State<Discover>
|
|||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onLoading() {
|
_onLoading() async {
|
||||||
if (isLoadMore) return;
|
if (isLoadMore) return;
|
||||||
// if (refreshController.footerStatus == LoadStatus.loading) return;
|
// if (refreshController.footerStatus == LoadStatus.loading) return;
|
||||||
isLoadMore = true;
|
isLoadMore = true;
|
||||||
loadData();
|
await loadData();
|
||||||
|
isLoadMore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -34,6 +34,7 @@ import '../../../utils/cache_img.dart';
|
|||||||
import '../../../utils/eventBus.dart';
|
import '../../../utils/eventBus.dart';
|
||||||
import '../../circle_list/logic.dart';
|
import '../../circle_list/logic.dart';
|
||||||
import '../../circle_list/widgets/hug_tip.dart';
|
import '../../circle_list/widgets/hug_tip.dart';
|
||||||
|
import '../../circle_list/widgets/right_circle_iten.dart';
|
||||||
|
|
||||||
class InfoListView extends StatefulWidget {
|
class InfoListView extends StatefulWidget {
|
||||||
var logic;
|
var logic;
|
||||||
@ -59,11 +60,20 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
bool callOutMore = true;
|
bool callOutMore = true;
|
||||||
|
bool isShowEmoji = false;
|
||||||
var circleId = '';
|
var circleId = '';
|
||||||
List<Lists> lists = [];
|
List<Lists> lists = [];
|
||||||
|
|
||||||
double widgetWidth = 0.0;
|
double widgetWidth = 0.0;
|
||||||
Map interestAgentMap = {};
|
Map interestAgentMap = {};
|
||||||
|
|
||||||
|
List<String> emojis = [
|
||||||
|
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||||
|
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||||
|
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||||
|
"🫣", "😂", "🤐", "😱", "🫥"
|
||||||
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
@ -262,7 +272,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
}
|
}
|
||||||
Get.toNamed(Routes.Chat, arguments: con);
|
Get.toNamed(Routes.Chat, arguments: con);
|
||||||
} else if (data['code'] == 32104) {
|
} else if (data['code'] == 32104) {
|
||||||
showReportDialog(Get.context!, data['msg']);
|
showReportDialog(Get.context!, circleId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,7 +345,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
bean.chat!.count = bean.chat!.count! + 1;
|
bean.chat!.count = bean.chat!.count! + 1;
|
||||||
widget.logic.update();
|
widget.logic.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1015,6 +1024,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
///至尊喊话
|
///至尊喊话
|
||||||
vipDynamicItem(Lists lists) {
|
vipDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
@ -1343,14 +1353,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
Container(
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(top: picHeight > 0 ? 5.sp : 5.sp,bottom: 10.sp),
|
margin: EdgeInsets.only(
|
||||||
|
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(15.sp),
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
color: Color(0x33000000)
|
color: Color(0x33000000)),
|
||||||
),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
widgets.isNotEmpty
|
widgets.isNotEmpty
|
||||||
@ -1361,32 +1374,78 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 4.sp,
|
width: 2.sp,
|
||||||
),
|
),
|
||||||
widgets.isNotEmpty
|
widgets.isNotEmpty
|
||||||
? Expanded(
|
? Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75), fontSize: 14.sp),
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75), fontSize: 14.sp),
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
pushMsgPage(lists, widget.bean.id.toString(),);
|
pushMsgPage(
|
||||||
|
lists,
|
||||||
|
widget.bean.id.toString(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
width: 60.sp,
|
width: 50.sp,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -1396,6 +1455,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
///普通图文喊话
|
///普通图文喊话
|
||||||
normalDynamicItem(Lists lists) {
|
normalDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
@ -1721,10 +1781,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
);
|
);
|
||||||
}))
|
}))
|
||||||
: Container(),
|
: Container(),
|
||||||
Container(
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp,),
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(top: picHeight > 0 ? 5.sp : 10.sp,bottom: 10.sp),
|
margin: EdgeInsets.only(
|
||||||
|
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(15.sp),
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
color: Color(0x33000000)),
|
color: Color(0x33000000)),
|
||||||
@ -1738,34 +1802,78 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 4.sp,
|
width: 2.sp,
|
||||||
),
|
),
|
||||||
widgets.isNotEmpty
|
widgets.isNotEmpty
|
||||||
? Expanded(
|
? Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75), fontSize: 14.sp),
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75), fontSize: 14.sp),
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async{
|
onTap: () {
|
||||||
pushMsgPage(lists, widget.bean.id.toString());
|
pushMsgPage(
|
||||||
|
lists,
|
||||||
// });
|
widget.bean.id.toString(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
width: 60.sp,
|
width: 50.sp,
|
||||||
))
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -1780,6 +1888,121 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OverlayEntry? _overlayEntry;
|
||||||
|
|
||||||
|
void _showEmojiPicker(Lists list,int id,BuildContext context, Offset position) {
|
||||||
|
if (isShowEmoji) return;
|
||||||
|
isShowEmoji = true;
|
||||||
|
_overlayEntry = OverlayEntry(
|
||||||
|
builder: (context) => Stack(
|
||||||
|
children: [
|
||||||
|
// 遮罩层,点击关闭
|
||||||
|
Positioned.fill(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: Colors.black.withOpacity(0.3),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 表情选择器
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 190.w,
|
||||||
|
top: position.dy - 60.sp,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// 气泡框
|
||||||
|
Container(
|
||||||
|
width: 200.w, // 设置最大宽度,超出才会滚动
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black26,
|
||||||
|
blurRadius: 10,
|
||||||
|
spreadRadius: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
|
children: emojis.map((emoji) => Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: _emojiButton(emoji,id,list),
|
||||||
|
)).toList(),
|
||||||
|
),),
|
||||||
|
),
|
||||||
|
// 底部倒三角形
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 12.w,
|
||||||
|
top: position.dy - 15,
|
||||||
|
child: CustomPaint(
|
||||||
|
size: Size(20, 10),
|
||||||
|
painter: TrianglePainter(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Overlay.of(context).insert(_overlayEntry!);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _emojiButton(String emoji,int id,Lists list) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
print("选择了表情: $emoji");
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
|
||||||
|
int index = emojis.indexOf(emoji) + 1;
|
||||||
|
var result = await DioManager.instance.post(url: Api.interactEmoji,params: {
|
||||||
|
"calloutId": id,
|
||||||
|
"type": index
|
||||||
|
});
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
var data = await DioManager.instance.get(url: Api.signCalloutDetail,params: {
|
||||||
|
'id':id,
|
||||||
|
});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
Lists bean =Lists.fromJson(data['data']);
|
||||||
|
index = lists.indexOf(list);
|
||||||
|
lists[index] = bean;
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
emoji,
|
||||||
|
style: TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _removeOverlay() {
|
||||||
|
_overlayEntry?.remove();
|
||||||
|
_overlayEntry = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
circleInfoItem() {
|
circleInfoItem() {
|
||||||
return ClipRRect(
|
return ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import '../../../utils/cache_img.dart';
|
|||||||
import '../../../utils/time_format.dart';
|
import '../../../utils/time_format.dart';
|
||||||
import '../../circle_list/logic.dart';
|
import '../../circle_list/logic.dart';
|
||||||
import '../../circle_list/view.dart';
|
import '../../circle_list/view.dart';
|
||||||
|
import '../../circle_list/widgets/right_circle_iten.dart';
|
||||||
import '../../msg/recommend_circle_friend_item.dart';
|
import '../../msg/recommend_circle_friend_item.dart';
|
||||||
import '../../world_call_out/view.dart';
|
import '../../world_call_out/view.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
@ -77,6 +78,14 @@ class _LikeViewState extends State<LikeView>
|
|||||||
|
|
||||||
List likelist = [];
|
List likelist = [];
|
||||||
|
|
||||||
|
List<String> emojis = [
|
||||||
|
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||||
|
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||||
|
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||||
|
"🫣", "😂", "🤐", "😱", "🫥"
|
||||||
|
]; OverlayEntry? _overlayEntry;
|
||||||
|
bool isShowEmoji = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
@ -844,6 +853,7 @@ class _LikeViewState extends State<LikeView>
|
|||||||
|
|
||||||
///至尊喊话
|
///至尊喊话
|
||||||
vipDynamicItem(Lists lists) {
|
vipDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Text descText = Text(
|
Text descText = Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
||||||
@ -1137,10 +1147,65 @@ class _LikeViewState extends State<LikeView>
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
Container(
|
// Container(
|
||||||
|
// height: 30.sp,
|
||||||
|
// padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
|
// margin: EdgeInsets.only(top: picHeight == 0 ? 15.sp : 5.sp),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(15.sp),
|
||||||
|
// color: Color(0x33000000)),
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// widgets.isNotEmpty
|
||||||
|
// ? SizedBox(
|
||||||
|
// width: 24 + 12.sp * widgets.length - 8.sp,
|
||||||
|
// height: 24.sp,
|
||||||
|
// child: Stack(children: widgets),
|
||||||
|
// )
|
||||||
|
// : Container(),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 4.sp,
|
||||||
|
// ),
|
||||||
|
// widgets.isNotEmpty
|
||||||
|
// ? Expanded(
|
||||||
|
// child: Text(
|
||||||
|
// '${lists.chat!.count!}位圈友已私聊',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white.withOpacity(0.75),
|
||||||
|
// fontSize: 14.sp),
|
||||||
|
// ))
|
||||||
|
// : Expanded(
|
||||||
|
// child: Text(
|
||||||
|
// '赶紧成为第一位私聊ta的圈友吧',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white.withOpacity(0.75),
|
||||||
|
// fontSize: 14.sp),
|
||||||
|
// )),
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// pushMsgPage(
|
||||||
|
// lists,
|
||||||
|
// lists.interest!['id'].toString(),
|
||||||
|
// );
|
||||||
|
// // pushHomePage(
|
||||||
|
// // lists, widget.bean.id.toString());
|
||||||
|
// },
|
||||||
|
// child: Image.asset(
|
||||||
|
// getCircleImage('chat'),
|
||||||
|
// width: 60.sp,
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(top: picHeight == 0 ? 15.sp : 5.sp),
|
margin: EdgeInsets.only(
|
||||||
|
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(15.sp),
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
color: Color(0x33000000)),
|
color: Color(0x33000000)),
|
||||||
@ -1162,14 +1227,14 @@ class _LikeViewState extends State<LikeView>
|
|||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -1177,8 +1242,6 @@ class _LikeViewState extends State<LikeView>
|
|||||||
lists,
|
lists,
|
||||||
lists.interest!['id'].toString(),
|
lists.interest!['id'].toString(),
|
||||||
);
|
);
|
||||||
// pushHomePage(
|
|
||||||
// lists, widget.bean.id.toString());
|
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
@ -1188,7 +1251,47 @@ class _LikeViewState extends State<LikeView>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 5.sp : 0.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
||||||
child: circleInfoItem(lists.interest, lists, index),
|
child: circleInfoItem(lists.interest, lists, index),
|
||||||
@ -1202,6 +1305,7 @@ class _LikeViewState extends State<LikeView>
|
|||||||
|
|
||||||
///普通图文喊话
|
///普通图文喊话
|
||||||
normalDynamicItem(Lists lists) {
|
normalDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Text descText = Text(
|
Text descText = Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
||||||
@ -1485,14 +1589,15 @@ class _LikeViewState extends State<LikeView>
|
|||||||
);
|
);
|
||||||
}))
|
}))
|
||||||
: Container(),
|
: Container(),
|
||||||
Container(
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
left: 5.sp,
|
margin: EdgeInsets.only(
|
||||||
right: 10.sp,
|
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp),
|
||||||
),
|
|
||||||
margin:
|
|
||||||
EdgeInsets.only(top: picHeight == 0 ? 15.sp : 5.sp),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(15.sp),
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
color: Color(0x33000000)),
|
color: Color(0x33000000)),
|
||||||
@ -1514,29 +1619,70 @@ class _LikeViewState extends State<LikeView>
|
|||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
pushMsgPage(
|
pushMsgPage(
|
||||||
lists, lists.interest!['id'].toString());
|
lists,
|
||||||
|
lists.interest!['id'].toString(),
|
||||||
// });
|
);
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
width: 60.sp,
|
width: 60.sp,
|
||||||
))
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 5.sp : 0.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
||||||
child: circleInfoItem(lists.interest, lists, index),
|
child: circleInfoItem(lists.interest, lists, index),
|
||||||
@ -1549,6 +1695,125 @@ class _LikeViewState extends State<LikeView>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showEmojiPicker(Lists list,int id,BuildContext context, Offset position) {
|
||||||
|
if (isShowEmoji) return;
|
||||||
|
isShowEmoji = true;
|
||||||
|
_overlayEntry = OverlayEntry(
|
||||||
|
builder: (context) => Stack(
|
||||||
|
children: [
|
||||||
|
// 遮罩层,点击关闭
|
||||||
|
Positioned.fill(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: Colors.black.withOpacity(0.3),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 表情选择器
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 190.w,
|
||||||
|
top: position.dy - 60.sp,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// 气泡框
|
||||||
|
Container(
|
||||||
|
width: 200.w, // 设置最大宽度,超出才会滚动
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black26,
|
||||||
|
blurRadius: 10,
|
||||||
|
spreadRadius: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
|
children: emojis.map((emoji) => Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: _emojiButton(emoji,id,list),
|
||||||
|
)).toList(),
|
||||||
|
),),
|
||||||
|
),
|
||||||
|
// 底部倒三角形
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 12.w,
|
||||||
|
top: position.dy - 15,
|
||||||
|
child: CustomPaint(
|
||||||
|
size: Size(20, 10),
|
||||||
|
painter: TrianglePainter(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Overlay.of(context).insert(_overlayEntry!);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _emojiButton(String emoji,int id,Lists list) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
print("选择了表情: $emoji");
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
|
||||||
|
int index = emojis.indexOf(emoji) + 1;
|
||||||
|
var result = await DioManager.instance.post(url: Api.interactEmoji,params: {
|
||||||
|
"calloutId": id,
|
||||||
|
"type": index
|
||||||
|
});
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
var data = await DioManager.instance.get(url: Api.signCalloutDetail,params: {
|
||||||
|
'id':id,
|
||||||
|
});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
Lists bean =Lists.fromJson(data['data']);
|
||||||
|
if (lists.contains(list)) {
|
||||||
|
index = lists.indexOf(list);
|
||||||
|
lists[index] = bean;
|
||||||
|
} else {
|
||||||
|
index = recomanddlists.indexOf(list);
|
||||||
|
recomanddlists[index] = bean;
|
||||||
|
}
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
emoji,
|
||||||
|
style: TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void _removeOverlay() {
|
||||||
|
_overlayEntry?.remove();
|
||||||
|
_overlayEntry = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tipItem() {
|
tipItem() {
|
||||||
bool showTitle = lists.isEmpty;
|
bool showTitle = lists.isEmpty;
|
||||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import 'package:video_player/video_player.dart';
|
|||||||
import '../../../commons/widgets/video_share_dialog.dart';
|
import '../../../commons/widgets/video_share_dialog.dart';
|
||||||
import '../../../net/api.dart';
|
import '../../../net/api.dart';
|
||||||
import '../../../net/dio_manager.dart';
|
import '../../../net/dio_manager.dart';
|
||||||
|
import '../../../utils/cache_img.dart';
|
||||||
import '../../userinfo/logic.dart';
|
import '../../userinfo/logic.dart';
|
||||||
import '../../world_call_out/world_data.dart';
|
import '../../world_call_out/world_data.dart';
|
||||||
import 'controller/physics.dart';
|
import 'controller/physics.dart';
|
||||||
@ -20,8 +21,9 @@ class PlayVideoView extends StatefulWidget {
|
|||||||
String url;
|
String url;
|
||||||
String callOutId;
|
String callOutId;
|
||||||
String userId;
|
String userId;
|
||||||
|
String imid;
|
||||||
PlayVideoView(this.url, this.callOutId, this.userId, {Key? key})
|
Map chat;
|
||||||
|
PlayVideoView(this.url, this.callOutId, this.userId,this.chat,this.imid, {Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
@override
|
@override
|
||||||
State<PlayVideoView> createState() => _PlayVideoViewState();
|
State<PlayVideoView> createState() => _PlayVideoViewState();
|
||||||
@ -75,10 +77,12 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
|||||||
'id': int.parse(widget.callOutId),
|
'id': int.parse(widget.callOutId),
|
||||||
'user': {
|
'user': {
|
||||||
'id': int.parse(widget.userId),
|
'id': int.parse(widget.userId),
|
||||||
|
'imId': widget.imid,
|
||||||
},
|
},
|
||||||
'album': [
|
'album': [
|
||||||
{'type': 2, 'url': widget.url}
|
{'type': 2, 'url': widget.url}
|
||||||
]
|
],
|
||||||
|
'chat':widget.chat
|
||||||
});
|
});
|
||||||
|
|
||||||
userList = [list];
|
userList = [list];
|
||||||
@ -213,6 +217,28 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
|||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
itemCount: _videoListController.videoCount,
|
itemCount: _videoListController.videoCount,
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
|
|
||||||
|
WorldLists lists = userList[i];
|
||||||
|
|
||||||
|
List<Widget> widgets = [];
|
||||||
|
int index = 0;
|
||||||
|
for (var element in lists.chat!.users!) {
|
||||||
|
widgets.add(Positioned(
|
||||||
|
left: 12.sp * index,
|
||||||
|
child: circleWidget(element.avatar!, element.id.toString(), width: 24),
|
||||||
|
));
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
if (widgets.isNotEmpty) {
|
||||||
|
widgets.add(Positioned(
|
||||||
|
left: 12.sp * lists.chat!.users!.length,
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage('more'),
|
||||||
|
width: 24.sp,
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 拼一个视频组件出来
|
// 拼一个视频组件出来
|
||||||
var player = _videoListController.playerOfIndex(i)!;
|
var player = _videoListController.playerOfIndex(i)!;
|
||||||
var data = player.videoInfo!;
|
var data = player.videoInfo!;
|
||||||
@ -267,6 +293,62 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
|||||||
// backgroundColor: Colors.black)),
|
// backgroundColor: Colors.black)),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
Positioned(bottom: 5.sp + MediaQuery.of(context).padding.bottom,child: Container(
|
||||||
|
height: 30.sp,
|
||||||
|
width: Get.width - 20.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 5.sp,
|
||||||
|
right: 5.sp,
|
||||||
|
),
|
||||||
|
// margin: EdgeInsets.only(
|
||||||
|
// top: picHeight > 0 ? 5.sp : 10.sp, bottom: 10.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
|
color: Colors.white.withOpacity(0.15)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
widgets.isNotEmpty
|
||||||
|
? SizedBox(
|
||||||
|
width: 24 + 12.sp * widgets.length - 8.sp,
|
||||||
|
height: 24.sp,
|
||||||
|
child: Stack(children: widgets),
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
|
widgets.isNotEmpty
|
||||||
|
? Expanded(
|
||||||
|
child: Text(
|
||||||
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
))
|
||||||
|
: Expanded(
|
||||||
|
child: Text(
|
||||||
|
'赶紧成为第一位私聊ta的圈友吧',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
if (player.controller.value.isPlaying) {
|
||||||
|
await player.pause();
|
||||||
|
}
|
||||||
|
setState(() {});
|
||||||
|
pushChatPage(lists.user!.id!.toString(),
|
||||||
|
lists.user!.imId!.toString(), lists.user!.nickname ?? '');
|
||||||
|
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage('chat'),
|
||||||
|
width: 60.sp,
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -349,4 +431,29 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
circleWidget(String url, String userId, {double width = 24}) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
// pushUserHome(userId);
|
||||||
|
},
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getCircleImage('avatar_bg'),
|
||||||
|
width: width.sp,
|
||||||
|
),
|
||||||
|
ClipOval(
|
||||||
|
child: CachedImg(
|
||||||
|
imageUrl: url ??
|
||||||
|
"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
|
||||||
|
width: (width - 1).sp,
|
||||||
|
height: (width - 1).sp,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/circle_app/circle/widgets/play_video_view.dart';
|
import 'package:circle_app/circle_app/circle/widgets/play_video_view.dart';
|
||||||
|
import 'package:circle_app/circle_app/world_call_out/world_data.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../net/api.dart';
|
||||||
|
import '../../../net/dio_manager.dart';
|
||||||
import '../../../utils/cache_img.dart';
|
import '../../../utils/cache_img.dart';
|
||||||
|
import '../logic.dart';
|
||||||
|
|
||||||
class VideoItemWidget extends StatefulWidget {
|
class VideoItemWidget extends StatefulWidget {
|
||||||
String url;
|
String url;
|
||||||
@ -17,17 +21,26 @@ class VideoItemWidget extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _VideoItemWidgetState extends State<VideoItemWidget> {
|
class _VideoItemWidgetState extends State<VideoItemWidget> {
|
||||||
|
bool isPush = false;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
// color: Colors.red,
|
|
||||||
|
|
||||||
width: Get.width - 120.sp,
|
width: Get.width - 120.sp,
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
Get.to(PlayVideoView(widget.url,widget.callOutId,widget.userId));
|
if (isPush) return;
|
||||||
|
var data = await DioManager.instance.get(url: Api.signCalloutDetail,params: {
|
||||||
|
'id':widget.callOutId,
|
||||||
|
});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
WorldLists bean = WorldLists.fromJson(data['data']);
|
||||||
|
Get.to(
|
||||||
|
PlayVideoView(widget.url, widget.callOutId, widget.userId,bean.chat!.toJson(),bean.user!.imId!));
|
||||||
|
}
|
||||||
|
isPush = false;
|
||||||
},
|
},
|
||||||
child: IntrinsicWidth(
|
child: IntrinsicWidth(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
|||||||
@ -46,12 +46,8 @@ class LikeLogic extends GetxController {
|
|||||||
|
|
||||||
int pageType = 0;
|
int pageType = 0;
|
||||||
|
|
||||||
List<MyConfigData> genderList = [
|
List<MyConfigData> genderList = [MyConfigData('0', '全部', true)];
|
||||||
MyConfigData('0', '全部', true)
|
List<MyConfigData> newgenderList = [MyConfigData('0', '全部', true)];
|
||||||
];
|
|
||||||
List<MyConfigData> newgenderList = [
|
|
||||||
MyConfigData('0', '全部', true)
|
|
||||||
];
|
|
||||||
|
|
||||||
bool isNewPeople = false;
|
bool isNewPeople = false;
|
||||||
|
|
||||||
@ -77,19 +73,19 @@ class LikeLogic extends GetxController {
|
|||||||
sub = EventBusManager.on<ChangeCircleIndex>().listen((event) {
|
sub = EventBusManager.on<ChangeCircleIndex>().listen((event) {
|
||||||
changeCircle(event.param);
|
changeCircle(event.param);
|
||||||
});
|
});
|
||||||
await loadMyInfo();
|
|
||||||
rightCtr.addListener(() {
|
rightCtr.addListener(() {
|
||||||
if (rightCtr.position.pixels ==
|
if (rightCtr.position.pixels == rightCtr.position.maxScrollExtent) {
|
||||||
rightCtr.position.maxScrollExtent) {
|
|
||||||
loadMore();
|
loadMore();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
loadMyInfo();
|
||||||
|
|
||||||
await initGerder();
|
// loadInviteData();
|
||||||
loadInviteData();
|
|
||||||
loadCircleListData();
|
loadCircleListData();
|
||||||
loadMyCircleData();
|
loadMyCircleData();
|
||||||
loadCircleTypeData();
|
loadCircleTypeData();
|
||||||
|
initGerder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -101,8 +97,7 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initGerder() async {
|
initGerder() async {
|
||||||
var data1 =
|
var data1 = await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||||
await DioManager.instance.get(url: Api.getConfig, params: {});
|
|
||||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||||
data1, (data1) => ConfigBean.fromJson(data1));
|
data1, (data1) => ConfigBean.fromJson(data1));
|
||||||
|
|
||||||
@ -113,7 +108,6 @@ class LikeLogic extends GetxController {
|
|||||||
if (int.parse(key) < 3) {
|
if (int.parse(key) < 3) {
|
||||||
genderList.add(MyConfigData(key, value, true));
|
genderList.add(MyConfigData(key, value, true));
|
||||||
newgenderList.add(MyConfigData(key, value, true));
|
newgenderList.add(MyConfigData(key, value, true));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// roleList.clear();
|
// roleList.clear();
|
||||||
@ -132,51 +126,36 @@ class LikeLogic extends GetxController {
|
|||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
isFirst = false;
|
isFirst = false;
|
||||||
// int type = getUserType(
|
|
||||||
// ( bean.data!.user.createTime?.isNotEmpty ?? false)
|
|
||||||
// ? bean.data!.user.createTime!
|
|
||||||
// : DateTime.now().toString());
|
|
||||||
// if (type == 2) {
|
|
||||||
// currentIndex = -1;
|
|
||||||
// isNewPeople = true;
|
|
||||||
// } else {
|
|
||||||
// currentIndex = -2;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (!isLoadNewData && tabController == null) {
|
|
||||||
isLoadNewData = true;
|
isLoadNewData = true;
|
||||||
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
isLoadFial = true;
|
// isLoadFial = true;
|
||||||
showOKToast('网络不流畅哦,请检查网络情况');
|
// showOKToast('网络不流畅哦,请检查网络情况');
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
loadInviteData();
|
// loadInviteData();
|
||||||
loadCircleListData();
|
loadCircleListData();
|
||||||
loadMyCircleData();
|
loadMyCircleData();
|
||||||
loadCircleTypeData();
|
loadCircleTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadInviteData() async {
|
loadInviteData() async {
|
||||||
|
|
||||||
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
Autogenerated result = Autogenerated.fromJson(data);
|
Autogenerated result = Autogenerated.fromJson(data);
|
||||||
|
|
||||||
homeData = result.data;
|
homeData = result.data;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadCircleListData() async {
|
loadCircleListData() async {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: Api.getCircleInterests, params: {"page": page, 'page_size': 20});
|
url: Api.getCircleInterests, params: {"page": page, 'page_size': 10});
|
||||||
var bean = BaseResponse<InterestsBean>.fromJson(
|
var bean = BaseResponse<InterestsBean>.fromJson(
|
||||||
data, (data) => InterestsBean.fromJson(data));
|
data, (data) => InterestsBean.fromJson(data));
|
||||||
if (bean.code == 200) {
|
if (bean.code == 200) {
|
||||||
@ -187,8 +166,8 @@ class LikeLogic extends GetxController {
|
|||||||
circle.lists.addAll(bean.data!.lists);
|
circle.lists.addAll(bean.data!.lists);
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoad = false;
|
|
||||||
if (bean.data!.lists.length < 20) {
|
if (bean.data!.lists.length == 0) {
|
||||||
isMore = false;
|
isMore = false;
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
@ -199,8 +178,7 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadMyCircleData() async {
|
loadMyCircleData() async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance.get(url: Api.getMyCircleAll);
|
||||||
.get(url: Api.getMyCircleAll);
|
|
||||||
|
|
||||||
// var bean = BaseResponse<InterestsBean>.fromJson(
|
// var bean = BaseResponse<InterestsBean>.fromJson(
|
||||||
// data, (data) => InterestsBean.fromJson(data));
|
// data, (data) => InterestsBean.fromJson(data));
|
||||||
@ -215,7 +193,7 @@ class LikeLogic extends GetxController {
|
|||||||
});
|
});
|
||||||
mycircle.lists = infoList;
|
mycircle.lists = infoList;
|
||||||
if (currentIndex >= mycircle.lists.length - 1) {
|
if (currentIndex >= mycircle.lists.length - 1) {
|
||||||
currentIndex = mycircle.lists.length -1;
|
currentIndex = mycircle.lists.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadCalloutsNew();
|
loadCalloutsNew();
|
||||||
@ -237,8 +215,6 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void relaodData() {
|
void relaodData() {
|
||||||
page = 1;
|
page = 1;
|
||||||
isMore = true;
|
isMore = true;
|
||||||
@ -252,7 +228,6 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void relaodCircleTypeData() {
|
void relaodCircleTypeData() {
|
||||||
loadCircleTypeData();
|
loadCircleTypeData();
|
||||||
}
|
}
|
||||||
@ -274,16 +249,15 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
relaodMyData();
|
relaodMyData();
|
||||||
}
|
}
|
||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
setTopCircle(String interest_id,bool isStatus) async {
|
setTopCircle(String interest_id, bool isStatus) async {
|
||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance.post(
|
||||||
url: Api.circleTop,
|
url: Api.circleTop,
|
||||||
params: {"interestId": interest_id,'isTop' :isStatus ? 1 : 0});
|
params: {"interestId": interest_id, 'isTop': isStatus ? 1 : 0});
|
||||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||||
if (bean.code == 200) {
|
if (bean.code == 200) {
|
||||||
relaodMyData();
|
relaodMyData();
|
||||||
@ -291,15 +265,13 @@ class LikeLogic extends GetxController {
|
|||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
loadCalloutsNew() async {
|
loadCalloutsNew() async {
|
||||||
List<String> idList = [];
|
List<String> idList = [];
|
||||||
mycircle.lists.forEach((element) {
|
mycircle.lists.forEach((element) {
|
||||||
idList.add(element.id.toString());
|
idList.add(element.id.toString());
|
||||||
});
|
});
|
||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance
|
||||||
url:Api.calloutsNew,
|
.post(url: Api.calloutsNew, params: {"interestIds": idList});
|
||||||
params: {"interestIds":idList});
|
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
hasNewList.clear();
|
hasNewList.clear();
|
||||||
@ -323,7 +295,8 @@ class LikeLogic extends GetxController {
|
|||||||
|
|
||||||
loadCircleTypeData() async {
|
loadCircleTypeData() async {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url:Api.categoriesList,);
|
url: Api.categoriesList,
|
||||||
|
);
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
categoriesList = data['data'];
|
categoriesList = data['data'];
|
||||||
update();
|
update();
|
||||||
@ -336,7 +309,6 @@ class LikeLogic extends GetxController {
|
|||||||
mycircle.lists.forEach((element) {
|
mycircle.lists.forEach((element) {
|
||||||
if (element.id.toString() == param) {
|
if (element.id.toString() == param) {
|
||||||
changeIndex = mycircle.lists.indexOf(element);
|
changeIndex = mycircle.lists.indexOf(element);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
currentIndex = changeIndex;
|
currentIndex = changeIndex;
|
||||||
@ -344,8 +316,7 @@ class LikeLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ChangeCircleIndex {
|
class ChangeCircleIndex {
|
||||||
String param;
|
String param;
|
||||||
ChangeCircleIndex(this.param);
|
ChangeCircleIndex(this.param);
|
||||||
}
|
}
|
||||||
@ -44,6 +44,9 @@ class _CircleListPageState extends State<CircleListPage>
|
|||||||
|
|
||||||
int currentIndex = 1;
|
int currentIndex = 1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<String> tipList = [
|
List<String> tipList = [
|
||||||
'总有一个小众圈子适合你',
|
'总有一个小众圈子适合你',
|
||||||
'每一种情趣都值得被尊重',
|
'每一种情趣都值得被尊重',
|
||||||
@ -67,6 +70,15 @@ class _CircleListPageState extends State<CircleListPage>
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
logic.tabController = TabController(
|
||||||
|
length: 3,
|
||||||
|
vsync: this,
|
||||||
|
initialIndex: 1);
|
||||||
|
logic.tabController!.addListener(() {
|
||||||
|
// logic.tabIndex = logic.tabController!.index;
|
||||||
|
// currentIndex = logic.tabController!.index;
|
||||||
|
logic.update();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -110,18 +122,6 @@ class _CircleListPageState extends State<CircleListPage>
|
|||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logic.isLoadNewData && logic.tabController == null) {
|
|
||||||
logic.tabController = TabController(
|
|
||||||
length: 3,
|
|
||||||
vsync: this,
|
|
||||||
initialIndex: 1);
|
|
||||||
logic.tabController!.addListener(() {
|
|
||||||
// logic.tabIndex = logic.tabController!.index;
|
|
||||||
// currentIndex = logic.tabController!.index;
|
|
||||||
logic.update();
|
|
||||||
});
|
|
||||||
logic.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
return logic.isLoadFial
|
return logic.isLoadFial
|
||||||
? noResultWidget(
|
? noResultWidget(
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:circle_app/circle_app/circle_list/widgets/right_circle_iten.dart';
|
||||||
import 'package:circle_app/utils/eventBus.dart';
|
import 'package:circle_app/utils/eventBus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
@ -59,6 +60,13 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
Map interestAgentMap = {};
|
Map interestAgentMap = {};
|
||||||
List visibleItems = [];
|
List visibleItems = [];
|
||||||
|
|
||||||
|
List<String> emojis = [
|
||||||
|
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||||
|
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||||
|
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||||
|
"🫣", "😂", "🤐", "😱", "🫥"
|
||||||
|
]; OverlayEntry? _overlayEntry;
|
||||||
|
|
||||||
bool isScrolling = false;
|
bool isScrolling = false;
|
||||||
Timer? _timer;
|
Timer? _timer;
|
||||||
|
|
||||||
@ -66,7 +74,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
var sub;
|
var sub;
|
||||||
var sub1;
|
var sub1;
|
||||||
bool isLoadCircleInfo = false;
|
bool isLoadCircleInfo = false;
|
||||||
|
bool isShowEmoji = false;
|
||||||
int callOut = 0;
|
int callOut = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -432,7 +440,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
),
|
),
|
||||||
HideText(
|
HideText(
|
||||||
text: interest.intro + interest.intro,
|
text: interest.intro + interest.intro,
|
||||||
maxWidth: Get.width * 0.5 - 5.sp,
|
maxWidth: Get.width * 0.5 - 9.sp,
|
||||||
additionText: '进圈逛逛',
|
additionText: '进圈逛逛',
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -621,6 +629,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
|
|
||||||
///至尊喊话
|
///至尊喊话
|
||||||
vipDynamicItem(Lists lists) {
|
vipDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
@ -751,7 +760,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
||||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 28.sp,
|
height: 24.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(52, 41, 67, 1),
|
color: Color.fromRGBO(52, 41, 67, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@ -763,7 +772,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
(lists.user!.city ?? '外星').length > 4
|
(lists.user!.city ?? '外星').length > 4
|
||||||
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
||||||
: (lists.user!.city ?? '外星'),
|
: (lists.user!.city ?? '外星'),
|
||||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -1024,7 +1033,10 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
@ -1050,21 +1062,18 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
pushMsgPage(
|
pushMsgPage(lists, '');
|
||||||
lists,
|
|
||||||
'',
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
@ -1074,6 +1083,47 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 5.sp : 5.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
if (lists.interest?.isNotEmpty ?? false)
|
if (lists.interest?.isNotEmpty ?? false)
|
||||||
Container(
|
Container(
|
||||||
width: Get.width - 26.sp,
|
width: Get.width - 26.sp,
|
||||||
@ -1088,6 +1138,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
|
|
||||||
///普通图文喊话
|
///普通图文喊话
|
||||||
normalDynamicItem(Lists lists) {
|
normalDynamicItem(Lists lists) {
|
||||||
|
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
@ -1218,7 +1269,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
||||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 28.sp,
|
height: 24.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(52, 41, 67, 1),
|
color: Color.fromRGBO(52, 41, 67, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@ -1230,7 +1281,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
(lists.user!.city ?? '外星').length > 4
|
(lists.user!.city ?? '外星').length > 4
|
||||||
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
||||||
: (lists.user!.city ?? '外星'),
|
: (lists.user!.city ?? '外星'),
|
||||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -1450,14 +1501,14 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
);
|
);
|
||||||
}))
|
}))
|
||||||
: Container(),
|
: Container(),
|
||||||
Container(
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||||
left: 5.sp,
|
|
||||||
right: 10.sp,
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: picHeight > 0 ? 5.sp : 10.sp, bottom: 10.sp),
|
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(15.sp),
|
borderRadius: BorderRadius.circular(15.sp),
|
||||||
color: Color(0x33000000)),
|
color: Color(0x33000000)),
|
||||||
@ -1479,26 +1530,67 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
'${lists.chat!.count!}位圈友已私聊',
|
'${lists.chat!.count!}位圈友已私聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
))
|
))
|
||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'赶紧成为第一位私聊ta的圈友吧',
|
'赶紧成为第一位私聊ta的人吧',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white.withOpacity(0.75),
|
color: Colors.white.withOpacity(0.75),
|
||||||
fontSize: 14.sp),
|
fontSize: 13.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
pushMsgPage(lists, '');
|
pushMsgPage(lists, '');
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
width: 60.sp,
|
width: 60.sp,
|
||||||
))
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTapUp: (TapUpDetails details) {
|
||||||
|
if (lists.isInteract! > 0) {
|
||||||
|
showOKToast('这个喊话已经点过了哦');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_showEmojiPicker(lists,lists.id!,context, details.globalPosition);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 5.sp : 5.sp),
|
||||||
|
// height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 43.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
emojis[lists.isInteract! > 0 ? lists.isInteract! - 1 : type] ?? '❤',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
if ((lists.topInteractType!['userCount'] ?? 0) > 0)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: Text(
|
||||||
|
'${lists.topInteractType!['userCount']}',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
if (lists.interest?.isNotEmpty ?? false)
|
if (lists.interest?.isNotEmpty ?? false)
|
||||||
Container(
|
Container(
|
||||||
width: Get.width - 26.sp,
|
width: Get.width - 26.sp,
|
||||||
@ -1518,9 +1610,124 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showEmojiPicker(Lists list,int id,BuildContext context, Offset position) {
|
||||||
|
if (isShowEmoji) return;
|
||||||
|
isShowEmoji = true;
|
||||||
|
_overlayEntry = OverlayEntry(
|
||||||
|
builder: (context) => Stack(
|
||||||
|
children: [
|
||||||
|
// 遮罩层,点击关闭
|
||||||
|
Positioned.fill(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: Colors.black.withOpacity(0.3),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 表情选择器
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 190.w,
|
||||||
|
top: position.dy - 60.sp,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// 气泡框
|
||||||
|
Container(
|
||||||
|
width: 200.w, // 设置最大宽度,超出才会滚动
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black26,
|
||||||
|
blurRadius: 10,
|
||||||
|
spreadRadius: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
|
children: emojis.map((emoji) => Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: _emojiButton(emoji,id,list),
|
||||||
|
)).toList(),
|
||||||
|
),),
|
||||||
|
),
|
||||||
|
// 底部倒三角形
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
left: position.dx - 12.w,
|
||||||
|
top: position.dy - 15,
|
||||||
|
child: CustomPaint(
|
||||||
|
size: Size(20, 10),
|
||||||
|
painter: TrianglePainter(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Overlay.of(context).insert(_overlayEntry!);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _emojiButton(String emoji,int id,Lists list) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
print("选择了表情: $emoji");
|
||||||
|
_removeOverlay();
|
||||||
|
isShowEmoji = false;
|
||||||
|
|
||||||
|
int index = emojis.indexOf(emoji) + 1;
|
||||||
|
var result = await DioManager.instance.post(url: Api.interactEmoji,params: {
|
||||||
|
"calloutId": id,
|
||||||
|
"type": index
|
||||||
|
});
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
var data = await DioManager.instance.get(url: Api.signCalloutDetail,params: {
|
||||||
|
'id':id,
|
||||||
|
});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
Lists bean =Lists.fromJson(data['data']);
|
||||||
|
index = lists.indexOf(list);
|
||||||
|
lists[index] = bean;
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
emoji,
|
||||||
|
style: TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void _removeOverlay() {
|
||||||
|
_overlayEntry?.remove();
|
||||||
|
_overlayEntry = null;
|
||||||
|
}
|
||||||
|
|
||||||
circleWidget(String url, String userId, {double width = 24}) {
|
circleWidget(String url, String userId, {double width = 24}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {},
|
onTap: () async {
|
||||||
|
pushUserHome(userId);
|
||||||
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -1710,4 +1917,9 @@ class _AllCircleItemState extends State<AllCircleItem>
|
|||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pushUserHome(String userId) {
|
||||||
|
Get.toNamed(Routes.UserInfoPage, arguments: userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,188 @@
|
|||||||
|
import 'package:circle_app/net/dio_manager.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:oktoast/oktoast.dart';
|
||||||
|
|
||||||
|
import '../../../commons/Widgets/base_tip_widget.dart';
|
||||||
|
import '../../../commons/colors/app_color.dart';
|
||||||
|
import '../../../net/api.dart';
|
||||||
|
import '../../../router/routers.dart';
|
||||||
|
import '../../../utils/util.dart';
|
||||||
|
|
||||||
|
class ApplyForAnAgentDialog extends StatefulWidget {
|
||||||
|
int circleId;
|
||||||
|
ApplyForAnAgentDialog({super.key,required this.circleId});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ApplyForAnAgentDialogState createState() =>
|
||||||
|
new _ApplyForAnAgentDialogState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ApplyForAnAgentDialogState extends State<ApplyForAnAgentDialog> {
|
||||||
|
// TODO: add state variables and methods
|
||||||
|
String msg = '';
|
||||||
|
String price = '';
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
loadContentData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: add widget build method
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
insetPadding:EdgeInsets.only(left: 20.sp,right: 20.sp),
|
||||||
|
child: Container(
|
||||||
|
height: 270.sp,
|
||||||
|
padding: const EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
color: AppColor.bgColor,
|
||||||
|
borderRadius: BorderRadius.circular(12.0.sp),
|
||||||
|
// gradient: const LinearGradient(
|
||||||
|
// colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// margin: EdgeInsets.all(1.sp),
|
||||||
|
// child: Image.asset(getMineImage("im_neglect"),fit: BoxFit.fill,),
|
||||||
|
// ),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 12.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"申请体验圈子代理人权益",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 18.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 0.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Text(
|
||||||
|
msg,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed(Routes.InvitePage);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 130.w,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 40.sp,
|
||||||
|
margin: EdgeInsets.only(bottom: 16.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Text(
|
||||||
|
"前往邀请",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
loadBuyInterestAgentData();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 130.w,
|
||||||
|
height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
margin: EdgeInsets.only(bottom: 16.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
|
gradient: AppColor
|
||||||
|
.tagVerLinearGradient,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
"快速体验(${price})",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadContentData() async {
|
||||||
|
var result = await DioManager.instance.get(url: Api.agentRights);
|
||||||
|
if (result['code'] == 10000) {
|
||||||
|
msg = result['content'];
|
||||||
|
await loadbuyInterestAgentPriceData();
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadbuyInterestAgentPriceData() async {
|
||||||
|
var result = await DioManager.instance.get(url: Api.buyInterestAgentPrice);
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
price = result['data'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadBuyInterestAgentData() async {
|
||||||
|
var result = await DioManager.instance.post(url: Api.buyInterestAgent,params: {'id':widget.circleId});
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
showOKToast('购买成功');
|
||||||
|
Get.back(result: '1');
|
||||||
|
} else if (result['code'] == 31201) {
|
||||||
|
showRechargeScreenDialog('buyInterestAgent');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -30,7 +30,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: '帮助与反馈',
|
centerTitle: '客服与反馈',
|
||||||
actionWdiget: const Text(
|
actionWdiget: const Text(
|
||||||
"我的反馈",
|
"我的反馈",
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
|
|||||||
@ -86,6 +86,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
|
|
||||||
String inviteCode = '';
|
String inviteCode = '';
|
||||||
|
|
||||||
|
String agentManualStr = '';
|
||||||
|
|
||||||
var link = '';
|
var link = '';
|
||||||
@override
|
@override
|
||||||
void onClose() async {
|
void onClose() async {
|
||||||
@ -132,13 +134,13 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
|
|
||||||
addMsgListener();
|
addMsgListener();
|
||||||
|
|
||||||
checkVersion();
|
|
||||||
loadMyCircleData();
|
loadMyCircleData();
|
||||||
|
|
||||||
initWxApi();
|
initWxApi();
|
||||||
|
|
||||||
awaitShowTodayDialog();
|
awaitShowTodayDialog();
|
||||||
awaitShowLikeRecomandDialog();
|
// awaitShowLikeRecomandDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
void addMsgListener() {
|
void addMsgListener() {
|
||||||
@ -572,7 +574,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
void onReady() async {
|
void onReady() async {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
checkVersion();
|
||||||
FlutterNativeSplash.remove();
|
FlutterNativeSplash.remove();
|
||||||
final logic = Get.find<CircleLogic>();
|
final logic = Get.find<CircleLogic>();
|
||||||
logic.loadCirclePeopleData();
|
logic.loadCirclePeopleData();
|
||||||
@ -803,7 +805,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void awaitShowTodayDialog() {
|
void awaitShowTodayDialog() {
|
||||||
Future.delayed(Duration(seconds: 5), () async {
|
Future.delayed(Duration(seconds: 30), () async {
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (await sp.isFirstAutoMatch()) {
|
if (await sp.isFirstAutoMatch()) {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
@ -859,6 +861,13 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
if (Get.currentRoute.contains(Routes.Chat) ) return;
|
if (Get.currentRoute.contains(Routes.Chat) ) return;
|
||||||
EventBusManager.fire(MsgTipClass(text, msgID, userInfo));
|
EventBusManager.fire(MsgTipClass(text, msgID, userInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadManualata() async {
|
||||||
|
var data = await DioManager.instance.get(url: Api.agentManual);
|
||||||
|
if (data['code'] == 10000) {
|
||||||
|
agentManualStr = data['content'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class conTop {
|
class conTop {
|
||||||
|
|||||||
@ -307,8 +307,9 @@ class _HomePageState extends State<HomePage>
|
|||||||
isSelected
|
isSelected
|
||||||
? getTabbarImage('${image}_selected')
|
? getTabbarImage('${image}_selected')
|
||||||
: getTabbarImage('${image}_normal'),
|
: getTabbarImage('${image}_normal'),
|
||||||
width: 30.sp,
|
width: 29.sp,
|
||||||
height: 30.sp,
|
height: 29.sp,
|
||||||
|
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
excludeFromSemantics: true,
|
excludeFromSemantics: true,
|
||||||
gaplessPlayback: true,
|
gaplessPlayback: true,
|
||||||
|
|||||||
@ -72,12 +72,11 @@ class _InvitePageState extends State<InvitePage>
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
|
|
||||||
diyTitleWdiget: Container(
|
diyTitleWdiget: Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Theme(
|
Theme(
|
||||||
data: ThemeData(
|
data: ThemeData(
|
||||||
@ -90,15 +89,15 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
},
|
},
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
tabs: tabs,
|
tabs: tabs,
|
||||||
labelPadding: EdgeInsets.only(left: 8.sp,right: 8.sp),
|
labelPadding: EdgeInsets.only(left: 8.sp, right: 8.sp),
|
||||||
indicatorPadding:
|
indicatorPadding: EdgeInsets.only(
|
||||||
EdgeInsets.only(left: 20.sp, right: 20.sp, bottom: 10.sp),
|
left: 20.sp, right: 20.sp, bottom: 10.sp),
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
labelColor: AppColor.mainColor,
|
labelColor: AppColor.mainColor,
|
||||||
unselectedLabelColor: Color(0xCCF7FAFA),
|
unselectedLabelColor: Color(0xCCF7FAFA),
|
||||||
labelStyle:
|
labelStyle: TextStyle(
|
||||||
TextStyle(fontSize: 18.sp, fontWeight: FontWeight.w500),
|
fontSize: 18.sp, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -117,11 +116,36 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
// width: 62.sp,
|
// width: 62.sp,
|
||||||
child: Image.asset(
|
child: Container(
|
||||||
getMineImage('invite_right_icon'),
|
height: 24.sp,
|
||||||
width: 62.sp,
|
margin: EdgeInsets.all(0.6.sp),
|
||||||
fit: BoxFit.fill,
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp,
|
||||||
|
right: 6.sp,
|
||||||
),
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(17.0),
|
||||||
|
color: const Color(0xFF392D53),
|
||||||
|
border: GradientBoxBorder(
|
||||||
|
gradient: AppColor
|
||||||
|
.mainVerLinearGradient,
|
||||||
|
width: 1.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"邀请攻略",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -726,7 +750,8 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
margin: EdgeInsets.only(top: 35.sp),
|
margin: EdgeInsets.only(top: 35.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(21.sp),
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
gradient: AppColor.mainVerLinearGradient,),
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -734,10 +759,12 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
Image(
|
Image(
|
||||||
image: AssetImage(getMineImage("invite_icon")),
|
image: AssetImage(getMineImage("invite_icon")),
|
||||||
// width: 22.sp,
|
// width: 22.sp,
|
||||||
height:22.sp,
|
height: 22.sp,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp,),
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
'邀请圈友赚钱',
|
'邀请圈友赚钱',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -779,13 +806,20 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
margin: EdgeInsets.only(top: 35.sp),
|
margin: EdgeInsets.only(top: 35.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(21.sp),
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
gradient: AppColor.mainVerLinearGradient,),
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.perm_identity_outlined,size: 22.sp,color: Colors.white,),
|
Icon(
|
||||||
SizedBox(width: 4.sp,),
|
Icons.perm_identity_outlined,
|
||||||
|
size: 22.sp,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
homeLogic.inventStr.contains('赚') ? '联系客服结算' : '联系客服',
|
homeLogic.inventStr.contains('赚') ? '联系客服结算' : '联系客服',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -801,8 +835,6 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
myTitileWidget() {
|
myTitileWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 41.sp,
|
height: 41.sp,
|
||||||
@ -922,7 +954,6 @@ mainAxisAlignment: MainAxisAlignment.center,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
buildSegment() {
|
buildSegment() {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(top: 15.sp),
|
margin: EdgeInsets.only(top: 15.sp),
|
||||||
@ -1073,7 +1104,7 @@ rowWidget(
|
|||||||
String str4,
|
String str4,
|
||||||
String str5,
|
String str5,
|
||||||
String userId,
|
String userId,
|
||||||
) {
|
) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 41.sp,
|
height: 41.sp,
|
||||||
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
@ -1137,8 +1168,6 @@ rowWidget(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
infoText(String info, [Color color = const Color(0xFFF7FAFA)]) {
|
infoText(String info, [Color color = const Color(0xFFF7FAFA)]) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -1268,7 +1297,6 @@ void showCodePicker(InviteLogic logic) {
|
|||||||
enableDrag: false);
|
enableDrag: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class InventDescItem extends StatefulWidget {
|
class InventDescItem extends StatefulWidget {
|
||||||
const InventDescItem({super.key});
|
const InventDescItem({super.key});
|
||||||
|
|
||||||
@ -1518,7 +1546,6 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 12.sp,
|
height: 12.sp,
|
||||||
),
|
),
|
||||||
@ -1572,8 +1599,13 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 12.sp),
|
margin: EdgeInsets.only(top: 12.sp),
|
||||||
child:Text('微乐园推广大使榜',style: TextStyle(color: AppColor.mainColor,fontSize: 15.sp,fontWeight: FontWeight.bold),)
|
child: Text(
|
||||||
),
|
'微乐园推广大使榜',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
fontSize: 15.sp,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
)),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
@ -1596,9 +1628,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return titileWidget();
|
return titileWidget();
|
||||||
}
|
}
|
||||||
if (logic.allInveiteData
|
if (logic.allInveiteData.length + 1 ==
|
||||||
.length +
|
|
||||||
1 ==
|
|
||||||
index) {
|
index) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
@ -1614,20 +1644,18 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
var data = logic
|
var data =
|
||||||
.allInveiteData[index - 1];
|
logic.allInveiteData[index - 1];
|
||||||
return rowWidget(
|
return rowWidget(
|
||||||
data['nickname'],
|
data['nickname'],
|
||||||
data['inviteCount']
|
data['inviteCount'].toString(),
|
||||||
.toString(),
|
data['vipDaysStr'].toString() + '天',
|
||||||
data['vipDaysStr']
|
|
||||||
.toString() +
|
|
||||||
'天',
|
|
||||||
'${data['directProfitStr']}票',
|
'${data['directProfitStr']}票',
|
||||||
'${data['rebateStr']}票',
|
'${data['rebateStr']}票',
|
||||||
data['userId'].toString());
|
data['userId'].toString());
|
||||||
},
|
},
|
||||||
itemCount: logic.allInveiteData.length + 2))),
|
itemCount:
|
||||||
|
logic.allInveiteData.length + 2))),
|
||||||
])),
|
])),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 60.sp + MediaQuery.of(context).padding.bottom,
|
height: 60.sp + MediaQuery.of(context).padding.bottom,
|
||||||
@ -1658,17 +1686,18 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: AppColor.mainVerLinearGradient,
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
borderRadius: BorderRadius.circular(21.sp)),
|
borderRadius: BorderRadius.circular(21.sp)),
|
||||||
child:
|
child: Row(
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getMineImage("invite_icon")),
|
image: AssetImage(getMineImage("invite_icon")),
|
||||||
// width: 22.sp,
|
// width: 22.sp,
|
||||||
height:22.sp,
|
height: 22.sp,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp,),
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
'邀请圈友赚钱',
|
'邀请圈友赚钱',
|
||||||
style:
|
style:
|
||||||
@ -1706,16 +1735,21 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
gradient: AppColor.mainVerLinearGradient,
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
borderRadius: BorderRadius.circular(21.sp),
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
),
|
),
|
||||||
child:
|
child: Row(
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.stars,size: 22.sp,color: Colors.white,),
|
Icon(
|
||||||
SizedBox(width: 4.sp,),
|
Icons.stars,
|
||||||
|
size: 22.sp,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
'申请成为大使',
|
'申请成为大使',
|
||||||
style: TextStyle(
|
style:
|
||||||
color: Colors.white, fontSize: 15.sp),
|
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -1757,7 +1791,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 10.sp, top: 10.sp,right: 10.sp),
|
margin: EdgeInsets.only(left: 10.sp, top: 10.sp, right: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
desc,
|
desc,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -1898,4 +1932,3 @@ class _InventDescItemState extends State<InventDescItem> {
|
|||||||
isScrollControlled: true, enableDrag: false);
|
isScrollControlled: true, enableDrag: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class LoginLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sharedPreferences!.containsKey(SharedPreferencesHelper.firstLogin)) {
|
if (sharedPreferences!.containsKey(SharedPreferencesHelper.firstLogin) && pwd.isNotEmpty) {
|
||||||
loginType = 1;
|
loginType = 1;
|
||||||
pwdEditingController.text = pwd;
|
pwdEditingController.text = pwd;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,6 +78,8 @@ class MinefragmentLogic extends GetxController {
|
|||||||
|
|
||||||
AssetsDataData? myAssest;
|
AssetsDataData? myAssest;
|
||||||
|
|
||||||
|
bool isShowserveTip = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
@ -94,6 +96,9 @@ class MinefragmentLogic extends GetxController {
|
|||||||
} else {
|
} else {
|
||||||
isProxy = false;
|
isProxy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isShowserveTip = sp.getBool(SharedPreferencesHelper.serveTip) ?? true;
|
||||||
|
|
||||||
loadRelationTypeFirstListData();
|
loadRelationTypeFirstListData();
|
||||||
checkShowPositiveFeedBack();
|
checkShowPositiveFeedBack();
|
||||||
getMode();
|
getMode();
|
||||||
@ -109,6 +114,10 @@ class MinefragmentLogic extends GetxController {
|
|||||||
loadDyanmicListData();
|
loadDyanmicListData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setSpServeTip() async {
|
||||||
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
|
sp.setBool(SharedPreferencesHelper.serveTip, false);
|
||||||
|
}
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
getMode();
|
getMode();
|
||||||
@ -209,7 +218,7 @@ class MinefragmentLogic extends GetxController {
|
|||||||
var data =
|
var data =
|
||||||
await DioManager.instance.get(url: Api.getVisitorMsgs,);
|
await DioManager.instance.get(url: Api.getVisitorMsgs,);
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
recent_visit_count_new = data['data']['unreadCount'] ?? 0;
|
recent_visit_count_new = data['data']['newVisitorCount'] ?? 0;
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -524,7 +524,7 @@ class _MineFuncItemState extends State<MineFuncItem> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'帮助与反馈',
|
'客服与反馈',
|
||||||
style: TextStyle(color: Colors.white,fontSize: 14.sp),
|
style: TextStyle(color: Colors.white,fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp),
|
SizedBox(width: 4.sp),
|
||||||
|
|||||||
@ -257,8 +257,9 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap:() {
|
onTap: () {
|
||||||
Get.toNamed(Routes.GiftShopPage,arguments: '');
|
Get.toNamed(Routes.GiftShopPage,
|
||||||
|
arguments: '');
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
@ -314,7 +315,9 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 22.sp,
|
height: 22.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
(logic.myInfoBean?.contact?.isEmpty ?? true) ? '填写微信赚钱': '设置联系方式',
|
(logic.myInfoBean?.contact?.isEmpty ?? true)
|
||||||
|
? '填写微信赚钱'
|
||||||
|
: '设置联系方式',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 13.sp),
|
color: Colors.white, fontSize: 13.sp),
|
||||||
),
|
),
|
||||||
@ -367,31 +370,85 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
isShowMenu = false;
|
isShowMenu = false;
|
||||||
logic.update();
|
logic.update();
|
||||||
}),
|
}),
|
||||||
Positioned(bottom: 20.sp,right: 15.sp,child: InkWell(
|
if (logic.isShowserveTip)
|
||||||
|
Positioned(
|
||||||
|
child: Container(
|
||||||
|
width: Get.width,
|
||||||
|
height: Get.height,
|
||||||
|
color: Colors.black.withOpacity(0.7),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
bottom: 130.sp,
|
||||||
|
right: 30.sp,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getMineImage('bubble_icon'),
|
||||||
|
width: 174.sp,
|
||||||
|
),
|
||||||
|
Container(margin: EdgeInsets.only(bottom: 10.sp),child: Text('产品反馈或在线客服',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),))
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
bottom: 95.sp,
|
||||||
|
right: 40.sp,
|
||||||
|
child: Image.asset(
|
||||||
|
getMineImage('hand_icon'),
|
||||||
|
width: 32.sp,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
bottom: 20.sp,
|
||||||
|
right: 15.sp,
|
||||||
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.HelpPage);
|
Get.toNamed(Routes.HelpPage);
|
||||||
|
logic.isShowserveTip = false;
|
||||||
|
logic.setSpServeTip();
|
||||||
|
logic.update();
|
||||||
},
|
},
|
||||||
child: Container(
|
|
||||||
height: 50.sp,
|
|
||||||
width: 50.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: AppColor.mainVerLinearGradient,
|
|
||||||
borderRadius: BorderRadius.circular(25.sp)
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Container(
|
||||||
|
height: 50.sp,
|
||||||
|
width: 50.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(25.sp)),
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
getMineImage('cs_icon'),
|
getMineImage('cs_icon'),
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 4.sp),
|
||||||
|
child: Text(
|
||||||
|
'客服与反馈',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white,
|
||||||
|
shadows: [
|
||||||
|
Shadow(
|
||||||
|
color: Colors.black,
|
||||||
|
offset: Offset(0.0, -1))
|
||||||
|
]
|
||||||
|
),
|
||||||
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -484,7 +541,8 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
child: Container(
|
child: Container(
|
||||||
height: 22.sp,
|
height: 22.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
padding:
|
||||||
|
EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.mainBgColor,
|
color: AppColor.mainBgColor,
|
||||||
borderRadius: BorderRadius.circular(4.sp)),
|
borderRadius: BorderRadius.circular(4.sp)),
|
||||||
@ -527,12 +585,11 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
SizedBox(width: 8.sp),
|
SizedBox(width: 8.sp),
|
||||||
if ((logic.userInfoBean?.mark ?? 0) > 0)
|
if ((logic.userInfoBean?.mark ?? 0) > 0)
|
||||||
UserTagWidget(logic.userInfoBean!.mark!),
|
UserTagWidget(logic.userInfoBean!.mark!),
|
||||||
if (logic.isAuth)
|
if (logic.isAuth) SizedBox(width: 4.sp),
|
||||||
SizedBox(width: 4.sp),
|
|
||||||
if (logic.isAuth)
|
if (logic.isAuth)
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getMineImage("auth")),
|
image: AssetImage(getMineImage("auth")),
|
||||||
height:18.sp,
|
height: 18.sp,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -871,7 +928,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(left: 24.sp,right: 5.sp),
|
margin: EdgeInsets.only(left: 24.sp, right: 5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.userInfoBean != null
|
controller.userInfoBean != null
|
||||||
@ -2496,7 +2553,6 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (logic.userInfoBean?.avatarNonhuman == 0)
|
if (logic.userInfoBean?.avatarNonhuman == 0)
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
|
|||||||
@ -38,6 +38,8 @@ class MsgLogic extends GetxController {
|
|||||||
List visitorMsgs = [];
|
List visitorMsgs = [];
|
||||||
List bannerList = [];
|
List bannerList = [];
|
||||||
|
|
||||||
|
bool isMsgCountLoad = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
@ -200,6 +202,8 @@ class MsgLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void getVisitorMsgsData() async {
|
void getVisitorMsgsData() async {
|
||||||
|
if (isMsgCountLoad) return;
|
||||||
|
isMsgCountLoad = true;
|
||||||
var data =
|
var data =
|
||||||
await DioManager.getInstance().get(url: Api.getVisitorMsgs);
|
await DioManager.getInstance().get(url: Api.getVisitorMsgs);
|
||||||
if (data["code"] == 200) {
|
if (data["code"] == 200) {
|
||||||
@ -208,6 +212,7 @@ class MsgLogic extends GetxController {
|
|||||||
await loadVisitorTotalData();
|
await loadVisitorTotalData();
|
||||||
await loadInterestedInMeUsersData();
|
await loadInterestedInMeUsersData();
|
||||||
}
|
}
|
||||||
|
isMsgCountLoad = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -209,7 +209,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
width: 20.sp,
|
width: 20.sp,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'帮助与反馈',
|
'客服与反馈',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 15.sp),
|
fontSize: 15.sp),
|
||||||
@ -371,7 +371,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
info['ta']['nickname'] ?? '',
|
info['ta']['nickname'] ?? '',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white70,
|
color: Colors.white,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
@ -392,7 +392,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
info['msg'],
|
info['msg'],
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Colors.white54, fontSize: 14.sp),
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class QuickLogic extends GetxController {
|
|||||||
var data =
|
var data =
|
||||||
await DioManager.instance.post(url: Api.queryQuickChatUserV2, params: {
|
await DioManager.instance.post(url: Api.queryQuickChatUserV2, params: {
|
||||||
'page': type == 1 ? page : page1,
|
'page': type == 1 ? page : page1,
|
||||||
'pageSize': 20,
|
'pageSize': 10,
|
||||||
'sortType': type,
|
'sortType': type,
|
||||||
'wantMeet': wantMeet,
|
'wantMeet': wantMeet,
|
||||||
"lat": position?.latitude ?? 0,
|
"lat": position?.latitude ?? 0,
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class _OnlineRecommandDialogState extends State<OnlineRecommandDialog> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.bgColor,
|
color: AppColor.bgColor,
|
||||||
borderRadius: BorderRadius.circular(10.sp)),
|
borderRadius: BorderRadius.circular(10.sp)),
|
||||||
margin: EdgeInsets.only(left: 30.sp, right: 30.sp),
|
margin: EdgeInsets.only(left: widget.userList.length == 3 ? 5 : 30.sp, right: widget.userList.length == 3 ? 5 : 15.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -322,6 +322,7 @@ class _OnlineRecommandDialogState extends State<OnlineRecommandDialog> {
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 4.sp,
|
left: 4.sp,
|
||||||
|
top: 4.sp,
|
||||||
),
|
),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage(item.vip == 1 ? 'vip' : 'year_vip'),
|
getCircleImage(item.vip == 1 ? 'vip' : 'year_vip'),
|
||||||
|
|||||||
@ -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 ? 230.sp : 460.sp) : (!widget.isMore ? 190.sp :430.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)) ,
|
||||||
// 460.sp : 430.sp,
|
// 460.sp : 430.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFF393949),
|
color: const Color(0xFF393949),
|
||||||
@ -129,7 +129,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// SizedBox(height: 20.0.sp),
|
// SizedBox(height: 20.0.sp),
|
||||||
if (Platform.isAndroid)
|
if (Platform.isAndroid && widget.isMore)
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 0.sp, bottom: 20.sp),
|
margin: EdgeInsets.only(top: 0.sp, bottom: 20.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -437,8 +437,17 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
|||||||
var data = Autogenerated.fromJson(result);
|
var data = Autogenerated.fromJson(result);
|
||||||
if (data.prices != null) {
|
if (data.prices != null) {
|
||||||
prices = data.prices!;
|
prices = data.prices!;
|
||||||
|
if (wxInfo['price'] != null) {
|
||||||
|
List<Prices> pricesList = [];
|
||||||
|
pricesList.add(prices.first);
|
||||||
|
prices.forEach((element) {
|
||||||
|
print('当前价格:${element.curPrice!} 需支付价格:${wxInfo['price'] * 0.01}');
|
||||||
|
if (element.curPrice! > wxInfo['price'] * 0.01 && !pricesList.contains(element)) {
|
||||||
|
pricesList.add(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
prices = pricesList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
@ -468,7 +477,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
|||||||
Get.back(result: 1);
|
Get.back(result: 1);
|
||||||
} else {
|
} else {
|
||||||
showOKToast(result['msg']);
|
showOKToast(result['msg']);
|
||||||
if (result['code'] == 10081) {
|
if (result['code'] == 10081 || result['code'] == 31201) {
|
||||||
showRechargeScreenDialog('unlock_contact');
|
showRechargeScreenDialog('unlock_contact');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import '../../../utils/util.dart';
|
|||||||
class WxEditDialog extends StatefulWidget {
|
class WxEditDialog extends StatefulWidget {
|
||||||
String phone;
|
String phone;
|
||||||
|
|
||||||
WxEditDialog(this.phone,{super.key});
|
WxEditDialog(this.phone, {super.key});
|
||||||
@override
|
@override
|
||||||
_WxEditDialogState createState() => _WxEditDialogState();
|
_WxEditDialogState createState() => _WxEditDialogState();
|
||||||
}
|
}
|
||||||
@ -33,10 +33,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
|
|
||||||
Map wxStatusInfo = {};
|
Map wxStatusInfo = {};
|
||||||
|
|
||||||
|
String content = '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
loadDescData();
|
||||||
loadMyWxInfoData();
|
loadMyWxInfoData();
|
||||||
loadWxStatus();
|
loadWxStatus();
|
||||||
// updateWxText();
|
// updateWxText();
|
||||||
@ -58,8 +61,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
height: 455.sp,
|
height: 520.sp,
|
||||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -92,7 +95,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 10.sp,top: 15.sp),
|
margin: EdgeInsets.only(bottom: 10.sp, top: 15.sp),
|
||||||
// height: 30.sp,
|
// height: 30.sp,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -104,66 +107,75 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
getMineImage(type == 1 ? 'phone_icon' : type == 3 ? 'qq' : 'wx'),
|
getMineImage(type == 1
|
||||||
|
? 'phone_icon'
|
||||||
|
: type == 3
|
||||||
|
? 'qq'
|
||||||
|
: 'wx'),
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
margin: EdgeInsets.only(
|
||||||
child: Icon(Icons.change_circle,color: AppColor.mainColor,size: 30.sp,)),
|
left: 4.sp, right: 4.sp),
|
||||||
|
child: Icon(
|
||||||
|
Icons.change_circle,
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
size: 30.sp,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(child: Container(
|
Expanded(
|
||||||
|
child: Container(
|
||||||
margin: EdgeInsets.only(right: 15.sp),
|
margin: EdgeInsets.only(right: 15.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF260C3E),
|
color: Color(0xFF260C3E),
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
border: GradientBoxBorder(
|
border: GradientBoxBorder(
|
||||||
gradient:
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
AppColor.mainVerLinearGradient,
|
|
||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller:
|
controller: wxEditingController,
|
||||||
wxEditingController,
|
|
||||||
maxLength: 20,
|
maxLength: 20,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white, fontSize: 16.sp),
|
||||||
fontSize: 16.sp),
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请输入真实的联系方式',
|
hintText: '请输入真实的联系方式',
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Colors.white70,
|
color: Colors.white70, fontSize: 14.sp),
|
||||||
fontSize: 14.sp),
|
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
counterText: '',
|
counterText: '',
|
||||||
contentPadding:
|
contentPadding: EdgeInsets.only(left: 14.sp)),
|
||||||
EdgeInsets.only(
|
|
||||||
left: 14.sp)),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (wxInfo.containsKey('hideContact')) {
|
if (wxInfo.containsKey('hideContact')) {
|
||||||
wxInfo['hideContact'] = wxInfo['hideContact'] == 0 ? 1 : 0;
|
wxInfo['hideContact'] =
|
||||||
|
wxInfo['hideContact'] == 0 ? 1 : 0;
|
||||||
} else {
|
} else {
|
||||||
wxInfo['hideContact'] = 0;
|
wxInfo['hideContact'] = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
showOKToast(wxInfo['hideContact'] == 1 ? '已对其他人隐藏联系方式' : '已对其他人展示联系方式(需要解锁)');
|
showOKToast(wxInfo['hideContact'] == 1
|
||||||
setState(() {
|
? '已对其他人隐藏联系方式'
|
||||||
|
: '已对其他人展示联系方式(需要解锁)');
|
||||||
});
|
setState(() {});
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(getMineImage(wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] == 1 ? 'no_show_icon' : 'show_icon' : 'show_icon'),width: 30.sp,),
|
Image.asset(
|
||||||
|
getMineImage(
|
||||||
|
wxInfo.containsKey('hideContact')
|
||||||
|
? wxInfo['hideContact'] == 1
|
||||||
|
? 'no_show_icon'
|
||||||
|
: 'show_icon'
|
||||||
|
: 'show_icon'),
|
||||||
|
width: 30.sp,
|
||||||
|
),
|
||||||
//已隐藏 显示中
|
//已隐藏 显示中
|
||||||
Text(
|
Text(
|
||||||
wxInfo.containsKey('hideContact')
|
wxInfo.containsKey('hideContact')
|
||||||
@ -172,7 +184,9 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
: '显示中'
|
: '显示中'
|
||||||
: '显示中',
|
: '显示中',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xCCFFFFFF).withOpacity(0.5), fontSize: 14.sp),
|
color:
|
||||||
|
Color(0xCCFFFFFF).withOpacity(0.5),
|
||||||
|
fontSize: 14.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
@ -185,31 +199,23 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
color: Color(0xFF260C3E),
|
color: Color(0xFF260C3E),
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
border: GradientBoxBorder(
|
border: GradientBoxBorder(
|
||||||
gradient:
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
AppColor.mainVerLinearGradient,
|
|
||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller:
|
controller: descEditingController,
|
||||||
descEditingController,
|
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
style: TextStyle(
|
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 16.sp),
|
|
||||||
// keyboardType: TextInputType.phone,
|
// keyboardType: TextInputType.phone,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请输入解锁引导语',
|
hintText: '请输入解锁引导语',
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Colors.white70,
|
color: Colors.white70, fontSize: 14.sp),
|
||||||
fontSize: 14.sp),
|
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
counterText: '',
|
counterText: '',
|
||||||
contentPadding:
|
contentPadding: EdgeInsets.only(left: 14.sp)),
|
||||||
EdgeInsets.only(
|
|
||||||
left: 14.sp)),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
@ -220,13 +226,19 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
width: 18.sp,
|
width: 18.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
),
|
),
|
||||||
SizedBox(width: 2.sp,),
|
SizedBox(
|
||||||
Text('设置解锁价格',style: TextStyle(color: Color(0xCCFFFFFF),fontSize: 14.sp),),
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'设置解锁价格',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCFFFFFF), fontSize: 14.sp),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 60.sp,
|
width: 60.sp,
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(left: 5.sp,right: 5.sp),
|
margin: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF260C3E),
|
color: Color(0xFF260C3E),
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
@ -238,20 +250,17 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: TextField(
|
Expanded(
|
||||||
controller:
|
child: TextField(
|
||||||
moneyEditingController,
|
controller: moneyEditingController,
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white, fontSize: 14.sp),
|
||||||
fontSize: 14.sp),
|
|
||||||
keyboardType: TextInputType.phone,
|
keyboardType: TextInputType.phone,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
.digitsOnly,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '',
|
hintText: '',
|
||||||
isCollapsed: true,
|
isCollapsed: true,
|
||||||
@ -260,31 +269,39 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
counterText: '',
|
counterText: '',
|
||||||
contentPadding:
|
contentPadding: EdgeInsets.only(
|
||||||
EdgeInsets.only(
|
left: 6.sp,
|
||||||
left: 6.sp,right: 6.sp,bottom: 0,top: 0)),
|
right: 6.sp,
|
||||||
|
bottom: 0,
|
||||||
|
top: 0)),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text('元',style: TextStyle(color: Color(0xCCFFFFFF),fontSize: 14.sp),),
|
|
||||||
Text(
|
Text(
|
||||||
'(解锁收益都归您)',
|
'元',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xCCFFFFFF).withOpacity(0.5), fontSize: 14.sp),
|
color: Color(0xCCFFFFFF), fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'(可填10-520)',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCFFFFFF).withOpacity(0.5),
|
||||||
|
fontSize: 14.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
child: Text('温馨提示:\n'
|
child: Text(
|
||||||
+ '1、为了维护站内的社交环境,若检测到为不实的联系方式,或以非社交为目的的其他非法用途,会第一时间将您账号封禁,并扣除相关奖励;\n'
|
'温馨提示:\n' + '${content}',
|
||||||
+ '2、解锁引导语可以让更多的人愿意解锁您的联系方式,让您赚更多的钱;\n'
|
style: TextStyle(
|
||||||
+ '3、每个人解锁后,您都可以得到设置价格的钱,收益无上限哦;\n'
|
height: 1.5,
|
||||||
+ '4、此外,还可获得几重奖励。',style: TextStyle(color: Color(0xCCFFFFFF).withOpacity(0.5),fontSize: 14.sp),),
|
color: Color(0xCCFFFFFF).withOpacity(0.5),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
@ -299,7 +316,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
width: 100.sp,
|
width: 100.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
padding:
|
||||||
|
EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(bottom: 10.sp),
|
margin: EdgeInsets.only(bottom: 10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.grey.withOpacity(0.7),
|
color: Colors.grey.withOpacity(0.7),
|
||||||
@ -320,12 +338,16 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
if (wxEditingController.text.length == 11) {
|
if (wxEditingController.text.length == 11) {
|
||||||
RegExp exp = RegExp(
|
RegExp exp = RegExp(
|
||||||
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
|
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
|
||||||
isPass = exp.hasMatch(wxEditingController.text);
|
isPass =
|
||||||
|
exp.hasMatch(wxEditingController.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxEditingController.text.isNotEmpty && !isPass) {
|
if (wxEditingController.text.isNotEmpty &&
|
||||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
!isPass) {
|
||||||
if (!wxReg.hasMatch(wxEditingController.text)) {
|
RegExp wxReg = RegExp(
|
||||||
|
r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||||
|
if (!wxReg
|
||||||
|
.hasMatch(wxEditingController.text)) {
|
||||||
showOKToast('请输入正确的微信号');
|
showOKToast('请输入正确的微信号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -340,7 +362,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
if (wxEditingController.text.length == 11) {
|
if (wxEditingController.text.length == 11) {
|
||||||
RegExp exp = RegExp(
|
RegExp exp = RegExp(
|
||||||
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
|
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
|
||||||
isPass = exp.hasMatch(wxEditingController.text);
|
isPass =
|
||||||
|
exp.hasMatch(wxEditingController.text);
|
||||||
}
|
}
|
||||||
if (!isPass) {
|
if (!isPass) {
|
||||||
showOKToast('请输入正确的手机号');
|
showOKToast('请输入正确的手机号');
|
||||||
@ -348,37 +371,42 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (moneyEditingController.text.isNotEmpty) {
|
if (moneyEditingController.text.isNotEmpty) {
|
||||||
if (int.parse(moneyEditingController.text) <= 0) {
|
if (int.parse(moneyEditingController.text) <=
|
||||||
|
0) {
|
||||||
showOKToast('请设置联系方式解锁金额大于零');
|
showOKToast('请设置联系方式解锁金额大于零');
|
||||||
return;
|
return;
|
||||||
} else if (int.parse(moneyEditingController.text) > 300 || int.parse(moneyEditingController.text) < 10) {
|
} else if (int.parse(
|
||||||
showOKToast('请设置联系方式解锁金额在10元~300元之间');
|
moneyEditingController.text) >
|
||||||
|
520 ||
|
||||||
|
int.parse(moneyEditingController.text) <
|
||||||
|
10) {
|
||||||
|
showOKToast('请填写解锁金额在10元-520元之间');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (wxInfo.containsKey('10034')) {
|
if (wxInfo.containsKey('10034')) {
|
||||||
showOKToast(wxInfo['10034']);
|
showOKToast(wxInfo['10034']);
|
||||||
return;
|
return;
|
||||||
} else if (wxInfo.containsKey('10595')) {
|
} else if (wxInfo.containsKey('10595')) {
|
||||||
showOKToast(wxInfo['10595']);
|
showOKToast(wxInfo['10595']);
|
||||||
}
|
}
|
||||||
Map<String,dynamic> params = { "guideText": descEditingController.text,
|
Map<String, dynamic> params = {
|
||||||
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
"guideText": descEditingController.text,
|
||||||
|
"hideContact": wxInfo.containsKey('hideContact')
|
||||||
'contactType':type,
|
? wxInfo['hideContact']
|
||||||
"contact": wxEditingController.text};
|
: 0,
|
||||||
|
'contactType': type,
|
||||||
|
"contact": wxEditingController.text
|
||||||
|
};
|
||||||
|
|
||||||
if (moneyEditingController.text.isNotEmpty) {
|
if (moneyEditingController.text.isNotEmpty) {
|
||||||
params['price'] = moneyEditingController.text;
|
params['price'] = moneyEditingController.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var result = await DioManager()
|
||||||
var result = await DioManager().postBody(url: Api.confset,params: params);
|
.postBody(url: Api.confset, params: params);
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showOKToast('已设置成功,快去邀请圈友解锁呗~');
|
showOKToast('已设置成功,快去邀请圈友解锁呗~');
|
||||||
Get.back();
|
Get.back();
|
||||||
@ -390,13 +418,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
width: 100.sp,
|
width: 100.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
padding:
|
||||||
|
EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||||
margin: EdgeInsets.only(bottom: 10.sp),
|
margin: EdgeInsets.only(bottom: 10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: const Color(0xFFFF4D7C),
|
// color: const Color(0xFFFF4D7C),
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
gradient: AppColor.mainVerLinearGradient
|
gradient: AppColor.mainVerLinearGradient),
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'确认',
|
'确认',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -408,7 +436,6 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -432,14 +459,15 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
|
|
||||||
void updateWxText() async {
|
void updateWxText() async {
|
||||||
if (widget.phone.isNotEmpty) {
|
if (widget.phone.isNotEmpty) {
|
||||||
SharedPreferences sharedPreferences =await SharedPreferences.getInstance();
|
SharedPreferences sharedPreferences =
|
||||||
String loginPhone = await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE)??"";
|
await SharedPreferences.getInstance();
|
||||||
|
String loginPhone = await sharedPreferences
|
||||||
|
.getString(SharedPreferencesHelper.LOGINPHONE) ??
|
||||||
|
"";
|
||||||
wxEditingController.text = loginPhone;
|
wxEditingController.text = loginPhone;
|
||||||
type = 1;
|
type = 1;
|
||||||
wxInfo['hideContact'] = 0;
|
wxInfo['hideContact'] = 0;
|
||||||
setState(() {
|
setState(() {});
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,18 +482,20 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
} else {
|
} else {
|
||||||
wxEditingController.text = wxInfo['contact'] ?? '';
|
wxEditingController.text = wxInfo['contact'] ?? '';
|
||||||
type = wxInfo['contactType'] ?? 2;
|
type = wxInfo['contactType'] ?? 2;
|
||||||
wxInfo['hideContact'] = wxInfo['hideContact'] == null ? 0 : wxInfo['hideContact'];
|
wxInfo['hideContact'] =
|
||||||
|
wxInfo['hideContact'] == null ? 0 : wxInfo['hideContact'];
|
||||||
descEditingController.text = wxInfo['guideText'] ?? '';
|
descEditingController.text = wxInfo['guideText'] ?? '';
|
||||||
moneyEditingController.text = wxInfo['price'] != null ? wxInfo['price'].toString() : '';
|
moneyEditingController.text =
|
||||||
setState(() {
|
wxInfo['price'] != null ? wxInfo['price'].toString() : '';
|
||||||
|
setState(() {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadWxStatus() async {
|
void loadWxStatus() async {
|
||||||
var result = await DioManager.getInstance().get(url: Api.updateWxNumState,);
|
var result = await DioManager.getInstance().get(
|
||||||
|
url: Api.updateWxNumState,
|
||||||
|
);
|
||||||
if (result['code'] == 10034) {
|
if (result['code'] == 10034) {
|
||||||
wxInfo['10034'] = result['msg'];
|
wxInfo['10034'] = result['msg'];
|
||||||
} else if (result['code'] == 10595) {
|
} else if (result['code'] == 10595) {
|
||||||
@ -487,9 +517,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
type = 1;
|
type = 1;
|
||||||
setState(() {
|
setState(() {});
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: Text('手机号'),
|
child: Text('手机号'),
|
||||||
),
|
),
|
||||||
@ -497,9 +525,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
type = 3;
|
type = 3;
|
||||||
setState(() {
|
setState(() {});
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: Text('QQ'),
|
child: Text('QQ'),
|
||||||
),
|
),
|
||||||
@ -507,9 +533,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
type = 2;
|
type = 2;
|
||||||
setState(() {
|
setState(() {});
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: Text('微信'),
|
child: Text('微信'),
|
||||||
),
|
),
|
||||||
@ -525,4 +549,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
isScrollControlled: true);
|
isScrollControlled: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void loadDescData() async {
|
||||||
|
var data = await DioManager.instance.get(url: Api.contactGuide,);
|
||||||
|
if (data['code'] == 10000) {
|
||||||
|
content = data['content'];
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -379,7 +379,7 @@ class Api {
|
|||||||
static const wahtWxNum = '/user-service/user/updateWxNum/notice/';
|
static const wahtWxNum = '/user-service/user/updateWxNum/notice/';
|
||||||
|
|
||||||
//小票解锁微信
|
//小票解锁微信
|
||||||
static const balanceUnlockWX = '/user-service/contact/unlock/balance';
|
static const balanceUnlockWX = '/user-service/contact/unlock/balanceV2';
|
||||||
|
|
||||||
//获取用户解锁微信号设置信息
|
//获取用户解锁微信号设置信息
|
||||||
static const wxNumConfig = '/user-service/contact/user/conf/get/';
|
static const wxNumConfig = '/user-service/contact/user/conf/get/';
|
||||||
@ -684,4 +684,22 @@ class Api {
|
|||||||
//单个喊话详情
|
//单个喊话详情
|
||||||
static var signCalloutDetail = '/up-service/callout/id';
|
static var signCalloutDetail = '/up-service/callout/id';
|
||||||
|
|
||||||
|
//联系方式弹窗引导文案
|
||||||
|
static var contactGuide = '/user-service/content/popup/contact/guide';
|
||||||
|
|
||||||
|
//喊话互动
|
||||||
|
static var interactEmoji = '/up-service/callout/interact/emoji';
|
||||||
|
|
||||||
|
//圈子代理人说明
|
||||||
|
static var agentManual = '/user-service/content/popup/interest/agent/manual';
|
||||||
|
|
||||||
|
//代理人权益
|
||||||
|
static var agentRights = '/user-service/content/popup/interest/agent/rights';
|
||||||
|
|
||||||
|
//圈子代理人价格
|
||||||
|
static var buyInterestAgentPrice = '/mall-service/mall/wallet/trade/buyInterestAgent/price';
|
||||||
|
|
||||||
|
//购买圈子代理人
|
||||||
|
static var buyInterestAgent = '/mall-service/mall/wallet/trade/buyInterestAgent';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'dart:math';
|
|||||||
import 'package:circle_app/router/routers.dart';
|
import 'package:circle_app/router/routers.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:dio/io.dart';
|
||||||
import 'package:flutter_bugly/flutter_bugly.dart';
|
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||||
|
|
||||||
import '../utils/SharedPreferencesHelper.dart';
|
import '../utils/SharedPreferencesHelper.dart';
|
||||||
@ -36,6 +37,11 @@ class DioManager {
|
|||||||
return _instance!;
|
return _instance!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CancelToken _globalCancelToken = CancelToken(); // 添加全局CancelToken
|
||||||
|
|
||||||
|
// 存储每个请求的 CancelToken
|
||||||
|
Map<String, CancelToken> _cancelTokens = {};
|
||||||
|
|
||||||
Dio? _dio;
|
Dio? _dio;
|
||||||
|
|
||||||
DioManager._init() {
|
DioManager._init() {
|
||||||
@ -47,21 +53,30 @@ class DioManager {
|
|||||||
connectTimeout: const Duration(seconds: 15),
|
connectTimeout: const Duration(seconds: 15),
|
||||||
// 接收数据的最长时限
|
// 接收数据的最长时限
|
||||||
receiveTimeout: const Duration(seconds: 15),
|
receiveTimeout: const Duration(seconds: 15),
|
||||||
|
|
||||||
));
|
));
|
||||||
_dio!.interceptors.add(LogInterceptor(
|
_dio!.interceptors.add(LogInterceptor(
|
||||||
responseBody: true,
|
responseBody: true,
|
||||||
));
|
));
|
||||||
_dio!.interceptors.add(ConnectivityInterceptor());
|
_dio!.interceptors.add(TimingInterceptor()); // 添加拦截器
|
||||||
|
// _dio?.httpClientAdapter = IOHttpClientAdapter()
|
||||||
|
// ..createHttpClient = () {
|
||||||
|
// // 设置最大连接数
|
||||||
|
// HttpClient client = HttpClient();
|
||||||
|
// client.idleTimeout = Duration(seconds: 15); // 连接池的空闲超时
|
||||||
|
// client.maxConnectionsPerHost = 15; // 设置同一主机的最大连接数为 15
|
||||||
|
// return client;
|
||||||
|
// };
|
||||||
}
|
}
|
||||||
|
|
||||||
setDioTimeOut(int time) {
|
setDioTimeOut(int time) {
|
||||||
_dio!.options.connectTimeout = Duration(milliseconds: time);
|
_dio?.options.connectTimeout = Duration(milliseconds: time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setDioBaseUrl(String url) {
|
setDioBaseUrl(String url) {
|
||||||
if (url != _dio!.options.baseUrl && _dio!.options.baseUrl == Api.testBaseUrl)
|
if (url != _dio!.options.baseUrl && _dio!.options.baseUrl == Api.testBaseUrl)
|
||||||
_dio!.options = BaseOptions(
|
_dio?.options = BaseOptions(
|
||||||
// 请求基地址
|
// 请求基地址
|
||||||
baseUrl: url,
|
baseUrl: url,
|
||||||
// 连接服务器超时时间,单位是毫秒
|
// 连接服务器超时时间,单位是毫秒
|
||||||
@ -71,12 +86,25 @@ class DioManager {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cancelAllRequest() {
|
||||||
|
// _globalCancelToken.cancel("用户登出,取消所有请求");
|
||||||
|
// _globalCancelToken = CancelToken(); // 重新初始化 CancelToken 以便后续请求
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成请求 Key(根据 URL 和参数)
|
||||||
|
String _generateRequestKey(String url, Map<String, dynamic>? params) {
|
||||||
|
return "$url-${params?.toString() ?? ''}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setReceiveTimeout (int time) {
|
setReceiveTimeout (int time) {
|
||||||
_dio!.options = BaseOptions(
|
_dio!.options = BaseOptions(
|
||||||
// 请求基地址
|
// 请求基地址
|
||||||
baseUrl: _dio!.options!.baseUrl,
|
baseUrl: _dio!.options!.baseUrl,
|
||||||
// 连接服务器超时时间,单位是毫秒
|
// 连接服务器超时时间,单位是毫秒
|
||||||
connectTimeout: const Duration(seconds: 30),
|
connectTimeout: const Duration(seconds: 15),
|
||||||
// 接收数据的最长时限
|
// 接收数据的最长时限
|
||||||
receiveTimeout: Duration(seconds: time),
|
receiveTimeout: Duration(seconds: time),
|
||||||
);
|
);
|
||||||
@ -240,6 +268,20 @@ class DioManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print(">>>>>$params");
|
print(">>>>>$params");
|
||||||
|
// 如果没有提供 CancelToken,则使用全局的
|
||||||
|
cancelToken ??= _globalCancelToken;
|
||||||
|
|
||||||
|
String key = _generateRequestKey(url, params ?? {});
|
||||||
|
|
||||||
|
// 如果该请求已经存在,则取消上一个
|
||||||
|
if (_cancelTokens.containsKey(key)) {
|
||||||
|
_cancelTokens[key]!.cancel("重复请求,取消上一个");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建新的 CancelToken
|
||||||
|
cancelToken = CancelToken();
|
||||||
|
_cancelTokens[key] = cancelToken;
|
||||||
|
|
||||||
|
|
||||||
/// 不同请求方法,不同的请求参数,按实际项目需求分.
|
/// 不同请求方法,不同的请求参数,按实际项目需求分.
|
||||||
/// 这里 get 是 queryParameters,其它用 data. FormData 也是 data
|
/// 这里 get 是 queryParameters,其它用 data. FormData 也是 data
|
||||||
@ -247,7 +289,7 @@ class DioManager {
|
|||||||
switch (method) {
|
switch (method) {
|
||||||
case DioMethod.get:
|
case DioMethod.get:
|
||||||
response = await _dio!
|
response = await _dio!
|
||||||
.request(url, queryParameters: params, options: options);
|
.request(url, queryParameters: params, options: options,cancelToken: cancelToken);
|
||||||
break;
|
break;
|
||||||
case DioMethod.post:
|
case DioMethod.post:
|
||||||
response = await _dio!.post(url,
|
response = await _dio!.post(url,
|
||||||
@ -259,11 +301,11 @@ class DioManager {
|
|||||||
break;
|
break;
|
||||||
case DioMethod.put:
|
case DioMethod.put:
|
||||||
response =
|
response =
|
||||||
await _dio!.put(url, data: json.encode(params), options: options);
|
await _dio!.put(url, data: json.encode(params), options: options,cancelToken: cancelToken);
|
||||||
break;
|
break;
|
||||||
case DioMethod.delete:
|
case DioMethod.delete:
|
||||||
response = await _dio!
|
response = await _dio!
|
||||||
.delete(url, queryParameters: params, options: options);
|
.delete(url, queryParameters: params, options: options,cancelToken: cancelToken);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// 如果有formData参数,说明是传文件,忽略params的参数
|
// 如果有formData参数,说明是传文件,忽略params的参数
|
||||||
@ -278,6 +320,9 @@ class DioManager {
|
|||||||
data: params, cancelToken: cancelToken, options: options);
|
data: params, cancelToken: cancelToken, options: options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 请求完成后移除 token
|
||||||
|
_cancelTokens.remove(key);
|
||||||
// json转model
|
// json转model
|
||||||
String jsonStr = json.encode(response.data);
|
String jsonStr = json.encode(response.data);
|
||||||
Map<String, dynamic> responseMap = json.decode(jsonStr);
|
Map<String, dynamic> responseMap = json.decode(jsonStr);
|
||||||
@ -305,6 +350,18 @@ class DioManager {
|
|||||||
}
|
}
|
||||||
return responseMap;
|
return responseMap;
|
||||||
} on DioException catch (e) {
|
} on DioException catch (e) {
|
||||||
|
if (e.type == DioExceptionType.cancel) return {'code': 500, 'msg': ''};
|
||||||
|
print("请求失败: ${e.message}");
|
||||||
|
print("请求URL: ${e.requestOptions.uri}");
|
||||||
|
print("请求Headers: ${e.requestOptions.headers}");
|
||||||
|
print("请求数据: ${e.requestOptions.data}");
|
||||||
|
print("错误类型: ${e.type}"); // 检查 DioErrorType
|
||||||
|
// 获取连接池信息(仅适用于 Dart 原生 HttpClient)
|
||||||
|
// final adapter = _dio!.httpClientAdapter as IOHttpClientAdapter;
|
||||||
|
// HttpClient client = adapter.createHttpClient!();
|
||||||
|
// print("最大连接数: ${client.maxConnectionsPerHost}");
|
||||||
|
|
||||||
|
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||||
return {'code': 500, 'msg': ''};
|
return {'code': 500, 'msg': ''};
|
||||||
@ -432,3 +489,36 @@ class QnTokenData {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TimingInterceptor extends Interceptor {
|
||||||
|
@override
|
||||||
|
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
|
||||||
|
options.extra["startTime"] = DateTime.now(); // 记录开始时间
|
||||||
|
super.onRequest(options, handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onResponse(Response response, ResponseInterceptorHandler handler) {
|
||||||
|
DateTime startTime = response.requestOptions.extra["startTime"];
|
||||||
|
DateTime endTime = DateTime.now();
|
||||||
|
Duration duration = endTime.difference(startTime);
|
||||||
|
|
||||||
|
print("请求 URL: ${response.requestOptions.uri}");
|
||||||
|
print("请求耗时: ${duration.inMilliseconds} ms");
|
||||||
|
|
||||||
|
super.onResponse(response, handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onError(DioException err, ErrorInterceptorHandler handler) {
|
||||||
|
DateTime startTime = err.requestOptions.extra["startTime"];
|
||||||
|
DateTime endTime = DateTime.now();
|
||||||
|
Duration duration = endTime.difference(startTime);
|
||||||
|
|
||||||
|
print("请求失败 URL: ${err.requestOptions.uri}");
|
||||||
|
print("请求失败耗时: ${duration.inMilliseconds} ms");
|
||||||
|
|
||||||
|
super.onError(err, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -40,6 +40,10 @@ class SharedPreferencesHelper {
|
|||||||
|
|
||||||
static const fraudPreventionTip = 'fraudPreventionTip';
|
static const fraudPreventionTip = 'fraudPreventionTip';
|
||||||
|
|
||||||
|
static const nearTip = 'nearTip';
|
||||||
|
|
||||||
|
static const serveTip = 'serveTip';
|
||||||
|
|
||||||
static SharedPreferencesHelper? _instance;
|
static SharedPreferencesHelper? _instance;
|
||||||
static SharedPreferences? _preferences;
|
static SharedPreferences? _preferences;
|
||||||
|
|
||||||
@ -217,6 +221,22 @@ class SharedPreferencesHelper {
|
|||||||
preferences!.setBool(SettingStatus, status);
|
preferences!.setBool(SettingStatus, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> isShowNearLocation() async {
|
||||||
|
String time = await preferences!.getString(nearTip) ?? '';
|
||||||
|
if (time.isNotEmpty) {
|
||||||
|
DateTime dateTime = DateTime.parse(time);
|
||||||
|
bool isShow = !isSameDay(dateTime,DateTime.now());
|
||||||
|
if (isShow) {
|
||||||
|
preferences!.setString(nearTip, DateTime.now().toString());
|
||||||
|
}
|
||||||
|
return isShow;
|
||||||
|
} else {
|
||||||
|
preferences!.setString(nearTip, DateTime.now().toString());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool isSameDay(DateTime time1, DateTime time2) {
|
bool isSameDay(DateTime time1, DateTime time2) {
|
||||||
return time1.year == time2.year &&
|
return time1.year == time2.year &&
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import 'package:circle_app/circle_app/chat/logic.dart';
|
|||||||
import 'package:circle_app/circle_app/chat/view.dart';
|
import 'package:circle_app/circle_app/chat/view.dart';
|
||||||
import 'package:circle_app/circle_app/circle/view.dart';
|
import 'package:circle_app/circle_app/circle/view.dart';
|
||||||
import 'package:circle_app/circle_app/circle/widgets/discover.dart';
|
import 'package:circle_app/circle_app/circle/widgets/discover.dart';
|
||||||
|
import 'package:circle_app/circle_app/circle_list/widgets/apply_for_an_agent_dialog.dart';
|
||||||
import 'package:circle_app/circle_app/userinfo/logic.dart';
|
import 'package:circle_app/circle_app/userinfo/logic.dart';
|
||||||
import 'package:circle_app/circle_app/world_call_out/logic.dart';
|
import 'package:circle_app/circle_app/world_call_out/logic.dart';
|
||||||
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||||
@ -114,6 +115,7 @@ const bgImage = DecorationImage(
|
|||||||
bool isShowToast = false;
|
bool isShowToast = false;
|
||||||
///弹窗文本提示 msg: 提示内容
|
///弹窗文本提示 msg: 提示内容
|
||||||
showOKToast(String msg) {
|
showOKToast(String msg) {
|
||||||
|
if (msg.isEmpty) return;
|
||||||
if (isShowToast) return;
|
if (isShowToast) return;
|
||||||
isShowToast = true;
|
isShowToast = true;
|
||||||
int seconds = msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2;
|
int seconds = msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2;
|
||||||
@ -196,7 +198,7 @@ noResultWidget({String tip = '正在等待被填充~',Function? callBack, String
|
|||||||
tip,
|
tip,
|
||||||
style: TextStyle(color: Color(0xffdbdbdb), fontSize: 15.sp),
|
style: TextStyle(color: Color(0xffdbdbdb), fontSize: 15.sp),
|
||||||
),
|
),
|
||||||
if (callBack != null)
|
if (callBack != null && action.isNotEmpty)
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
callBack();
|
callBack();
|
||||||
@ -204,7 +206,7 @@ noResultWidget({String tip = '正在等待被填充~',Function? callBack, String
|
|||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
height: 42.sp,
|
height: 42.sp,
|
||||||
width: 160.sp,
|
width: action.length > 6 ? 200.sp : 160.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
// padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
// padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -274,6 +276,7 @@ String convertToThousand(int number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushLoginPage() async {
|
pushLoginPage() async {
|
||||||
|
DioManager.getInstance().cancelAllRequest();
|
||||||
await logoutIM();
|
await logoutIM();
|
||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
String loginPhone =
|
String loginPhone =
|
||||||
@ -293,6 +296,7 @@ pushLoginPage() async {
|
|||||||
sharedPreferences.setString(SharedPreferencesHelper.firstLogin, '1');
|
sharedPreferences.setString(SharedPreferencesHelper.firstLogin, '1');
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.UPDATEONE, updateone);
|
sharedPreferences.setString(SharedPreferencesHelper.UPDATEONE, updateone);
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.UPDATE, update);
|
sharedPreferences.setString(SharedPreferencesHelper.UPDATE, update);
|
||||||
|
sharedPreferences.setBool(SharedPreferencesHelper.serveTip, false);
|
||||||
sharedPreferences.setStringList(tipList);
|
sharedPreferences.setStringList(tipList);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -412,6 +416,125 @@ String getRoleContent(int number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showAgentManualDialog(BuildContext context,String msg) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 470.sp,
|
||||||
|
padding: const EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
color: AppColor.bgColor,
|
||||||
|
borderRadius: BorderRadius.circular(12.0.sp),
|
||||||
|
// gradient: const LinearGradient(
|
||||||
|
// colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// margin: EdgeInsets.all(1.sp),
|
||||||
|
// child: Image.asset(getMineImage("im_neglect"),fit: BoxFit.fill,),
|
||||||
|
// ),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 12.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"圈子代理人说明",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
msg,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 130.w,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 40.sp,
|
||||||
|
margin: EdgeInsets.only(top: 16.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20.sp),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Text(
|
||||||
|
"我知道了",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// Get.back();
|
||||||
|
// Get.toNamed(Routes.InvitePage);
|
||||||
|
// },
|
||||||
|
// child: Container(
|
||||||
|
// width: 130.w,
|
||||||
|
// height: 40.sp,
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// margin: EdgeInsets.only(top: 16.sp),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(20.sp),
|
||||||
|
// gradient: AppColor.mainVerLinearGradient,
|
||||||
|
// ),
|
||||||
|
// child: const Text(
|
||||||
|
// "快速体验(98元/月)",
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white,
|
||||||
|
// fontSize: 14,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
typedef void MyCallback(String path);
|
typedef void MyCallback(String path);
|
||||||
|
|
||||||
// Future<void> compressVideo(
|
// Future<void> compressVideo(
|
||||||
@ -723,21 +846,24 @@ Widget circlrPeopleInfoWidget(List<Widget> widgets,Circle bean) {
|
|||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
width:
|
width:
|
||||||
30.0.sp + 15.sp * (widgets.length - 1.sp),
|
30.0.sp + 15.sp * (widgets.length - 1.sp),
|
||||||
child: Stack(
|
child: IgnorePointer(
|
||||||
|
ignoring: true, // true 表示忽略手势,组件不可点击
|
||||||
|
child:Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: widgets,
|
children: widgets,
|
||||||
),
|
)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 4.sp,
|
width: 0.sp,
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'${convertToTenThousand(bean.joinTotal)}圈友加入',
|
'${convertToTenThousand(bean.joinTotal)}圈友加入',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 15.sp),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 4.sp,
|
width: 2.sp,
|
||||||
),
|
),
|
||||||
Image.asset(getCircleImage('more_icon'),width: 20.sp,),
|
Image.asset(getCircleImage('more_icon'),width: 20.sp,),
|
||||||
],
|
],
|
||||||
@ -1739,105 +1865,15 @@ void sendApplyToAgentData(var circleId) async {
|
|||||||
}
|
}
|
||||||
Get.toNamed(Routes.Chat, arguments: con);
|
Get.toNamed(Routes.Chat, arguments: con);
|
||||||
} else if (data['code'] == 32104) {
|
} else if (data['code'] == 32104) {
|
||||||
showReportDialog(Get.context!,data['msg']);
|
showReportDialog(Get.context!,circleId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showReportDialog(BuildContext context,String msg) {
|
void showReportDialog(BuildContext context,String circleId) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Dialog(
|
return ApplyForAnAgentDialog(circleId: int.parse('${circleId}'));
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
child: Container(
|
|
||||||
height: 200.sp,
|
|
||||||
padding: const EdgeInsets.all(1.0),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
color: AppColor.bgColor,
|
|
||||||
borderRadius: BorderRadius.circular(12.0.sp),
|
|
||||||
// gradient: const LinearGradient(
|
|
||||||
// colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
|
||||||
// begin: Alignment.topCenter,
|
|
||||||
// end: Alignment.bottomCenter,
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Container(
|
|
||||||
// margin: EdgeInsets.all(1.sp),
|
|
||||||
// child: Image.asset(getMineImage("im_neglect"),fit: BoxFit.fill,),
|
|
||||||
// ),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 12.sp),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Center(
|
|
||||||
child: Text(
|
|
||||||
"申请代理提示",
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(
|
|
||||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Text(
|
|
||||||
msg,
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Get.back();
|
|
||||||
Get.toNamed(Routes.InvitePage);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(top: 16.sp),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(17),
|
|
||||||
gradient: const LinearGradient(
|
|
||||||
colors: [
|
|
||||||
Color(0x26FFFFFF),
|
|
||||||
Color(0x26FFFFFF),
|
|
||||||
],
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.centerRight,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 10.sp,
|
|
||||||
bottom: 10.sp,
|
|
||||||
left: 52.sp,
|
|
||||||
right: 52.sp),
|
|
||||||
child: const Text(
|
|
||||||
"前往邀请",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
|||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
curve: Curves.easeInOut,
|
curve: Curves.easeInOut,
|
||||||
height: showMessage ? 85 : 0,
|
height: showMessage ? 75 : 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: Get.width - 16,
|
width: Get.width - 16,
|
||||||
// margin: EdgeInsets.only(top:10.sp),
|
// margin: EdgeInsets.only(top:10.sp),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user