修改反馈问题
This commit is contained in:
parent
f9c89c6c73
commit
e84d9eb651
@ -71,8 +71,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 37
|
versionCode 39
|
||||||
versionName "1.4.5"
|
versionName "1.4.7"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
BIN
circle_app/assets/images/mine/save.png
Normal file
BIN
circle_app/assets/images/mine/save.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
@ -381,7 +381,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.2;
|
MARKETING_VERSION = 1.4.4;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -530,7 +530,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.2;
|
MARKETING_VERSION = 1.4.4;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -573,7 +573,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.2;
|
MARKETING_VERSION = 1.4.4;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|||||||
@ -89,9 +89,10 @@ class _BillState extends State<BillPage> with SingleTickerProviderStateMixin {
|
|||||||
// _tabController.animateTo(index);
|
// _tabController.animateTo(index);
|
||||||
// },
|
// },
|
||||||
children: [
|
children: [
|
||||||
|
billListView(3),
|
||||||
billListView(1),
|
billListView(1),
|
||||||
billListView(2),
|
billListView(2),
|
||||||
billListView(3),
|
|
||||||
// billListView(4),
|
// billListView(4),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -192,11 +193,12 @@ class _BillState extends State<BillPage> with SingleTickerProviderStateMixin {
|
|||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
labelStyle: TextStyle(fontSize: 16.sp),
|
labelStyle: TextStyle(fontSize: 16.sp),
|
||||||
tabs: const [
|
tabs: const [
|
||||||
Tab(
|
|
||||||
text: "充值",
|
|
||||||
),
|
|
||||||
Tab(text: "消耗"),
|
|
||||||
Tab(text: "收入"),
|
Tab(text: "收入"),
|
||||||
|
Tab(
|
||||||
|
text: "充值/奖励",
|
||||||
|
),
|
||||||
|
Tab(text: "支出"),
|
||||||
|
|
||||||
],
|
],
|
||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
// _pageController.animateToPage(
|
// _pageController.animateToPage(
|
||||||
@ -258,7 +260,7 @@ class ListItemWidget extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
type==2 ? '-'+item.amount.toString(): '+'+item.amount.toString(),
|
type==2 ? '-'+item.amount.toString() + '小票' : '+'+ '${type == 3 ? (item.amount * 0.01).toStringAsFixed(2) + '元' : item.amount.toString() + '小票'}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xffefd84e),
|
color: const Color(0xffefd84e),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
|
|||||||
@ -299,6 +299,7 @@ class CircleLogic extends GetxController {
|
|||||||
deep = bean.data.deep;
|
deep = bean.data.deep;
|
||||||
} catch (Exception) {}
|
} catch (Exception) {}
|
||||||
|
|
||||||
|
myVip = bean.data.isVip ? 1 : 0;
|
||||||
if (vicinityPage == 1) {
|
if (vicinityPage == 1) {
|
||||||
cityName = bean.data.city;
|
cityName = bean.data.city;
|
||||||
|
|
||||||
@ -362,12 +363,14 @@ class CircleLogic extends GetxController {
|
|||||||
class VicinityBean {
|
class VicinityBean {
|
||||||
String city;
|
String city;
|
||||||
int offset;
|
int offset;
|
||||||
|
bool isVip;
|
||||||
int deep;
|
int deep;
|
||||||
List<VicinityItemBean> users;
|
List<VicinityItemBean> users;
|
||||||
|
|
||||||
VicinityBean(
|
VicinityBean(
|
||||||
{required this.city,
|
{required this.city,
|
||||||
required this.users,
|
required this.users,
|
||||||
|
required this.isVip,
|
||||||
required this.offset,
|
required this.offset,
|
||||||
required this.deep});
|
required this.deep});
|
||||||
|
|
||||||
@ -377,6 +380,7 @@ class VicinityBean {
|
|||||||
listsJson.map((e) => VicinityItemBean.fromJson(e)).toList();
|
listsJson.map((e) => VicinityItemBean.fromJson(e)).toList();
|
||||||
return VicinityBean(
|
return VicinityBean(
|
||||||
users: lists,
|
users: lists,
|
||||||
|
isVip: json['isVip'] ?? false,
|
||||||
city: json['city'],
|
city: json['city'],
|
||||||
offset: json['offset'],
|
offset: json['offset'],
|
||||||
deep: json['deep']);
|
deep: json['deep']);
|
||||||
@ -397,6 +401,7 @@ class VicinityItemBean {
|
|||||||
final double lng;
|
final double lng;
|
||||||
final double lat;
|
final double lat;
|
||||||
final String city;
|
final String city;
|
||||||
|
|
||||||
final List<Interest> interests;
|
final List<Interest> interests;
|
||||||
final List<String> images;
|
final List<String> images;
|
||||||
final String avatarThumb;
|
final String avatarThumb;
|
||||||
|
|||||||
@ -694,7 +694,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
TabBar(
|
TabBar(
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
labelPadding: EdgeInsets.symmetric(horizontal: 4.0.sp),
|
labelPadding: EdgeInsets.symmetric(horizontal: 12.0.sp),
|
||||||
indicator: UnderlineTabIndicator(
|
indicator: UnderlineTabIndicator(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: const Color(0xFF00FFF4),
|
color: const Color(0xFF00FFF4),
|
||||||
@ -786,7 +786,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('callout_icon'),
|
getCircleImage('callout_icon'),
|
||||||
width: 75.sp,
|
height: 24.5.sp,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Row(
|
: Row(
|
||||||
|
|||||||
@ -151,6 +151,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
lastPage = 0;
|
lastPage = 0;
|
||||||
_scrollController.animateTo(0,
|
_scrollController.animateTo(0,
|
||||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||||
|
refreshData();
|
||||||
});
|
});
|
||||||
sub1 = EventBusManager.on<OptionFindclass>().listen((event) {
|
sub1 = EventBusManager.on<OptionFindclass>().listen((event) {
|
||||||
genderList = event.genderList!;
|
genderList = event.genderList!;
|
||||||
@ -312,11 +313,11 @@ class _DiscoverState extends State<Discover>
|
|||||||
var user = Users.fromJson(list[index]);
|
var user = Users.fromJson(list[index]);
|
||||||
|
|
||||||
String onLineStr = '';
|
String onLineStr = '';
|
||||||
if (user.online! ?? false) {
|
if (user.online_flag?.isNotEmpty ?? false) {
|
||||||
onLineStr = '当前在线';
|
onLineStr = user.online_flag!;
|
||||||
if (user.distance != null) {
|
if (user.distance != null) {
|
||||||
if (user.distance! < 100) {
|
if (user.distance! < 100) {
|
||||||
onLineStr = '当前在线 · ${user.distance!.toInt()}km';
|
onLineStr = '${user.online_flag!}· ${user.distance!.toInt()}km';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -357,14 +358,24 @@ class _DiscoverState extends State<Discover>
|
|||||||
// clipBehavior: Clip.hardEdge,
|
// clipBehavior: Clip.hardEdge,
|
||||||
child: Container(
|
child: Container(
|
||||||
// padding: EdgeInsets.all(2.sp),
|
// padding: EdgeInsets.all(2.sp),
|
||||||
child: Swiper(
|
child: PageView.builder(
|
||||||
autoplay: false,
|
//当页面选中后回调此方法
|
||||||
loop: user.images!.length == 1
|
//参数[index]是当前滑动到的页面角标索引 从0开始
|
||||||
? false
|
onPageChanged: (int index) {
|
||||||
: true,
|
print("当前的页面是 $index");
|
||||||
itemBuilder:
|
// currentPage = index;
|
||||||
(BuildContext context, int index) {
|
},
|
||||||
// print(index);
|
//值为flase时 显示第一个页面 然后从左向右开始滑动
|
||||||
|
//值为true时 显示最后一个页面 然后从右向左开始滑动
|
||||||
|
reverse: false,
|
||||||
|
//滑动到页面底部无回弹效果
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
//纵向滑动切换
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
//页面控制器
|
||||||
|
// controller: pageController,
|
||||||
|
//所有的子Widget
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
List<String> imgList = [];
|
List<String> imgList = [];
|
||||||
@ -384,9 +395,20 @@ class _DiscoverState extends State<Discover>
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
height: screenHeight,
|
height: screenHeight,
|
||||||
));
|
));
|
||||||
},
|
},itemCount: user.images!.length,)
|
||||||
itemCount: user.images!.length,
|
|
||||||
),
|
// Swiper(
|
||||||
|
// autoplay: false,
|
||||||
|
// loop: user.images!.length == 1
|
||||||
|
// ? false
|
||||||
|
// : true,
|
||||||
|
// itemBuilder:
|
||||||
|
// (BuildContext context, int index) {
|
||||||
|
// // print(index);
|
||||||
|
|
||||||
|
// },
|
||||||
|
// itemCount: user.images!.length,
|
||||||
|
// ),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -433,7 +455,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (user.both_cities!.isNotEmpty)
|
if (onLineStr!.isNotEmpty)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 8.sp,
|
height: 8.sp,
|
||||||
),
|
),
|
||||||
@ -1056,6 +1078,7 @@ class Users {
|
|||||||
String? nicknameNote;
|
String? nicknameNote;
|
||||||
bool? online;
|
bool? online;
|
||||||
String? openId;
|
String? openId;
|
||||||
|
String? online_flag;
|
||||||
bool? partner;
|
bool? partner;
|
||||||
bool? is_follow;
|
bool? is_follow;
|
||||||
String? phoneNum;
|
String? phoneNum;
|
||||||
@ -1084,6 +1107,7 @@ class Users {
|
|||||||
this.bgPicUrl,
|
this.bgPicUrl,
|
||||||
this.birthday,
|
this.birthday,
|
||||||
this.blacklist,
|
this.blacklist,
|
||||||
|
this.online_flag,
|
||||||
this.city,
|
this.city,
|
||||||
this.both_interests,
|
this.both_interests,
|
||||||
this.distance,
|
this.distance,
|
||||||
@ -1136,6 +1160,7 @@ class Users {
|
|||||||
vip = json['vip'];
|
vip = json['vip'];
|
||||||
role = json['role'];
|
role = json['role'];
|
||||||
auth = json['auth'];
|
auth = json['auth'];
|
||||||
|
online_flag = json['online_flag'];
|
||||||
both_interests = json['both_interests'] ?? [];
|
both_interests = json['both_interests'] ?? [];
|
||||||
both_cities = json['both_cities'] ?? [];
|
both_cities = json['both_cities'] ?? [];
|
||||||
is_follow = json['is_follow'];
|
is_follow = json['is_follow'];
|
||||||
|
|||||||
695
circle_app/lib/app/circle/widgets/discover_item.dart
Normal file
695
circle_app/lib/app/circle/widgets/discover_item.dart
Normal file
@ -0,0 +1,695 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||||
|
|
||||||
|
import '../../../common/colors/app_color.dart';
|
||||||
|
import '../../../common/const.dart';
|
||||||
|
import '../../../network/api.dart';
|
||||||
|
import '../../../network/dio_manager.dart';
|
||||||
|
import '../../../router/app_routers.dart';
|
||||||
|
import '../../../util/util.dart';
|
||||||
|
import '../../chat/TIMUIKitChat/TIMUIKitMessageItem/TIMUIKitMessageReaction/tim_uikit_chat_gift_elem.dart';
|
||||||
|
import '../../home/logic.dart';
|
||||||
|
import 'discover.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class DiscoverItem extends StatefulWidget {
|
||||||
|
double screenHeight;
|
||||||
|
Function deleteCallBack;
|
||||||
|
Function likeCallBack;
|
||||||
|
List list;
|
||||||
|
int index;
|
||||||
|
String onLineStr;
|
||||||
|
|
||||||
|
DiscoverItem(this.screenHeight,this.list,this.index,this.onLineStr,this.deleteCallBack,this.likeCallBack, {super.key});
|
||||||
|
|
||||||
|
|
||||||
|
// screenHeight
|
||||||
|
@override
|
||||||
|
_DiscoverItemState createState() => new _DiscoverItemState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DiscoverItemState extends State<DiscoverItem> {
|
||||||
|
// TODO: add state variables and methods
|
||||||
|
var user;
|
||||||
|
String onLineStr = '';
|
||||||
|
HomeLogic logic = Get.find<HomeLogic>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
user = Users.fromJson(widget.list[widget.index]);
|
||||||
|
onLineStr= widget.onLineStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: add widget build method
|
||||||
|
return Container(
|
||||||
|
height: widget.screenHeight,
|
||||||
|
width: Get.width,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 5.sp, left: 16.sp, right: 16.sp),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withOpacity(0.25),
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
border: GradientBoxBorder(
|
||||||
|
gradient:
|
||||||
|
AppColor.mainVerLinearGradient,
|
||||||
|
width: 1.sp,
|
||||||
|
),
|
||||||
|
// image: DecorationImage(
|
||||||
|
// fit: BoxFit.fill,
|
||||||
|
// image: AssetImage(
|
||||||
|
// getCircleImage('open_vip_bg'),
|
||||||
|
// ))
|
||||||
|
),
|
||||||
|
height: widget.screenHeight,
|
||||||
|
width: Get.width,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
// clipBehavior: Clip.hardEdge,
|
||||||
|
child: Container(
|
||||||
|
// padding: EdgeInsets.all(2.sp),
|
||||||
|
child: Swiper(
|
||||||
|
autoplay: false,
|
||||||
|
loop: user.images!.length == 1
|
||||||
|
? false
|
||||||
|
: true,
|
||||||
|
itemBuilder:
|
||||||
|
(BuildContext context, int index) {
|
||||||
|
// print(index);
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
List<String> imgList = [];
|
||||||
|
user.images!.forEach((element) {
|
||||||
|
imgList.add(element);
|
||||||
|
});
|
||||||
|
|
||||||
|
Get.toNamed(AppRoutes.Swiper,
|
||||||
|
arguments: {
|
||||||
|
'imaglist': imgList,
|
||||||
|
'index': index
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: user.images![index],
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: Get.width,
|
||||||
|
height:widget.screenHeight,
|
||||||
|
));
|
||||||
|
},
|
||||||
|
itemCount: user.images!.length,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 5.sp,
|
||||||
|
top: 10.sp,
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (onLineStr.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
height: 24.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black
|
||||||
|
.withOpacity(0.35),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.sp)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 6.sp,
|
||||||
|
height: 6.sp,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 4.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
3.sp),
|
||||||
|
color:
|
||||||
|
const Color(0xFFCE51FF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (logic.online)
|
||||||
|
Text(
|
||||||
|
onLineStr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (user.both_cities!.isNotEmpty)
|
||||||
|
SizedBox(
|
||||||
|
height: 8.sp,
|
||||||
|
),
|
||||||
|
if (user.both_cities!.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
height: 24.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black
|
||||||
|
.withOpacity(0.35),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.sp)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 6.sp,
|
||||||
|
height: 6.sp,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 4.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
3.sp),
|
||||||
|
color: const Color(
|
||||||
|
0xFFCE51FF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (logic.online)
|
||||||
|
Text(
|
||||||
|
"你们都来过${user.both_cities!.first}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
if (user.both_cities!.isNotEmpty)
|
||||||
|
SizedBox(
|
||||||
|
height: 8.sp,
|
||||||
|
),
|
||||||
|
if (user.both_interests!.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
height: 24.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black
|
||||||
|
.withOpacity(0.35),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.sp)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 6.sp,
|
||||||
|
height: 6.sp,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
right: 4.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
3.sp),
|
||||||
|
color: const Color(
|
||||||
|
0xFFCE51FF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (logic.online)
|
||||||
|
Text(
|
||||||
|
"你们有共同的圈子:${user.both_interests!.first['title']}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
right: 16.sp,
|
||||||
|
top: 16.sp,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||||
|
arguments: user.userId!.toString());
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 73.sp,
|
||||||
|
height: 25.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient:
|
||||||
|
AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(12.5.sp)),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 5.sp),
|
||||||
|
child: Text(
|
||||||
|
'查看主页',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 10.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image(
|
||||||
|
width: 15.sp,
|
||||||
|
image: AssetImage(
|
||||||
|
getDisCoverImage("right_icon")),
|
||||||
|
// width: 44.sp,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
|
||||||
|
Positioned(
|
||||||
|
left: 6.sp,
|
||||||
|
bottom: 6.sp,
|
||||||
|
child: Container(
|
||||||
|
width: Get.width - 32.sp,
|
||||||
|
padding: EdgeInsets.only(right: 0.sp),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (user.wxNum != null && logic.isProd)
|
||||||
|
wxStatusWidget(
|
||||||
|
user.unLockWxNum == 1,
|
||||||
|
user.wxNum!,
|
||||||
|
user.userId.toString(),
|
||||||
|
user.avatarUrl!, () {
|
||||||
|
loadSignDiscoverData(
|
||||||
|
user.userId.toString());
|
||||||
|
}),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.sp,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
user.nickname ?? '',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp,
|
||||||
|
color: Color(0XFFF7FAFA),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 5.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 18.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
9.sp),
|
||||||
|
gradient:
|
||||||
|
const LinearGradient(
|
||||||
|
begin: Alignment(
|
||||||
|
0.25, 0.5),
|
||||||
|
end: Alignment(
|
||||||
|
0.75, 0.5),
|
||||||
|
colors: [
|
||||||
|
Color(0xff8DFFF8),
|
||||||
|
Color(0xffB5D3FF)
|
||||||
|
])),
|
||||||
|
child: Text(
|
||||||
|
getAgeCOntent(
|
||||||
|
user!.gender ?? 0,
|
||||||
|
user!.age ?? 0,
|
||||||
|
user!.role ?? 0,
|
||||||
|
user!.orientation ?? 0),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (user.vip! > 0)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 4.sp,
|
||||||
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage(user!.vip == 1
|
||||||
|
? 'vip'
|
||||||
|
: 'year_vip'),
|
||||||
|
width: 36.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: Get.width - 120.sp,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 15.sp, bottom: 15.sp),
|
||||||
|
child: Text(
|
||||||
|
user.signature! ?? '',
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines:
|
||||||
|
(user.signature! ?? '').length >
|
||||||
|
15
|
||||||
|
? 2
|
||||||
|
: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.sp,
|
||||||
|
color: const Color(0XFFF7FAFA)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: Get.width - 110.sp,
|
||||||
|
height: 35.sp,
|
||||||
|
child: tagItem(user.interests!),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Positioned(
|
||||||
|
bottom: 5.sp,
|
||||||
|
right: 15.sp,
|
||||||
|
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(
|
||||||
|
user.userId.toString(),
|
||||||
|
user.imAccid!.toString(),
|
||||||
|
user.nickname!);
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage(
|
||||||
|
'chat_icon',
|
||||||
|
),
|
||||||
|
width: 50.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 25.sp,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
widget.likeCallBack();
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage(
|
||||||
|
user.is_follow!
|
||||||
|
? 'like_icon'
|
||||||
|
: 'nor_like_icon',
|
||||||
|
),
|
||||||
|
width: 50.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.sp,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_showReportDialog(context,
|
||||||
|
user.userId!.toString(), widget.index);
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage(
|
||||||
|
'no_look_icon',
|
||||||
|
),
|
||||||
|
width: 50.sp,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void _showReportDialog(
|
||||||
|
BuildContext context, String userId, int currentIndex) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 277.sp,
|
||||||
|
padding: const EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"温馨提示",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getCircleImage("no_look_icon_h")),
|
||||||
|
width: 70.sp,
|
||||||
|
height: 70.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
"您确认对TA不感兴趣吗?确认之后在这个板块就看不见TA了。",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.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: 27.sp,
|
||||||
|
right: 27.sp),
|
||||||
|
child: const Text(
|
||||||
|
"再考虑考虑",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 24.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
sendNoLookData(userId, currentIndex);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sendNoLookData(String userId, int index) async {
|
||||||
|
var data = await DioManager.instance.post(url: Api.uninterested + userId);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
showOKToast('操作成功');
|
||||||
|
// widget.list.removeAt(index);
|
||||||
|
widget.deleteCallBack();
|
||||||
|
// setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
loadSignDiscoverData(String userId) async {
|
||||||
|
try {
|
||||||
|
var result = await DioManager.instance
|
||||||
|
.get(url: Api.getFindPageUserByUserId, params: {
|
||||||
|
'userId': userId,
|
||||||
|
'lat': '0',
|
||||||
|
'lng': '0',
|
||||||
|
});
|
||||||
|
|
||||||
|
int initIndex = 0;
|
||||||
|
widget.list.forEach((element) {
|
||||||
|
if (element['id'].toString() == userId) {
|
||||||
|
initIndex = widget.list.indexOf(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
widget.list[initIndex] = result['data'];
|
||||||
|
setState(() {});
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tagItem(List item) {
|
||||||
|
return Container(
|
||||||
|
width: Get.width,
|
||||||
|
margin: EdgeInsets.only(top: 5.sp, bottom: 5.sp),
|
||||||
|
// color: Colors.red,
|
||||||
|
// height: 45.sp,
|
||||||
|
child: ListView.builder(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: item.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return tagWidget(item[index]['title'], item[index]['id']);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
tagWidget(String tagName, int id) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.Signal_circle_list, arguments: id);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
color: const Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(0.2.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
|
color: const Color(0xFF392D53),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp,
|
||||||
|
bottom: 2.sp,
|
||||||
|
left: 10.sp,
|
||||||
|
right: 10.sp,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
tagName,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 11.0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -69,7 +69,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
controller: widget.logic.refreshController,
|
controller: widget.logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
enablePullUp: widget.logic.myVip == 0 ? false : true,
|
enablePullUp: true,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
controller: _scrollController,
|
controller: _scrollController,
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
@ -78,17 +78,17 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return bannerView(widget.logic);
|
return bannerView(widget.logic);
|
||||||
} else {
|
} else {
|
||||||
if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) {
|
// if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) {
|
||||||
// return;
|
// // return;
|
||||||
return Stack(
|
// return Stack(
|
||||||
children: [
|
// children: [
|
||||||
ListItem(widget.logic.vicinityList[index - 1], index - 1),
|
// ListItem(widget.logic.vicinityList[index - 1], index - 1),
|
||||||
showVipView()
|
// showVipView()
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -172,23 +172,18 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
|
|
||||||
Widget showVipView() {
|
Widget showVipView() {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Positioned(
|
|
||||||
bottom: 0,
|
|
||||||
child: Container(
|
|
||||||
color: Colors.black,
|
|
||||||
width: Get.width,
|
|
||||||
height: 100.sp,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 25.sp),
|
|
||||||
)),
|
|
||||||
Container(
|
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
|
height: 200.sp,
|
||||||
// margin: EdgeInsets.only(top: 10.sp),
|
// margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
color: Colors.black.withOpacity(0.87),
|
color: Colors.black.withOpacity(0.87),
|
||||||
padding: EdgeInsets.symmetric(vertical: 25.sp, horizontal: 20.sp),
|
),
|
||||||
|
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 15.sp, horizontal: 20.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -203,8 +198,37 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
// height: 40.sp,
|
||||||
|
// width: 120.sp,
|
||||||
|
margin: EdgeInsets.only(top: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 10.sp,
|
||||||
|
horizontal: 30.sp,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.grey.withOpacity(0.7),
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'再考虑考虑',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white.withOpacity(0.6),
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
)),
|
||||||
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
Get.back();
|
||||||
widget.logic.showRechargeDialog();
|
widget.logic.showRechargeDialog();
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
@ -223,7 +247,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
),
|
),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 10.sp,
|
vertical: 10.sp,
|
||||||
horizontal: 55.sp,
|
horizontal: 30.sp,
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
"前往开通VIP",
|
"前往开通VIP",
|
||||||
@ -233,18 +257,30 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
))
|
|
||||||
],
|
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
);
|
],
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget ListItem(VicinityItemBean item, int index) {
|
Widget ListItem(VicinityItemBean item, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (index < 5) {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
|
} else {
|
||||||
|
if (widget.logic
|
||||||
|
.myVip > 0) {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
|
} else {
|
||||||
|
Get.bottomSheet(Scaffold(backgroundColor: Colors.transparent,body: Center(
|
||||||
|
child: showVipView(),
|
||||||
|
),),isScrollControlled: true,backgroundColor: Colors.transparent,barrierColor: Colors.black.withOpacity(0.6));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
|||||||
@ -332,32 +332,32 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
data['data']['account_id'].toString(), data['data']['user_sig']);
|
data['data']['account_id'].toString(), data['data']['user_sig']);
|
||||||
accountId = data['data']['account_id'].toString();
|
accountId = data['data']['account_id'].toString();
|
||||||
|
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
// SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
var date = DateTime.now();
|
// var date = DateTime.now();
|
||||||
var date2 = '${date.year}-${date.month}-${date.day}-${accountId}';
|
// var date2 = '${date.year}-${date.month}-${date.day}-${accountId}';
|
||||||
String firspop = 'firspop-${accountId}';
|
// String firspop = 'firspop-${accountId}';
|
||||||
if (sp.preferences!.containsKey(firspop)) {
|
// if (sp.preferences!.containsKey(firspop)) {
|
||||||
var lastDate = sp.preferences!.getString(firspop);
|
// var lastDate = sp.preferences!.getString(firspop);
|
||||||
if (lastDate != date2) {
|
// if (lastDate != date2) {
|
||||||
Future.delayed(Duration(seconds: 15), () {
|
// Future.delayed(Duration(seconds: 15), () {
|
||||||
if (Get.currentRoute != AppRoutes.Login) {
|
// if (Get.currentRoute != AppRoutes.Login) {
|
||||||
sp.preferences!.setString(firspop, date2);
|
// sp.preferences!.setString(firspop, date2);
|
||||||
Get.bottomSheet(TodayPeopleDialog(), isScrollControlled: true,
|
// Get.bottomSheet(TodayPeopleDialog(), isScrollControlled: true,
|
||||||
enableDrag: false,);
|
// enableDrag: false,);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
Future.delayed(Duration(seconds: 15), () {
|
// Future.delayed(Duration(seconds: 15), () {
|
||||||
if (Get.currentRoute != AppRoutes.Login) {
|
// if (Get.currentRoute != AppRoutes.Login) {
|
||||||
sp.preferences!.setString(firspop, date2);
|
// sp.preferences!.setString(firspop, date2);
|
||||||
Get.bottomSheet(TodayPeopleDialog(),isScrollControlled: true,
|
// Get.bottomSheet(TodayPeopleDialog(),isScrollControlled: true,
|
||||||
enableDrag: false,);
|
// enableDrag: false,);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -262,13 +262,10 @@ class _ShareState extends State<Share> {
|
|||||||
shareAction('wxq', '朋友圈', () {
|
shareAction('wxq', '朋友圈', () {
|
||||||
shareWxData(2);
|
shareWxData(2);
|
||||||
}),
|
}),
|
||||||
shareAction('qq', 'QQ', () {
|
shareAction('save', '复制邀请链接', () {
|
||||||
copyInviteText(logic.name);
|
copyInviteText(logic.name);
|
||||||
}),
|
}),
|
||||||
shareAction('wb', '微博', () {
|
shareAction('hb', '保存邀请海报', () {
|
||||||
copyInviteText(logic.name);
|
|
||||||
}),
|
|
||||||
shareAction('hb', '保存海报', () {
|
|
||||||
_saveLocalImage();
|
_saveLocalImage();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -293,6 +293,41 @@ class Complete_materialLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (state.wxEditingController.text.isNotEmpty) {
|
||||||
|
bool isPass = false;
|
||||||
|
if (state.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(state.wxEditingController.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state.wxEditingController.text.isNotEmpty && !isPass) {
|
||||||
|
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||||
|
if (!wxReg.hasMatch(state.wxEditingController.text)) {
|
||||||
|
showOKToast('请输入正确的微信号');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wxStatusInfo.containsKey('4000')) {
|
||||||
|
showOKToast(wxStatusInfo['40000']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text});
|
||||||
|
if (result['code'] == 31201) {
|
||||||
|
// showToast.
|
||||||
|
showOKToast(result['msg']);
|
||||||
|
showRechargeScreenDialog();
|
||||||
|
return;
|
||||||
|
} else if (result['code'] == 200) {
|
||||||
|
if (wxStatusInfo.containsKey('32100')) {
|
||||||
|
showOKToast(wxStatusInfo['32100']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print(result);
|
||||||
|
}
|
||||||
|
|
||||||
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
||||||
'avatar_url': headUrl,
|
'avatar_url': headUrl,
|
||||||
'birthday': state.brithday,
|
'birthday': state.brithday,
|
||||||
@ -332,9 +367,9 @@ class Complete_materialLogic extends GetxController {
|
|||||||
showOKToast('请选择您的常驻城市');
|
showOKToast('请选择您的常驻城市');
|
||||||
return;
|
return;
|
||||||
} else if (state.role.isEmpty) {
|
} else if (state.role.isEmpty) {
|
||||||
showOKToast('请选择您的角色');
|
showOKToast('请选择您的属性');
|
||||||
return;
|
return;
|
||||||
} else if (state.role.isEmpty) {
|
} else if (state.sex.isEmpty) {
|
||||||
showOKToast('请选择您的角色');
|
showOKToast('请选择您的角色');
|
||||||
return;
|
return;
|
||||||
} else if (state.orientation.isEmpty) {
|
} else if (state.orientation.isEmpty) {
|
||||||
|
|||||||
@ -145,7 +145,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
|||||||
),
|
),
|
||||||
() {},
|
() {},
|
||||||
img: 'edit'),
|
img: 'edit'),
|
||||||
if (isShowWx)
|
// if (isShowWx)
|
||||||
funcWidget(
|
funcWidget(
|
||||||
'微信',
|
'微信',
|
||||||
TextField(
|
TextField(
|
||||||
@ -180,6 +180,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
|||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
), () {
|
), () {
|
||||||
|
showOKToast('为了确保角色的真实性,选错了需联系客服更正');
|
||||||
showSexPiker(context, controller);
|
showSexPiker(context, controller);
|
||||||
}),
|
}),
|
||||||
funcWidget(
|
funcWidget(
|
||||||
|
|||||||
@ -115,7 +115,7 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(right: 15.sp),
|
margin: EdgeInsets.only(right: 15.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
"收入金额",
|
"收入余额",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 13.sp),
|
fontSize: 13.sp),
|
||||||
@ -170,7 +170,6 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
|
|
||||||
"${logic.myAssest!.balance!}小票",
|
"${logic.myAssest!.balance!}小票",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -185,7 +184,7 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"${logic.myAssest!.incomeBalance!}小票",
|
"${(logic.myAssest!.incomeBalance! * 0.01).toStringAsFixed(2)}元",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 18.sp),
|
fontSize: 18.sp),
|
||||||
@ -213,12 +212,13 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"总充值",
|
"总收入",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
Text("${logic.myAssest!.totalRechargeBalance!}小票",
|
Text(
|
||||||
|
"${(logic.myAssest!.totalIncomeBalance! * 0.01).toStringAsFixed(2)}元",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
@ -237,13 +237,12 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"总收入",
|
"总充值/奖励",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
Text(
|
Text("${logic.myAssest!.totalRechargeBalance!}小票",
|
||||||
"${logic.myAssest!.totalIncomeBalance!}小票",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
@ -256,6 +255,7 @@ class My_assetsPage extends StatelessWidget {
|
|||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
color:Color(0x4DFFFFFF),
|
color:Color(0x4DFFFFFF),
|
||||||
),
|
),
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@ -353,13 +353,10 @@ class _CircleShareState extends State<CircleShare> {
|
|||||||
shareAction('wxq', '朋友圈', () {
|
shareAction('wxq', '朋友圈', () {
|
||||||
shareWxData(2);
|
shareWxData(2);
|
||||||
}),
|
}),
|
||||||
shareAction('qq', 'QQ', () {
|
shareAction('save', '复制邀请链接', () {
|
||||||
copyInviteText(logic.name);
|
copyInviteText(logic.name);
|
||||||
}),
|
}),
|
||||||
shareAction('wb', '微博', () {
|
shareAction('hb', '保存邀请海报', () {
|
||||||
copyInviteText(logic.name);
|
|
||||||
}),
|
|
||||||
shareAction('hb', '保存海报', () {
|
|
||||||
_saveLocalImage();
|
_saveLocalImage();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../const.dart';
|
||||||
import 'base_tip_widget.dart';
|
import 'base_tip_widget.dart';
|
||||||
|
|
||||||
class UnlockWxTip extends StatefulWidget {
|
class UnlockWxTip extends StatefulWidget {
|
||||||
@ -51,7 +52,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 20.sp,right: 20.sp),
|
margin: EdgeInsets.only(left: 20.sp,right: 20.sp),
|
||||||
padding: EdgeInsets.all(15.sp),
|
padding: EdgeInsets.all(15.sp),
|
||||||
height: !Platform.isIOS ? 440.sp : 350.sp,
|
height: !Platform.isIOS ? 440.sp : 410.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFF393949),
|
color: const Color(0xFF393949),
|
||||||
borderRadius: BorderRadius.circular(10.sp)
|
borderRadius: BorderRadius.circular(10.sp)
|
||||||
@ -174,7 +175,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
|||||||
} else {
|
} else {
|
||||||
unlockingPayment(prices[selectedIndex].id.toString(), (){
|
unlockingPayment(prices[selectedIndex].id.toString(), (){
|
||||||
Get.back();
|
Get.back();
|
||||||
showOKToast('微信号解锁成功');
|
checkMyUserStatus();
|
||||||
unLockWxSuccessResult(widget.userId);
|
unLockWxSuccessResult(widget.userId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:oktoast/oktoast.dart';
|
import 'package:oktoast/oktoast.dart';
|
||||||
|
|
||||||
|
import '../app/userinfo/logic.dart';
|
||||||
|
|
||||||
const bgAssetImage = DecorationImage(
|
const bgAssetImage = DecorationImage(
|
||||||
image: AssetImage('assets/images/base/bg.png'),
|
image: AssetImage('assets/images/base/bg.png'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -24,7 +26,7 @@ wxStatusWidget(bool isUnclock, String wx, String userId, String avatarUrl,
|
|||||||
var result = await DioManager()
|
var result = await DioManager()
|
||||||
.post(url: Api.UnlockWx, params: {'targetUserId': userId});
|
.post(url: Api.UnlockWx, params: {'targetUserId': userId});
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showToast('解锁成功');
|
checkMyUserStatus();
|
||||||
callBack();
|
callBack();
|
||||||
} else {
|
} else {
|
||||||
Get.bottomSheet(UnlockWxTip(userId, avatarUrl),
|
Get.bottomSheet(UnlockWxTip(userId, avatarUrl),
|
||||||
@ -90,3 +92,19 @@ wxStatusWidget(bool isUnclock, String wx, String userId, String avatarUrl,
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
checkMyUserStatus() async {
|
||||||
|
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
||||||
|
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||||
|
data, (data) => ResponseBean.fromJson(data));
|
||||||
|
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
UserBean userInfoBean = bean.data.user;
|
||||||
|
if (userInfoBean.wx_num.isNotEmpty) {
|
||||||
|
showToast('已成功解锁TA的微信,快去和TA私聊呗~');
|
||||||
|
} else {
|
||||||
|
showToast('你已成功解锁TA的微信,建议您也填写微信,方便对方快速找到您哦~');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user