代码提交
This commit is contained in:
parent
85c5e81283
commit
b715925219
@ -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 278
|
||||
versionName "2.7.8"
|
||||
versionCode 285
|
||||
versionName "2.8.5"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -78,9 +78,9 @@
|
||||
"width": 120,
|
||||
"height": 20,
|
||||
"isGravityCenter": true,
|
||||
"text": "其他方式登录",
|
||||
"text": "其他方式登录>",
|
||||
"font": 16,
|
||||
"textColor": "#ffffff",
|
||||
"textColor": "#0AFCFF",
|
||||
"clickable": true,
|
||||
"action": "otherLogin"
|
||||
},
|
||||
|
||||
BIN
circle_app/data/img/base/private_icon.png
Normal file
BIN
circle_app/data/img/base/private_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
@ -188,8 +188,8 @@
|
||||
"textColor": "#000000",
|
||||
"font": 15,
|
||||
"action": "handleCustomLabel",
|
||||
"text": "其他方式登录",
|
||||
"backgroundColor":"#00FFFFFF",
|
||||
"text": "其他方式登录>",
|
||||
"backgroundColor":"#000AFCFF",
|
||||
"textAlignment": 1,
|
||||
"frame": {"mainScreenCenterXWithLeftDistance":0,"mainScreenTopDistance":310,"width":200,"height":32}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string>App需要使用您的位置信息,寻找附近用户</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Runner需要您同意,才能使用麦克风,用来发送语音</string>
|
||||
<string>App需要您同意,才能使用麦克风,用来发送语音</string>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>是否同意应用将图片保存到相册中?</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
|
||||
@ -8,7 +8,6 @@ import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
@ -23,7 +22,6 @@ import '../../commons/widgets/BanDialog.dart';
|
||||
import '../../net/api.dart';
|
||||
import '../../net/dio_manager.dart';
|
||||
import '../../router/routers.dart';
|
||||
import '../../utils/SharedPreferencesHelper.dart';
|
||||
import '../../utils/eventBus.dart';
|
||||
import '../../utils/qiniu.dart';
|
||||
import '../circle/logic.dart';
|
||||
@ -60,6 +58,8 @@ class Call_outLogic extends GetxController {
|
||||
|
||||
bool isZfbPrice = true;
|
||||
bool isLocal = false;
|
||||
bool isWorld = Get.parameters.isNotEmpty;
|
||||
|
||||
final TUISettingModel settingModel = serviceLocator<TUISettingModel>();
|
||||
List<Interest> interests = [];
|
||||
@override
|
||||
@ -219,7 +219,7 @@ class Call_outLogic extends GetxController {
|
||||
);
|
||||
|
||||
if (beandata.isSuccess()) {
|
||||
showOKToast(beandata.msg);
|
||||
showOKToast('分享给好友,将获得流量曝光,吸引更多人查看');
|
||||
final logic = Get.put(CircleLogic());
|
||||
logic.setCircle(numbers[0].id);
|
||||
logic.refresh();
|
||||
|
||||
@ -392,6 +392,8 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
Positioned(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (controller.isWorld) return;
|
||||
|
||||
if (controller.vip == 2) {
|
||||
controller.isCheck =
|
||||
!controller.isCheck;
|
||||
|
||||
@ -1121,7 +1121,7 @@ class _TIMUIKItHistoryMessageListItemState
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(30.sp),
|
||||
child: Image.network(
|
||||
lists.user!.avatar_thumb!,
|
||||
lists.user!.avatar!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
fit: BoxFit.cover),
|
||||
|
||||
@ -57,10 +57,11 @@ class TIMUIKitCustomElem extends TIMUIKitStatelessWidget {
|
||||
borderRadius: messageBorderRadius ?? borderRadius,
|
||||
),
|
||||
constraints: const BoxConstraints(maxWidth: 240),
|
||||
child: Row(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('更新版本才能查看该消息哦~'),
|
||||
SizedBox(height: 10.w,),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
HomeLogic logic = Get.find<HomeLogic>();
|
||||
|
||||
@ -66,13 +66,13 @@ class _TIMSendSoundMessageState extends TIMUIKitState<TIMSendSoundMessage> {
|
||||
type: MaterialType.canvas,
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.8,
|
||||
opacity: 1.0,
|
||||
child: Container(
|
||||
width: 160,
|
||||
height: 160,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
// color: Color(0xff77797A),
|
||||
// color: Colors.transparent,
|
||||
color: Color(0xff77797A),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.0)),
|
||||
),
|
||||
child: Column(
|
||||
@ -140,7 +140,7 @@ class _TIMSendSoundMessageState extends TIMUIKitState<TIMSendSoundMessage> {
|
||||
onLongPressStart(_) {
|
||||
if (isInit) {
|
||||
setState(() {
|
||||
soundTipsText = TIM_t("手指上滑,取消发送");
|
||||
soundTipsText = TIM_t("松开发送,上滑取消");
|
||||
});
|
||||
startTime = DateTime.now();
|
||||
SoundPlayer.startRecord();
|
||||
@ -161,7 +161,7 @@ class _TIMSendSoundMessageState extends TIMUIKitState<TIMSendSoundMessage> {
|
||||
} else {
|
||||
if (mounted && soundTipsText == TIM_t("松开取消")) {
|
||||
setState(() {
|
||||
soundTipsText = TIM_t("手指上滑,取消发送");
|
||||
soundTipsText = TIM_t("松开发送,上滑取消");
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -208,7 +208,7 @@ class _TIMSendSoundMessageState extends TIMUIKitState<TIMSendSoundMessage> {
|
||||
});
|
||||
SoundPlayer.stopRecord();
|
||||
setState(() {
|
||||
soundTipsText = TIM_t("手指上滑,取消发送");
|
||||
soundTipsText = TIM_t("松开发送,上滑取消");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -710,24 +710,6 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
}
|
||||
|
||||
loadIsShowSendGiftDialogData() async {
|
||||
if (widget.conversationID.contains('qpqz_prod_10_')) {
|
||||
return true;
|
||||
}
|
||||
V2TimConversation con = Get.arguments;
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.isShow_give_gift + widget.conversationID.split('_').last);
|
||||
if (data['code'] == 200) {
|
||||
if (data['data']) {
|
||||
Get.bottomSheet(
|
||||
SendGiftDialog(
|
||||
accid: widget.conversationID,
|
||||
title: data['msg'],
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -1238,20 +1238,21 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
|
||||
loadIsShowSendGiftDialogData() async {
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.isShow_give_gift + widget.userId!.split('_').last);
|
||||
if (data['code'] == 200) {
|
||||
if (data['data']) {
|
||||
Get.bottomSheet(
|
||||
SendGiftDialog(
|
||||
accid: widget.userId!,
|
||||
title: data['msg'],
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// var data = await DioManager.instance
|
||||
// .get(url: Api.isShow_give_gift + widget.userId!.split('_').last);
|
||||
// if (data['code'] == 200) {
|
||||
// if (data['data']) {
|
||||
// Get.bottomSheet(
|
||||
// SendGiftDialog(
|
||||
// accid: widget.userId!,
|
||||
// title: data['msg'],
|
||||
// ),
|
||||
// isScrollControlled: true,
|
||||
// enableDrag: false);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -269,6 +269,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((isSelf ? info['user']['signature'] ?? '' : info['my']['signature'] ?? '').toString().isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
@ -284,10 +285,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
isSelf
|
||||
? '交友宣言:' + info['user']['signature']
|
||||
: '交友宣言:' + info['my']['signature'],
|
||||
child: Text('交友宣言:${isSelf ? info['user']['signature'] ?? '' : info['my']['signature'] ?? ''}',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
|
||||
@ -256,7 +256,7 @@ class _GiftState extends State<Gift> {
|
||||
}
|
||||
|
||||
void loadGiftData() async {
|
||||
var result = await DioManager.instance.get(url: Api.giftList);
|
||||
var result = await DioManager.instance.get(url: Api.giftListV2 + widget.accid.split('_').last);
|
||||
if (result['code'] == 200) {
|
||||
giftList = result['data'];
|
||||
|
||||
@ -305,7 +305,7 @@ class _GiftState extends State<Gift> {
|
||||
|
||||
giftItemWidget(Map info, int index) {
|
||||
bool isSelected = giftId == info['id'].toString();
|
||||
double price = info['price'];
|
||||
double price = info['price'] ;
|
||||
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -350,7 +350,9 @@ class _GiftState extends State<Gift> {
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500)),
|
||||
Text('${price.toInt()}小票',
|
||||
Text(
|
||||
'${(price / 100).toStringAsFixed(0)}元',
|
||||
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
|
||||
@ -32,9 +32,9 @@ class _PartnerOptionState extends State<PartnerOption> {
|
||||
];
|
||||
|
||||
List<String> vipTitleName = [
|
||||
"年度合伙人",
|
||||
"季度合伙人",
|
||||
"月度合伙人",
|
||||
"年度VIP",
|
||||
"季度VIP",
|
||||
"月度VIP",
|
||||
];
|
||||
|
||||
int propsIndex = 0;
|
||||
@ -115,7 +115,7 @@ class _PartnerOptionState extends State<PartnerOption> {
|
||||
),
|
||||
SizedBox(height: 4.sp),
|
||||
Text(
|
||||
'获得会员十几种专属特权' +
|
||||
'获得VIP十几种专属特权' +
|
||||
(index == 0
|
||||
? '一年'
|
||||
: index == 1
|
||||
|
||||
@ -127,7 +127,7 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
// Get.back();
|
||||
},
|
||||
child: Container(
|
||||
height: 42.sp,
|
||||
|
||||
@ -221,7 +221,14 @@ class _WelcomeDialogState extends State<WelcomeDialog> {
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 14.sp),
|
||||
child: Text(
|
||||
'Tip:不送礼物也可以欢迎哦',
|
||||
style: TextStyle(color: Colors.white.withOpacity(0.5), fontSize: 15.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -117,7 +117,7 @@ class _WishDialogState extends State<WishDialog> {
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500)),
|
||||
Text('${price.toInt()}小票',
|
||||
Text( '${(price / 100).toStringAsFixed(0)}元',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
|
||||
@ -39,7 +39,7 @@ class CircleLogic extends GetxController {
|
||||
SwiperController swiperController = SwiperController();
|
||||
final RefreshController refreshController = RefreshController();
|
||||
final RefreshController peopleRefreshController = RefreshController();
|
||||
final ScrollController nearScrollController = ScrollController();
|
||||
final ScrollController nearScrollController = ScrollController();
|
||||
ScrollController newscrollController = ScrollController();
|
||||
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||
|
||||
@ -47,6 +47,8 @@ final ScrollController nearScrollController = ScrollController();
|
||||
late RefreshManager nearManager;
|
||||
late RefreshManager discoverManager;
|
||||
|
||||
// 1=省份 2=城市
|
||||
int config = 2;
|
||||
|
||||
int currentIndex = 0;
|
||||
|
||||
@ -83,7 +85,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
int flush = 0;
|
||||
bool isMore = true;
|
||||
|
||||
|
||||
bool getNewUserIsShowData = false;
|
||||
|
||||
bool isShowNewUser = true;
|
||||
@ -174,10 +175,17 @@ final ScrollController nearScrollController = ScrollController();
|
||||
});
|
||||
|
||||
SharedPreferencesHelper helper =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
isShowTip = helper.getBool(SharedPreferencesHelper.nearOpTip) ?? true;
|
||||
}
|
||||
|
||||
loadConfigData() async {
|
||||
var result = await DioManager.instance.get(url: Api.nearLevelConf);
|
||||
if (result['code'] == 200) {
|
||||
config = result['data'];
|
||||
}
|
||||
}
|
||||
|
||||
startTimer() {
|
||||
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
||||
seconds++;
|
||||
@ -200,9 +208,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
getNewUserIsShowData = true;
|
||||
if (data['code'] == 200) {
|
||||
isShowNewUser = data['data'] == 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {}
|
||||
}
|
||||
|
||||
void loadNewUserRewardData() async {
|
||||
@ -224,7 +230,11 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
|
||||
void loadCallOutListData() async {
|
||||
Map<String, dynamic> params = {'page': 1, 'pageSize': 10,'autoExposure':1};
|
||||
Map<String, dynamic> params = {
|
||||
'page': 1,
|
||||
'pageSize': 10,
|
||||
'autoExposure': 1
|
||||
};
|
||||
|
||||
List wantMeet = [];
|
||||
genderList.forEach((element) {
|
||||
@ -236,7 +246,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
params['genders'] = wantMeet;
|
||||
|
||||
var result =
|
||||
await DioManager.instance.post(url: Api.worldCallouts, params: params);
|
||||
await DioManager.instance.post(url: Api.worldCallouts, params: params);
|
||||
|
||||
if (result['code'] == 200) {
|
||||
callList = result['data']['lists'];
|
||||
@ -259,10 +269,9 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
initGerder() async {
|
||||
initGerder() async {
|
||||
await loadMyInfo();
|
||||
var data1 =
|
||||
await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||
var data1 = await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
|
||||
@ -279,13 +288,12 @@ final ScrollController nearScrollController = ScrollController();
|
||||
});
|
||||
configBean.roleMap.forEach((key, value) {
|
||||
allRoleList.add(value);
|
||||
|
||||
});
|
||||
genderList.add(MyConfigData('-1', '非二元', true));
|
||||
dis_genderList.add(MyConfigData('-1', '非二元', false));
|
||||
new_genderList.add(MyConfigData('-1', '非二元', true));
|
||||
bool isAll = false;
|
||||
if (userInfoBea!.orientations!.length == 6 ) {
|
||||
if (userInfoBea!.orientations!.length == 6) {
|
||||
dis_genderList.forEach((element) {
|
||||
element.isSelect = true;
|
||||
});
|
||||
@ -302,7 +310,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
configBean.orientationMap.forEach((key, value) {
|
||||
allOrientationList.add(value);
|
||||
orientationList.add(MyConfigData(key, value, false));
|
||||
@ -321,13 +328,13 @@ final ScrollController nearScrollController = ScrollController();
|
||||
|
||||
Map cityMap = {};
|
||||
|
||||
|
||||
loadMyInfo() async {
|
||||
var data = await DioManager.instance.get(url: Api.getUserInfo,params: {'2':2});
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getUserInfo, params: {'2': 2});
|
||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
userInfoBea = bean.data.user;
|
||||
userInfoBea = bean.data.user;
|
||||
}
|
||||
}
|
||||
|
||||
@ -445,7 +452,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(true,''),
|
||||
body: Open_vip_tipPage(true, ''),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
@ -462,9 +469,8 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
getSyncBanner() async {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.nearbyBanner, params: {});
|
||||
getSyncBanner() async {
|
||||
var data = await DioManager.instance.get(url: Api.nearbyBanner, params: {});
|
||||
if (data['code'] == 200) {
|
||||
syncBannerList.clear();
|
||||
List dataList = data['data'];
|
||||
@ -494,12 +500,14 @@ final ScrollController nearScrollController = ScrollController();
|
||||
position = await getCurrentPosition();
|
||||
await getCurrentCity();
|
||||
} else {
|
||||
var data =
|
||||
await DioManager.instance.post(url: Api.postNearbyList, params: {
|
||||
"offset": 0,
|
||||
'deep': 0,
|
||||
'city': cityName,
|
||||
});
|
||||
var data = await DioManager.instance.post(
|
||||
url: config == 1 ? Api.provinceNearByUserList : Api.postNearbyList,
|
||||
params: {
|
||||
"offset": 0,
|
||||
'deep': 0,
|
||||
'city': config == 1 ? "" : cityName,
|
||||
'province': config == 1 ? cityName : '',
|
||||
});
|
||||
if (data['code'] == 200) {
|
||||
cityName = data['data']['city'];
|
||||
loadNerPeopleRouteStatus();
|
||||
@ -508,10 +516,13 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
|
||||
loadNerPeopleRouteStatus() async {
|
||||
var data = await DioManager.instance
|
||||
.post(url: Api.hasNewUser, params: {'city': cityName});
|
||||
var data = await DioManager.instance.post(
|
||||
url: config == 1 ? Api.provinceHasNewUser : Api.hasNewUser,
|
||||
params: {
|
||||
'city': config == 1 ? "" : cityName,
|
||||
'province': config == 1 ? cityName : ''
|
||||
});
|
||||
if (data['code'] == 200) {
|
||||
|
||||
if (data['data']['has']) {
|
||||
peopleInfo = data['data'];
|
||||
update();
|
||||
@ -522,7 +533,12 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
|
||||
void loadNearbyInfo() async {
|
||||
var data = await DioManager.instance.get(url: Api.nearbyInfo,params: {'city':cityName});
|
||||
var data = await DioManager.instance.get(
|
||||
url: config == 1 ? Api.provinceNearbyInfo : Api.nearbyInfo,
|
||||
params: {
|
||||
'city': config == 1 ? "" : cityName,
|
||||
'province': config == 1 ? cityName : ''
|
||||
});
|
||||
if (data['code'] == 200) {
|
||||
nearInfoMap = data['data'];
|
||||
update();
|
||||
@ -531,12 +547,13 @@ final ScrollController nearScrollController = ScrollController();
|
||||
|
||||
// 检查位置权限
|
||||
Future<void> startCheckLocationPermission() async {
|
||||
await loadConfigData();
|
||||
// var status = await Permission.location.status;
|
||||
// if (status.isGranted) {
|
||||
// getLocationPermission();
|
||||
// _isLocationGranted = true;
|
||||
// } else {
|
||||
getNearByList();
|
||||
getNearByList();
|
||||
// }
|
||||
}
|
||||
|
||||
@ -546,19 +563,20 @@ final ScrollController nearScrollController = ScrollController();
|
||||
if (hasLocationPermission) {
|
||||
// 权限申请通过
|
||||
checkLcoationStatus();
|
||||
} else if (isShowLocationDialogEd == false && isShowLocationDialog == false) {
|
||||
} else if (isShowLocationDialogEd == false &&
|
||||
isShowLocationDialog == false) {
|
||||
isShowLocationDialogEd = true;
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
getNearbyCardData() async {
|
||||
var data = await DioManager.instance.get(url: Api.nearbyCardData, params: {'city':cityName});
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.nearbyCardData, params: {'city': cityName});
|
||||
if (data['code'] == 200) {
|
||||
cardInfo = data['data'];
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void getNearByList() async {
|
||||
@ -585,15 +603,18 @@ final ScrollController nearScrollController = ScrollController();
|
||||
await getSyncBanner();
|
||||
}
|
||||
|
||||
var data = await DioManager.instance.post(url: Api.postNearbyList, params: {
|
||||
"offset": offset,
|
||||
'deep': deep,
|
||||
'city': cityName,
|
||||
"genders": genders,
|
||||
"roles": roles,
|
||||
'flush': flush,
|
||||
"orientations": orientations
|
||||
});
|
||||
var data = await DioManager.instance.post(
|
||||
url: config == 1 ? Api.provinceNearByUserList : Api.postNearbyList,
|
||||
params: {
|
||||
"offset": offset,
|
||||
'deep': deep,
|
||||
'city': config == 1 ? '' : cityName,
|
||||
'province': config == 1 ? cityName : '',
|
||||
"genders": genders,
|
||||
"roles": roles,
|
||||
'flush': flush,
|
||||
"orientations": orientations
|
||||
});
|
||||
|
||||
// isNearLoad = false;
|
||||
var bean = BaseResponse<VicinityBean>.fromJson(
|
||||
@ -604,7 +625,10 @@ final ScrollController nearScrollController = ScrollController();
|
||||
flush = 0;
|
||||
}
|
||||
try {
|
||||
if (bean.data.offset == offset && offset != 0 && bean.data.deep == deep && deep != 0) {
|
||||
if (bean.data.offset == offset &&
|
||||
offset != 0 &&
|
||||
bean.data.deep == deep &&
|
||||
deep != 0) {
|
||||
refreshController.loadNoData();
|
||||
return;
|
||||
}
|
||||
@ -615,7 +639,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
chargeType = bean.data.chargeType;
|
||||
myVip = bean.data.isVip ? 1 : 0;
|
||||
if (vicinityPage == 1) {
|
||||
cityName = bean.data.city;
|
||||
cityName = config == 1 ? bean.data.province! : bean.data.city;
|
||||
|
||||
vicinityList.clear();
|
||||
loadNerPeopleRouteStatus();
|
||||
@ -623,7 +647,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
|
||||
// if (vicinityPage == 1) {
|
||||
refreshController.refreshCompleted();
|
||||
refreshController.refreshCompleted();
|
||||
// }
|
||||
|
||||
try {
|
||||
@ -657,11 +681,13 @@ final ScrollController nearScrollController = ScrollController();
|
||||
} on Exception {}
|
||||
update();
|
||||
|
||||
if (position == null && isShowLocationDialogEd == false && vicinityPage == 3 && !isCheckLocation) {
|
||||
if (position == null &&
|
||||
isShowLocationDialogEd == false &&
|
||||
vicinityPage == 3 &&
|
||||
!isCheckLocation) {
|
||||
try {
|
||||
isCheckLocation = true;
|
||||
checkLcoationStatus();
|
||||
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
@ -669,7 +695,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
} else if (bean.code == 21201) {
|
||||
showOKToast(bean.msg);
|
||||
// if (vicinityPage == 1) {
|
||||
showVipDialog('nearby_list');
|
||||
showVipDialog('nearby_list');
|
||||
roleList.forEach((element) {
|
||||
element.isSelect = false;
|
||||
});
|
||||
@ -677,10 +703,21 @@ final ScrollController nearScrollController = ScrollController();
|
||||
orientationList.forEach((element) {
|
||||
element.isSelect = false;
|
||||
});
|
||||
refreshController.refreshCompleted();
|
||||
refreshController.refreshCompleted();
|
||||
// }
|
||||
refreshController.loadComplete();
|
||||
update();
|
||||
} else if (bean.code == 21202) {
|
||||
roleList.forEach((element) {
|
||||
element.isSelect = false;
|
||||
});
|
||||
|
||||
orientationList.forEach((element) {
|
||||
element.isSelect = false;
|
||||
});
|
||||
showVipDialog('nearby_list');
|
||||
refreshController.refreshCompleted();
|
||||
refreshController.loadComplete();
|
||||
} else if (bean.code == 404 || bean.code == 500) {
|
||||
isNearLoad = false;
|
||||
showOKToast(bean.msg);
|
||||
@ -695,7 +732,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
checkLcoationStatus() async {
|
||||
if (isShowLocationDialogEd == false && position == null) {
|
||||
bool hasLocationPermission = await requestLocationPermission();
|
||||
@ -704,10 +740,10 @@ final ScrollController nearScrollController = ScrollController();
|
||||
// 检查权限
|
||||
position = await getCurrentPosition();
|
||||
await getCurrentCity();
|
||||
} else if (isShowLocationDialogEd == false && isShowLocationDialog == false) {
|
||||
|
||||
} else if (isShowLocationDialogEd == false &&
|
||||
isShowLocationDialog == false) {
|
||||
SharedPreferencesHelper helper =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
if ((await helper.isShowNearLocation())) {
|
||||
isShowLocationDialogEd = true;
|
||||
update();
|
||||
@ -718,10 +754,10 @@ final ScrollController nearScrollController = ScrollController();
|
||||
|
||||
getCurrentCity({bool isload = true}) async {
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.getCity + '${position!.longitude!}/' + '${position!.latitude!}',
|
||||
url: '${config == 1 ? Api.getProvince : Api.getCity}${position!.longitude!}/${position!.latitude!}',
|
||||
);
|
||||
if (data['code'] == 200) {
|
||||
cityName = data['data']['city'];
|
||||
cityName = config == 1 ? data['data']['province'] : data['data']['city'];
|
||||
if (isload) {
|
||||
vicinityPage = 1;
|
||||
refreshVicinityData();
|
||||
@ -802,7 +838,7 @@ final ScrollController nearScrollController = ScrollController();
|
||||
new_orientationList.forEach((element) {
|
||||
element.isSelect = false;
|
||||
});
|
||||
showVipDialog('new_list');
|
||||
showVipDialog('new_list');
|
||||
// }
|
||||
if (peopleRefreshController.headerStatus == RefreshStatus.refreshing) {
|
||||
peopleRefreshController.refreshCompleted();
|
||||
@ -867,10 +903,9 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unlockDicoverPeople(String id,{bool isPush = true}) async {
|
||||
unlockDicoverPeople(String id, {bool isPush = true}) async {
|
||||
var data =
|
||||
await DioManager.instance.post(url: Api.nearbylock, params: {'id': id});
|
||||
await DioManager.instance.post(url: Api.nearbylock, params: {'id': id});
|
||||
|
||||
if (data['code'] == 200) {
|
||||
unclockUserList.add(id);
|
||||
@ -888,9 +923,9 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
void unlockNewPeople(String id,{bool isPush = true}) async {
|
||||
void unlockNewPeople(String id, {bool isPush = true}) async {
|
||||
var data =
|
||||
await DioManager.instance.post(url: Api.nearbylock, params: {'id': id});
|
||||
await DioManager.instance.post(url: Api.nearbylock, params: {'id': id});
|
||||
|
||||
if (data['code'] == 200) {
|
||||
unclockUserList.add(id);
|
||||
@ -900,7 +935,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
if (isPush) {
|
||||
Get.toNamed(Routes.UserInfoPage, arguments: id.toString());
|
||||
}
|
||||
|
||||
} else if (data['code'] == 31201) {
|
||||
showRechargeScreenDialog('one_money_lock');
|
||||
showOKToast(data['msg']);
|
||||
@ -909,7 +943,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void onRefresh() async {
|
||||
int lastPage = pageIndex;
|
||||
pageIndex = 1;
|
||||
@ -928,7 +961,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
getNewPeopleListData();
|
||||
}
|
||||
|
||||
|
||||
/// 申请定位权限
|
||||
/// 授予定位权限返回true, 否则返回false
|
||||
Future<bool> requestLocationPermission() async {
|
||||
@ -942,15 +974,15 @@ final ScrollController nearScrollController = ScrollController();
|
||||
permission = await Geolocator.requestPermission();
|
||||
}
|
||||
|
||||
if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) {
|
||||
if (permission == LocationPermission.whileInUse ||
|
||||
permission == LocationPermission.always) {
|
||||
//已经授权
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
refreshVicinityData() {
|
||||
vicinityPage = 1;
|
||||
offset = 0;
|
||||
@ -981,7 +1013,6 @@ final ScrollController nearScrollController = ScrollController();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void snedHelloMoreData() async {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.sayHelloMore,
|
||||
@ -1032,17 +1063,16 @@ final ScrollController nearScrollController = ScrollController();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
|
||||
setSpTip() async {
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
sp.setBool(SharedPreferencesHelper.nearOpTip, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class VicinityBean {
|
||||
String city;
|
||||
int offset;
|
||||
String province;
|
||||
bool isVip;
|
||||
int deep;
|
||||
int chargeFreeNum;
|
||||
@ -1056,6 +1086,7 @@ class VicinityBean {
|
||||
required this.offset,
|
||||
required this.chargeFreeNum,
|
||||
required this.chargeType,
|
||||
required this.province,
|
||||
required this.deep});
|
||||
|
||||
factory VicinityBean.fromJson(Map<String, dynamic> json) {
|
||||
@ -1069,6 +1100,7 @@ class VicinityBean {
|
||||
chargeType: json['chargeType'],
|
||||
chargeFreeNum: json['chargeFreeNum'],
|
||||
offset: json['offset'],
|
||||
province: json['province'],
|
||||
deep: json['deep']);
|
||||
}
|
||||
}
|
||||
@ -1108,7 +1140,6 @@ class VicinityItemBean {
|
||||
final String lastRankTopDesc;
|
||||
final String lastUserRelation;
|
||||
|
||||
|
||||
final calloutTotal;
|
||||
bool isFollow;
|
||||
int singleUnlock;
|
||||
@ -1117,7 +1148,7 @@ class VicinityItemBean {
|
||||
String contact;
|
||||
int isBacker;
|
||||
Map lastAgentInterest;
|
||||
Map lastCallout ;
|
||||
Map lastCallout;
|
||||
int isNew;
|
||||
List<String> goodImages;
|
||||
|
||||
@ -1134,10 +1165,6 @@ class VicinityItemBean {
|
||||
required this.hasContact,
|
||||
required this.lastRankTopDesc,
|
||||
required this.lastUserRelation,
|
||||
|
||||
|
||||
|
||||
|
||||
required this.signature,
|
||||
required this.isFollow,
|
||||
required this.birthday,
|
||||
@ -1151,7 +1178,6 @@ class VicinityItemBean {
|
||||
required this.imId,
|
||||
required this.lastCallout,
|
||||
required this.isNew,
|
||||
|
||||
required this.orientation,
|
||||
required this.lng,
|
||||
required this.lat,
|
||||
@ -1170,8 +1196,6 @@ class VicinityItemBean {
|
||||
required this.goodImages,
|
||||
required this.isBacker,
|
||||
required this.lastAgentInterest,
|
||||
|
||||
|
||||
});
|
||||
|
||||
factory VicinityItemBean.fromJson(Map json) {
|
||||
@ -1216,7 +1240,7 @@ class VicinityItemBean {
|
||||
city: json['city'],
|
||||
interests: interests,
|
||||
images: List<String>.from(json['images'] ?? []),
|
||||
goodImages:List<String>.from(json['goodImages'] ?? []),
|
||||
goodImages: List<String>.from(json['goodImages'] ?? []),
|
||||
avatarThumb: json['avatar_thumb'],
|
||||
genderName: json['gender_name'],
|
||||
roleName: json['role_name'],
|
||||
@ -1317,7 +1341,9 @@ class Circle {
|
||||
oldAmount:
|
||||
json.containsKey('amount') ? json['old_amount'].toDouble() ?? 0 : 0,
|
||||
lastCalloutTime: json['last_callout_time'] ?? '',
|
||||
isJoin: json.containsKey('isJoin') ? json['isJoin'] ?? false : json['is_join'] ?? false,
|
||||
isJoin: json.containsKey('isJoin')
|
||||
? json['isJoin'] ?? false
|
||||
: json['is_join'] ?? false,
|
||||
isLike: json['is_like'] ?? false,
|
||||
viewTotal: json['view_total'] ?? 0,
|
||||
joinTotal: json['join_total'] ?? 0,
|
||||
|
||||
@ -610,7 +610,6 @@ class _CirclePageState extends State<CirclePage>
|
||||
void _onRefresh() async {
|
||||
logic.vicinityPage = 1;
|
||||
logic.offset = 0;
|
||||
logic.nearScrollController.jumpTo(0);
|
||||
logic.loadNearbyInfo();
|
||||
logic.getNearByList();
|
||||
|
||||
@ -1238,7 +1237,11 @@ class _CirclePageState extends State<CirclePage>
|
||||
);
|
||||
}
|
||||
|
||||
void _showBottomSheet(BuildContext context) {
|
||||
void _showBottomSheet(BuildContext context) async {
|
||||
if (logic.genderList.length == 1) {
|
||||
await logic.initGerder();
|
||||
}
|
||||
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
@ -1260,10 +1263,17 @@ class _CirclePageState extends State<CirclePage>
|
||||
? logic.new_roleList
|
||||
: logic.dis_roleList,
|
||||
isHaveCity: _tabController.index == 1,
|
||||
callback: (genderList, orientationList, roleList, status) {
|
||||
|
||||
isShowInvisibilitySwitch:_tabController.index == 1,
|
||||
callback: (genderList, orientationList, roleList, status) async {
|
||||
if (_tabController.index == 1) {
|
||||
EventBusManager.fire(NearScrollTap());
|
||||
logic.refreshController.requestRefresh();
|
||||
try {
|
||||
await logic.refreshVicinityData();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
} else if (_tabController.index == 0) {
|
||||
List<String> genders = [];
|
||||
logic.new_genderList.forEach((element) {
|
||||
@ -1433,16 +1443,21 @@ class _CirclePageState extends State<CirclePage>
|
||||
Pickers.showMultiLinkPicker(context,
|
||||
pickerStyle: DefaultPickerStyle.dark(),
|
||||
data: logic.cityMap,
|
||||
columeNum: 2, onConfirm: (List res, List<int> position) {
|
||||
columeNum: logic.config, onConfirm: (List res, List<int> position) {
|
||||
print(res);
|
||||
// print(logic.cityMap[res[0]][res[1]][0]);
|
||||
// controller.state.city = controller.cityMap[res[0]][res[1]][0];
|
||||
// logic.state.city = res[1];
|
||||
if (res[0].contains("台湾")) {
|
||||
logic.cityName = "台湾省";
|
||||
if (logic.config == 1) {
|
||||
logic.cityName = res[0];
|
||||
} else {
|
||||
logic.cityName = res[1];
|
||||
if (res[0].contains("台湾")) {
|
||||
logic.cityName = "台湾省";
|
||||
} else {
|
||||
logic.cityName = res[1];
|
||||
}
|
||||
}
|
||||
|
||||
EventBusManager.fire(NearScrollTap());
|
||||
_onRefresh();
|
||||
});
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:circle_app/circle_app/circle/view.dart';
|
||||
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||
import 'package:circle_app/commons/Widgets/genderview.dart';
|
||||
@ -105,10 +106,10 @@ class _DiscoverState extends State<Discover>
|
||||
.animateTo(offset,
|
||||
duration: const Duration(milliseconds: 200), curve: Curves.easeIn)
|
||||
.then((value) {
|
||||
if (widget.unlockWxNum == 0) {
|
||||
stopTimer();
|
||||
startTimer();
|
||||
}
|
||||
if (widget.unlockWxNum == 0) {
|
||||
stopTimer();
|
||||
startTimer();
|
||||
}
|
||||
|
||||
if (onScrollCompleted != null) {
|
||||
onScrollCompleted();
|
||||
@ -166,7 +167,7 @@ class _DiscoverState extends State<Discover>
|
||||
}
|
||||
|
||||
void startTimer() {
|
||||
stopTimer(); // 确保定时器每次启动前都已停止
|
||||
stopTimer(); // 确保定时器每次启动前都已停止
|
||||
_start = 2;
|
||||
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
if (_start == 0) {
|
||||
@ -185,10 +186,9 @@ class _DiscoverState extends State<Discover>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sendRequest() async {
|
||||
var data =
|
||||
await DioManager.getInstance().postBody(url: Api.visitUserById,params: {'id': list[lastPage]['id']});
|
||||
var data = await DioManager.getInstance()
|
||||
.postBody(url: Api.visitUserById, params: {'id': list[lastPage]['id']});
|
||||
}
|
||||
|
||||
@override
|
||||
@ -244,27 +244,24 @@ class _DiscoverState extends State<Discover>
|
||||
index = 1;
|
||||
list.clear();
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
loadData();
|
||||
});
|
||||
|
||||
|
||||
|
||||
refreshSignSub = EventBusManager.on<DiscoverDataRefresh>().listen((event) {
|
||||
loadSignDiscoverData(event.userId);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取组件尺寸的方法
|
||||
void _getSize(Duration duration) {
|
||||
final RenderBox renderBox = _key.currentContext!.findRenderObject() as RenderBox;
|
||||
final RenderBox renderBox =
|
||||
_key.currentContext!.findRenderObject() as RenderBox;
|
||||
final size = renderBox.size;
|
||||
if (size.height < Get.height * 0.7 && screenHeight == 0 && getHeightCount < 2) {
|
||||
if (size.height < Get.height * 0.7 &&
|
||||
screenHeight == 0 &&
|
||||
getHeightCount < 2) {
|
||||
_getSize(duration);
|
||||
getHeightCount++;
|
||||
} else {
|
||||
@ -274,11 +271,11 @@ class _DiscoverState extends State<Discover>
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
loadUnlockStatus(userId) async {
|
||||
var result = await DioManager().post(url: Api.unlockStatus,params: {'targetUserId':userId});
|
||||
var result = await DioManager()
|
||||
.post(url: Api.unlockStatus, params: {'targetUserId': userId});
|
||||
if (result['code'] == 200) {
|
||||
residueUnlockNum = result['data']['residueUnlockNum'];
|
||||
}
|
||||
@ -335,11 +332,11 @@ class _DiscoverState extends State<Discover>
|
||||
} else {
|
||||
await circleLogic.initGerder();
|
||||
|
||||
circleLogic.dis_genderList.forEach((element) {
|
||||
if (element.isSelect) {
|
||||
genderList.add(element.id.toString());
|
||||
}
|
||||
});
|
||||
circleLogic.dis_genderList.forEach((element) {
|
||||
if (element.isSelect) {
|
||||
genderList.add(element.id.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (genderList.contains('0')) {
|
||||
@ -363,7 +360,6 @@ class _DiscoverState extends State<Discover>
|
||||
});
|
||||
//
|
||||
if (data['code'] == 200) {
|
||||
|
||||
List dataList = data['data']['users'];
|
||||
//"singleUnlock" -> 0
|
||||
if (dataList.isNotEmpty) {
|
||||
@ -406,7 +402,7 @@ class _DiscoverState extends State<Discover>
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
if (isLoadMore) {
|
||||
Future.delayed(Duration(milliseconds: 250),() {
|
||||
Future.delayed(Duration(milliseconds: 250), () {
|
||||
isLoadMore = false;
|
||||
lastPage = lastPage + 1;
|
||||
animateToOffset(
|
||||
@ -425,9 +421,7 @@ class _DiscoverState extends State<Discover>
|
||||
if (refreshController.footerStatus == LoadStatus.loading) {
|
||||
refreshController.loadComplete();
|
||||
}
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
@ -464,74 +458,96 @@ class _DiscoverState extends State<Discover>
|
||||
return Container(
|
||||
key: _key,
|
||||
child: list.isEmpty
|
||||
? loadFail ? noResultWidget(tip: '',callBack: () {
|
||||
isMore = true;
|
||||
loadFail = false;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
refreshData();
|
||||
}) : isMore
|
||||
? loaddingWidget(true)
|
||||
: noResultWidget(tip: widget.unlockWxNum == 1 ? '已解锁联系方式的圈友会展示在这里哦~' :'正在等待被填充~')
|
||||
? loadFail
|
||||
? noResultWidget(
|
||||
tip: '',
|
||||
callBack: () {
|
||||
isMore = true;
|
||||
loadFail = false;
|
||||
setState(() {});
|
||||
refreshData();
|
||||
})
|
||||
: isMore
|
||||
? loaddingWidget(true)
|
||||
: noResultWidget(
|
||||
tip: widget.unlockWxNum == 1
|
||||
? '已解锁联系方式的圈友会展示在这里哦~'
|
||||
: '正在等待被填充~')
|
||||
: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Container(color: Colors.transparent),
|
||||
Listener(
|
||||
onPointerDown: getPointDownListenerInHorizontal(),
|
||||
onPointerUp: getPointUpListenerInHorizontal(),
|
||||
child: SizeCacheWidget(
|
||||
child:SmartRefresher(
|
||||
footer: DiyLoadFooter(
|
||||
noDataText: widget.unlockWxNum == 2 || widget.unlockWxNum == 1 ? '---更多精彩正在赶来的路上---' : '只展示一些精选过的圈友哦~',
|
||||
),
|
||||
onRefresh: refreshData,
|
||||
controller: refreshController,
|
||||
onLoading: _onLoading,
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
var user = Users.fromJson(list[index]);
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Container(color: Colors.transparent),
|
||||
Listener(
|
||||
onPointerDown: getPointDownListenerInHorizontal(),
|
||||
onPointerUp: getPointUpListenerInHorizontal(),
|
||||
child: SizeCacheWidget(
|
||||
child: SmartRefresher(
|
||||
footer: DiyLoadFooter(
|
||||
noDataText:
|
||||
widget.unlockWxNum == 2 || widget.unlockWxNum == 1
|
||||
? '---更多精彩正在赶来的路上---'
|
||||
: '只展示一些精选过的圈友哦~',
|
||||
),
|
||||
onRefresh: refreshData,
|
||||
controller: refreshController,
|
||||
onLoading: _onLoading,
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
var user = Users.fromJson(list[index]);
|
||||
|
||||
String onLineStr = '';
|
||||
if (user.online_flag?.isNotEmpty ?? false) {
|
||||
onLineStr = user.online_flag!;
|
||||
if (user.distance != null) {
|
||||
if (user.distance! < 100) {
|
||||
onLineStr =
|
||||
'${user.online_flag!}· ${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (user.distance != null) {
|
||||
if ((user.distance! ?? 10) < 100) {
|
||||
onLineStr = '${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
}
|
||||
String onLineStr = '';
|
||||
if (user.online_flag?.isNotEmpty ?? false) {
|
||||
onLineStr = user.online_flag!;
|
||||
if (user.distance != null) {
|
||||
if (user.distance! < 100) {
|
||||
onLineStr =
|
||||
'${user.online_flag!}· ${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (user.distance != null) {
|
||||
if ((user.distance! ?? 10) < 100) {
|
||||
onLineStr = '${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FrameSeparateWidget(
|
||||
index: index,
|
||||
child: FeaturedItem(info: list[index], index: index, screenHeight: screenHeight,chargeType: chargeDiscoverType,chargeFreeNum: chargeDiscoverFreeNum,myVip: myVip, sendNoLookData: () {
|
||||
sendNoLookData(user.userId!.toString(),index);
|
||||
},setLike: () {
|
||||
setLike(user.userId!.toString(),
|
||||
user.is_follow!, () {
|
||||
list[index]['is_follow'] =
|
||||
!user.is_follow!;
|
||||
setState(() {});
|
||||
});
|
||||
}, loadSignDiscoverData: loadSignDiscoverData, showGiftPannel: showGiftPannel, residueUnlockNum: residueUnlockNum,));
|
||||
},
|
||||
itemCount: list.length,
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
),
|
||||
return FrameSeparateWidget(
|
||||
index: index,
|
||||
child: FeaturedItem(
|
||||
info: list[index],
|
||||
index: index,
|
||||
screenHeight: screenHeight,
|
||||
chargeType: chargeDiscoverType,
|
||||
chargeFreeNum: chargeDiscoverFreeNum,
|
||||
myVip: myVip,
|
||||
sendNoLookData: () {
|
||||
sendNoLookData(
|
||||
user.userId!.toString(), index);
|
||||
},
|
||||
setLike: () {
|
||||
setLike(
|
||||
user.userId!.toString(), user.is_follow!,
|
||||
() {
|
||||
list[index]['is_follow'] = !user.is_follow!;
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
loadSignDiscoverData: loadSignDiscoverData,
|
||||
showGiftPannel: showGiftPannel,
|
||||
residueUnlockNum: residueUnlockNum,
|
||||
));
|
||||
},
|
||||
itemCount: list.length,
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -611,11 +627,12 @@ class _DiscoverState extends State<Discover>
|
||||
}
|
||||
|
||||
Future<bool> isFirstContactTip() async {
|
||||
SharedPreferencesHelper preferences = await SharedPreferencesHelper.getInstance();
|
||||
SharedPreferencesHelper preferences =
|
||||
await SharedPreferencesHelper.getInstance();
|
||||
String time = await preferences!.getString(firstContactTip) ?? '';
|
||||
if (time.isNotEmpty) {
|
||||
DateTime dateTime = DateTime.parse(time);
|
||||
bool isShow = !isWithinOneMonth(dateTime,DateTime.now());
|
||||
bool isShow = !isWithinOneMonth(dateTime, DateTime.now());
|
||||
if (isShow) {
|
||||
preferences!.setString(firstContactTip, DateTime.now().toString());
|
||||
}
|
||||
@ -643,7 +660,6 @@ class _DiscoverState extends State<Discover>
|
||||
return time2.isAfter(time1) && time2.isBefore(time1PlusOneMonth);
|
||||
}
|
||||
|
||||
|
||||
loadWxNumData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.checkWxNumState,
|
||||
@ -651,9 +667,9 @@ class _DiscoverState extends State<Discover>
|
||||
if (data['code'] == 200) {
|
||||
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
||||
|
||||
if ((data['data']['user']['contact'] ?? '').toString().isEmpty) {
|
||||
showAddWxPicker(false);
|
||||
}
|
||||
if ((data['data']['user']['contact'] ?? '').toString().isEmpty) {
|
||||
showAddWxPicker(false);
|
||||
}
|
||||
} else {
|
||||
// wxStatusInfo['${data['code']}'] = data['msg'];
|
||||
}
|
||||
@ -843,7 +859,15 @@ class FeaturedItem extends StatefulWidget {
|
||||
{super.key,
|
||||
required this.info,
|
||||
required this.index,
|
||||
required this.screenHeight,required this.sendNoLookData,required this.chargeType,required this.chargeFreeNum,required this.myVip,required this.residueUnlockNum,required this.setLike,required this.loadSignDiscoverData,required this.showGiftPannel});
|
||||
required this.screenHeight,
|
||||
required this.sendNoLookData,
|
||||
required this.chargeType,
|
||||
required this.chargeFreeNum,
|
||||
required this.myVip,
|
||||
required this.residueUnlockNum,
|
||||
required this.setLike,
|
||||
required this.loadSignDiscoverData,
|
||||
required this.showGiftPannel});
|
||||
|
||||
@override
|
||||
State<FeaturedItem> createState() => _FeaturedItemState();
|
||||
@ -877,29 +901,24 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<Widget> pointWidget = [];
|
||||
int count = 0;
|
||||
|
||||
for (var item in user.images!) {
|
||||
pointWidget.add( Expanded(
|
||||
pointWidget.add(Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
right: user.images!.indexOf(item) ==
|
||||
user.images!.last
|
||||
? 0
|
||||
: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: currentIndex == count
|
||||
? Colors.white
|
||||
: Colors.white.withOpacity(0.25),
|
||||
borderRadius: BorderRadius.circular(2.sp),
|
||||
),
|
||||
)));
|
||||
margin: EdgeInsets.only(
|
||||
right: user.images!.indexOf(item) == user.images!.last ? 0 : 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: currentIndex == count
|
||||
? Colors.white
|
||||
: Colors.white.withOpacity(0.25),
|
||||
borderRadius: BorderRadius.circular(2.sp),
|
||||
),
|
||||
)));
|
||||
count = count + 1;
|
||||
}
|
||||
|
||||
|
||||
return Container(
|
||||
height: screenHeight,
|
||||
width: Get.width,
|
||||
@ -918,72 +937,133 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
// clipBehavior: Clip.hardEdge,
|
||||
child: Container(
|
||||
// padding: EdgeInsets.all(2.sp),
|
||||
child: PageView.builder(
|
||||
controller: pageController,
|
||||
//当页面选中后回调此方法
|
||||
//参数[index]是当前滑动到的页面角标索引 从0开始
|
||||
onPageChanged: (int index) {
|
||||
print("当前的页面是 $index");
|
||||
currentIndex = index;
|
||||
setState(() {
|
||||
padding: EdgeInsets.all(2.sp),
|
||||
child: CarouselSlider.builder(
|
||||
|
||||
});
|
||||
},
|
||||
//值为flase时 显示第一个页面 然后从左向右开始滑动
|
||||
//值为true时 显示最后一个页面 然后从右向左开始滑动
|
||||
reverse: false,
|
||||
//滑动到页面底部无回弹效果
|
||||
// physics: BouncingScrollPhysics(),
|
||||
//纵向滑动切换
|
||||
scrollDirection: Axis.horizontal,
|
||||
//页面控制器
|
||||
// controller: pageController,
|
||||
//所有的子Widget
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
bool isFee = true;
|
||||
if (widget.index < widget.chargeFreeNum) {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
} else {
|
||||
if (widget.chargeType == 1) {
|
||||
if (widget.myVip > 0 || user.singleUnlock == 1) {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
} else {
|
||||
Get.toNamed(Routes.UserInfoPage, arguments: {'userId':user.userId.toString(), 'isFee':true,'pageType':3,'pageIndex':index},parameters: {'source':'chosen_list'});
|
||||
}
|
||||
} else {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
}
|
||||
options: CarouselOptions(
|
||||
onPageChanged: (index, reason) {
|
||||
currentIndex = index;
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: CachedImg(
|
||||
imageUrl: user.images![index],
|
||||
fit: BoxFit.cover,
|
||||
// width: Get.width,
|
||||
height: screenHeight,
|
||||
));
|
||||
},
|
||||
itemCount: user.images!.length,
|
||||
)
|
||||
// scrollPhysics: NeverScrollableScrollPhysics(),
|
||||
height: screenHeight,
|
||||
autoPlay: user.images!.length > 1, // 启用自动播放
|
||||
enlargeCenterPage: false,
|
||||
autoPlayInterval: const Duration(seconds: 2),
|
||||
aspectRatio: 1.0,
|
||||
viewportFraction: 1.0),
|
||||
itemBuilder:
|
||||
(BuildContext context, int index, int realIndex) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
bool isFee = true;
|
||||
if (widget.index < widget.chargeFreeNum) {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),
|
||||
parameters: {'source': 'chosen_list'});
|
||||
} else {
|
||||
if (widget.chargeType == 1) {
|
||||
if (widget.myVip > 0 ||
|
||||
user.singleUnlock == 1) {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),
|
||||
parameters: {'source': 'chosen_list'});
|
||||
} else {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: {
|
||||
'userId': user.userId.toString(),
|
||||
'isFee': true,
|
||||
'pageType': 3,
|
||||
'pageIndex': index
|
||||
},
|
||||
parameters: {
|
||||
'source': 'chosen_list'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Get.toNamed(Routes.UserInfoPage,
|
||||
arguments: user.userId!.toString(),
|
||||
parameters: {'source': 'chosen_list'});
|
||||
}
|
||||
}
|
||||
},
|
||||
child: CachedImg(
|
||||
imageUrl: user.images![index],
|
||||
fit: BoxFit.cover,
|
||||
// width: Get.width,
|
||||
height: screenHeight,
|
||||
));
|
||||
},
|
||||
itemCount: user.images!.length,
|
||||
),
|
||||
// padding: EdgeInsets.all(2.sp),
|
||||
// child: PageView.builder(
|
||||
// controller: pageController,
|
||||
// //当页面选中后回调此方法
|
||||
// //参数[index]是当前滑动到的页面角标索引 从0开始
|
||||
// onPageChanged: (int index) {
|
||||
// print("当前的页面是 $index");
|
||||
// currentIndex = index;
|
||||
// setState(() {
|
||||
//
|
||||
// });
|
||||
// },
|
||||
// //值为flase时 显示第一个页面 然后从左向右开始滑动
|
||||
// //值为true时 显示最后一个页面 然后从右向左开始滑动
|
||||
// reverse: false,
|
||||
// //滑动到页面底部无回弹效果
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// //纵向滑动切换
|
||||
// scrollDirection: Axis.horizontal,
|
||||
// //页面控制器
|
||||
// // controller: pageController,
|
||||
// //所有的子Widget
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// return GestureDetector(
|
||||
// onTap: () {
|
||||
// bool isFee = true;
|
||||
// if (widget.index < widget.chargeFreeNum) {
|
||||
// Get.toNamed(Routes.UserInfoPage,
|
||||
// arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
// } else {
|
||||
// if (widget.chargeType == 1) {
|
||||
// if (widget.myVip > 0 || user.singleUnlock == 1) {
|
||||
// Get.toNamed(Routes.UserInfoPage,
|
||||
// arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
// } else {
|
||||
// Get.toNamed(Routes.UserInfoPage, arguments: {'userId':user.userId.toString(), 'isFee':true,'pageType':3,'pageIndex':index},parameters: {'source':'chosen_list'});
|
||||
// }
|
||||
// } else {
|
||||
// Get.toNamed(Routes.UserInfoPage,
|
||||
// arguments: user.userId!.toString(),parameters: {'source':'chosen_list'});
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// child: CachedImg(
|
||||
// imageUrl: user.images![index],
|
||||
// fit: BoxFit.cover,
|
||||
// // width: Get.width,
|
||||
// height: screenHeight,
|
||||
// ));
|
||||
// },
|
||||
// itemCount: user.images!.length,
|
||||
// )
|
||||
|
||||
// Swiper(
|
||||
// autoplay: false,
|
||||
// loop: user.images!.length == 1
|
||||
// ? false
|
||||
// : true,
|
||||
// itemBuilder:
|
||||
// (BuildContext context, int index) {
|
||||
// // print(index);
|
||||
// Swiper(
|
||||
// autoplay: false,
|
||||
// loop: user.images!.length == 1
|
||||
// ? false
|
||||
// : true,
|
||||
// itemBuilder:
|
||||
// (BuildContext context, int index) {
|
||||
// // print(index);
|
||||
|
||||
// },
|
||||
// itemCount: user.images!.length,
|
||||
// ),
|
||||
)),
|
||||
// },
|
||||
// itemCount: user.images!.length,
|
||||
// ),
|
||||
)),
|
||||
),
|
||||
if (user.images!.length > 1)
|
||||
Positioned(
|
||||
@ -1095,7 +1175,7 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
)),
|
||||
Positioned(
|
||||
left: 6.sp,
|
||||
bottom: 6.sp,
|
||||
bottom: 36.sp,
|
||||
child: Container(
|
||||
width: Get.width - 32.sp,
|
||||
padding: EdgeInsets.only(right: 0.sp),
|
||||
@ -1103,7 +1183,6 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (user.contact!.isNotEmpty)
|
||||
|
||||
wxStatusWidget(
|
||||
!user.contact!.contains('*'),
|
||||
user.contact!,
|
||||
@ -1119,7 +1198,6 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
children: [
|
||||
Text(
|
||||
formatNickname(user.nickname ?? ''),
|
||||
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: Color(0XFFF7FAFA),
|
||||
@ -1151,51 +1229,58 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: Get.width - 120.sp,
|
||||
margin: EdgeInsets.only(top: 15.sp, bottom: 15.sp),
|
||||
child: RichText(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: ui.PlaceholderAlignment.middle,
|
||||
// alignment: Rect.fromCenter(center: center, width: width, height: height),
|
||||
child: IntrinsicWidth(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 2.sp,),
|
||||
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||
height: 20.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(22),
|
||||
color: AppColor.cityBgColor,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.location_on,color: Colors.white,size: 12.sp,),
|
||||
Text(
|
||||
user.city!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
width: Get.width - 120.sp,
|
||||
margin: EdgeInsets.only(top: 15.sp, bottom: 15.sp),
|
||||
child: RichText(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: ui.PlaceholderAlignment.middle,
|
||||
// alignment: Rect.fromCenter(center: center, width: width, height: height),
|
||||
child: IntrinsicWidth(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
right: 2.sp,
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
left: 4.sp, right: 4.sp),
|
||||
height: 20.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(22),
|
||||
color: AppColor.cityBgColor,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.location_on,
|
||||
color: Colors.white,
|
||||
size: 12.sp,
|
||||
),
|
||||
Text(
|
||||
user.city!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: user.signature!,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.sp,)),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
TextSpan(
|
||||
text: user.signature!,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.sp,
|
||||
)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
width: Get.width - 110.sp,
|
||||
height: 35.sp,
|
||||
@ -1229,38 +1314,46 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
bool isFee = true;
|
||||
if (widget.index < widget.chargeFreeNum) {
|
||||
pushChatPage(user.userId.toString(),
|
||||
user.imAccid!.toString(), user.nickname!,source: 'chosen_list');
|
||||
user.imAccid!.toString(), user.nickname!,
|
||||
source: 'chosen_list');
|
||||
} else {
|
||||
if (widget.chargeType == 1) {
|
||||
if (widget.myVip > 0 || user.singleUnlock == 1 || unclockUserList.contains(user.userId.toString()) ) {
|
||||
if (widget.myVip > 0 ||
|
||||
user.singleUnlock == 1 ||
|
||||
unclockUserList
|
||||
.contains(user.userId.toString())) {
|
||||
pushChatPage(user.userId.toString(),
|
||||
user.imAccid!.toString(), user.nickname!,source: 'chosen_list');
|
||||
user.imAccid!.toString(), user.nickname!,
|
||||
source: 'chosen_list');
|
||||
} else {
|
||||
showVip('为了给大家提供更多的体验,可以自主选择「查看单人-永久免费和TA私聊」和「查看所有-永久免费私聊所有人)',
|
||||
'1元私聊单人', '会员私聊所有', () {
|
||||
addUmengTag('点击附近一元私聊弹窗');
|
||||
Get.bottomSheet(
|
||||
showVip(
|
||||
'为了给大家提供更多的体验,可以自主选择「查看单人-永久免费和TA私聊」和「查看所有-永久免费私聊所有人)',
|
||||
'1元私聊单人',
|
||||
'会员私聊所有', () {
|
||||
addUmengTag('点击附近一元私聊弹窗');
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(true,''),
|
||||
body: Open_vip_tipPage(true, ''),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false).then((value) {
|
||||
// homeLogic.loadMyInfoData();
|
||||
});
|
||||
}, () {
|
||||
CircleLogic circleLogic = Get.find<CircleLogic>();
|
||||
circleLogic.unlockDicoverPeople(user.userId.toString());
|
||||
});
|
||||
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
// homeLogic.loadMyInfoData();
|
||||
});
|
||||
}, () {
|
||||
CircleLogic circleLogic =
|
||||
Get.find<CircleLogic>();
|
||||
circleLogic.unlockDicoverPeople(
|
||||
user.userId.toString());
|
||||
});
|
||||
}
|
||||
} else {
|
||||
pushChatPage(user.userId.toString(),
|
||||
user.imAccid!.toString(), user.nickname!,source: 'chosen_list');
|
||||
user.imAccid!.toString(), user.nickname!,
|
||||
source: 'chosen_list');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
@ -1303,50 +1396,69 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
],
|
||||
),
|
||||
)),
|
||||
if ((index == 0 && homeLogic.model?.userType != 1) && !isShowTipPhoto && Get.currentRoute == Routes.Home)
|
||||
if ((index == 0 && homeLogic.model?.userType != 1) &&
|
||||
!isShowTipPhoto &&
|
||||
Get.currentRoute == Routes.Home)
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 6.sp,left: 6.sp,right: 6.sp,bottom: 6.sp),
|
||||
margin: EdgeInsets.only(left: 35.sp,right: 35.sp,top: 5.sp),
|
||||
padding: EdgeInsets.only(
|
||||
top: 6.sp, left: 6.sp, right: 6.sp, bottom: 6.sp),
|
||||
margin: EdgeInsets.only(left: 35.sp, right: 35.sp, top: 5.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(6.sp)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('上传更多真实形象照才能被精选',style: TextStyle(color: Colors.white,fontSize: 14),),
|
||||
Text(
|
||||
'上传更多真实形象照才能被精选',
|
||||
style: TextStyle(color: Colors.white, fontSize: 14),
|
||||
),
|
||||
Spacer(),
|
||||
InkWell(onTap: () {
|
||||
Get.toNamed(Routes.UserInfoPage);
|
||||
isShowTipPhoto = true;
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
},child: Text('去上传',style: TextStyle(color: AppColor.mainColor,fontSize: 14),))
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.UserInfoPage);
|
||||
isShowTipPhoto = true;
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'去上传',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor, fontSize: 14),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
if (index == 0 && widget.residueUnlockNum != 0)
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 6.sp,left: 6.sp,right: 6.sp,bottom: 6.sp),
|
||||
margin: EdgeInsets.only(left: 45.sp,right: 45.sp,top: 5.sp),
|
||||
padding: EdgeInsets.only(
|
||||
top: 6.sp, left: 6.sp, right: 6.sp, bottom: 6.sp),
|
||||
margin: EdgeInsets.only(left: 45.sp, right: 45.sp, top: 5.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(6.sp)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(6.sp)),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(widget.residueUnlockNum == -1 ? '还有无限制免费解锁次数未使用' : '还有${widget.residueUnlockNum}次免费解锁次数未使用',style: TextStyle(color: Colors.white,fontSize: 14),),
|
||||
Text(
|
||||
widget.residueUnlockNum == -1
|
||||
? '还有无限制免费解锁次数未使用'
|
||||
: '还有${widget.residueUnlockNum}次免费解锁次数未使用',
|
||||
style: TextStyle(color: Colors.white, fontSize: 14),
|
||||
),
|
||||
Spacer(),
|
||||
InkWell(onTap: () {
|
||||
Get.back();
|
||||
},child: Text('前往解锁>',style: TextStyle(color: AppColor.mainColor,fontSize: 14),))
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Text(
|
||||
'前往解锁>',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor, fontSize: 14),
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
@ -1354,11 +1466,10 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
tagItem(List item) {
|
||||
return Container(
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(top: 5.sp, bottom: 5.sp),
|
||||
margin: EdgeInsets.only(top: 5.sp, bottom: 0.sp),
|
||||
// color: Colors.red,
|
||||
// height: 45.sp,
|
||||
child: ListView.builder(
|
||||
@ -1380,8 +1491,7 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0),
|
||||
border: GradientBoxBorder(
|
||||
gradient:
|
||||
AppColor.mainVerLinearGradient,
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
width: 0.5.sp,
|
||||
),
|
||||
color: const Color(0xFF392D53),
|
||||
@ -1450,7 +1560,7 @@ class _FeaturedItemState extends State<FeaturedItem> {
|
||||
child: Text(
|
||||
"温馨提示",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@ -1628,7 +1738,7 @@ class Users {
|
||||
this.blacklist,
|
||||
this.mark,
|
||||
this.contact,
|
||||
this.singleUnlock,
|
||||
this.singleUnlock,
|
||||
this.contactType,
|
||||
this.online_flag,
|
||||
this.city,
|
||||
|
||||
@ -951,7 +951,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 300.sp,
|
||||
height: 400.sp,
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
@ -68,9 +68,9 @@ class _VicinityState extends State<Vicinity>
|
||||
});
|
||||
|
||||
widget.logic.startCheckLocationPermission();
|
||||
sub = EventBusManager.on<NearScrollTap>().listen((event) {
|
||||
sub = EventBusManager.on<NearScrollTap>().listen((event) async {
|
||||
try {
|
||||
_scrollController.animateTo(0,
|
||||
await _scrollController.animateTo(0,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut);
|
||||
} catch (e) {}
|
||||
@ -791,7 +791,7 @@ class _VicinityState extends State<Vicinity>
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'同城喊话',
|
||||
'同省喊话',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:circle_app/router/routers.dart';
|
||||
import 'package:circle_app/utils/cache_img.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -162,6 +163,16 @@ class _VideoPlayerWidgetState extends State<VideoPlayerWidget> with RouteAware {
|
||||
));
|
||||
}
|
||||
|
||||
goCircleList() async {
|
||||
var data = await DioManager.getInstance()
|
||||
.get(url: Api.signInterestCalloutDetail, params: {'calloutId': widget.user.id!});
|
||||
if (data['code'] == 200) {
|
||||
Get.toNamed(Routes.SignalCircleListPage,
|
||||
arguments: data['data']['interest']['id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Widget> widgets = [];
|
||||
@ -342,15 +353,19 @@ class _VideoPlayerWidgetState extends State<VideoPlayerWidget> with RouteAware {
|
||||
text: '#' + (widget.user.interest?.title ?? ''),
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 14.sp,
|
||||
fontSize: 16.sp,
|
||||
letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||
height: 1.8),
|
||||
recognizer: TapGestureRecognizer()..onTap =() {
|
||||
goCircleList();
|
||||
|
||||
}
|
||||
),
|
||||
TextSpan(
|
||||
text: widget.user.content!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontSize: 16.sp,
|
||||
letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||
height: 1.8),
|
||||
)
|
||||
|
||||
@ -2960,14 +2960,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
widgets.isNotEmpty
|
||||
? Expanded(
|
||||
child: Text(
|
||||
'${list.chat!.count!}位圈友已私聊',
|
||||
'${list.chat!.count!}圈友已私聊',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
))
|
||||
: Expanded(
|
||||
child: Text(
|
||||
'快成为第一位私聊ta的人',
|
||||
'成为第一位私聊ta的人',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontSize: 13.sp),
|
||||
|
||||
@ -29,10 +29,11 @@ class ScreenBottomSheetDialog extends StatefulWidget {
|
||||
List<MyConfigData> roleList ;
|
||||
final ScreenCallback callback;
|
||||
bool? isShowAutoSwitch;
|
||||
bool? isShowInvisibilitySwitch;
|
||||
final bool isHaveCity;
|
||||
|
||||
ScreenBottomSheetDialog({required this.genderList, required this.orientationList,required this.roleList,
|
||||
required this.callback,required this.isHaveCity,this.isShowAutoSwitch
|
||||
required this.callback,required this.isHaveCity,this.isShowAutoSwitch,this.isShowInvisibilitySwitch
|
||||
});
|
||||
@override
|
||||
_ScreenBottomSheetDialogState createState() =>
|
||||
@ -46,7 +47,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
|
||||
|
||||
int myVip = 0;
|
||||
String city = '切换城市';
|
||||
String city = '切换';
|
||||
String locationCity = '';
|
||||
String endCity = '';
|
||||
|
||||
@ -57,6 +58,8 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
|
||||
bool isShowAutoSwitch = false;
|
||||
|
||||
var logic = Get.find<CircleLogic>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
@ -162,7 +165,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
});
|
||||
|
||||
if (widget.isHaveCity) {
|
||||
var result = await DioManager.instance.postBody(url: Api.nearbyCanSearch,params: {'orientations':roles,'roles':orientations});
|
||||
var result = await DioManager.instance.postBody(url: logic.config == 1 ? Api.provinceNearbyCanSearch : Api.nearbyCanSearch,params: {'orientations':roles,'roles':orientations});
|
||||
int code = result['code'];
|
||||
if (code != 200) {
|
||||
// LIMIT_VIP(21201, "功能限制,开启VIP后再进行使用"),
|
||||
@ -225,15 +228,21 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 16.sp),
|
||||
child: Text(
|
||||
"角色",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text(
|
||||
"角色",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 23.sp,
|
||||
margin: EdgeInsets.only(left: 18.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp),
|
||||
child: ListView.builder(
|
||||
itemCount: widget.genderList.length,
|
||||
scrollDirection: Axis.horizontal,
|
||||
@ -278,7 +287,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 6.0),
|
||||
margin: EdgeInsets.only(right: 10.0),
|
||||
width: 50.0,
|
||||
height: 23.0,
|
||||
decoration: BoxDecoration(
|
||||
@ -330,20 +339,27 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
if (widget.roleList.isNotEmpty)
|
||||
Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 16.sp,top: 6.sp),
|
||||
child: Text(
|
||||
"属性",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text(
|
||||
"属性",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 23.sp,
|
||||
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp,top: 6.sp),
|
||||
child: ListView.builder(
|
||||
itemCount: roleList.length,
|
||||
scrollDirection: Axis.horizontal,
|
||||
@ -394,7 +410,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 6.0),
|
||||
margin: EdgeInsets.only(right: 10.0),
|
||||
width: 50.0,
|
||||
height: 23.0,
|
||||
decoration: BoxDecoration(
|
||||
@ -442,7 +458,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
Positioned(
|
||||
left: 36.sp,
|
||||
|
||||
top: -5,
|
||||
child: Image(
|
||||
image: AssetImage(getBaseImage("icon_white_vip")),
|
||||
width: 34.sp,
|
||||
@ -451,24 +467,31 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.sp,
|
||||
height: 20.sp,
|
||||
),
|
||||
if (widget.orientationList.isNotEmpty)
|
||||
Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 16.sp,top: 6.sp),
|
||||
child: Text(
|
||||
"取向",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text(
|
||||
"取向",
|
||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 23.sp,
|
||||
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp,top: 6.sp),
|
||||
child: ListView.builder(
|
||||
itemCount: orientationList.length,
|
||||
scrollDirection: Axis.horizontal,
|
||||
@ -520,7 +543,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 6.0),
|
||||
margin: EdgeInsets.only(right: 10.0),
|
||||
width: 50.0,
|
||||
height: 23.0,
|
||||
decoration: BoxDecoration(
|
||||
@ -568,6 +591,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
Positioned(
|
||||
left: 36.sp,
|
||||
top:-5,
|
||||
child: Image(
|
||||
image: AssetImage(getBaseImage("icon_white_yearvip")),
|
||||
width: 34.sp,
|
||||
@ -578,7 +602,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
if (widget.isShowAutoSwitch != null)
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 15.sp,right: 0.sp),
|
||||
padding: EdgeInsets.only(left: 16.sp,right: 0.sp),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -587,8 +611,10 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text('自动曝光',
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.0.sp)),
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.0.sp)),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
@ -626,14 +652,84 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
Text(
|
||||
'关闭后仅展示您主动发出的内容',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 12.0.sp),
|
||||
style: TextStyle(color: Colors.grey, fontSize: 14.0.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (widget.isShowInvisibilitySwitch ?? false)
|
||||
Container(
|
||||
height: 20.sp,
|
||||
)
|
||||
padding: EdgeInsets.only(left: 15.sp,right: 0.sp,top: 20.sp),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SizedBox(height: 16.0.sp),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text('神秘隐身',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.0.sp)),
|
||||
SizedBox(width: 4.w,),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding: EdgeInsets.only(left: 8.sp, right: 8.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.tagVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(9.sp)),
|
||||
child: Text(
|
||||
'年VIP专享',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 11.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Transform.scale(
|
||||
scale: 0.7,
|
||||
child: CupertinoSwitch(
|
||||
activeColor: AppColor.mainColor,
|
||||
value: logic.nearInfoMap['nearbyHide'] == 1,
|
||||
onChanged: (bool value) async {
|
||||
|
||||
|
||||
var result = await DioManager.instance.postBody(url: Api.nearByHide,params: {'hide':value ? 1 : 0});
|
||||
if (result['code'] == 21202) {
|
||||
showVipDialog('nearby_hide');
|
||||
} else if (result['code'] == 200){
|
||||
logic.nearInfoMap['nearbyHide'] = value ? 1 : 0;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'开启后,其他人将无法看到你哦~',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 14.0.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 20.sp,
|
||||
)
|
||||
// Other content here...
|
||||
],
|
||||
),
|
||||
@ -651,7 +747,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 10.sp,left: 15.sp,right: 15.sp),
|
||||
child: Text(
|
||||
'可以切换到你喜欢的城市,遇见更多有趣的圈友',
|
||||
'可以切换到你喜欢的${logic.config == 1 ? '省份' : '城市'},遇见更多有趣的圈友',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 14.0.sp,
|
||||
@ -681,7 +777,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
),
|
||||
SizedBox(width: 6.0.sp),
|
||||
Text(
|
||||
'当前城市:',
|
||||
logic.config == 1 ? '当前省份:' : '当前城市:',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 14.0.sp,
|
||||
@ -724,14 +820,18 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
||||
Pickers.showMultiLinkPicker(context,
|
||||
pickerStyle: DefaultPickerStyle.dark(),
|
||||
data: logic.cityMap,
|
||||
columeNum: 2, onConfirm: (List res, List<int> position) {
|
||||
columeNum: logic.config, onConfirm: (List res, List<int> position) {
|
||||
print(res);
|
||||
|
||||
if (res[0].contains("台湾")) {
|
||||
logic.cityName = "台湾省";
|
||||
if (logic.config == 1) {
|
||||
logic.cityName = res[0];
|
||||
} else {
|
||||
logic.cityName = res[1];
|
||||
if (res[0].contains("台湾")) {
|
||||
logic.cityName = "台湾省";
|
||||
} else {
|
||||
logic.cityName = res[1];
|
||||
}
|
||||
}
|
||||
|
||||
city = logic.cityName;
|
||||
setState(() {
|
||||
|
||||
|
||||
@ -342,8 +342,11 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
} else if (int.parse(event) == 10) {
|
||||
//有新访客
|
||||
MsgLogic logic = Get.find<MsgLogic>();
|
||||
logic.getVisitorMsgsData();
|
||||
if (Get.isRegistered<MsgLogic>()) {
|
||||
MsgLogic logic = Get.find<MsgLogic>();
|
||||
logic.getVisitorMsgsData();
|
||||
}
|
||||
|
||||
} else if (int.parse(event) == 11) {
|
||||
var info = jsonDecode(jsonData['content']);
|
||||
EventBusManager.fire(ShowGiftNotifi(info));
|
||||
|
||||
@ -396,7 +396,7 @@ class _HomePageState extends State<HomePage>
|
||||
builder: (BuildContext context) {
|
||||
return Stack(alignment: Alignment.center, children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
@ -492,7 +492,7 @@ class _HomePageState extends State<HomePage>
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 4.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
@ -570,7 +570,7 @@ class _HomePageState extends State<HomePage>
|
||||
builder: (BuildContext context) {
|
||||
return Stack(alignment: Alignment.center, children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
// right: 16,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
@ -680,7 +680,7 @@ class _HomePageState extends State<HomePage>
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 4.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
@ -848,7 +848,7 @@ class _HomePageState extends State<HomePage>
|
||||
builder: (BuildContext context) {
|
||||
return Stack(alignment: Alignment.center, children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInSine,
|
||||
@ -942,7 +942,7 @@ class _HomePageState extends State<HomePage>
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 4.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
@ -1006,7 +1006,7 @@ class _HomePageState extends State<HomePage>
|
||||
builder: (BuildContext context) {
|
||||
return Stack(alignment: Alignment.center, children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
// right: 16,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
@ -1100,7 +1100,7 @@ class _HomePageState extends State<HomePage>
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 4.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@ -1833,7 +1833,7 @@ class _InventDescItemState extends State<InventDescItem> {
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('获合伙人'),
|
||||
child: infoText('获会员'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
|
||||
@ -114,7 +114,7 @@ class Complete_materialLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
} else {
|
||||
watchGenderList[1].isSelect = true;
|
||||
// watchGenderList[1].isSelect = true;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@ -407,27 +407,24 @@ class Complete_materialLogic extends GetxController {
|
||||
focusNickNode.requestFocus();
|
||||
return;
|
||||
} else if (state.sex.isEmpty) {
|
||||
showOKToast('请选择您的属性');
|
||||
return;
|
||||
} else if (state.age.isEmpty) {
|
||||
showOKToast('请选择您的真实生日');
|
||||
showOKToast('请选择您的角色');
|
||||
return;
|
||||
} else if (state.city.isEmpty) {
|
||||
showOKToast('请选择您的常住城市');
|
||||
return;
|
||||
} else if (state.role.isEmpty) {
|
||||
showOKToast('请选择您的属性');
|
||||
return;
|
||||
} else if (state.sex.isEmpty) {
|
||||
showOKToast('请选择您的角色');
|
||||
showOKToast('请选择您的圈内属性');
|
||||
return;
|
||||
} else if (state.orientation.isEmpty) {
|
||||
showOKToast('请选择您的取向');
|
||||
showOKToast('请选择您的真实取向');
|
||||
return;
|
||||
} else if (numbers.isEmpty) {
|
||||
showOKToast('请选择您的兴趣圈子');
|
||||
// return;
|
||||
} else if (state.descEditingController.text.isEmpty) {
|
||||
} else if (state.age.isEmpty) {
|
||||
showOKToast('请选择您的真实生日');
|
||||
return;
|
||||
} else if (state.descEditingController.text.isEmpty) {
|
||||
showOKToast('请输入您的交友宣言');
|
||||
focusNode.requestFocus();
|
||||
return;
|
||||
@ -449,7 +446,7 @@ class Complete_materialLogic extends GetxController {
|
||||
}
|
||||
});
|
||||
if (genderTagList.isEmpty) {
|
||||
showOKToast("请点击选择你想认识的人");
|
||||
showOKToast("请点击选择我想认识的人");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -94,15 +94,9 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 20.sp,
|
||||
),
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 106.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.getImageFile();
|
||||
@ -187,29 +181,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
() {},
|
||||
img: 'edit'),
|
||||
// if (isShowWx)
|
||||
wxFuncWidget('联系方式(选填)',
|
||||
TextField(
|
||||
controller: controller.state.wxEditingController,
|
||||
maxLength: 19,
|
||||
textAlign: TextAlign.right,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.deny(
|
||||
RegExp("[^-_a-zA-Z0-9]")),
|
||||
],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
decoration: InputDecoration(
|
||||
counterText: '',
|
||||
hintText: '请输入联系信息',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),),
|
||||
|
||||
|
||||
funcWidget(
|
||||
'我的角色',
|
||||
@ -278,20 +250,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
), () async {
|
||||
|
||||
},img: ''),
|
||||
funcWidget(
|
||||
'生日',
|
||||
Text(
|
||||
controller.state.age,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
), () {
|
||||
showAgePiker(
|
||||
context,
|
||||
controller,
|
||||
);
|
||||
}),
|
||||
|
||||
funcWidget(
|
||||
'常住城市',
|
||||
Text(
|
||||
@ -304,7 +263,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
showCityPiker(context, controller);
|
||||
}),
|
||||
funcWidget(
|
||||
'属性',
|
||||
'圈内属性',
|
||||
Text(
|
||||
controller.state.role,
|
||||
style: TextStyle(
|
||||
@ -315,7 +274,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
showRolePiker(context, controller);
|
||||
}),
|
||||
funcWidget(
|
||||
'取向',
|
||||
'真实取向',
|
||||
Text(
|
||||
controller.state.orientation,
|
||||
style: TextStyle(
|
||||
@ -346,6 +305,43 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
controller.update();
|
||||
}
|
||||
}),
|
||||
funcWidget(
|
||||
'生日',
|
||||
Text(
|
||||
controller.state.age,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
), () {
|
||||
showAgePiker(
|
||||
context,
|
||||
controller,
|
||||
);
|
||||
}),
|
||||
wxFuncWidget('联系方式(选填)',
|
||||
TextField(
|
||||
controller: controller.state.wxEditingController,
|
||||
maxLength: 19,
|
||||
textAlign: TextAlign.right,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.deny(
|
||||
RegExp("[^-_a-zA-Z0-9]")),
|
||||
],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
decoration: InputDecoration(
|
||||
counterText: '',
|
||||
hintText: '请输入联系信息',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 24.sp,
|
||||
@ -475,6 +471,8 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
Text(leftStr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -536,6 +534,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -543,6 +542,9 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(child: Container(width: 4,height: 4, color: AppColor.mainColor,)),
|
||||
SizedBox(width: 6.w),
|
||||
|
||||
Text(leftStr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
|
||||
@ -14,7 +14,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:quickpass_yidun_flutter/quickpass_flutter_plugin.dart';
|
||||
import 'package:quickpass_yidun_flutter/quickpass_yidun_flutter.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../../net/api.dart';
|
||||
@ -32,7 +32,7 @@ class LoginLogic extends GetxController {
|
||||
bool isPhone = false;
|
||||
|
||||
String clipboardStr = '';
|
||||
String source = 'kuaishou1';
|
||||
String source = '';
|
||||
|
||||
bool isShowPwd = false;
|
||||
|
||||
@ -253,7 +253,7 @@ class LoginLogic extends GetxController {
|
||||
quickLogin(ydToken);
|
||||
} else {
|
||||
await FlutterBugly.uploadException(
|
||||
message: '${map?['code']}- ${ydToken}',
|
||||
message: '${map?['code']}-${ydToken}-${map}',
|
||||
detail: 'login',
|
||||
);
|
||||
// "resultCode" -> 401
|
||||
@ -261,6 +261,7 @@ class LoginLogic extends GetxController {
|
||||
isInitSuccess();
|
||||
showOKToast('当前使用用户过多,请重试');
|
||||
} else {
|
||||
|
||||
showOKToast('当前使用用户过多,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,11 +200,16 @@ class MinefragmentLogic extends GetxController {
|
||||
.get(url: Api.masterBabies, params: {'page': 1, 'page_size': 10});
|
||||
|
||||
if (result['code'] == 200) {
|
||||
List list = result['data'] ?? [];
|
||||
if (list.isNotEmpty) {
|
||||
isHaveBady = true;
|
||||
update();
|
||||
try {
|
||||
List list = result['data'] ?? [];
|
||||
if (list.isNotEmpty) {
|
||||
isHaveBady = true;
|
||||
update();
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ class _MineFuncItemState extends State<MineFuncItem> {
|
||||
logic.isShowPositiveFeedBack ? _editGoodReviewItemView() : Container(),
|
||||
_wxItemView(),
|
||||
_authtemView(),
|
||||
_privateItemView(),
|
||||
_helpItemView(),
|
||||
_versionView(),
|
||||
_setUpItemView()
|
||||
@ -608,6 +609,50 @@ class _MineFuncItemState extends State<MineFuncItem> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _privateItemView() {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.PrivateSetting);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 25.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image(
|
||||
image: AssetImage(getBaseImage('private_icon')),
|
||||
width: 38.sp,
|
||||
height:38.sp,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 4.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'隐私管理',
|
||||
style: TextStyle(color: Colors.white,fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(width: 4.sp),
|
||||
Text(
|
||||
"自由管理您的隐私",
|
||||
style: TextStyle(color: Colors.white60,fontSize: 12.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_in")),
|
||||
width: 24.sp,
|
||||
height: 24.sp,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _helpItemView() {
|
||||
return GestureDetector(
|
||||
|
||||
@ -249,7 +249,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
List<V2TimConversation?> getFilteredConversation() {
|
||||
List<V2TimConversation?> filteredConversationList = model.conversationList
|
||||
.where(
|
||||
(element) => (element?.groupID != null || element?.userID != null))
|
||||
(element) => (element?.userID != null))
|
||||
.toList();
|
||||
|
||||
// 过滤指定的 userID qpqz_prod_10_10000000000
|
||||
@ -510,7 +510,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
List<String> userIdList = [];
|
||||
|
||||
filteredConversationList.forEach((element) {
|
||||
userIdList.add(element!.userID!);
|
||||
userIdList.add(element?.userID ?? '');
|
||||
});
|
||||
|
||||
Widget conversationList() {
|
||||
@ -1188,6 +1188,8 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((recommendCircleFriendData['user']
|
||||
['signature']).toString().isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
|
||||
@ -498,6 +498,8 @@ class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((recommendCircleFriendData['user']
|
||||
['signature']).toString().isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
|
||||
@ -114,10 +114,12 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
logic.serieslists.isNotEmpty) {
|
||||
return activeHorItem();
|
||||
} else {
|
||||
if (logic.serieslists.isNotEmpty) {
|
||||
if (logic.serieslists.isNotEmpty && logic.normallists.length >= index) {
|
||||
return PlatformWdiget(
|
||||
list: logic
|
||||
.normallists[index - 1]);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
return PlatformWdiget(
|
||||
|
||||
@ -497,6 +497,7 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
_showTextContentDialog(
|
||||
Get.context!,
|
||||
bean.intro,
|
||||
bean.title
|
||||
);
|
||||
},
|
||||
)),
|
||||
@ -650,22 +651,23 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
));
|
||||
}
|
||||
|
||||
void _showTextContentDialog(BuildContext context, String msg) {
|
||||
void _showTextContentDialog(BuildContext context, String msg,String title) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 300.sp,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
height: 400.sp,
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -677,31 +679,45 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 15,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(child: Text(title, style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA), fontSize: 16.sp)),)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||
alignment: Alignment.topLeft,
|
||||
child: Text(
|
||||
msg,
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
margin: EdgeInsets.only(top: 24.sp,bottom: 24.sp),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||
alignment: Alignment.center,
|
||||
child: SingleChildScrollView(child: Text(
|
||||
msg,
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),),
|
||||
),
|
||||
)
|
||||
),
|
||||
Positioned(
|
||||
top:8.sp,
|
||||
right: 10.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Icon(
|
||||
Icons.close,color: Colors.white,
|
||||
size: 20.sp,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -58,17 +58,17 @@ class My_master_or_babyLogic extends GetxController {
|
||||
} else {
|
||||
isMore = false;
|
||||
}
|
||||
update();
|
||||
|
||||
} else {
|
||||
if (list.isNotEmpty) {
|
||||
dataList.addAll(list);
|
||||
refreshController.loadComplete();
|
||||
update();
|
||||
} else {
|
||||
refreshController.loadNoData();
|
||||
}
|
||||
}
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
void showMasterPop(textEditingController,userId,masterInfo) async {
|
||||
|
||||
@ -38,10 +38,11 @@ class Near_talentLogic extends GetxController {
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var data = await DioManager.instance.post(url: Api.postNearbyList, params: {
|
||||
var data = await DioManager.instance.post(url: Get.find<CircleLogic>().config == 1 ? Api.provinceNearByUserList : Api.postNearbyList, params: {
|
||||
"offset": offset,
|
||||
'deep': deep,
|
||||
'city': cityName,
|
||||
'city': Get.find<CircleLogic>().config == 1 ? '': cityName,
|
||||
'province': Get.find<CircleLogic>().config == 1 ? cityName : '',
|
||||
"talent": 1,
|
||||
});
|
||||
var bean = BaseResponse<VicinityBean>.fromJson(
|
||||
|
||||
@ -13,6 +13,7 @@ class New_peopleLogic extends GetxController {
|
||||
String city = Get.arguments;
|
||||
final RefreshController refreshController = RefreshController();
|
||||
List<VicinityItemBean> peopleList = [];
|
||||
var logic = Get.find<CircleLogic>();
|
||||
bool isLoad = true;
|
||||
bool isMore = true;
|
||||
int deep = 0;
|
||||
@ -22,36 +23,15 @@ class New_peopleLogic extends GetxController {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
loadData();
|
||||
getCityList();
|
||||
}
|
||||
|
||||
Map cityMap = {};
|
||||
List<Province> provinceList = [];
|
||||
|
||||
getCityList() async {
|
||||
try {
|
||||
String jsonString = await rootBundle.loadString('data/china.json');
|
||||
List<dynamic> jsonData = json.decode(jsonString);
|
||||
provinceList =
|
||||
jsonData.map((dynamic item) => Province.fromJson(item)).toList();
|
||||
cityMap.clear();
|
||||
for (int i = 0; i < provinceList.length; i++) {
|
||||
Map areaMap = {};
|
||||
for (int c = 0; c < provinceList[i].city.length; c++) {
|
||||
String cityName = provinceList[i].city[c].name;
|
||||
areaMap[cityName] = []; // 不再存储区域列表,直接设置为空列表
|
||||
}
|
||||
cityMap[provinceList[i].name] = areaMap;
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error loading JSON file: $e');
|
||||
}
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var result = await DioManager.instance.postBody(
|
||||
url: Api.nearPeople,
|
||||
params: {'city': city, "deep": deep, 'offset': offset});
|
||||
url: logic.config == 1 ? Api.provinceNearPeople : Api.nearPeople,
|
||||
params: { 'city': logic.config == 1 ? '' : city,'province' :logic.config == 1 ? city : '', "deep": deep, 'offset': offset});
|
||||
var bean = BaseResponse<VicinityBean>.fromJson(
|
||||
result, (data) => VicinityBean.fromJson(data));
|
||||
|
||||
|
||||
@ -29,6 +29,8 @@ class New_peoplePage extends StatelessWidget {
|
||||
|
||||
final logic = Get.find<New_peopleLogic>();
|
||||
final homelogic = Get.find<HomeLogic>();
|
||||
var circleLogic = Get.find<CircleLogic>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
@ -633,11 +635,11 @@ class _WelecomePeopleDialogState extends State<WelecomePeopleDialog> {
|
||||
// type //1=3人 2=10人 3=30人
|
||||
// msg //招呼内容
|
||||
var result = await DioManager.instance.post(
|
||||
url: Api.nearBySayHello,
|
||||
url: logic.logic.config == 1 ? Api.provinceNearBySayHello : Api.nearBySayHello,
|
||||
params: {
|
||||
'msg': descController.text,
|
||||
'type': currentIndex + 1,
|
||||
'city': logic.city
|
||||
'city': logic.logic.config == 1 ? '' : logic.city,'province' :logic.logic.config == 1 ? logic.city : '',
|
||||
});
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('已成功欢迎,TA回复后就可以在消息列表继续聊天啦~');
|
||||
|
||||
10
circle_app/lib/circle_app/private_setting/binding.dart
Normal file
10
circle_app/lib/circle_app/private_setting/binding.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class Private_settingBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => Private_settingLogic());
|
||||
}
|
||||
}
|
||||
68
circle_app/lib/circle_app/private_setting/logic.dart
Normal file
68
circle_app/lib/circle_app/private_setting/logic.dart
Normal file
@ -0,0 +1,68 @@
|
||||
import 'package:circle_app/circle_app/circle/logic.dart';
|
||||
import 'package:circle_app/circle_app/minefragment/logic.dart';
|
||||
import 'package:circle_app/circle_app/world_call_out/logic.dart';
|
||||
import 'package:circle_app/net/api.dart';
|
||||
import 'package:circle_app/net/dio_manager.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class Private_settingLogic extends GetxController {
|
||||
bool status1 = false;
|
||||
bool status4 = false;
|
||||
bool status5 = false;
|
||||
var circleLogic = Get.find<CircleLogic>();
|
||||
var minefragmentLogic = Get.find<MinefragmentLogic>();
|
||||
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
status1 = circleLogic.nearInfoMap['nearbyHide'] == 1;
|
||||
loadData();
|
||||
}
|
||||
|
||||
Future setData(int type, bool status) async {
|
||||
if (type == 1) {
|
||||
var result = await DioManager.instance.postBody(url: Api.nearByHide,params: {'hide':status ? 1 : 0});
|
||||
if (result['code'] == 21202) {
|
||||
showVipDialog('nearby_hide');
|
||||
return false;
|
||||
} else if (result['code'] == 200){
|
||||
circleLogic.nearInfoMap['nearbyHide'] = (status ? 1 : 0);
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
|
||||
} else if (type == 5) {
|
||||
var result =
|
||||
await DioManager.instance.post(url: Api.setAutoExposureConf,params: {'value':status ? 1 : 0});
|
||||
update();
|
||||
if (Get.isRegistered<World_call_outLogic>()) {
|
||||
var world_call_outLogic = Get.find<World_call_outLogic>();
|
||||
await world_call_outLogic.loadAutoExposureConf();
|
||||
await world_call_outLogic.refreshData();
|
||||
}
|
||||
|
||||
return status;
|
||||
} else if (type == 4) {
|
||||
var result =
|
||||
await DioManager.instance.post(url: Api.hideWxNum + (status ? '1' : '0'));
|
||||
minefragmentLogic.fetchUserInfo(Api.getUserInfo);
|
||||
update();
|
||||
return status;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var result =
|
||||
await DioManager.instance.get(url: Api.getAutoExposureConf,);
|
||||
if (result['code'] == 200) {
|
||||
status5 = result['data']['value'] == 1;
|
||||
}
|
||||
status4 = minefragmentLogic.myInfoBean?.hide_wx_num == 1;
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
197
circle_app/lib/circle_app/private_setting/view.dart
Normal file
197
circle_app/lib/circle_app/private_setting/view.dart
Normal file
@ -0,0 +1,197 @@
|
||||
import 'package:circle_app/commons/Widgets/my_app_bar.dart';
|
||||
import 'package:circle_app/commons/colors/app_color.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class Private_settingPage extends StatelessWidget {
|
||||
Private_settingPage({Key? key}) : super(key: key);
|
||||
|
||||
final logic = Get.find<Private_settingLogic>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(getBaseImage("home_back")),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(centerTitle: '隐私管理'),
|
||||
body: GetBuilder<Private_settingLogic>(builder: (logic) {
|
||||
return Column(
|
||||
children: [
|
||||
settingItem([
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(margin: EdgeInsets.only(left: 10.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text('附近隐身', style: TextStyle(
|
||||
color: Colors.white, fontSize: 18.sp),),
|
||||
SizedBox(width: 4.w,),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 8.sp, right: 8.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor
|
||||
.tagVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(
|
||||
9.sp)),
|
||||
child: Text(
|
||||
'年VIP专享',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 11.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
Transform.scale(
|
||||
scale: 0.8,
|
||||
child: CupertinoSwitch(
|
||||
activeColor: AppColor.mainColor,
|
||||
value: logic.status1,
|
||||
onChanged: (bool value) async {
|
||||
logic.status1 = value;
|
||||
bool status = await logic.setData(
|
||||
1, logic.status1);
|
||||
if (!status) {
|
||||
logic.status1 = !value;
|
||||
}
|
||||
logic.update();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 10.sp, bottom: 10.sp),
|
||||
child: Text(
|
||||
'开启后,其他人将无法在附近看到你哦~',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.4),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
)
|
||||
]),
|
||||
SizedBox(height: 10.sp,),
|
||||
settingItem([
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(margin: EdgeInsets.only(left: 10.sp),
|
||||
child: Text('隐藏联系方式', style: TextStyle(
|
||||
color: Colors.white, fontSize: 18.sp),)),
|
||||
|
||||
Transform.scale(
|
||||
scale: 0.8,
|
||||
child: CupertinoSwitch(
|
||||
activeColor: AppColor.mainColor,
|
||||
value: logic.status4,
|
||||
onChanged: (bool value) async {
|
||||
logic.status4 = value;
|
||||
logic.setData(4, logic.status4);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 10.sp, bottom: 10.sp),
|
||||
child: Text(
|
||||
'开启后,对其他人隐藏,无解锁收入',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.4),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
)
|
||||
]),
|
||||
SizedBox(height: 10.sp,),
|
||||
settingItem([
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(margin: EdgeInsets.only(left: 10.sp),
|
||||
child: Text('自动曝光', style: TextStyle(
|
||||
color: Colors.white, fontSize: 18.sp),)),
|
||||
|
||||
Transform.scale(
|
||||
scale: 0.8,
|
||||
child: CupertinoSwitch(
|
||||
activeColor: AppColor.mainColor,
|
||||
value: logic.status5,
|
||||
onChanged: (bool value) async {
|
||||
logic.status5 = value;
|
||||
logic.setData(5, logic.status5);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 10.sp, bottom: 10.sp),
|
||||
child: Text(
|
||||
'关闭后,至尊墙仅展示主动发出的内容',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.4),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
)
|
||||
]),
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
settingItem(List<Widget> items) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xaa31264D),
|
||||
borderRadius: BorderRadius.circular(10.sp)
|
||||
),
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
child: Column(
|
||||
children: items,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -96,51 +96,13 @@ class Real_people_authLogic extends GetxController {
|
||||
|
||||
// 校验身份证合法性
|
||||
bool verifyCardId(String cardId) {
|
||||
const Map city = {11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江 ", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南", 42: "湖北 ", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏 ", 61: "陕西", 62: "甘肃", 63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外 "};
|
||||
String tip = '';
|
||||
bool pass = true;
|
||||
// 身份证号的正则表达式
|
||||
final regExp = RegExp(
|
||||
r'^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X|x)$|^[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}$');
|
||||
|
||||
// 检查身份证号是否符合正则
|
||||
return regExp.hasMatch(cardId);
|
||||
|
||||
RegExp cardReg = RegExp(r'^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$');
|
||||
if(cardId.isEmpty || !cardReg.hasMatch(cardId)) {
|
||||
tip = '身份证号格式错误';
|
||||
print(tip);
|
||||
pass = false;
|
||||
return pass;
|
||||
}
|
||||
if(city[int.parse(cardId.substring(0,2))] == null) {
|
||||
tip = '地址编码错误';
|
||||
print(tip);
|
||||
pass = false;
|
||||
return pass;
|
||||
}
|
||||
// 18位身份证需要验证最后一位校验位,15位不检测了,现在也没15位的了
|
||||
if (cardId.length == 18) {
|
||||
List numList = cardId.split('');
|
||||
//∑(ai×Wi)(mod 11)
|
||||
//加权因子
|
||||
List factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
|
||||
//校验位
|
||||
List parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
|
||||
int sum = 0;
|
||||
int ai = 0;
|
||||
int wi = 0;
|
||||
for (var i = 0; i < 17; i++) {
|
||||
ai = int.parse(numList[i]);
|
||||
wi = factor[i];
|
||||
sum += ai * wi;
|
||||
}
|
||||
var last = parity[sum % 11];
|
||||
if (parity[sum % 11].toString() != numList[17]) {
|
||||
tip = "校验位错误";
|
||||
print(tip);
|
||||
pass = false;
|
||||
}
|
||||
}else {
|
||||
tip = '身份证号不是18位';
|
||||
print(tip);
|
||||
pass = false;
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
// 根据身份证号获取年龄
|
||||
|
||||
@ -611,14 +611,14 @@ class UserinfoLogic extends GetxController {
|
||||
|
||||
void masterBind(textEditingController) async {
|
||||
if (masterInfo.isNotEmpty) {
|
||||
if (int.parse(textEditingController.text) < masterInfo['amount'] + 100) {
|
||||
showOKToast('小票数量不能低于${masterInfo['amount'] + 100}');
|
||||
if (int.parse(textEditingController.text) * 100 < masterInfo['amount'] + 100) {
|
||||
showOKToast('金额不能低于${masterInfo['amount']/100 + 1}');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var result = await DioManager.instance.postBody(
|
||||
url: Api.masterBind,
|
||||
params: {'userId': userId, 'amount': textEditingController.text});
|
||||
params: {'userId': userId, 'amount': int.parse(textEditingController.text) * 100});
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('绑定成功');
|
||||
Get.back();
|
||||
@ -661,9 +661,9 @@ class UserinfoLogic extends GetxController {
|
||||
var result1 = await DioManager.instance.get(
|
||||
url: Api.minAmount,
|
||||
);
|
||||
textEditingController.text = result1['data'].toString() ?? '1000';
|
||||
textEditingController.text = (result1['data'] * 0.01).toString().split('.').first ?? '100';
|
||||
} else {
|
||||
textEditingController.text = (masterInfo['amount'] + 100).toString();
|
||||
textEditingController.text = '${(masterInfo['amount'] * 0.01 + 1).toString().split('.').first}';
|
||||
}
|
||||
|
||||
showMasterDialog(result['title'], result['content'],
|
||||
@ -764,15 +764,15 @@ class UserinfoLogic extends GetxController {
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
Text(
|
||||
'${masterInfo['amount']}',
|
||||
'${(masterInfo['amount']/100).toString().split('.').first}元',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
Image.asset(
|
||||
getMineImage('bi_icon${0 + 1}'),
|
||||
height: 20.sp,
|
||||
)
|
||||
// Image.asset(
|
||||
// getMineImage('bi_icon${0 + 1}'),
|
||||
// height: 20.sp,
|
||||
// )
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -805,7 +805,6 @@ class UserinfoLogic extends GetxController {
|
||||
controller: textEditingController,
|
||||
keyboardType: TextInputType.phone,
|
||||
textAlign: TextAlign.center,
|
||||
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
FilteringTextInputFormatter.deny(
|
||||
@ -813,29 +812,33 @@ class UserinfoLogic extends GetxController {
|
||||
],
|
||||
maxLength: 6,
|
||||
//右边图标设置
|
||||
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 20.sp),
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入小票数量',
|
||||
hintText: '请输入金额',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 20.sp),
|
||||
border: InputBorder.none,
|
||||
// contentPadding:EdgeInsets.zero,
|
||||
counterText: '',
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 0.sp, bottom: 7.5.sp),
|
||||
top: 0.sp, bottom: 10.5.sp),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 10,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.sp, left: 100.sp),
|
||||
child: Image.asset(
|
||||
getMineImage('bi_icon${1}'),
|
||||
height: 25.sp,
|
||||
)))
|
||||
top: 15.sp, right: 0.sp),
|
||||
child: Text(
|
||||
'元',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
Row(
|
||||
|
||||
@ -88,7 +88,7 @@ class World_call_outLogic extends GetxController {
|
||||
}
|
||||
|
||||
|
||||
void loadAutoExposureConf() async {
|
||||
loadAutoExposureConf() async {
|
||||
var result =
|
||||
await DioManager.instance.get(url: Api.getAutoExposureConf,);
|
||||
if (result['code'] == 200) {
|
||||
@ -152,7 +152,7 @@ class World_call_outLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void refreshData() async {
|
||||
refreshData() async {
|
||||
isNewMsg = false;
|
||||
index = 1;
|
||||
isMore = true;
|
||||
@ -377,7 +377,8 @@ class World_call_outLogic extends GetxController {
|
||||
}
|
||||
var data = await Get.toNamed(
|
||||
Routes.CallOutPage,
|
||||
arguments: '1'
|
||||
arguments: '1',
|
||||
parameters: {'1':''}
|
||||
);
|
||||
if (data != null) {
|
||||
index = 1;
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:circle_app/circle_app/circle/logic.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/circle_app/circle_list/logic.dart';
|
||||
import 'package:circle_app/circle_app/minefragment/logic.dart';
|
||||
import 'package:circle_app/circle_app/world_call_out/world_data.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -253,7 +254,19 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
chatActionWidget(getBaseImage('call_icon'), '喊个话',
|
||||
() async {
|
||||
addUmengTag('点击喊个话');
|
||||
logic.checkHasFreeTimes();
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getUserMine, params: {'2': 2});
|
||||
var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||
data, (data) => MineResponseBean.fromJson(data));
|
||||
if (bean.data.user.vip == 2) {
|
||||
logic.checkHasFreeTimes();
|
||||
} else {
|
||||
|
||||
showOKToast('至尊喊话需要开通年会员,普通喊话前往圈子免费发布');
|
||||
showVipDialog('world_call_out');
|
||||
}
|
||||
|
||||
|
||||
}),
|
||||
],
|
||||
),
|
||||
@ -556,8 +569,8 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
},
|
||||
child: Text(
|
||||
logic.total > 0
|
||||
? '全球喊话' + '(${convertToTenThousand(logic.total)})'
|
||||
: '全球喊话',
|
||||
? '至尊墙' + '(${convertToTenThousand(logic.total)})'
|
||||
: '至尊墙',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
@ -2050,7 +2063,8 @@ class _SigalItemWidgetState extends State<SigalItemWidget> {
|
||||
child: Text(
|
||||
list.jumpInfo!.btnText ?? '',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
color: Colors.white,
|
||||
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
|
||||
@ -36,7 +36,7 @@ class RechargeScreenDialog extends StatefulWidget {
|
||||
class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
|
||||
String incomeBalance = '';
|
||||
bool isZfbPrice = true;
|
||||
bool isZfbPrice = false;
|
||||
|
||||
bool isAgree = false;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import 'RechargeScreenDialog.dart';
|
||||
import 'open_vip_tip/logic.dart';
|
||||
import 'open_vip_tip/view.dart';
|
||||
|
||||
bool isZfbPrice = true;
|
||||
bool isZfbPrice = false;
|
||||
|
||||
joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
||||
String title, MyCallback myCallback,{String iosItem = ''}) {
|
||||
@ -34,7 +34,6 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
||||
Container(
|
||||
width: 339.sp,
|
||||
height: Platform.isIOS ? 390.sp :420.sp ,
|
||||
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
|
||||
@ -22,7 +22,7 @@ class Open_vip_tipLogic extends GetxController {
|
||||
|
||||
ScrollController scrollController = ScrollController();
|
||||
|
||||
bool isZfbPrice = true;
|
||||
bool isZfbPrice = false;
|
||||
bool isYean = false;
|
||||
|
||||
bool isShowInviteTip = false;
|
||||
|
||||
@ -561,17 +561,13 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
controller.priceBean[index].title,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
Text(
|
||||
controller.priceBean[index].amountText.toString(),
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'${controller.priceBean[index].amount.toInt()}',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
@ -586,7 +582,12 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
Text(
|
||||
controller.priceBean[index].amountText.toString(),
|
||||
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -594,7 +595,7 @@ class _Open_vip_tipPageState extends State<Open_vip_tipPage> {
|
||||
// top: 0.sp,
|
||||
// left: 0.sp,
|
||||
// width: 44.sp,
|
||||
// height: 18.sp,
|
||||
// height: 18.sp,,
|
||||
// child: Image.asset(getMineImage("icon_yean_vip")),
|
||||
// ) :Container(),
|
||||
if (count > 0)
|
||||
|
||||
@ -38,183 +38,188 @@ class _SignInDialogState extends State<SignInDialog> {
|
||||
// TODO: add widget build method
|
||||
// "rewards" -> [_GrowableList]
|
||||
List infoList = widget.configInfo['rewards'];
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Container(
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getHomeImage(
|
||||
'sign_bg',
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Container(
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getHomeImage(
|
||||
'sign_bg',
|
||||
),
|
||||
width: Get.width - 60.sp,
|
||||
height: 320.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
width: Get.width - 60.sp,
|
||||
height: 320.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
//标题
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
//标题
|
||||
|
||||
//奖励
|
||||
Container(
|
||||
height: 180.sp,
|
||||
// color: Colors.red,
|
||||
width: Get.width - 70.sp,
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.sp,
|
||||
right: 12.sp,
|
||||
top: 45.sp,
|
||||
//奖励
|
||||
Container(
|
||||
height: 180.sp,
|
||||
// color: Colors.red,
|
||||
width: Get.width - 70.sp,
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.sp,
|
||||
right: 12.sp,
|
||||
top: 45.sp,
|
||||
),
|
||||
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
itemNormalWidget(
|
||||
infoList[0]['rewardDesc'],
|
||||
infoList[0]['rewardImg'],
|
||||
infoList[0]['dayDesc'],
|
||||
infoList[0]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[1]['rewardDesc'],
|
||||
infoList[1]['rewardImg'],
|
||||
infoList[1]['dayDesc'],
|
||||
infoList[1]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[2]['rewardDesc'],
|
||||
infoList[2]['rewardImg'],
|
||||
infoList[2]['dayDesc'],
|
||||
infoList[2]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[3]['rewardDesc'],
|
||||
infoList[3]['rewardImg'],
|
||||
infoList[3]['dayDesc'],
|
||||
infoList[3]['hasReceived']),
|
||||
],
|
||||
)),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
itemNormalWidget(
|
||||
infoList[4]['rewardDesc'],
|
||||
infoList[4]['rewardImg'],
|
||||
infoList[4]['dayDesc'],
|
||||
infoList[4]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[5]['rewardDesc'],
|
||||
infoList[5]['rewardImg'],
|
||||
infoList[5]['dayDesc'],
|
||||
infoList[5]['hasReceived']),
|
||||
Expanded(
|
||||
child: itemMaxWidget(
|
||||
infoList[6]['rewardDesc'],
|
||||
infoList[6]['rewardImg']
|
||||
.toString()
|
||||
.split('|'),
|
||||
infoList[6]['dayDesc'],
|
||||
infoList[6]['hasReceived'])),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
// SizedBox(height: 10.sp,),
|
||||
|
||||
child: Column(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
itemNormalWidget(
|
||||
infoList[0]['rewardDesc'],
|
||||
infoList[0]['rewardImg'],
|
||||
infoList[0]['dayDesc'],
|
||||
infoList[0]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[1]['rewardDesc'],
|
||||
infoList[1]['rewardImg'],
|
||||
infoList[1]['dayDesc'],
|
||||
infoList[1]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[2]['rewardDesc'],
|
||||
infoList[2]['rewardImg'],
|
||||
infoList[2]['dayDesc'],
|
||||
infoList[2]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[3]['rewardDesc'],
|
||||
infoList[3]['rewardImg'],
|
||||
infoList[3]['dayDesc'],
|
||||
infoList[3]['hasReceived']),
|
||||
],
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
sendSign();
|
||||
},
|
||||
child: Container(
|
||||
width: 120.sp,
|
||||
height: 40.sp,
|
||||
margin:
|
||||
EdgeInsets.only(bottom: 0.sp, top: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
getHomeImage('sign_btn_bg')),
|
||||
fit: BoxFit.fill),
|
||||
// gradient: AppColor.newMainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'🎉领签到奖励',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
width: 10.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
navigateToUseStrategy();
|
||||
},
|
||||
child: Container(
|
||||
width: 120.sp,
|
||||
height: 40.sp,
|
||||
margin:
|
||||
EdgeInsets.only(bottom: 0.sp, top: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
getHomeImage('sign_btn_bg')),
|
||||
fit: BoxFit.fill),
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'📖看畅玩攻略',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
)),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
itemNormalWidget(
|
||||
infoList[4]['rewardDesc'],
|
||||
infoList[4]['rewardImg'],
|
||||
infoList[4]['dayDesc'],
|
||||
infoList[4]['hasReceived']),
|
||||
itemNormalWidget(
|
||||
infoList[5]['rewardDesc'],
|
||||
infoList[5]['rewardImg'],
|
||||
infoList[5]['dayDesc'],
|
||||
infoList[5]['hasReceived']),
|
||||
Expanded(
|
||||
child: itemMaxWidget(
|
||||
infoList[6]['rewardDesc'],
|
||||
infoList[6]['rewardImg']
|
||||
.toString()
|
||||
.split('|'),
|
||||
infoList[6]['dayDesc'],
|
||||
infoList[6]['hasReceived'])),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
// SizedBox(height: 10.sp,),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
sendSign();
|
||||
},
|
||||
child: Container(
|
||||
width: 120.sp,
|
||||
height: 40.sp,
|
||||
margin:
|
||||
EdgeInsets.only(bottom: 0.sp, top: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
getHomeImage('sign_btn_bg')),
|
||||
fit: BoxFit.fill),
|
||||
// gradient: AppColor.newMainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'🎉领签到奖励',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
width: 10.sp,
|
||||
SizedBox(height: 0.sp,),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
HomeLogic logic = Get.find<HomeLogic>();
|
||||
if ((logic.model?.vip ?? 0) > 0 ) {
|
||||
showOKToast('您是会员哦,已经可以领取双倍奖励啦~');
|
||||
}
|
||||
showOepnVipDialog('');
|
||||
},
|
||||
child: Container(
|
||||
child: Text(
|
||||
'👑会员每天领双倍奖励 >',
|
||||
style:
|
||||
TextStyle(color: AppColor.mainColor, fontSize: 13.sp),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
navigateToUseStrategy();
|
||||
},
|
||||
child: Container(
|
||||
width: 120.sp,
|
||||
height: 40.sp,
|
||||
margin:
|
||||
EdgeInsets.only(bottom: 0.sp, top: 15.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
getHomeImage('sign_btn_bg')),
|
||||
fit: BoxFit.fill),
|
||||
borderRadius: BorderRadius.circular(20.sp)),
|
||||
child: Text(
|
||||
'📖看畅玩攻略',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 0.sp,),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
HomeLogic logic = Get.find<HomeLogic>();
|
||||
if ((logic.model?.vip ?? 0) > 0 ) {
|
||||
showOKToast('您是合伙人哦,已经可以领取双倍奖励啦~');
|
||||
}
|
||||
showOepnVipDialog('');
|
||||
},
|
||||
child: Container(
|
||||
child: Text(
|
||||
'👑合伙人每天领双倍奖励 >',
|
||||
style:
|
||||
TextStyle(color: AppColor.mainColor, fontSize: 13.sp),
|
||||
),
|
||||
),
|
||||
)
|
||||
]),
|
||||
],
|
||||
)
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 5.sp, top: 10.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Image.asset(
|
||||
getHomeImage('wx_close'),
|
||||
height: 20.sp,
|
||||
))),
|
||||
]),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 5.sp, top: 10.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Image.asset(
|
||||
getHomeImage('wx_close'),
|
||||
height: 35.sp,
|
||||
))),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -441,6 +441,7 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((recommendCircleFriendData['user']['signature'] ?? '').toString().isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
@ -456,7 +457,7 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'交友宣言:' + recommendCircleFriendData['user']['signature'],
|
||||
'交友宣言: ${recommendCircleFriendData['user']['signature']}' ,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:circle_app/commons/Widgets/open_vip_tip/logic.dart';
|
||||
@ -29,7 +30,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
// TODO: add state variables and methods
|
||||
List<Prices> prices = [];
|
||||
int selectedIndex = -1;
|
||||
bool isZfbPrice = true;
|
||||
bool isZfbPrice = false;
|
||||
|
||||
Map wxInfo = {};
|
||||
|
||||
@ -427,7 +428,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
Expanded(child: Container()),
|
||||
// To push the next widget to the right edge
|
||||
Text(
|
||||
'${price}小票',
|
||||
'${(int.parse(price) * 0.01).toInt()}元',
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
],
|
||||
|
||||
@ -411,6 +411,24 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
SmartDialog.dismiss();
|
||||
showOKToast(wxInfo['10595']);
|
||||
}
|
||||
|
||||
if (descEditingController.text.isNotEmpty) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.shieldWordCheck, params: {'text': descEditingController.text});
|
||||
if (data['data']['code'] == 10000) {
|
||||
List words = data['data']['words'];
|
||||
if (words.isNotEmpty) {
|
||||
upFilterWordsData(descEditingController.text, words, 1);
|
||||
for (int i = 0; i < words.length; i++) {
|
||||
descEditingController.text = descEditingController.text.replaceAll(words[i], '*');
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
showOKToast('含违规词汇,无法提交');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> params = {
|
||||
"guideText": descEditingController.text,
|
||||
"hideContact": wxInfo.containsKey('hideContact')
|
||||
|
||||
@ -10,7 +10,6 @@ import 'package:circle_app/net/api.dart';
|
||||
import 'package:circle_app/net/dio_manager.dart';
|
||||
import 'package:circle_app/router/pages.dart';
|
||||
import 'package:circle_app/router/routers.dart';
|
||||
import 'package:circle_app/utils/SharedPreferencesHelper.dart';
|
||||
import 'package:circle_app/utils/device.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -29,7 +28,6 @@ import 'package:tencent_cloud_chat_uikit/data_services/core/core_services.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||
import 'circle_app/login/login/logic.dart';
|
||||
import 'circle_app/splash/view.dart';
|
||||
|
||||
///定义全局的 routeObserver 对象
|
||||
@ -156,6 +154,8 @@ loginIM(String userId, String sig) async {
|
||||
}
|
||||
var logic = Get.find<HomeLogic>();
|
||||
logic.getUnreadSize();
|
||||
} else {
|
||||
loginIM(userId, sig);
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,20 +305,20 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
callbackValue.errorMsg!.contains("not support @all")) {
|
||||
showOKToast("当前群组不支持@全体成员");
|
||||
} else {
|
||||
// showToast(callbackValue.errorMsg ??
|
||||
// callbackValue.errorCode.toString());
|
||||
showToast(callbackValue.errorMsg ??
|
||||
callbackValue.errorCode.toString());
|
||||
}
|
||||
break;
|
||||
case TIMCallbackType.FLUTTER_ERROR:
|
||||
{
|
||||
if (callbackValue.catchError != null) {
|
||||
FlutterBugly.uploadException(
|
||||
message: callbackValue.catchError.toString(),
|
||||
detail: callbackValue.stackTrace.toString());
|
||||
message: 'TIMCallbackType.FLUTTER_ERROR',
|
||||
detail: callbackValue.stackTrace.toString() + '|' + callbackValue.stackTrace.toString());
|
||||
} else {
|
||||
FlutterBugly.uploadException(
|
||||
message: 'TIMCallbackType.FLUTTER_ERROR',
|
||||
detail: callbackValue.stackTrace.toString());
|
||||
detail: callbackValue.stackTrace.toString() + '|' + callbackValue.stackTrace.toString());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -22,9 +22,11 @@ class Api {
|
||||
//多个用户扩展信息
|
||||
static const extInfo = '/user-service/batch/extInfo';
|
||||
|
||||
//附近是否有新人入口
|
||||
//附近是否有新人入口-城市
|
||||
static const hasNewUser = '/user-service/nearby/hasNewUser';
|
||||
|
||||
//附近是否有新人入口-省
|
||||
static const provinceHasNewUser = '/user-service/nearby/province/hasNewUser';
|
||||
|
||||
// 登录
|
||||
static const new_login = '/user-service/login/password/v2';
|
||||
@ -204,6 +206,9 @@ class Api {
|
||||
//获取定位城市
|
||||
static const getCity = '/user-service/nearby/getCity/';
|
||||
|
||||
//获取定位省
|
||||
static const getProvince = '/user-service/nearby/province/getProvince/';
|
||||
|
||||
//获取IM配置信息
|
||||
static const getIMInfo = 'msg-service/im/token';
|
||||
|
||||
@ -307,6 +312,9 @@ class Api {
|
||||
//礼物列表
|
||||
static const giftList = '/mall-service/gift/giftMall';
|
||||
|
||||
//礼物列表
|
||||
static const giftListV2 = '/mall-service/gift/all/v2/';
|
||||
|
||||
//获取万人展礼物
|
||||
static const treatList = '/mall-service/user/gift/treat/list';
|
||||
|
||||
@ -411,6 +419,8 @@ class Api {
|
||||
//新人列表
|
||||
static const queryNewUserList = '/user-service/newUser/queryNewUserList/v3';
|
||||
|
||||
|
||||
|
||||
//30人打招呼
|
||||
static const sayHelloMore = '/user-service/newUser/sayHelloMore';
|
||||
|
||||
@ -455,7 +465,7 @@ class Api {
|
||||
static const visitUserByIds = '/user-service/visitUserByIds';
|
||||
|
||||
// //查询单个喊话
|
||||
// static const visitUserByIds = '/up-service/readCalloutById';
|
||||
static const visitCallId = '/up-service/readCalloutById';
|
||||
|
||||
//批量查看多个喊话
|
||||
static const readCalloutByIds = '/up-service/readCalloutByIds';
|
||||
@ -533,6 +543,9 @@ class Api {
|
||||
//同城新人
|
||||
static var nearPeople = '/user-service/nearby/queryNewUserList';
|
||||
|
||||
//同城新人-省
|
||||
static var provinceNearPeople = '/user-service/nearby/province/queryNewUserList';
|
||||
|
||||
//亲密度配置信息
|
||||
static var intimacy = '/msg-service/intimacy/get';
|
||||
|
||||
@ -568,9 +581,15 @@ class Api {
|
||||
//附近筛选是否需要会员
|
||||
static var nearbyCanSearch = '/user-service/nearby/search/need/vip';
|
||||
|
||||
//附近筛选是否需要会员-省
|
||||
static var provinceNearbyCanSearch = '/user-service/nearby/province/search/need/vip';
|
||||
|
||||
//精选筛选是否需要会员
|
||||
static var findPageCanSearch = '/user-service/findPage/search/need/vip';
|
||||
|
||||
//附近隐身
|
||||
static var nearByHide = '/user-service/nearby/hide';
|
||||
|
||||
//申请创建
|
||||
static var interestApplyToCreate = '/up-service/interest/applyToCreate';
|
||||
|
||||
@ -580,6 +599,9 @@ class Api {
|
||||
//给同城新人打招呼
|
||||
static var nearBySayHello = '/user-service/nearby/newUser/sayHello';
|
||||
|
||||
//给同城新人打招呼-省
|
||||
static var provinceNearBySayHello = '/user-service/nearby/province/newUser/sayHello';
|
||||
|
||||
//财富榜配置
|
||||
static var wealthConfig = '/user-service/rank/wealth/showConf';
|
||||
|
||||
@ -598,9 +620,12 @@ class Api {
|
||||
//魅力榜
|
||||
static var charmList = '/user-service/rank/charm';
|
||||
|
||||
//附近顶部同城和喊话数据
|
||||
//附近顶部同城和喊话数据-城市
|
||||
static var nearbyInfo = '/user-service/nearby/info';
|
||||
|
||||
//附近顶部同城和喊话数据-省
|
||||
static var provinceNearbyInfo = '/user-service/nearby/province/info';
|
||||
|
||||
//申请成为达人
|
||||
static var requestTalent = '/user-service/nearby/talent';
|
||||
|
||||
@ -816,4 +841,9 @@ class Api {
|
||||
//订阅产品
|
||||
static var vipProductInfo = '/mall-service/vips/renew';
|
||||
|
||||
//附近系统配置
|
||||
static var nearLevelConf = '/user-service/nearby/levelConf';
|
||||
|
||||
//附近省用户列表
|
||||
static var provinceNearByUserList = '/user-service/nearby/province/queryNearByUserList';
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ class DioManager {
|
||||
'OsVersion': await getDeviceId(),
|
||||
'Imei': await getImei(),
|
||||
'Brand': await getBrand(),
|
||||
'Channel':'kuaishou1'
|
||||
// 'Channel':'channel4'
|
||||
});
|
||||
} else {
|
||||
options = Options(method: methodValues[method], headers: {
|
||||
|
||||
@ -39,6 +39,8 @@ import 'package:circle_app/circle_app/offaccount/binding.dart';
|
||||
import 'package:circle_app/circle_app/offaccount/view.dart';
|
||||
import 'package:circle_app/circle_app/photoinfo/binding.dart';
|
||||
import 'package:circle_app/circle_app/photoinfo/view.dart';
|
||||
import 'package:circle_app/circle_app/private_setting/binding.dart';
|
||||
import 'package:circle_app/circle_app/private_setting/view.dart';
|
||||
import 'package:circle_app/circle_app/quick/view.dart';
|
||||
import 'package:circle_app/circle_app/report/binding.dart';
|
||||
import 'package:circle_app/circle_app/report/view.dart';
|
||||
@ -704,6 +706,10 @@ class PageList {
|
||||
name: Routes.CallOutDetail,
|
||||
page: () => Call_out_detailPage(),
|
||||
binding: Call_out_detailBinding()),
|
||||
GetPage(
|
||||
name: Routes.PrivateSetting,
|
||||
page: () => Private_settingPage(),
|
||||
binding: Private_settingBinding()),
|
||||
|
||||
|
||||
];
|
||||
|
||||
@ -137,5 +137,6 @@ abstract class Routes {
|
||||
static const HelpBack = '/HelpBack';
|
||||
|
||||
static const CallOutDetail = '/CallOutDetail';
|
||||
static const PrivateSetting = '/privateSetting';
|
||||
|
||||
}
|
||||
@ -11,6 +11,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:in_app_purchase_storekit/src/types/app_store_purchase_details.dart';
|
||||
import 'package:oktoast/oktoast.dart';
|
||||
|
||||
// iOS支付单一实例
|
||||
// final iOSPayment = IOSPayment();
|
||||
@ -95,6 +96,11 @@ class IOSPayment {
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('包月会员开通成功');
|
||||
EventBusManager.fire(CommentVipEvent(1));
|
||||
} else {
|
||||
showToast('开通异常,请联系客服处理');
|
||||
await sendTextMsg('qpqz_prod_10_102',content: 'iOS充值异常');
|
||||
pushChatCustomerPage();
|
||||
|
||||
}
|
||||
} else {
|
||||
Map<String,dynamic> params = {
|
||||
@ -151,6 +157,11 @@ class IOSPayment {
|
||||
showOKToast('解锁联系方式成功');
|
||||
unLockWxSuccessResult(target_id);
|
||||
}
|
||||
} else {
|
||||
showToast('付费异常,请联系客服处理');
|
||||
await sendTextMsg('qpqz_prod_10_102',content: 'iOS充值异常');
|
||||
pushChatCustomerPage();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -260,6 +260,7 @@ String filterText(String text) {
|
||||
}
|
||||
|
||||
String convertToTenThousand(int number) {
|
||||
if (number == null) return '';
|
||||
if (number >= 10000) {
|
||||
double result = number / 10000;
|
||||
return '${result.toStringAsFixed(1)}万';
|
||||
@ -969,9 +970,10 @@ Widget circlrPeopleInfoWidget(List<Widget> widgets,Circle bean) {
|
||||
}
|
||||
|
||||
//跳转发消息页面
|
||||
pushChatPage(String userId, String imId, String userName,{String source = ''}) {
|
||||
pushChatPage(String userId, String imId, String userName,{String source = ''}) async {
|
||||
var con = V2TimConversation(
|
||||
conversationID: "c2c_$imId", userID: imId, showName: userName, type: 1);
|
||||
|
||||
Get.toNamed(Routes.Chat, arguments: con,parameters: {'source':source});
|
||||
createCustomMsg(userId, imId);
|
||||
}
|
||||
@ -1065,6 +1067,7 @@ createCustomMsg(String userId, String imId) async {
|
||||
info['user'] = data['data']['user'];
|
||||
info['guide_text'] = data['data']['guide_text'] ?? '请问现在有空吗?';
|
||||
info['tags'] = recommendCircleFriendData['tags'] ?? [];
|
||||
print('需要发送卡片消息');
|
||||
await sendCustomMsg(imId, jsonEncode(info), desc);
|
||||
return true;
|
||||
}
|
||||
@ -1145,10 +1148,14 @@ sendCustomMsg(String userId, String data, String desc) async {
|
||||
.sendMessage(id: id!, receiver: userId, groupID: '');
|
||||
if (sendMessageRes.code == 0) {
|
||||
// 发送成功
|
||||
EventBusManager.fire(ChatRefreshMsg());
|
||||
Future.delayed(Duration(milliseconds: 500),() {
|
||||
EventBusManager.fire(ChatRefreshMsg());
|
||||
});
|
||||
sendMessageRes.data?.customElem?.data; //自定义data
|
||||
sendMessageRes.data?.customElem?.desc; //自定义desc
|
||||
sendMessageRes.data?.customElem?.extension; //自定义extension
|
||||
} else {
|
||||
print('卡片消息发送失败');
|
||||
}
|
||||
// }
|
||||
}
|
||||
@ -1586,11 +1593,11 @@ Future<List<V2TimUserFullInfo>> loadConverstationListData() async {
|
||||
return [];
|
||||
}
|
||||
|
||||
showVipDialog(String source) {
|
||||
showVipDialog(String source,{bool isYear = false}) {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,source),
|
||||
body: Open_vip_tipPage(isYear,source),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false).then((value) {
|
||||
@ -1756,9 +1763,9 @@ void loadMasterData(String userId) async {
|
||||
var result1 = await DioManager.instance.get(
|
||||
url: Api.minAmount,
|
||||
);
|
||||
textEditingController.text = result1['data'].toString() ?? '1000';
|
||||
textEditingController.text = (result1['data']/100).toString().split('.').first ?? '10';
|
||||
} else {
|
||||
textEditingController.text = (masterInfo['amount'] + 100).toString();
|
||||
textEditingController.text = (masterInfo['amount']/100 + 1).toString().split('.').first;
|
||||
}
|
||||
|
||||
showMasterDialog(resultData['title'], resultData['content'],
|
||||
@ -1860,15 +1867,15 @@ showMasterDialog(
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
Text(
|
||||
'${masterInfo['amount']}',
|
||||
'${(masterInfo['amount']/100).toString().split('.').first}元',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
Image.asset(
|
||||
getMineImage('bi_icon${0 + 1}'),
|
||||
height: 20.sp,
|
||||
)
|
||||
// Image.asset(
|
||||
// getMineImage('bi_icon${0 + 1}'),
|
||||
// height: 20.sp,
|
||||
// )
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -1913,7 +1920,7 @@ showMasterDialog(
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 20.sp),
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入小票数量',
|
||||
hintText: '请输入金额',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 20.sp),
|
||||
@ -1925,13 +1932,17 @@ showMasterDialog(
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 10,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.sp, left: 100.sp),
|
||||
child: Image.asset(
|
||||
getMineImage('bi_icon${1}'),
|
||||
height: 25.sp,
|
||||
)))
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.sp, right: 0.sp),
|
||||
child: Text(
|
||||
'元',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@ -2017,8 +2028,8 @@ showMasterDialog(
|
||||
|
||||
void masterBind(textEditingController,Map masterInfo,String userId) async {
|
||||
if (masterInfo.isNotEmpty) {
|
||||
if (int.parse(textEditingController.text) < masterInfo['amount'] + 100) {
|
||||
showOKToast('小票数量不能低于${masterInfo['amount'] + 100}');
|
||||
if (int.parse(textEditingController.text) * 100 < masterInfo['amount'] + 100) {
|
||||
showOKToast('金额不能低于${masterInfo['amount']/100 + 1}');
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2330,6 +2341,8 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
|
||||
} else if (action == 'quick_chat') {
|
||||
// quick_chat
|
||||
Get.toNamed(Routes.QuickPage);
|
||||
} else if (action == 'push_callout') {
|
||||
Get.toNamed(Routes.CallOutPage);
|
||||
} else {
|
||||
if (isShowUpdate) {
|
||||
showOKToast('升级最新版本才能使用该功能');
|
||||
|
||||
@ -54,7 +54,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
// right: 16,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
@ -191,7 +191,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
||||
),
|
||||
// if (event == 0)
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 8,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
@ -486,7 +486,7 @@ void showPeopleCallOutOverlay(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
// right: 16,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
@ -581,7 +581,7 @@ void showPeopleCallOutOverlay(
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
top: MediaQuery.of(context).padding.top + 44,
|
||||
right: 7.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@ -1505,10 +1505,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: quickpass_yidun_flutter
|
||||
sha256: f04f7bb1dd82d116e6e837c7c9d501af11cc4ce116998b4f739a50a5d718b108
|
||||
sha256: d89ae6de2ea33f2d804b6bc3b7dd227f133286543c40b7035886a7124a157e18
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.5.6"
|
||||
version: "1.6.4"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@ -129,7 +129,7 @@ dependencies:
|
||||
#友盟
|
||||
umeng_common_sdk: ^1.2.7
|
||||
#易盾一键认证
|
||||
quickpass_yidun_flutter: ^1.5.6
|
||||
quickpass_yidun_flutter: ^1.6.4
|
||||
#视频播放器
|
||||
fijkplayer: ^0.11.0
|
||||
characters: ^1.2.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user