1.3.9代码提交
This commit is contained in:
parent
d372be171d
commit
0a4c28d7bd
@ -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 30
|
||||
versionName "1.3.8"
|
||||
versionCode 31
|
||||
versionName "1.3.9"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -637,6 +637,23 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () {
|
||||
showKeyboard = true;
|
||||
widget.goDownBottom();
|
||||
|
||||
widget.textEditingController.value = TextEditingValue(
|
||||
///用来设置文本 controller.text = "0000"
|
||||
text: widget.textEditingController.text,
|
||||
///设置光标的位置
|
||||
selection: TextSelection.fromPosition(
|
||||
///用来设置文本的位置
|
||||
TextPosition(
|
||||
affinity: TextAffinity.downstream,
|
||||
/// 光标向后移动的长度
|
||||
offset: widget.textEditingController.text.length),),);
|
||||
|
||||
// = TextEditingController.fromValue(
|
||||
// ///用来设置初始化时显示
|
||||
|
||||
// );
|
||||
|
||||
setState(() {
|
||||
showEmojiPanel = false;
|
||||
showMore = false;
|
||||
|
||||
@ -15,7 +15,8 @@ class ChatGiftPannel extends StatefulWidget {
|
||||
String accid;
|
||||
String giftId;
|
||||
int selectedIndex;
|
||||
ChatGiftPannel({Key? key,required this.accid,this.selectedIndex = 0, this.giftId = ''}) : super(key: key);
|
||||
bool isShowVip;
|
||||
ChatGiftPannel({Key? key,required this.accid,this.selectedIndex = 0, this.giftId = '',this.isShowVip = true}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _ChatGiftPannelState();
|
||||
@ -33,7 +34,7 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
tabController = TabController(
|
||||
length:2,
|
||||
length:widget.isShowVip ? 2 : 1,
|
||||
vsync: this,
|
||||
initialIndex: widget.selectedIndex
|
||||
);
|
||||
@ -84,14 +85,14 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
|
||||
children: [
|
||||
Container(
|
||||
height: 30.sp,
|
||||
width:120.sp,
|
||||
width: widget.isShowVip ? 120.sp : 60.sp,
|
||||
margin: EdgeInsets.only(left: 5.sp,),
|
||||
child: TabBar(
|
||||
isScrollable: false,
|
||||
automaticIndicatorColorAdjustment: false,
|
||||
labelPadding: EdgeInsets.symmetric(horizontal: 4.0.sp),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
indicatorColor: AppColor.mainColor,
|
||||
indicatorColor: widget.isShowVip ? AppColor.mainColor : Colors.transparent,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
@ -102,17 +103,19 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16.sp, fontWeight: FontWeight.w500),
|
||||
controller: tabController,
|
||||
tabs: const <Widget>[
|
||||
tabs: widget.isShowVip ? <Widget>[
|
||||
Tab(
|
||||
text: '礼物',
|
||||
),
|
||||
Tab(
|
||||
text: '会员',
|
||||
),
|
||||
],
|
||||
] : <Widget>[Tab(
|
||||
text: '礼物',
|
||||
)],
|
||||
),
|
||||
),
|
||||
tabController.index == 0 ? Container(
|
||||
tabController.index == 0 && widget.isShowVip ? Container(
|
||||
margin: EdgeInsets.only(right: 15.sp),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@ -148,6 +151,7 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
|
||||
controller: tabController,
|
||||
children: [
|
||||
Gift(widget.accid,widget.giftId),
|
||||
if (widget.isShowVip)
|
||||
PartnerOption(accid: widget.accid),
|
||||
],
|
||||
))
|
||||
|
||||
@ -97,7 +97,7 @@ class _GiftState extends State<Gift> {
|
||||
}),
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
height: 48.sp,
|
||||
width: Get.width,
|
||||
child: Row(
|
||||
@ -286,13 +286,13 @@ class _GiftState extends State<Gift> {
|
||||
width: Get.width,
|
||||
// color: Colors.red,
|
||||
height: 255.sp,
|
||||
padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
child: GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
crossAxisSpacing: 0.0.sp,
|
||||
mainAxisSpacing: 0.sp,
|
||||
childAspectRatio: (Get.width - 32.sp) / 4 / 127.5.sp,
|
||||
childAspectRatio: (Get.width - 32.sp) / 4 / 120.5.sp,
|
||||
),
|
||||
itemCount: info.length,
|
||||
// Replace with the actual item count
|
||||
|
||||
@ -76,6 +76,13 @@ class CircleLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
loadData() {
|
||||
loadCircleListData();
|
||||
loadCirclePeopleData();
|
||||
initGerder();
|
||||
getCityList();
|
||||
}
|
||||
|
||||
|
||||
loadCircleListData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
|
||||
@ -21,6 +21,7 @@ import 'package:gradient_borders/gradient_borders.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import '../../../../util/eventBus.dart';
|
||||
import '../../chat/widget/chat_gift_pannel.dart';
|
||||
|
||||
const String todayAddWxStatus = 'todayAddWxStatus';
|
||||
|
||||
@ -658,6 +659,18 @@ class _DiscoverState extends State<Discover>
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
showGiftPannel(user.imAccid!.toString());
|
||||
},
|
||||
child: Image.asset(
|
||||
getMsgImage('gift'),
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushChatPage(
|
||||
@ -976,6 +989,17 @@ class _DiscoverState extends State<Discover>
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
showGiftPannel(String accId) {
|
||||
Get.bottomSheet(
|
||||
ChatGiftPannel(
|
||||
accid: accId,
|
||||
isShowVip:false,
|
||||
),
|
||||
isScrollControlled: false,
|
||||
enableDrag: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DiscoverDataRefresh {
|
||||
|
||||
@ -760,7 +760,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
height: 30.sp,
|
||||
),
|
||||
Text(
|
||||
lists.user!.city ?? '外星',
|
||||
|
||||
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
@ -1068,7 +1069,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
height: 30.sp,
|
||||
),
|
||||
Text(
|
||||
lists.user!.city ?? '外星',
|
||||
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
|
||||
@ -573,7 +573,7 @@ class _LikeViewState extends State<LikeView>
|
||||
height: 30.sp,
|
||||
),
|
||||
Text(
|
||||
lists.user!.city ?? '外星',
|
||||
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
@ -877,7 +877,7 @@ class _LikeViewState extends State<LikeView>
|
||||
height: 30.sp,
|
||||
),
|
||||
Text(
|
||||
lists.user!.city ?? '外星',
|
||||
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'),
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
|
||||
@ -13,6 +13,7 @@ import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
@ -31,12 +32,16 @@ import '../../util/eventBus.dart';
|
||||
import '../../view/notice.dart';
|
||||
import '../circle/view.dart';
|
||||
import '../dialog/UpdateDialog.dart';
|
||||
import '../like/logic.dart';
|
||||
import '../minefragment/view.dart';
|
||||
import '../msg/view.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
late TabController tabController;
|
||||
var connectivitySub;
|
||||
ConnectivityResult? currentResult;
|
||||
|
||||
int currentIndex = 0;
|
||||
Widget currentPage = Container();
|
||||
|
||||
@ -61,6 +66,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
connectivitySub.cancel();
|
||||
TencentImSDKPlugin.v2TIMManager
|
||||
.v2TIMMessageManager.removeAdvancedMsgListener();
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
@ -71,6 +77,10 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
unreadSIze.value = '0';
|
||||
// 设置网络变化监听
|
||||
connectListener();
|
||||
// 获取网络连接状态
|
||||
getConnectType();
|
||||
getIMData();
|
||||
|
||||
setFirstData();
|
||||
@ -433,6 +443,47 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
showcirlceUnred.value = isHasNew;
|
||||
}
|
||||
}
|
||||
|
||||
/// 获取联网类型
|
||||
void getConnectType() async {
|
||||
var connectResult = await (Connectivity().checkConnectivity());
|
||||
|
||||
if (connectResult == ConnectivityResult.mobile) {
|
||||
// _netType = "4G";
|
||||
} else if (connectResult == ConnectivityResult.wifi) {
|
||||
// _netType = "wifi";
|
||||
} else if (connectResult == ConnectivityResult.none) {
|
||||
// _netType = "未连接";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// 判断网络是否连接
|
||||
Future<bool> isConnected() async {
|
||||
var connectResult = await (Connectivity().checkConnectivity());
|
||||
return connectResult != ConnectivityResult.none;
|
||||
}
|
||||
|
||||
/// 设置网络切换监听
|
||||
connectListener() {
|
||||
connectivitySub = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
|
||||
|
||||
if (result == ConnectivityResult.none) {
|
||||
if (currentIndex == 0) {
|
||||
var logic = Get.put(CircleLogic());
|
||||
logic.loadData();
|
||||
} else if (currentIndex == 1) {
|
||||
var logic = Get.put(LikeLogic());
|
||||
logic.loadData();
|
||||
} else if (currentIndex == 2) {
|
||||
final logic = Get.find<MsgLogic>();
|
||||
logic.loadData();
|
||||
} else if (currentIndex == 3) {
|
||||
var logic = Get.put(MinefragmentLogic());
|
||||
logic.loadData();
|
||||
}
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -55,6 +55,12 @@ class LikeLogic extends GetxController {
|
||||
loadMyCircleData();
|
||||
}
|
||||
|
||||
loadData() {
|
||||
loadInviteData();
|
||||
loadCircleListData();
|
||||
loadMyCircleData();
|
||||
}
|
||||
|
||||
loadInviteData() async {
|
||||
|
||||
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||
|
||||
@ -83,7 +83,6 @@ class Complete_materialLogic extends GetxController {
|
||||
state.roleId = userInfoBean!.role.toString();
|
||||
state.orientation = getOrientationContent(userInfoBean!.orientation);
|
||||
if (userInfoBean!.orientations.isNotEmpty) {
|
||||
|
||||
watchGenderList.forEach((element) {
|
||||
if (userInfoBean!.orientations!.contains(element.id)) {
|
||||
element.isSelect = true;
|
||||
@ -105,6 +104,9 @@ class Complete_materialLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
} else {
|
||||
watchGenderList[1].isSelect = true;
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -55,6 +55,12 @@ class MinefragmentLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
loadData() {
|
||||
getMode();
|
||||
checkVersion();
|
||||
checkShowPositiveFeedBack();
|
||||
}
|
||||
|
||||
Future<void> checkVersion() async {
|
||||
var data = await DioManager.instance.get(url: Api.APP_VERSION);
|
||||
var bean = BaseResponse<UpdateInfo>.fromJson(
|
||||
|
||||
@ -15,6 +15,7 @@ import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||
import '../../common/colors/app_color.dart';
|
||||
import '../../main.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/util.dart';
|
||||
@ -123,14 +124,14 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
top:24.sp,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 20.sp,right: 50.sp),
|
||||
padding: EdgeInsets.only(left: 18.sp,right: 40.sp),
|
||||
height: 50.sp,
|
||||
child: Row(
|
||||
children: [
|
||||
if (!logic.isProxy)
|
||||
Image.asset(getHomeImage('mine_vip_icon'),width: 46.sp,),
|
||||
|
||||
SizedBox(width: !logic.isProxy ? 10.sp : 60.sp,),
|
||||
SizedBox(width: !logic.isProxy ? 5.sp : 60.sp,),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -142,8 +143,6 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
),
|
||||
),
|
||||
if (!logic.isProxy)
|
||||
SizedBox(width: 10.sp,),
|
||||
if (!logic.isProxy)
|
||||
Image.asset(getHomeImage(logic.isVip.value == 0 ? 'open_vip' : 'pay_vip'),height: 28.sp,),
|
||||
],
|
||||
),
|
||||
@ -151,6 +150,7 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
|
||||
],),
|
||||
),
|
||||
myAssetsItem(),
|
||||
_circleLiveView(logic),
|
||||
Container(height: 20.sp,)
|
||||
],
|
||||
@ -161,11 +161,74 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
});
|
||||
}
|
||||
|
||||
myAssetsItem() {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.MyAssets);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 10.sp,),
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.sp,
|
||||
right: 12.sp,
|
||||
bottom: 10.sp,
|
||||
top: 10.sp),
|
||||
// height: 80.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.05),
|
||||
borderRadius: BorderRadius.circular(13.sp)),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'我的资产',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 18.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
Text(
|
||||
'您的圈内资产和收入都在这里哦',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
Container(
|
||||
height: 26.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(13.sp)),
|
||||
child: Text(
|
||||
'前往查看',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _circleLiveView(MinefragmentLogic logic) {
|
||||
|
||||
|
||||
return Column(
|
||||
children: [_myAssetItemView(),_circleItemView(logic),_invienItemView(),_shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()],
|
||||
children: [_circleItemView(logic),_invienItemView(),_shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()],
|
||||
);
|
||||
}
|
||||
|
||||
@ -328,8 +391,9 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
|
||||
Widget _editGoodReviewItemView() {
|
||||
|
||||
return mineLogic.isShwGoodReview ? GestureDetector(
|
||||
return (mineLogic.isShwGoodReview ?? false) ? GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
|
||||
onTap: () {
|
||||
showTipPop();
|
||||
},
|
||||
|
||||
@ -1018,9 +1018,9 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 10.sp),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 5.sp),
|
||||
height: 72.sp,
|
||||
width: 140.sp,
|
||||
width: 145.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.sp),
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
// ignore_for_file: empty_catches
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/app/msg/TIMUIKitConversation/tim_uikit_conversation_last_msg.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
@ -132,6 +134,18 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
|
||||
|
||||
@override
|
||||
Widget tuiBuild(BuildContext context, TUIKitBuildValue value) {
|
||||
int vipType = 0;
|
||||
if (userInfo != null) {
|
||||
if (userInfo!.customInfo!.containsKey('Vip')) {
|
||||
if (userInfo!.customInfo!['Vip'] != null) {
|
||||
String infoStr = userInfo!.customInfo!['Vip']!;
|
||||
Map infoMap = jsonDecode(infoStr);
|
||||
if (infoMap.containsKey('type')) {
|
||||
vipType = infoMap['type'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
final TUITheme theme = value.theme;
|
||||
final isDesktopScreen =
|
||||
TUIKitScreenUtils.getFormFactor(context) == DeviceType.Desktop;
|
||||
@ -227,6 +241,15 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
|
||||
)
|
||||
),
|
||||
child: Text('官方',style: TextStyle(color: Color(0xFFF7FAFA),fontSize: 10.sp,fontWeight: FontWeight.w600),),),
|
||||
if (vipType > 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.sp,),
|
||||
child: Image(
|
||||
image: AssetImage(getBaseImage(vipType == 2 ? 'year_vip' : "vip")),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
) ,),
|
||||
|
||||
Expanded(
|
||||
child:Container()),
|
||||
_getTimeStringForChatWidget(context, theme),
|
||||
|
||||
@ -32,6 +32,14 @@ class MsgLogic extends GetxController {
|
||||
loadLikeData();
|
||||
loadStatusData();
|
||||
}
|
||||
|
||||
loadData() {
|
||||
loadMyInfoData();
|
||||
loadChatData();
|
||||
loadLikeData();
|
||||
loadStatusData();
|
||||
}
|
||||
|
||||
loadLikeData() async {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.fansList, params: {
|
||||
|
||||
@ -53,7 +53,7 @@ class My_assetsPage extends StatelessWidget {
|
||||
return logic.myAssest != null ? SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
child:Stack(
|
||||
children: [
|
||||
@ -282,8 +282,68 @@ class My_assetsPage extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
)),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
navigateStartGetMoeny();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 10.sp,left: 15.sp,right: 15.sp),
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.sp,
|
||||
right: 12.sp,
|
||||
bottom: 10.sp,
|
||||
top: 10.sp),
|
||||
// height: 80.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x1AFFFFFF),
|
||||
borderRadius: BorderRadius.circular(13.sp)),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'微乐园赚钱攻略',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 18.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
Text(
|
||||
'几种赚钱方式助你躺赚',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
Container(
|
||||
height: 26.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(13.sp)),
|
||||
child: Text(
|
||||
'开始赚钱',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 16.sp),
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
height: 401.sp,
|
||||
width: Get.width,
|
||||
child: RechargeScreenDialog(isShowBalance: false,),
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../circle/logic.dart';
|
||||
|
||||
class QuickLogic extends GetxController {
|
||||
|
||||
@ -37,7 +38,21 @@ class QuickLogic extends GetxController {
|
||||
refreshController.loadComplete();
|
||||
lists = list;
|
||||
} else {
|
||||
lists.addAll(list);
|
||||
|
||||
list.forEach((element) {
|
||||
var info = VicinityItemBean.fromJson(element);
|
||||
bool isContain = false;
|
||||
lists.forEach((element1) {
|
||||
var info1 = VicinityItemBean.fromJson(element1);
|
||||
if (info.id == info1.id) {
|
||||
isContain = true;
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
lists.add(element);
|
||||
}
|
||||
});
|
||||
// lists.addAll(list);
|
||||
refreshController.loadComplete();
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -5,6 +5,6 @@ import 'state.dart';
|
||||
class WebviewLogic extends GetxController {
|
||||
final WebviewState state = WebviewState();
|
||||
|
||||
var title = Get.arguments['title'] ?? '';
|
||||
String title = Get.arguments['title'] ?? '';
|
||||
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ class _WebViewContainerState extends State<WebviewPage> {
|
||||
|
||||
controller = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..setBackgroundColor(Colors.white)
|
||||
..setBackgroundColor(logic.title.contains('赚钱') || logic.title.contains('攻略') ? Colors.transparent : Colors.white)
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {
|
||||
|
||||
@ -24,6 +24,7 @@ import 'dart:ui' as ui;
|
||||
import 'package:fluwx/fluwx.dart' as fluwx;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../app/likelist/logic.dart';
|
||||
|
||||
@ -43,7 +44,7 @@ class _CircleShareState extends State<CircleShare> {
|
||||
GlobalKey _globalKey = GlobalKey();
|
||||
List<UserListItem> lists = [];
|
||||
late MinefragmentLogic logic;
|
||||
|
||||
List<V2TimUserFullInfo> conList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -281,37 +282,46 @@ class _CircleShareState extends State<CircleShare> {
|
||||
SafeArea(
|
||||
top: false,
|
||||
child: Container(
|
||||
height: lists.isNotEmpty ? 264.sp : 164.sp,
|
||||
height: lists.isNotEmpty || conList.isNotEmpty ? 264.sp : 164.sp,
|
||||
width: Get.width,
|
||||
color: Color(0xFF292247),
|
||||
child: Column(
|
||||
children: [
|
||||
if (lists.isNotEmpty)
|
||||
if (lists.isNotEmpty || conList.isNotEmpty)
|
||||
Container(
|
||||
height: 100.sp,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemBuilder: (context,index) {
|
||||
if (lists.length > 5 && index == 4) {
|
||||
if (index == 4) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.bottomSheet(FollowMeDialog( bean: widget.bean,), isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
},
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(getCircleImage('share_more'),width: 51.sp,),
|
||||
SizedBox(height: 4.sp,),
|
||||
Text('更多',style: TextStyle(color: Colors.white,fontSize: 14.sp),)
|
||||
],
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
width: Get.width / 5,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(getCircleImage('share_more'),width: 51.sp,),
|
||||
SizedBox(height: 4.sp,),
|
||||
Text('更多',style: TextStyle(color: Colors.white,fontSize: 14.sp),)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
var info = lists[index];
|
||||
var info;
|
||||
if (conList.length > index) {
|
||||
info = conList[index];
|
||||
} else {
|
||||
info = lists[index];
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
sendCircleCustomMsg(info.user.imId,
|
||||
sendCircleCustomMsg(info.userID ?? info.user.imId,
|
||||
jsonEncode(widget.bean.toJson()), '分享[${widget.bean.title}]');
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -320,14 +330,14 @@ class _CircleShareState extends State<CircleShare> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(child: Image.network(info.user.avatar,width: 51.sp,height: 51.sp,fit: BoxFit.cover,),),
|
||||
ClipOval(child: Image.network(info.faceUrl ?? info.user.avatar,width: 51.sp,height: 51.sp,fit: BoxFit.cover,),),
|
||||
SizedBox(height: 4.sp,),
|
||||
Text(info.user.nickname,style: TextStyle(color: Colors.white,fontSize: 14.sp),)
|
||||
Text(info.nickName ?? info.user.nickname,style: TextStyle(color: Colors.white,fontSize: 14.sp),maxLines: 1,overflow: TextOverflow.ellipsis,)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},itemCount: lists.length > 5 ? 5 : lists.length,),
|
||||
},itemCount: conList.length + lists.length > 5 ? 5 : conList.isNotEmpty ? conList.length : lists.length,),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
@ -786,13 +796,33 @@ class _CircleShareState extends State<CircleShare> {
|
||||
}
|
||||
|
||||
void loadFollowMeData() async {
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.fansList, params: {'page': 1,'page_size':6});
|
||||
var bean = BaseResponse<UserList>.fromJson(
|
||||
data, (data) => UserList.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
lists.addAll(bean.data.lists);
|
||||
if (conList.isEmpty) {
|
||||
conList = await loadConverstationListData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (conList.length < 5) {
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.fansList, params: {'page': 1,'page_size':6});
|
||||
var bean = BaseResponse<UserList>.fromJson(
|
||||
data, (data) => UserList.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
data.forEach((element) {
|
||||
bool isContain = false;
|
||||
conList.forEach((user) {
|
||||
if (element.user.imId == user.userID!) {
|
||||
isContain = true;
|
||||
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
lists.add(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setState(() {
|
||||
|
||||
});
|
||||
|
||||
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../app/circle/logic.dart';
|
||||
import '../../app/likelist/logic.dart';
|
||||
@ -31,9 +32,10 @@ class FollowMeDialog extends StatefulWidget {
|
||||
class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
// TODO: add state variables and methods
|
||||
List<UserListItem> lists = [];
|
||||
List<V2TimUserFullInfo> conList = [];
|
||||
bool isMore = true;
|
||||
int page = 1;
|
||||
bool isVip = false;
|
||||
bool isVip = true;
|
||||
final RefreshController refreshController = RefreshController();
|
||||
|
||||
|
||||
@ -41,6 +43,7 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
loadMineInfo();
|
||||
loadData();
|
||||
}
|
||||
@ -69,9 +72,9 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'喜欢我的',
|
||||
'最近聊过和喜欢我的',
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp,
|
||||
fontSize: 18.sp,
|
||||
color: Colors.white
|
||||
)),
|
||||
Positioned(
|
||||
@ -97,9 +100,12 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: lists.length,
|
||||
itemCount: lists.length + conList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListItem(lists[index], index);
|
||||
if (conList.length > index) {
|
||||
return ConListItem(conList[index], index);
|
||||
}
|
||||
return ListItem(lists[index - conList.length], index - conList.length);
|
||||
},
|
||||
),
|
||||
|
||||
@ -316,6 +322,68 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
));
|
||||
}
|
||||
|
||||
Widget ConListItem(V2TimUserFullInfo item, int index) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
// if (isVip || index < 3) {
|
||||
sendCircleCustomMsg(item.userID!, jsonEncode(widget.bean.toJson()), '分享[${widget.bean.title}]');
|
||||
// Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
// arguments: item.user.id.toString());
|
||||
// }
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 21.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
imageUrl: item.faceUrl!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0.sp,
|
||||
// left: 0.sp,
|
||||
bottom: 0.sp,
|
||||
child: Image.asset(
|
||||
getMsgImage(getGenderContent(item.role!)),
|
||||
height: 13.sp,
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(width: 10.sp),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
item.nickName!,
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
// Placeholder image
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
// Pla
|
||||
const Spacer(),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget ListItem(UserListItem item, int index) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -339,33 +407,21 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
Stack(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
imgList.add(item.user.avatar);
|
||||
Get.toNamed(AppRoutes.Swiper,
|
||||
arguments: {'imaglist': imgList, 'index': 0});
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
imageUrl: item.user.avatarThumb,
|
||||
width: 53.sp,
|
||||
height: 53.sp,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
imageUrl: item.user.avatarThumb,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0.sp,
|
||||
left: 0.sp,
|
||||
// left: 0.sp,
|
||||
bottom: 0.sp,
|
||||
child: item.user.vip != 0
|
||||
? Image(
|
||||
image: AssetImage(getBaseImage(
|
||||
item.user.vip == 1 ? "vip" : 'year_vip')),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
child: Image.asset(
|
||||
getMsgImage(getGenderContent(item.user.gender)),
|
||||
height: 13.sp,
|
||||
)
|
||||
: Container(),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -377,28 +433,17 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
children: [
|
||||
Text(
|
||||
item.user.nickname,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 14,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(width: 4.sp),
|
||||
// SizedBox(height: 8.sp),
|
||||
_buildInfoRow(item),
|
||||
// _buildInfoRow(item),
|
||||
// Placeholder image
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8.sp),
|
||||
SizedBox(
|
||||
width: 200.sp,
|
||||
child: Text(
|
||||
item.user.signature,
|
||||
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Pla
|
||||
@ -466,14 +511,29 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
if (conList.isEmpty) {
|
||||
conList = await loadConverstationListData();
|
||||
}
|
||||
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.fansList, params: {'page': page,'page_size':6});
|
||||
.get(url: Api.fansList, params: {'page': page,'page_size':8});
|
||||
var bean = BaseResponse<UserList>.fromJson(
|
||||
data, (data) => UserList.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
List data = bean.data.lists;
|
||||
if (data.isNotEmpty) {
|
||||
lists.addAll(bean.data.lists);
|
||||
data.forEach((element) {
|
||||
bool isContain = false;
|
||||
conList.forEach((user) {
|
||||
if (element.user.imId == user.userID!) {
|
||||
isContain = true;
|
||||
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
lists.add(element);
|
||||
}
|
||||
});
|
||||
refreshController.loadComplete();
|
||||
} else {
|
||||
isMore = false;
|
||||
|
||||
@ -35,7 +35,9 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
|
||||
if (data['code'] == 200) {
|
||||
recommendCircleFriendData = data['data'][0];
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,9 +388,9 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 10.sp),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 5.sp),
|
||||
height: 72.sp,
|
||||
width: 140.sp,
|
||||
width: 145.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.sp),
|
||||
border: GradientBoxBorder(
|
||||
@ -468,104 +470,110 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black.withOpacity(0.75),
|
||||
body: recommendCircleFriendData.isNotEmpty
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 16.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0, -1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: Text(
|
||||
'圈友推荐',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||
]),
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.black.withOpacity(0.75),
|
||||
body: recommendCircleFriendData.isNotEmpty
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 16.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
itemWidget(),
|
||||
Container(
|
||||
height: 40.sp,
|
||||
margin: EdgeInsets.only(top: 20.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.sp,
|
||||
height: 40.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF392D53),
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0, -1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: Text(
|
||||
'先不看了',
|
||||
'圈友推荐',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||
]),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 40.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
loadRecommendCircleFriendData();
|
||||
},
|
||||
child: Container(
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
itemWidget(),
|
||||
Container(
|
||||
height: 40.sp,
|
||||
margin: EdgeInsets.only(top: 20.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.sp,
|
||||
height: 40.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainHorLinearGradient,
|
||||
color: Color(0xFF392D53),
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'换一位',
|
||||
'先不看了',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container());
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 40.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
loadRecommendCircleFriendData();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.sp,
|
||||
height: 40.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainHorLinearGradient,
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'换一位',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ final TUIChatSeparateViewModel chatSeparateViewModel =
|
||||
OverlayEntry? mainOverlayEntry;
|
||||
|
||||
void main() {
|
||||
// setCustomErrorWidget();
|
||||
FlutterBugly.postCatchedException(() async {
|
||||
// 如果需要 ensureInitialized,请在这里运行。
|
||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -66,6 +67,23 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
setCustomErrorWidget() {
|
||||
ErrorWidget.builder = (FlutterErrorDetails details) {
|
||||
print(details.toString());
|
||||
// Widget errorBuilder;
|
||||
// if (isDebug){
|
||||
// // debug 建议走系统的,方便排查问题
|
||||
// errorBuilder = defaultErrorBuilder(details);
|
||||
// } else{
|
||||
// // 线上环境 走业务兜底,避免影响线上用户
|
||||
// errorBuilder = buildErrorWidget(details);
|
||||
// }
|
||||
return Center(
|
||||
child: Text('请重新加载',style: TextStyle(color: Colors.white,fontSize: 15.sp),),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Future<void> getLostData() async {
|
||||
final ImagePicker picker = ImagePicker();
|
||||
final LostDataResponse response = await picker.retrieveLostData();
|
||||
|
||||
@ -308,4 +308,6 @@ class Api {
|
||||
|
||||
//是否弹窗
|
||||
static const popup = '/user-service/follow/popup/';
|
||||
|
||||
|
||||
}
|
||||
@ -17,6 +17,8 @@ import 'package:oktoast/oktoast.dart';
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_conversation_view_model.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:video_compress/video_compress.dart';
|
||||
@ -431,6 +433,14 @@ void navigateToInviteStrategy() {
|
||||
});
|
||||
}
|
||||
|
||||
//跳转到赚钱攻略
|
||||
navigateStartGetMoeny() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "微乐园赚钱攻略",
|
||||
"url": 'https://iquanpai.com/app-h5/4_178.html'
|
||||
});
|
||||
}
|
||||
|
||||
void navigateToCustomRoute(BannerItem bannerItem) async {
|
||||
print(bannerItem.param);
|
||||
switch (bannerItem.type) {
|
||||
@ -847,3 +857,60 @@ Map checkCardReturnData(Map recommendCircleFriendData) {
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
Future<List<V2TimUserFullInfo>> loadConverstationListData() async {
|
||||
TUIConversationViewModel model =
|
||||
serviceLocator<TUIConversationViewModel>();
|
||||
|
||||
List<V2TimConversation?> filteredConversationList = model.conversationList
|
||||
.where(
|
||||
(element) => (element?.groupID != null || element?.userID != null))
|
||||
.toList();
|
||||
|
||||
// 过滤指定的 userID qpqz_prod_10_10000000000
|
||||
String devtTargetUserID = "qpqz_dev_10_10000000000";
|
||||
String prodTargetUserID = "qpqz_prod_10_10000000000";
|
||||
filteredConversationList = filteredConversationList
|
||||
.where((conversation) =>
|
||||
conversation?.userID != devtTargetUserID &&
|
||||
conversation?.userID != prodTargetUserID)
|
||||
.toList();
|
||||
|
||||
|
||||
List<String> userIdList = [];
|
||||
|
||||
filteredConversationList.forEach((element) {
|
||||
userIdList.add(element!.userID!);
|
||||
});
|
||||
|
||||
V2TimValueCallback<String> getLoginUserRes =
|
||||
await TencentImSDKPlugin.v2TIMManager.getLoginUser();
|
||||
if (getLoginUserRes.code == 0) {
|
||||
//获取成功
|
||||
if (getLoginUserRes.data != null) {
|
||||
userIdList.insert(
|
||||
0, getLoginUserRes.data!); // getLoginUserRes.data为查询到的登录用户的UserID
|
||||
}
|
||||
}
|
||||
//获取用户资料
|
||||
V2TimValueCallback<List<V2TimUserFullInfo>> getUsersInfoRes =
|
||||
await TencentImSDKPlugin.v2TIMManager
|
||||
.getUsersInfo(userIDList: userIdList); //需要查询的用户id列表
|
||||
if (getUsersInfoRes.code == 0) {
|
||||
// 查询成功
|
||||
getUsersInfoRes.data?.forEach((element) {
|
||||
element.allowType; //用户的好友验证方式 0:允许所有人加我好友 1:不允许所有人加我好友 2:加我好友需我确认
|
||||
element.birthday; //用户生日
|
||||
element.customInfo; //用户的自定义状态
|
||||
element.faceUrl; //用户头像 url
|
||||
element.gender; //用户的性别 1:男 2:女
|
||||
element.level; //用户的等级
|
||||
element.nickName; //用户昵称
|
||||
element.role; //用户的角色
|
||||
element.selfSignature; //用户的签名
|
||||
element.userID; //用户 ID
|
||||
});
|
||||
return getUsersInfoRes.data ?? [];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user