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.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 89
|
||||
versionName "2.4.4"
|
||||
versionCode 92
|
||||
versionName "2.4.7"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -26,7 +26,7 @@ allprojects {
|
||||
maven { url "https://storage.googleapis.com/download.flutter.io" }
|
||||
maven { url "https://jitpack.io" }
|
||||
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://developer.huawei.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/commons/colors/app_color.dart';
|
||||
import 'package:circle_app/commons/widgets/base_tip_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.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 '../../utils/util.dart';
|
||||
import '../circle_list/logic.dart';
|
||||
import '../home/logic.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
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 {
|
||||
@ -290,7 +328,7 @@ class ListItemWidget extends StatelessWidget {
|
||||
type == 2
|
||||
? '-' + item.amount.toString() + '小票'
|
||||
: '+' +
|
||||
'${type == 3 ? (item.amount * 0.01).toStringAsFixed(2) + '元' : item.amount.toString() + '小票'}',
|
||||
'${type == 3 ? (item.amount).toString() + '小票' : item.amount.toString() + '小票'}',
|
||||
style: TextStyle(
|
||||
color: const Color(0xffefd84e),
|
||||
fontSize: 14.0.sp,
|
||||
|
||||
@ -1251,7 +1251,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
var status = await checkCameraStatus();
|
||||
if (!status) return;
|
||||
} else {
|
||||
await requestStoragePermission();
|
||||
// await requestStoragePermission();
|
||||
}
|
||||
|
||||
XFile? pickedFile;
|
||||
@ -1366,7 +1366,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
if (!isOK) {
|
||||
return;
|
||||
}
|
||||
await requestStoragePermission();
|
||||
// await requestStoragePermission();
|
||||
var status = await checkCameraStatus();
|
||||
if (!status) return;
|
||||
try {
|
||||
|
||||
@ -22,6 +22,7 @@ import '../../commons/config.dart';
|
||||
import '../../commons/widgets/refresh_list_manager.dart';
|
||||
import '../../net/api.dart';
|
||||
import '../../net/dio_manager.dart';
|
||||
import '../../utils/SharedPreferencesHelper.dart';
|
||||
import '../../utils/eventBus.dart';
|
||||
import '../../utils/newbie_guide_tip.dart';
|
||||
import '../../utils/qiniu.dart';
|
||||
@ -219,12 +220,12 @@ final ScrollController nearScrollController = ScrollController();
|
||||
|
||||
loadCircleListData() async {
|
||||
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(
|
||||
data, (data) => InterestsBean.fromJson(data));
|
||||
if (bean.data is InterestsBean && bean.isSuccess()) {
|
||||
circle = bean.data!;
|
||||
if (circle.lists.length < 20) {
|
||||
if (circle.lists.isEmpty) {
|
||||
isMore = false;
|
||||
}
|
||||
|
||||
@ -646,8 +647,14 @@ final ScrollController nearScrollController = ScrollController();
|
||||
position = await getCurrentPosition();
|
||||
await getCurrentCity();
|
||||
} else if (isShowLocationDialogEd == false && isShowLocationDialog == false) {
|
||||
isShowLocationDialogEd = true;
|
||||
update();
|
||||
|
||||
SharedPreferencesHelper helper =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
if (!(await helper.isShowNearLocation())) {
|
||||
isShowLocationDialogEd = true;
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,6 +26,8 @@ class Lists {
|
||||
int? userTop;
|
||||
String? create_time;
|
||||
String? at;
|
||||
Map? topInteractType;
|
||||
int? isInteract;
|
||||
Lists(
|
||||
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
|
||||
|
||||
@ -46,10 +48,12 @@ class Lists {
|
||||
: null;
|
||||
showType = json['showType'];
|
||||
interest = json['interest'] ?? {};
|
||||
topInteractType = json['topInteractType'] ?? {};
|
||||
create_time = json['createTime'] ?? json['create_time'];
|
||||
// "createTime" -> "2024-12-04 22:00"
|
||||
isQueen = json['is_queen'];
|
||||
userTop = json['userTop'] ?? 0;
|
||||
isInteract = json['interactedType'] ?? 0;
|
||||
user = json['user'] != null ? new User.fromJson(json['user']) : null;
|
||||
}
|
||||
|
||||
|
||||
@ -417,11 +417,12 @@ class _DiscoverState extends State<Discover>
|
||||
loadData();
|
||||
}
|
||||
|
||||
_onLoading() {
|
||||
_onLoading() async {
|
||||
if (isLoadMore) return;
|
||||
// if (refreshController.footerStatus == LoadStatus.loading) return;
|
||||
isLoadMore = true;
|
||||
loadData();
|
||||
await loadData();
|
||||
isLoadMore = false;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -34,6 +34,7 @@ import '../../../utils/cache_img.dart';
|
||||
import '../../../utils/eventBus.dart';
|
||||
import '../../circle_list/logic.dart';
|
||||
import '../../circle_list/widgets/hug_tip.dart';
|
||||
import '../../circle_list/widgets/right_circle_iten.dart';
|
||||
|
||||
class InfoListView extends StatefulWidget {
|
||||
var logic;
|
||||
@ -59,11 +60,20 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
|
||||
bool isLoad = true;
|
||||
bool callOutMore = true;
|
||||
bool isShowEmoji = false;
|
||||
var circleId = '';
|
||||
List<Lists> lists = [];
|
||||
|
||||
double widgetWidth = 0.0;
|
||||
Map interestAgentMap = {};
|
||||
|
||||
List<String> emojis = [
|
||||
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||
"🫣", "😂", "🤐", "😱", "🫥"
|
||||
];
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
@ -262,7 +272,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
}
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
} 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;
|
||||
widget.logic.update();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1015,6 +1024,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
|
||||
///至尊喊话
|
||||
vipDynamicItem(Lists lists) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
||||
lists.content!,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
@ -1343,50 +1353,99 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
);
|
||||
}),
|
||||
),
|
||||
Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(top: picHeight > 0 ? 5.sp : 5.sp,bottom: 10.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, widget.bean.id.toString(),);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.sp,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 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: 2.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(
|
||||
lists,
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
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) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text(
|
||||
lists.content!,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
@ -1721,51 +1781,99 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
);
|
||||
}))
|
||||
: Container(),
|
||||
Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp,),
|
||||
margin: EdgeInsets.only(top: picHeight > 0 ? 5.sp : 10.sp,bottom: 10.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,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 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: 2.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(
|
||||
lists,
|
||||
widget.bean.id.toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 50.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{
|
||||
pushMsgPage(lists, widget.bean.id.toString());
|
||||
),
|
||||
GestureDetector(
|
||||
onTapUp: (TapUpDetails details) {
|
||||
if (lists.isInteract! > 0) {
|
||||
showOKToast('这个喊话已经点过了哦');
|
||||
return;
|
||||
}
|
||||
|
||||
// });
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.sp,
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
_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() {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
|
||||
@ -33,6 +33,7 @@ import '../../../utils/cache_img.dart';
|
||||
import '../../../utils/time_format.dart';
|
||||
import '../../circle_list/logic.dart';
|
||||
import '../../circle_list/view.dart';
|
||||
import '../../circle_list/widgets/right_circle_iten.dart';
|
||||
import '../../msg/recommend_circle_friend_item.dart';
|
||||
import '../../world_call_out/view.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@ -77,6 +78,14 @@ class _LikeViewState extends State<LikeView>
|
||||
|
||||
List likelist = [];
|
||||
|
||||
List<String> emojis = [
|
||||
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||
"🫣", "😂", "🤐", "😱", "🫥"
|
||||
]; OverlayEntry? _overlayEntry;
|
||||
bool isShowEmoji = false;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
@ -844,6 +853,7 @@ class _LikeViewState extends State<LikeView>
|
||||
|
||||
///至尊喊话
|
||||
vipDynamicItem(Lists lists) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Text descText = Text(
|
||||
lists.content!,
|
||||
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
||||
@ -1137,58 +1147,151 @@ class _LikeViewState extends State<LikeView>
|
||||
);
|
||||
}),
|
||||
),
|
||||
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(
|
||||
// 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,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.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,
|
||||
: Container(),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(
|
||||
lists,
|
||||
lists.interest!['id'].toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
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(
|
||||
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
||||
child: circleInfoItem(lists.interest, lists, index),
|
||||
@ -1202,6 +1305,7 @@ class _LikeViewState extends State<LikeView>
|
||||
|
||||
///普通图文喊话
|
||||
normalDynamicItem(Lists lists) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Text descText = Text(
|
||||
lists.content!,
|
||||
style: TextStyle(color: Colors.white, fontSize: 17.sp),
|
||||
@ -1485,57 +1589,99 @@ 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(
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.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,
|
||||
: Container(),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(
|
||||
lists,
|
||||
lists.interest!['id'].toString(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.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 {
|
||||
pushMsgPage(
|
||||
lists, lists.interest!['id'].toString());
|
||||
),
|
||||
GestureDetector(
|
||||
onTapUp: (TapUpDetails details) {
|
||||
if (lists.isInteract! > 0) {
|
||||
showOKToast('这个喊话已经点过了哦');
|
||||
return;
|
||||
}
|
||||
|
||||
// });
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.sp,
|
||||
))
|
||||
],
|
||||
),
|
||||
_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(
|
||||
margin: EdgeInsets.only(bottom: 10.sp, top: 5.sp),
|
||||
@ -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() {
|
||||
bool showTitle = lists.isEmpty;
|
||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||
|
||||
@ -10,6 +10,7 @@ import 'package:video_player/video_player.dart';
|
||||
import '../../../commons/widgets/video_share_dialog.dart';
|
||||
import '../../../net/api.dart';
|
||||
import '../../../net/dio_manager.dart';
|
||||
import '../../../utils/cache_img.dart';
|
||||
import '../../userinfo/logic.dart';
|
||||
import '../../world_call_out/world_data.dart';
|
||||
import 'controller/physics.dart';
|
||||
@ -20,8 +21,9 @@ class PlayVideoView extends StatefulWidget {
|
||||
String url;
|
||||
String callOutId;
|
||||
String userId;
|
||||
|
||||
PlayVideoView(this.url, this.callOutId, this.userId, {Key? key})
|
||||
String imid;
|
||||
Map chat;
|
||||
PlayVideoView(this.url, this.callOutId, this.userId,this.chat,this.imid, {Key? key})
|
||||
: super(key: key);
|
||||
@override
|
||||
State<PlayVideoView> createState() => _PlayVideoViewState();
|
||||
@ -75,10 +77,12 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
||||
'id': int.parse(widget.callOutId),
|
||||
'user': {
|
||||
'id': int.parse(widget.userId),
|
||||
'imId': widget.imid,
|
||||
},
|
||||
'album': [
|
||||
{'type': 2, 'url': widget.url}
|
||||
]
|
||||
],
|
||||
'chat':widget.chat
|
||||
});
|
||||
|
||||
userList = [list];
|
||||
@ -213,6 +217,28 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: _videoListController.videoCount,
|
||||
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 data = player.videoInfo!;
|
||||
@ -267,6 +293,62 @@ class _PlayVideoViewState extends State<PlayVideoView>
|
||||
// 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: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:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../net/api.dart';
|
||||
import '../../../net/dio_manager.dart';
|
||||
import '../../../utils/cache_img.dart';
|
||||
import '../logic.dart';
|
||||
|
||||
class VideoItemWidget extends StatefulWidget {
|
||||
String url;
|
||||
@ -17,17 +21,26 @@ class VideoItemWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _VideoItemWidgetState extends State<VideoItemWidget> {
|
||||
bool isPush = false;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
// color: Colors.red,
|
||||
|
||||
width: Get.width - 120.sp,
|
||||
alignment: Alignment.topLeft,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.to(PlayVideoView(widget.url,widget.callOutId,widget.userId));
|
||||
onTap: () async {
|
||||
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: Stack(
|
||||
|
||||
@ -46,12 +46,8 @@ class LikeLogic extends GetxController {
|
||||
|
||||
int pageType = 0;
|
||||
|
||||
List<MyConfigData> genderList = [
|
||||
MyConfigData('0', '全部', true)
|
||||
];
|
||||
List<MyConfigData> newgenderList = [
|
||||
MyConfigData('0', '全部', true)
|
||||
];
|
||||
List<MyConfigData> genderList = [MyConfigData('0', '全部', true)];
|
||||
List<MyConfigData> newgenderList = [MyConfigData('0', '全部', true)];
|
||||
|
||||
bool isNewPeople = false;
|
||||
|
||||
@ -77,19 +73,19 @@ class LikeLogic extends GetxController {
|
||||
sub = EventBusManager.on<ChangeCircleIndex>().listen((event) {
|
||||
changeCircle(event.param);
|
||||
});
|
||||
await loadMyInfo();
|
||||
|
||||
rightCtr.addListener(() {
|
||||
if (rightCtr.position.pixels ==
|
||||
rightCtr.position.maxScrollExtent) {
|
||||
if (rightCtr.position.pixels == rightCtr.position.maxScrollExtent) {
|
||||
loadMore();
|
||||
}
|
||||
});
|
||||
loadMyInfo();
|
||||
|
||||
await initGerder();
|
||||
loadInviteData();
|
||||
// loadInviteData();
|
||||
loadCircleListData();
|
||||
loadMyCircleData();
|
||||
loadCircleTypeData();
|
||||
initGerder();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -101,8 +97,7 @@ class LikeLogic extends GetxController {
|
||||
}
|
||||
|
||||
initGerder() async {
|
||||
var data1 =
|
||||
await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||
var data1 = await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
|
||||
@ -113,7 +108,6 @@ class LikeLogic extends GetxController {
|
||||
if (int.parse(key) < 3) {
|
||||
genderList.add(MyConfigData(key, value, true));
|
||||
newgenderList.add(MyConfigData(key, value, true));
|
||||
|
||||
}
|
||||
});
|
||||
// roleList.clear();
|
||||
@ -132,51 +126,36 @@ class LikeLogic extends GetxController {
|
||||
if (bean.isSuccess()) {
|
||||
if (isFirst) {
|
||||
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;
|
||||
isLoad = false;
|
||||
update();
|
||||
}
|
||||
|
||||
} else {
|
||||
isLoadFial = true;
|
||||
showOKToast('网络不流畅哦,请检查网络情况');
|
||||
} else {
|
||||
// isLoadFial = true;
|
||||
// showOKToast('网络不流畅哦,请检查网络情况');
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
loadData() {
|
||||
loadInviteData();
|
||||
// loadInviteData();
|
||||
loadCircleListData();
|
||||
loadMyCircleData();
|
||||
loadCircleTypeData();
|
||||
}
|
||||
|
||||
loadInviteData() async {
|
||||
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||
if (data['code'] == 200) {
|
||||
Autogenerated result = Autogenerated.fromJson(data);
|
||||
|
||||
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||
if (data['code'] == 200) {
|
||||
Autogenerated result = Autogenerated.fromJson(data);
|
||||
|
||||
homeData = result.data;
|
||||
|
||||
}
|
||||
homeData = result.data;
|
||||
}
|
||||
}
|
||||
|
||||
loadCircleListData() async {
|
||||
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(
|
||||
data, (data) => InterestsBean.fromJson(data));
|
||||
if (bean.code == 200) {
|
||||
@ -187,8 +166,8 @@ class LikeLogic extends GetxController {
|
||||
circle.lists.addAll(bean.data!.lists);
|
||||
}
|
||||
|
||||
isLoad = false;
|
||||
if (bean.data!.lists.length < 20) {
|
||||
|
||||
if (bean.data!.lists.length == 0) {
|
||||
isMore = false;
|
||||
}
|
||||
update();
|
||||
@ -199,8 +178,7 @@ class LikeLogic extends GetxController {
|
||||
}
|
||||
|
||||
loadMyCircleData() async {
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.getMyCircleAll);
|
||||
var data = await DioManager.instance.get(url: Api.getMyCircleAll);
|
||||
|
||||
// var bean = BaseResponse<InterestsBean>.fromJson(
|
||||
// data, (data) => InterestsBean.fromJson(data));
|
||||
@ -215,7 +193,7 @@ class LikeLogic extends GetxController {
|
||||
});
|
||||
mycircle.lists = infoList;
|
||||
if (currentIndex >= mycircle.lists.length - 1) {
|
||||
currentIndex = mycircle.lists.length -1;
|
||||
currentIndex = mycircle.lists.length - 1;
|
||||
}
|
||||
|
||||
loadCalloutsNew();
|
||||
@ -232,13 +210,11 @@ class LikeLogic extends GetxController {
|
||||
|
||||
loadMore() {
|
||||
if (isMore) {
|
||||
page = page + 1;
|
||||
page = page + 1;
|
||||
loadCircleListData();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void relaodData() {
|
||||
page = 1;
|
||||
isMore = true;
|
||||
@ -247,12 +223,11 @@ class LikeLogic extends GetxController {
|
||||
|
||||
loadMyMore() {
|
||||
if (isMyMore) {
|
||||
myPage = myPage + 1;
|
||||
myPage = myPage + 1;
|
||||
loadMyCircleData();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void relaodCircleTypeData() {
|
||||
loadCircleTypeData();
|
||||
}
|
||||
@ -274,16 +249,15 @@ class LikeLogic extends GetxController {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
relaodMyData();
|
||||
}
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
setTopCircle(String interest_id,bool isStatus) async {
|
||||
setTopCircle(String interest_id, bool isStatus) async {
|
||||
var data = await DioManager.instance.post(
|
||||
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);
|
||||
if (bean.code == 200) {
|
||||
relaodMyData();
|
||||
@ -291,15 +265,13 @@ class LikeLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
|
||||
loadCalloutsNew() async {
|
||||
List<String> idList = [];
|
||||
mycircle.lists.forEach((element) {
|
||||
idList.add(element.id.toString());
|
||||
idList.add(element.id.toString());
|
||||
});
|
||||
var data = await DioManager.instance.post(
|
||||
url:Api.calloutsNew,
|
||||
params: {"interestIds":idList});
|
||||
var data = await DioManager.instance
|
||||
.post(url: Api.calloutsNew, params: {"interestIds": idList});
|
||||
|
||||
if (data['code'] == 200) {
|
||||
hasNewList.clear();
|
||||
@ -323,7 +295,8 @@ class LikeLogic extends GetxController {
|
||||
|
||||
loadCircleTypeData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url:Api.categoriesList,);
|
||||
url: Api.categoriesList,
|
||||
);
|
||||
if (data['code'] == 200) {
|
||||
categoriesList = data['data'];
|
||||
update();
|
||||
@ -336,7 +309,6 @@ class LikeLogic extends GetxController {
|
||||
mycircle.lists.forEach((element) {
|
||||
if (element.id.toString() == param) {
|
||||
changeIndex = mycircle.lists.indexOf(element);
|
||||
|
||||
}
|
||||
});
|
||||
currentIndex = changeIndex;
|
||||
@ -344,8 +316,7 @@ class LikeLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ChangeCircleIndex {
|
||||
String param;
|
||||
ChangeCircleIndex(this.param);
|
||||
}
|
||||
ChangeCircleIndex(this.param);
|
||||
}
|
||||
|
||||
@ -44,6 +44,9 @@ class _CircleListPageState extends State<CircleListPage>
|
||||
|
||||
int currentIndex = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
List<String> tipList = [
|
||||
'总有一个小众圈子适合你',
|
||||
'每一种情趣都值得被尊重',
|
||||
@ -67,6 +70,15 @@ class _CircleListPageState extends State<CircleListPage>
|
||||
void initState() {
|
||||
// TODO: implement 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
|
||||
@ -110,18 +122,6 @@ class _CircleListPageState extends State<CircleListPage>
|
||||
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
|
||||
? noResultWidget(
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
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:flutter/material.dart';
|
||||
import 'dart:async';
|
||||
@ -59,6 +60,13 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
Map interestAgentMap = {};
|
||||
List visibleItems = [];
|
||||
|
||||
List<String> emojis = [
|
||||
"❤️", "🪢", "⛓️", "🕯️", "🔐", "🔔", "⭕️", "📏", "🪡", "🎭",
|
||||
"👙", "👅", "🦶", "🧎", "⚔️", "🍌", "🦋", "🌼", "👏", "🤟",
|
||||
"🙏", "🦴", "🐶", "👿", "👼", "👻", "🌹", "💌", "😘", "😍",
|
||||
"🫣", "😂", "🤐", "😱", "🫥"
|
||||
]; OverlayEntry? _overlayEntry;
|
||||
|
||||
bool isScrolling = false;
|
||||
Timer? _timer;
|
||||
|
||||
@ -66,7 +74,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
var sub;
|
||||
var sub1;
|
||||
bool isLoadCircleInfo = false;
|
||||
|
||||
bool isShowEmoji = false;
|
||||
int callOut = 0;
|
||||
|
||||
@override
|
||||
@ -432,7 +440,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
),
|
||||
HideText(
|
||||
text: interest.intro + interest.intro,
|
||||
maxWidth: Get.width * 0.5 - 5.sp,
|
||||
maxWidth: Get.width * 0.5 - 9.sp,
|
||||
additionText: '进圈逛逛',
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
@ -621,6 +629,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
|
||||
///至尊喊话
|
||||
vipDynamicItem(Lists lists) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
lists.content!,
|
||||
@ -751,7 +760,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
height: 28.sp,
|
||||
height: 24.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(52, 41, 67, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
@ -763,7 +772,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
(lists.user!.city ?? '外星').length > 4
|
||||
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
||||
: (lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -1024,55 +1033,96 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
}),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15.sp),
|
||||
color: Color(0x33000000)),
|
||||
child: Row(
|
||||
children: [
|
||||
widgets.isNotEmpty
|
||||
? SizedBox(
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.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,
|
||||
'',
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.sp,
|
||||
: Container(),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
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)
|
||||
Container(
|
||||
@ -1088,6 +1138,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
|
||||
///普通图文喊话
|
||||
normalDynamicItem(Lists lists) {
|
||||
int type = (lists.topInteractType?['type'] ?? 1) - 1;
|
||||
Widget descText = widget.logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
lists.content!,
|
||||
@ -1218,7 +1269,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
// margin: EdgeInsets.only(top: 5.sp,right: 5.sp),
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
height: 28.sp,
|
||||
height: 24.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(52, 41, 67, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
@ -1230,7 +1281,7 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
(lists.user!.city ?? '外星').length > 4
|
||||
? (lists.user!.city ?? '外星').substring(0, 4) + '...'
|
||||
: (lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -1450,54 +1501,95 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
);
|
||||
}))
|
||||
: Container(),
|
||||
Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 5.sp,
|
||||
right: 10.sp,
|
||||
),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 10.sp, bottom: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15.sp),
|
||||
color: Color(0x33000000)),
|
||||
child: Row(
|
||||
children: [
|
||||
widgets.isNotEmpty
|
||||
? SizedBox(
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
|
||||
margin: EdgeInsets.only(
|
||||
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.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,
|
||||
: Container(),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${lists.chat!.count!}位圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'赶紧成为第一位私聊ta的人吧',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
width: 60.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 {
|
||||
pushMsgPage(lists, '');
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('chat'),
|
||||
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)
|
||||
Container(
|
||||
@ -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}) {
|
||||
return GestureDetector(
|
||||
onTap: () async {},
|
||||
onTap: () async {
|
||||
pushUserHome(userId);
|
||||
},
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@ -1710,4 +1917,9 @@ class _AllCircleItemState extends State<AllCircleItem>
|
||||
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(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: '帮助与反馈',
|
||||
centerTitle: '客服与反馈',
|
||||
actionWdiget: const Text(
|
||||
"我的反馈",
|
||||
style: TextStyle(color: Colors.white),
|
||||
|
||||
@ -86,6 +86,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
|
||||
String inviteCode = '';
|
||||
|
||||
String agentManualStr = '';
|
||||
|
||||
var link = '';
|
||||
@override
|
||||
void onClose() async {
|
||||
@ -132,13 +134,13 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
|
||||
addMsgListener();
|
||||
|
||||
checkVersion();
|
||||
|
||||
loadMyCircleData();
|
||||
|
||||
initWxApi();
|
||||
|
||||
awaitShowTodayDialog();
|
||||
awaitShowLikeRecomandDialog();
|
||||
// awaitShowLikeRecomandDialog();
|
||||
}
|
||||
|
||||
void addMsgListener() {
|
||||
@ -572,7 +574,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
void onReady() async {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
|
||||
checkVersion();
|
||||
FlutterNativeSplash.remove();
|
||||
final logic = Get.find<CircleLogic>();
|
||||
logic.loadCirclePeopleData();
|
||||
@ -803,7 +805,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
|
||||
void awaitShowTodayDialog() {
|
||||
Future.delayed(Duration(seconds: 5), () async {
|
||||
Future.delayed(Duration(seconds: 30), () async {
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
if (await sp.isFirstAutoMatch()) {
|
||||
var data = await DioManager.instance.get(
|
||||
@ -859,6 +861,13 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
if (Get.currentRoute.contains(Routes.Chat) ) return;
|
||||
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 {
|
||||
|
||||
@ -200,7 +200,7 @@ class _HomePageState extends State<HomePage>
|
||||
children: [
|
||||
const CirclePage(),
|
||||
CircleListPage(),
|
||||
WorldCallOutPage(),
|
||||
WorldCallOutPage(),
|
||||
MsgPage(),
|
||||
MinefragmentPage()
|
||||
],
|
||||
@ -307,8 +307,9 @@ class _HomePageState extends State<HomePage>
|
||||
isSelected
|
||||
? getTabbarImage('${image}_selected')
|
||||
: getTabbarImage('${image}_normal'),
|
||||
width: 30.sp,
|
||||
height: 30.sp,
|
||||
width: 29.sp,
|
||||
height: 29.sp,
|
||||
|
||||
fit: BoxFit.fill,
|
||||
excludeFromSemantics: true,
|
||||
gaplessPlayback: true,
|
||||
|
||||
@ -72,12 +72,11 @@ class _InvitePageState extends State<InvitePage>
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
|
||||
diyTitleWdiget: Container(
|
||||
width: Get.width,
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Theme(
|
||||
data: ThemeData(
|
||||
@ -90,15 +89,15 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
},
|
||||
controller: _tabController,
|
||||
tabs: tabs,
|
||||
labelPadding: EdgeInsets.only(left: 8.sp,right: 8.sp),
|
||||
indicatorPadding:
|
||||
EdgeInsets.only(left: 20.sp, right: 20.sp, bottom: 10.sp),
|
||||
labelPadding: EdgeInsets.only(left: 8.sp, right: 8.sp),
|
||||
indicatorPadding: EdgeInsets.only(
|
||||
left: 20.sp, right: 20.sp, bottom: 10.sp),
|
||||
isScrollable: true,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
labelColor: AppColor.mainColor,
|
||||
unselectedLabelColor: Color(0xCCF7FAFA),
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 18.sp, fontWeight: FontWeight.w500),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 18.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -117,11 +116,36 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
alignment: Alignment.center,
|
||||
height: 30.sp,
|
||||
// width: 62.sp,
|
||||
child: Image.asset(
|
||||
getMineImage('invite_right_icon'),
|
||||
width: 62.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
child: Container(
|
||||
height: 24.sp,
|
||||
margin: EdgeInsets.all(0.6.sp),
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
);
|
||||
},
|
||||
@ -725,8 +749,9 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
height: 42.sp,
|
||||
margin: EdgeInsets.only(top: 35.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: AppColor.mainVerLinearGradient,),
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -734,10 +759,12 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
Image(
|
||||
image: AssetImage(getMineImage("invite_icon")),
|
||||
// width: 22.sp,
|
||||
height:22.sp,
|
||||
height: 22.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(width: 4.sp,),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'邀请圈友赚钱',
|
||||
style: TextStyle(
|
||||
@ -774,26 +801,33 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
},
|
||||
child: Container(
|
||||
width: 150.sp,
|
||||
height: 42.sp,
|
||||
margin: EdgeInsets.only(top: 35.sp),
|
||||
decoration: BoxDecoration(
|
||||
width: 150.sp,
|
||||
height: 42.sp,
|
||||
margin: EdgeInsets.only(top: 35.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: AppColor.mainVerLinearGradient,),
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.perm_identity_outlined,size: 22.sp,color: Colors.white,),
|
||||
SizedBox(width: 4.sp,),
|
||||
Text(
|
||||
homeLogic.inventStr.contains('赚') ? '联系客服结算' : '联系客服',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
])),
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.perm_identity_outlined,
|
||||
size: 22.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
homeLogic.inventStr.contains('赚') ? '联系客服结算' : '联系客服',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
])),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -801,8 +835,6 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
myTitileWidget() {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
@ -922,7 +954,6 @@ mainAxisAlignment: MainAxisAlignment.center,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
buildSegment() {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 15.sp),
|
||||
@ -1067,13 +1098,13 @@ titileWidget() {
|
||||
}
|
||||
|
||||
rowWidget(
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String str5,
|
||||
String userId,
|
||||
) {
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String str5,
|
||||
String userId,
|
||||
) {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
@ -1137,8 +1168,6 @@ rowWidget(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
infoText(String info, [Color color = const Color(0xFFF7FAFA)]) {
|
||||
return Center(
|
||||
child: Text(
|
||||
@ -1268,7 +1297,6 @@ void showCodePicker(InviteLogic logic) {
|
||||
enableDrag: false);
|
||||
}
|
||||
|
||||
|
||||
class InventDescItem extends StatefulWidget {
|
||||
const InventDescItem({super.key});
|
||||
|
||||
@ -1292,15 +1320,15 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
Container(
|
||||
height: 42.sp,
|
||||
margin:
|
||||
EdgeInsets.only(left: 0.sp, right: 0.sp, top: 10.sp),
|
||||
EdgeInsets.only(left: 0.sp, right: 0.sp, top: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF211C37),
|
||||
borderRadius: BorderRadius.circular(8.sp)
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage(getMineImage("invite_sys_bg")),
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
),
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage(getMineImage("invite_sys_bg")),
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
),
|
||||
child: Swiper(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
autoplayDelay: 1500,
|
||||
@ -1360,7 +1388,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
width: 100.sp,
|
||||
height: 50.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
@ -1418,7 +1446,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
width: 100.sp,
|
||||
height: 50.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
@ -1476,7 +1504,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
width: 100.sp,
|
||||
height: 50.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
color: AppColor.mainColor.withOpacity(0.35),
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
@ -1518,7 +1546,6 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 12.sp,
|
||||
),
|
||||
@ -1571,9 +1598,14 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Column(children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 12.sp),
|
||||
child:Text('微乐园推广大使榜',style: TextStyle(color: AppColor.mainColor,fontSize: 15.sp,fontWeight: FontWeight.bold),)
|
||||
),
|
||||
margin: EdgeInsets.only(top: 12.sp),
|
||||
child: Text(
|
||||
'微乐园推广大使榜',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 15.sp,
|
||||
fontWeight: FontWeight.bold),
|
||||
)),
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
@ -1582,52 +1614,48 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x99363542),
|
||||
borderRadius:
|
||||
BorderRadiusDirectional.circular(4.sp),
|
||||
BorderRadiusDirectional.circular(4.sp),
|
||||
border: Border.all(
|
||||
color: Color(0x99363542), width: 1.sp)),
|
||||
child: logic.allInveiteData.isEmpty &&
|
||||
logic.selectedIndex == 1
|
||||
logic.selectedIndex == 1
|
||||
? noResultWidget()
|
||||
: ListView.builder(
|
||||
// controller: logic.contentScrollController,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
// controller: logic.contentScrollController,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
if (index == 0) {
|
||||
return titileWidget();
|
||||
}
|
||||
if (logic.allInveiteData
|
||||
.length +
|
||||
1 ==
|
||||
index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 4.sp,
|
||||
left: 5.sp,
|
||||
right: 5.sp),
|
||||
child: Text(
|
||||
'温馨提示:仅展示前${logic.allInveiteData.length}名,上榜的推广大使还能获得微乐园APP官方定制的精美礼品一份哦~',
|
||||
style: TextStyle(
|
||||
color: Colors.white
|
||||
.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
),
|
||||
);
|
||||
if (logic.allInveiteData.length + 1 ==
|
||||
index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 4.sp,
|
||||
left: 5.sp,
|
||||
right: 5.sp),
|
||||
child: Text(
|
||||
'温馨提示:仅展示前${logic.allInveiteData.length}名,上榜的推广大使还能获得微乐园APP官方定制的精美礼品一份哦~',
|
||||
style: TextStyle(
|
||||
color: Colors.white
|
||||
.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
),
|
||||
);
|
||||
}
|
||||
var data = logic
|
||||
.allInveiteData[index - 1];
|
||||
var data =
|
||||
logic.allInveiteData[index - 1];
|
||||
return rowWidget(
|
||||
data['nickname'],
|
||||
data['inviteCount']
|
||||
.toString(),
|
||||
data['vipDaysStr']
|
||||
.toString() +
|
||||
'天',
|
||||
'${data['directProfitStr']}票',
|
||||
'${data['rebateStr']}票',
|
||||
data['userId'].toString());
|
||||
data['nickname'],
|
||||
data['inviteCount'].toString(),
|
||||
data['vipDaysStr'].toString() + '天',
|
||||
'${data['directProfitStr']}票',
|
||||
'${data['rebateStr']}票',
|
||||
data['userId'].toString());
|
||||
},
|
||||
itemCount: logic.allInveiteData.length + 2))),
|
||||
itemCount:
|
||||
logic.allInveiteData.length + 2))),
|
||||
])),
|
||||
SizedBox(
|
||||
height: 60.sp + MediaQuery.of(context).padding.bottom,
|
||||
@ -1658,69 +1686,75 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(21.sp)),
|
||||
child:
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image(
|
||||
image: AssetImage(getMineImage("invite_icon")),
|
||||
// width: 22.sp,
|
||||
height:22.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(width: 4.sp,),
|
||||
Text(
|
||||
'邀请圈友赚钱',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image(
|
||||
image: AssetImage(getMineImage("invite_icon")),
|
||||
// width: 22.sp,
|
||||
height: 22.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'邀请圈友赚钱',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// if (logic.isShow)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.sendApply();
|
||||
var con;
|
||||
if (kDebugMode) {
|
||||
con = V2TimConversation(
|
||||
conversationID: "c2c_qpqz_dev_10_102",
|
||||
userID: "qpqz_dev_10_102",
|
||||
showName: "测试乐园客服",
|
||||
type: 1);
|
||||
} else {
|
||||
con = V2TimConversation(
|
||||
conversationID: "c2c_qpqz_prod_10_102",
|
||||
userID: "qpqz_prod_10_102",
|
||||
showName: "乐园客服",
|
||||
type: 1);
|
||||
}
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
width: 150.sp,
|
||||
height: 42.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
),
|
||||
child:
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.stars,size: 22.sp,color: Colors.white,),
|
||||
SizedBox(width: 4.sp,),
|
||||
Text(
|
||||
'申请成为大使',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.sendApply();
|
||||
var con;
|
||||
if (kDebugMode) {
|
||||
con = V2TimConversation(
|
||||
conversationID: "c2c_qpqz_dev_10_102",
|
||||
userID: "qpqz_dev_10_102",
|
||||
showName: "测试乐园客服",
|
||||
type: 1);
|
||||
} else {
|
||||
con = V2TimConversation(
|
||||
conversationID: "c2c_qpqz_prod_10_102",
|
||||
userID: "qpqz_prod_10_102",
|
||||
showName: "乐园客服",
|
||||
type: 1);
|
||||
}
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
width: 150.sp,
|
||||
height: 42.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
),
|
||||
)
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.stars,
|
||||
size: 22.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'申请成为大使',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
@ -1757,7 +1791,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
],
|
||||
),
|
||||
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(
|
||||
desc,
|
||||
style: TextStyle(
|
||||
@ -1831,12 +1865,12 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
}
|
||||
|
||||
myRowWidget(
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String userId,
|
||||
) {
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String userId,
|
||||
) {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
@ -1898,4 +1932,3 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
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;
|
||||
pwdEditingController.text = pwd;
|
||||
}
|
||||
|
||||
@ -78,6 +78,8 @@ class MinefragmentLogic extends GetxController {
|
||||
|
||||
AssetsDataData? myAssest;
|
||||
|
||||
bool isShowserveTip = false;
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
@ -94,6 +96,9 @@ class MinefragmentLogic extends GetxController {
|
||||
} else {
|
||||
isProxy = false;
|
||||
}
|
||||
|
||||
isShowserveTip = sp.getBool(SharedPreferencesHelper.serveTip) ?? true;
|
||||
|
||||
loadRelationTypeFirstListData();
|
||||
checkShowPositiveFeedBack();
|
||||
getMode();
|
||||
@ -109,6 +114,10 @@ class MinefragmentLogic extends GetxController {
|
||||
loadDyanmicListData();
|
||||
}
|
||||
|
||||
setSpServeTip() async {
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
sp.setBool(SharedPreferencesHelper.serveTip, false);
|
||||
}
|
||||
|
||||
loadData() {
|
||||
getMode();
|
||||
@ -209,7 +218,7 @@ class MinefragmentLogic extends GetxController {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getVisitorMsgs,);
|
||||
if (data['code'] == 200) {
|
||||
recent_visit_count_new = data['data']['unreadCount'] ?? 0;
|
||||
recent_visit_count_new = data['data']['newVisitorCount'] ?? 0;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ class _MineFuncItemState extends State<MineFuncItem> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'帮助与反馈',
|
||||
'客服与反馈',
|
||||
style: TextStyle(color: Colors.white,fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(width: 4.sp),
|
||||
|
||||
@ -257,8 +257,9 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap:() {
|
||||
Get.toNamed(Routes.GiftShopPage,arguments: '');
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.GiftShopPage,
|
||||
arguments: '');
|
||||
},
|
||||
child: Container(
|
||||
height: 18.sp,
|
||||
@ -314,7 +315,9 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
alignment: Alignment.center,
|
||||
height: 22.sp,
|
||||
child: Text(
|
||||
(logic.myInfoBean?.contact?.isEmpty ?? true) ? '填写微信赚钱': '设置联系方式',
|
||||
(logic.myInfoBean?.contact?.isEmpty ?? true)
|
||||
? '填写微信赚钱'
|
||||
: '设置联系方式',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
@ -367,31 +370,85 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
isShowMenu = false;
|
||||
logic.update();
|
||||
}),
|
||||
Positioned(bottom: 20.sp,right: 15.sp,child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.HelpPage);
|
||||
},
|
||||
child: Container(
|
||||
height: 50.sp,
|
||||
width: 50.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(25.sp)
|
||||
),
|
||||
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: () {
|
||||
Get.toNamed(Routes.HelpPage);
|
||||
logic.isShowserveTip = false;
|
||||
logic.setSpServeTip();
|
||||
logic.update();
|
||||
},
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getMineImage('cs_icon'),
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
color: Colors.white,
|
||||
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'),
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
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(
|
||||
height: 22.sp,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||
padding:
|
||||
EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.mainBgColor,
|
||||
borderRadius: BorderRadius.circular(4.sp)),
|
||||
@ -524,15 +582,14 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
if ((logic.userInfoBean?.mark ?? 0) > 0)
|
||||
SizedBox(width: 8.sp),
|
||||
SizedBox(width: 8.sp),
|
||||
if ((logic.userInfoBean?.mark ?? 0) > 0)
|
||||
UserTagWidget(logic.userInfoBean!.mark!),
|
||||
if (logic.isAuth)
|
||||
SizedBox(width: 4.sp),
|
||||
UserTagWidget(logic.userInfoBean!.mark!),
|
||||
if (logic.isAuth) SizedBox(width: 4.sp),
|
||||
if (logic.isAuth)
|
||||
Image(
|
||||
image: AssetImage(getMineImage("auth")),
|
||||
height:18.sp,
|
||||
height: 18.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -581,11 +638,11 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
if (interests.isNotEmpty)
|
||||
Container(
|
||||
height: 50.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp, left: 10.sp, right: 10.sp),
|
||||
child: _buildInterestsListView(interests),
|
||||
),
|
||||
Container(
|
||||
height: 50.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp, left: 10.sp, right: 10.sp),
|
||||
child: _buildInterestsListView(interests),
|
||||
),
|
||||
_friendsRow(logic),
|
||||
Container(
|
||||
height: 70.sp,
|
||||
@ -826,35 +883,35 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
)
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
showTimeRecordDialog(logic.myInfoBean!);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.sp,
|
||||
horizontal: 12.sp,
|
||||
),
|
||||
child: Text(
|
||||
'记录时光',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
showTimeRecordDialog(logic.myInfoBean!);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.sp,
|
||||
horizontal: 12.sp,
|
||||
),
|
||||
child: Text(
|
||||
'记录时光',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -871,7 +928,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 24.sp,right: 5.sp),
|
||||
margin: EdgeInsets.only(left: 24.sp, right: 5.sp),
|
||||
child: Center(
|
||||
child: Text(
|
||||
controller.userInfoBean != null
|
||||
@ -2496,7 +2553,6 @@ class _MinefragmentPageState extends State<MinefragmentPage>
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
if (logic.userInfoBean?.avatarNonhuman == 0)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
|
||||
@ -38,6 +38,8 @@ class MsgLogic extends GetxController {
|
||||
List visitorMsgs = [];
|
||||
List bannerList = [];
|
||||
|
||||
bool isMsgCountLoad = false;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
@ -200,6 +202,8 @@ class MsgLogic extends GetxController {
|
||||
}
|
||||
|
||||
void getVisitorMsgsData() async {
|
||||
if (isMsgCountLoad) return;
|
||||
isMsgCountLoad = true;
|
||||
var data =
|
||||
await DioManager.getInstance().get(url: Api.getVisitorMsgs);
|
||||
if (data["code"] == 200) {
|
||||
@ -208,6 +212,7 @@ class MsgLogic extends GetxController {
|
||||
await loadVisitorTotalData();
|
||||
await loadInterestedInMeUsersData();
|
||||
}
|
||||
isMsgCountLoad = false;
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@ -209,7 +209,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
width: 20.sp,
|
||||
),
|
||||
Text(
|
||||
'帮助与反馈',
|
||||
'客服与反馈',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15.sp),
|
||||
@ -371,7 +371,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
Text(
|
||||
info['ta']['nickname'] ?? '',
|
||||
style: const TextStyle(
|
||||
color: Colors.white70,
|
||||
color: Colors.white,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
@ -392,7 +392,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
child: Text(
|
||||
info['msg'],
|
||||
style:
|
||||
TextStyle(color: Colors.white54, fontSize: 14.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -126,7 +126,7 @@ class QuickLogic extends GetxController {
|
||||
var data =
|
||||
await DioManager.instance.post(url: Api.queryQuickChatUserV2, params: {
|
||||
'page': type == 1 ? page : page1,
|
||||
'pageSize': 20,
|
||||
'pageSize': 10,
|
||||
'sortType': type,
|
||||
'wantMeet': wantMeet,
|
||||
"lat": position?.latitude ?? 0,
|
||||
|
||||
@ -55,7 +55,7 @@ class _OnlineRecommandDialogState extends State<OnlineRecommandDialog> {
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.bgColor,
|
||||
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(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@ -322,6 +322,7 @@ class _OnlineRecommandDialogState extends State<OnlineRecommandDialog> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 4.sp,
|
||||
top: 4.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
getCircleImage(item.vip == 1 ? 'vip' : 'year_vip'),
|
||||
|
||||
@ -58,7 +58,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.sp, right: 20.sp),
|
||||
padding: EdgeInsets.all(15.sp),
|
||||
height: Platform.isAndroid ? (!widget.isMore ? 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,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF393949),
|
||||
@ -129,7 +129,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
),
|
||||
),
|
||||
// SizedBox(height: 20.0.sp),
|
||||
if (Platform.isAndroid)
|
||||
if (Platform.isAndroid && widget.isMore)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 0.sp, bottom: 20.sp),
|
||||
child: Row(
|
||||
@ -437,8 +437,17 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
var data = Autogenerated.fromJson(result);
|
||||
if (data.prices != null) {
|
||||
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) {
|
||||
@ -468,7 +477,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
Get.back(result: 1);
|
||||
} else {
|
||||
showOKToast(result['msg']);
|
||||
if (result['code'] == 10081) {
|
||||
if (result['code'] == 10081 || result['code'] == 31201) {
|
||||
showRechargeScreenDialog('unlock_contact');
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,9 +16,9 @@ import '../../../utils/util.dart';
|
||||
class WxEditDialog extends StatefulWidget {
|
||||
String phone;
|
||||
|
||||
WxEditDialog(this.phone,{super.key});
|
||||
WxEditDialog(this.phone, {super.key});
|
||||
@override
|
||||
_WxEditDialogState createState() => _WxEditDialogState();
|
||||
_WxEditDialogState createState() => _WxEditDialogState();
|
||||
}
|
||||
|
||||
class _WxEditDialogState extends State<WxEditDialog> {
|
||||
@ -33,10 +33,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
Map wxStatusInfo = {};
|
||||
|
||||
String content = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
loadDescData();
|
||||
loadMyWxInfoData();
|
||||
loadWxStatus();
|
||||
// updateWxText();
|
||||
@ -58,8 +61,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
height: 455.sp,
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
height: 520.sp,
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@ -81,7 +84,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
child: Text(
|
||||
'联系方式设置',
|
||||
style: TextStyle(
|
||||
// color: AppColor.mainColor,
|
||||
// color: AppColor.mainColor,
|
||||
color: Colors.white,
|
||||
fontSize: 18.sp,
|
||||
shadows: const [
|
||||
@ -92,7 +95,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 10.sp,top: 15.sp),
|
||||
margin: EdgeInsets.only(bottom: 10.sp, top: 15.sp),
|
||||
// height: 30.sp,
|
||||
child: Row(
|
||||
children: [
|
||||
@ -104,75 +107,86 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
getMineImage(type == 1 ? 'phone_icon' : type == 3 ? 'qq' : 'wx'),
|
||||
getMineImage(type == 1
|
||||
? 'phone_icon'
|
||||
: type == 3
|
||||
? 'qq'
|
||||
: 'wx'),
|
||||
width: 40.sp,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||
child: Icon(Icons.change_circle,color: AppColor.mainColor,size: 30.sp,)),
|
||||
margin: EdgeInsets.only(
|
||||
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),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF260C3E),
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
border: GradientBoxBorder(
|
||||
gradient:
|
||||
AppColor.mainVerLinearGradient,
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
child: TextField(
|
||||
controller:
|
||||
wxEditingController,
|
||||
controller: wxEditingController,
|
||||
maxLength: 20,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入真实的联系方式',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 14.sp),
|
||||
color: Colors.white70, fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
counterText: '',
|
||||
contentPadding:
|
||||
EdgeInsets.only(
|
||||
left: 14.sp)),
|
||||
contentPadding: EdgeInsets.only(left: 14.sp)),
|
||||
),
|
||||
)),
|
||||
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (wxInfo.containsKey('hideContact')) {
|
||||
wxInfo['hideContact'] = wxInfo['hideContact'] == 0 ? 1 : 0;
|
||||
|
||||
} else {
|
||||
wxInfo['hideContact'] = 0;
|
||||
|
||||
}
|
||||
showOKToast(wxInfo['hideContact'] == 1 ? '已对其他人隐藏联系方式' : '已对其他人展示联系方式(需要解锁)');
|
||||
setState(() {
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (wxInfo.containsKey('hideContact')) {
|
||||
wxInfo['hideContact'] =
|
||||
wxInfo['hideContact'] == 0 ? 1 : 0;
|
||||
} else {
|
||||
wxInfo['hideContact'] = 0;
|
||||
}
|
||||
showOKToast(wxInfo['hideContact'] == 1
|
||||
? '已对其他人隐藏联系方式'
|
||||
: '已对其他人展示联系方式(需要解锁)');
|
||||
setState(() {});
|
||||
},
|
||||
child: Column(
|
||||
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(
|
||||
wxInfo.containsKey('hideContact')
|
||||
? wxInfo['hideContact'] == 1
|
||||
? '已隐藏'
|
||||
: '显示中'
|
||||
? '已隐藏'
|
||||
: '显示中'
|
||||
: '显示中',
|
||||
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),
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
border: GradientBoxBorder(
|
||||
gradient:
|
||||
AppColor.mainVerLinearGradient,
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
child: TextField(
|
||||
controller:
|
||||
descEditingController,
|
||||
child: TextField(
|
||||
controller: descEditingController,
|
||||
maxLength: 30,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
// keyboardType: TextInputType.phone,
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入解锁引导语',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 14.sp),
|
||||
color: Colors.white70, fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
counterText: '',
|
||||
contentPadding:
|
||||
EdgeInsets.only(
|
||||
left: 14.sp)),
|
||||
contentPadding: EdgeInsets.only(left: 14.sp)),
|
||||
),
|
||||
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
@ -220,13 +226,19 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
width: 18.sp,
|
||||
height: 18.sp,
|
||||
),
|
||||
SizedBox(width: 2.sp,),
|
||||
Text('设置解锁价格',style: TextStyle(color: Color(0xCCFFFFFF),fontSize: 14.sp),),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'设置解锁价格',
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFFFFFF), fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 60.sp,
|
||||
height: 30.sp,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 5.sp,right: 5.sp),
|
||||
margin: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF260C3E),
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
@ -238,20 +250,17 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: TextField(
|
||||
controller:
|
||||
moneyEditingController,
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: moneyEditingController,
|
||||
maxLength: 4,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
color: Colors.white, fontSize: 14.sp),
|
||||
keyboardType: TextInputType.phone,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter
|
||||
.digitsOnly,
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
],
|
||||
|
||||
decoration: InputDecoration(
|
||||
hintText: '',
|
||||
isCollapsed: true,
|
||||
@ -260,31 +269,39 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
counterText: '',
|
||||
contentPadding:
|
||||
EdgeInsets.only(
|
||||
left: 6.sp,right: 6.sp,bottom: 0,top: 0)),
|
||||
contentPadding: EdgeInsets.only(
|
||||
left: 6.sp,
|
||||
right: 6.sp,
|
||||
bottom: 0,
|
||||
top: 0)),
|
||||
))
|
||||
],
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
Text('元',style: TextStyle(color: Color(0xCCFFFFFF),fontSize: 14.sp),),
|
||||
Text(
|
||||
'(解锁收益都归您)',
|
||||
'元',
|
||||
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(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
child: Text('温馨提示:\n'
|
||||
+ '1、为了维护站内的社交环境,若检测到为不实的联系方式,或以非社交为目的的其他非法用途,会第一时间将您账号封禁,并扣除相关奖励;\n'
|
||||
+ '2、解锁引导语可以让更多的人愿意解锁您的联系方式,让您赚更多的钱;\n'
|
||||
+ '3、每个人解锁后,您都可以得到设置价格的钱,收益无上限哦;\n'
|
||||
+ '4、此外,还可获得几重奖励。',style: TextStyle(color: Color(0xCCFFFFFF).withOpacity(0.5),fontSize: 14.sp),),
|
||||
child: Text(
|
||||
'温馨提示:\n' + '${content}',
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
color: Color(0xCCFFFFFF).withOpacity(0.5),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
@ -299,7 +316,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
height: 30.sp,
|
||||
width: 100.sp,
|
||||
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),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.withOpacity(0.7),
|
||||
@ -320,12 +338,16 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
if (wxEditingController.text.length == 11) {
|
||||
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}$');
|
||||
isPass = exp.hasMatch(wxEditingController.text);
|
||||
isPass =
|
||||
exp.hasMatch(wxEditingController.text);
|
||||
}
|
||||
|
||||
if (wxEditingController.text.isNotEmpty && !isPass) {
|
||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg.hasMatch(wxEditingController.text)) {
|
||||
if (wxEditingController.text.isNotEmpty &&
|
||||
!isPass) {
|
||||
RegExp wxReg = RegExp(
|
||||
r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg
|
||||
.hasMatch(wxEditingController.text)) {
|
||||
showOKToast('请输入正确的微信号');
|
||||
return;
|
||||
}
|
||||
@ -340,7 +362,8 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
if (wxEditingController.text.length == 11) {
|
||||
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}$');
|
||||
isPass = exp.hasMatch(wxEditingController.text);
|
||||
isPass =
|
||||
exp.hasMatch(wxEditingController.text);
|
||||
}
|
||||
if (!isPass) {
|
||||
showOKToast('请输入正确的手机号');
|
||||
@ -348,37 +371,42 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (moneyEditingController.text.isNotEmpty) {
|
||||
if (int.parse(moneyEditingController.text) <= 0) {
|
||||
if (int.parse(moneyEditingController.text) <=
|
||||
0) {
|
||||
showOKToast('请设置联系方式解锁金额大于零');
|
||||
return;
|
||||
} else if (int.parse(moneyEditingController.text) > 300 || int.parse(moneyEditingController.text) < 10) {
|
||||
showOKToast('请设置联系方式解锁金额在10元~300元之间');
|
||||
} else if (int.parse(
|
||||
moneyEditingController.text) >
|
||||
520 ||
|
||||
int.parse(moneyEditingController.text) <
|
||||
10) {
|
||||
showOKToast('请填写解锁金额在10元-520元之间');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (wxInfo.containsKey('10034')) {
|
||||
showOKToast(wxInfo['10034']);
|
||||
return;
|
||||
} else if (wxInfo.containsKey('10595')) {
|
||||
showOKToast(wxInfo['10595']);
|
||||
}
|
||||
Map<String,dynamic> params = { "guideText": descEditingController.text,
|
||||
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
||||
|
||||
'contactType':type,
|
||||
"contact": wxEditingController.text};
|
||||
Map<String, dynamic> params = {
|
||||
"guideText": descEditingController.text,
|
||||
"hideContact": wxInfo.containsKey('hideContact')
|
||||
? wxInfo['hideContact']
|
||||
: 0,
|
||||
'contactType': type,
|
||||
"contact": wxEditingController.text
|
||||
};
|
||||
|
||||
if (moneyEditingController.text.isNotEmpty) {
|
||||
params['price'] = moneyEditingController.text;
|
||||
}
|
||||
|
||||
|
||||
var result = await DioManager().postBody(url: Api.confset,params: params);
|
||||
var result = await DioManager()
|
||||
.postBody(url: Api.confset, params: params);
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('已设置成功,快去邀请圈友解锁呗~');
|
||||
Get.back();
|
||||
@ -390,13 +418,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
height: 30.sp,
|
||||
width: 100.sp,
|
||||
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),
|
||||
decoration: BoxDecoration(
|
||||
// color: const Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
),
|
||||
// color: const Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
gradient: AppColor.mainVerLinearGradient),
|
||||
child: Text(
|
||||
'确认',
|
||||
style: TextStyle(
|
||||
@ -408,7 +436,6 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -432,20 +459,21 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
void updateWxText() async {
|
||||
if (widget.phone.isNotEmpty) {
|
||||
SharedPreferences sharedPreferences =await SharedPreferences.getInstance();
|
||||
String loginPhone = await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE)??"";
|
||||
SharedPreferences sharedPreferences =
|
||||
await SharedPreferences.getInstance();
|
||||
String loginPhone = await sharedPreferences
|
||||
.getString(SharedPreferencesHelper.LOGINPHONE) ??
|
||||
"";
|
||||
wxEditingController.text = loginPhone;
|
||||
type = 1;
|
||||
wxInfo['hideContact'] = 0;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
void loadMyWxInfoData() async {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.mycontactConf, params: {});
|
||||
await DioManager.instance.get(url: Api.mycontactConf, params: {});
|
||||
if (data['code'] == 200) {
|
||||
wxInfo = data['data'];
|
||||
|
||||
@ -454,18 +482,20 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
} else {
|
||||
wxEditingController.text = wxInfo['contact'] ?? '';
|
||||
type = wxInfo['contactType'] ?? 2;
|
||||
wxInfo['hideContact'] = wxInfo['hideContact'] == null ? 0 : wxInfo['hideContact'];
|
||||
wxInfo['hideContact'] =
|
||||
wxInfo['hideContact'] == null ? 0 : wxInfo['hideContact'];
|
||||
descEditingController.text = wxInfo['guideText'] ?? '';
|
||||
moneyEditingController.text = wxInfo['price'] != null ? wxInfo['price'].toString() : '';
|
||||
setState(() {
|
||||
|
||||
});
|
||||
moneyEditingController.text =
|
||||
wxInfo['price'] != null ? wxInfo['price'].toString() : '';
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
wxInfo['10034'] = result['msg'];
|
||||
} else if (result['code'] == 10595) {
|
||||
@ -487,9 +517,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
type = 1;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
},
|
||||
child: Text('手机号'),
|
||||
),
|
||||
@ -497,9 +525,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
type = 3;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
},
|
||||
child: Text('QQ'),
|
||||
),
|
||||
@ -507,9 +533,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
type = 2;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
},
|
||||
child: Text('微信'),
|
||||
),
|
||||
@ -525,4 +549,13 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
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 balanceUnlockWX = '/user-service/contact/unlock/balance';
|
||||
static const balanceUnlockWX = '/user-service/contact/unlock/balanceV2';
|
||||
|
||||
//获取用户解锁微信号设置信息
|
||||
static const wxNumConfig = '/user-service/contact/user/conf/get/';
|
||||
@ -683,5 +683,23 @@ class Api {
|
||||
|
||||
//单个喊话详情
|
||||
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/utils/util.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio/io.dart';
|
||||
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||
|
||||
import '../utils/SharedPreferencesHelper.dart';
|
||||
@ -36,6 +37,11 @@ class DioManager {
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
static CancelToken _globalCancelToken = CancelToken(); // 添加全局CancelToken
|
||||
|
||||
// 存储每个请求的 CancelToken
|
||||
Map<String, CancelToken> _cancelTokens = {};
|
||||
|
||||
Dio? _dio;
|
||||
|
||||
DioManager._init() {
|
||||
@ -47,21 +53,30 @@ class DioManager {
|
||||
connectTimeout: const Duration(seconds: 15),
|
||||
// 接收数据的最长时限
|
||||
receiveTimeout: const Duration(seconds: 15),
|
||||
|
||||
));
|
||||
_dio!.interceptors.add(LogInterceptor(
|
||||
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) {
|
||||
_dio!.options.connectTimeout = Duration(milliseconds: time);
|
||||
_dio?.options.connectTimeout = Duration(milliseconds: time);
|
||||
}
|
||||
|
||||
|
||||
setDioBaseUrl(String url) {
|
||||
if (url != _dio!.options.baseUrl && _dio!.options.baseUrl == Api.testBaseUrl)
|
||||
_dio!.options = BaseOptions(
|
||||
_dio?.options = BaseOptions(
|
||||
// 请求基地址
|
||||
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) {
|
||||
_dio!.options = BaseOptions(
|
||||
// 请求基地址
|
||||
baseUrl: _dio!.options!.baseUrl,
|
||||
// 连接服务器超时时间,单位是毫秒
|
||||
connectTimeout: const Duration(seconds: 30),
|
||||
connectTimeout: const Duration(seconds: 15),
|
||||
// 接收数据的最长时限
|
||||
receiveTimeout: Duration(seconds: time),
|
||||
);
|
||||
@ -240,6 +268,20 @@ class DioManager {
|
||||
}
|
||||
|
||||
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
|
||||
@ -247,7 +289,7 @@ class DioManager {
|
||||
switch (method) {
|
||||
case DioMethod.get:
|
||||
response = await _dio!
|
||||
.request(url, queryParameters: params, options: options);
|
||||
.request(url, queryParameters: params, options: options,cancelToken: cancelToken);
|
||||
break;
|
||||
case DioMethod.post:
|
||||
response = await _dio!.post(url,
|
||||
@ -259,11 +301,11 @@ class DioManager {
|
||||
break;
|
||||
case DioMethod.put:
|
||||
response =
|
||||
await _dio!.put(url, data: json.encode(params), options: options);
|
||||
await _dio!.put(url, data: json.encode(params), options: options,cancelToken: cancelToken);
|
||||
break;
|
||||
case DioMethod.delete:
|
||||
response = await _dio!
|
||||
.delete(url, queryParameters: params, options: options);
|
||||
.delete(url, queryParameters: params, options: options,cancelToken: cancelToken);
|
||||
break;
|
||||
default:
|
||||
// 如果有formData参数,说明是传文件,忽略params的参数
|
||||
@ -278,6 +320,9 @@ class DioManager {
|
||||
data: params, cancelToken: cancelToken, options: options);
|
||||
}
|
||||
}
|
||||
|
||||
// 请求完成后移除 token
|
||||
_cancelTokens.remove(key);
|
||||
// json转model
|
||||
String jsonStr = json.encode(response.data);
|
||||
Map<String, dynamic> responseMap = json.decode(jsonStr);
|
||||
@ -305,6 +350,18 @@ class DioManager {
|
||||
}
|
||||
return responseMap;
|
||||
} 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();
|
||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||
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 nearTip = 'nearTip';
|
||||
|
||||
static const serveTip = 'serveTip';
|
||||
|
||||
static SharedPreferencesHelper? _instance;
|
||||
static SharedPreferences? _preferences;
|
||||
|
||||
@ -217,6 +221,22 @@ class SharedPreferencesHelper {
|
||||
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) {
|
||||
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/circle/view.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/world_call_out/logic.dart';
|
||||
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||
@ -114,6 +115,7 @@ const bgImage = DecorationImage(
|
||||
bool isShowToast = false;
|
||||
///弹窗文本提示 msg: 提示内容
|
||||
showOKToast(String msg) {
|
||||
if (msg.isEmpty) return;
|
||||
if (isShowToast) return;
|
||||
isShowToast = true;
|
||||
int seconds = msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2;
|
||||
@ -186,7 +188,7 @@ noResultWidget({String tip = '正在等待被填充~',Function? callBack, String
|
||||
children: [
|
||||
Image.asset(
|
||||
getBaseImage('no_result'),
|
||||
width: 200.sp,
|
||||
width: 200.sp,
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
@ -196,7 +198,7 @@ noResultWidget({String tip = '正在等待被填充~',Function? callBack, String
|
||||
tip,
|
||||
style: TextStyle(color: Color(0xffdbdbdb), fontSize: 15.sp),
|
||||
),
|
||||
if (callBack != null)
|
||||
if (callBack != null && action.isNotEmpty)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
callBack();
|
||||
@ -204,7 +206,7 @@ noResultWidget({String tip = '正在等待被填充~',Function? callBack, String
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
height: 42.sp,
|
||||
width: 160.sp,
|
||||
width: action.length > 6 ? 200.sp : 160.sp,
|
||||
alignment: Alignment.center,
|
||||
// padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
@ -274,6 +276,7 @@ String convertToThousand(int number) {
|
||||
}
|
||||
|
||||
pushLoginPage() async {
|
||||
DioManager.getInstance().cancelAllRequest();
|
||||
await logoutIM();
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
String loginPhone =
|
||||
@ -293,6 +296,7 @@ pushLoginPage() async {
|
||||
sharedPreferences.setString(SharedPreferencesHelper.firstLogin, '1');
|
||||
sharedPreferences.setString(SharedPreferencesHelper.UPDATEONE, updateone);
|
||||
sharedPreferences.setString(SharedPreferencesHelper.UPDATE, update);
|
||||
sharedPreferences.setBool(SharedPreferencesHelper.serveTip, false);
|
||||
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);
|
||||
|
||||
// Future<void> compressVideo(
|
||||
@ -723,21 +846,24 @@ Widget circlrPeopleInfoWidget(List<Widget> widgets,Circle bean) {
|
||||
height: 30.sp,
|
||||
width:
|
||||
30.0.sp + 15.sp * (widgets.length - 1.sp),
|
||||
child: Stack(
|
||||
child: IgnorePointer(
|
||||
ignoring: true, // true 表示忽略手势,组件不可点击
|
||||
child:Stack(
|
||||
alignment: Alignment.center,
|
||||
children: widgets,
|
||||
),
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
width: 0.sp,
|
||||
),
|
||||
|
||||
Text(
|
||||
'${convertToTenThousand(bean.joinTotal)}圈友加入',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 12.sp),
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
width: 2.sp,
|
||||
),
|
||||
Image.asset(getCircleImage('more_icon'),width: 20.sp,),
|
||||
],
|
||||
@ -1739,105 +1865,15 @@ void sendApplyToAgentData(var circleId) async {
|
||||
}
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
} 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(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
return ApplyForAnAgentDialog(circleId: int.parse('${circleId}'));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
height: showMessage ? 85 : 0,
|
||||
height: showMessage ? 75 : 0,
|
||||
child: Container(
|
||||
width: Get.width - 16,
|
||||
// margin: EdgeInsets.only(top:10.sp),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user