Browse Source

隐藏功能,增加过审几率

ios
Jolie 3 months ago
parent
commit
60558d7515
10 changed files with 140 additions and 95 deletions
  1. 3
      android/app/src/main/AndroidManifest.xml
  2. 14
      ios/Runner.xcodeproj/project.pbxproj
  3. 4
      ios/Runner/Info.plist
  4. 7
      lib/controller/home/home_controller.dart
  5. 7
      lib/controller/mine/mine_controller.dart
  6. 4
      lib/model/home/marriage_data.dart
  7. 62
      lib/pages/home/content_card.dart
  8. 65
      lib/pages/home/user_information_page.dart
  9. 35
      lib/pages/mine/login_page.dart
  10. 34
      lib/widget/live/live_recharge_popup.dart

3
android/app/src/main/AndroidManifest.xml

@ -11,6 +11,9 @@
<!-- Android 13以下版本的文件读写权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
<!-- 位置权限 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:label="趣恋恋"
android:name="${applicationName}"

14
ios/Runner.xcodeproj/project.pbxproj

@ -296,10 +296,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@ -313,10 +317,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@ -492,7 +500,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = P65XS8BRNU;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -685,7 +693,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = P65XS8BRNU;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -718,7 +726,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = P65XS8BRNU;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;

4
ios/Runner/Info.plist

@ -47,6 +47,10 @@
<string>需要访问麦克风以录制语音和视频</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要访问相册以选择和发送图片、视频</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>需要访问相册以保存图片和视频</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要获取您的位置信息以提供同城匹配服务</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>

7
lib/controller/home/home_controller.dart

@ -304,11 +304,14 @@ class HomeController extends GetxController {
// data PaginatedResponse<dynamic>使
// records dynamic MarriageData
final records = paginatedData.records
final allRecords = paginatedData.records
.map((item) => MarriageData.fromJson(item as Map<String, dynamic>))
.toList();
print('_fetchMarriageData 返回 - 请求页码: $pageNum, 返回当前页: ${paginatedData.current}, 总页数: ${paginatedData.pages}, 记录数: ${records.length}');
//
final records = allRecords.where((item) => !item.isLive).toList();
print('_fetchMarriageData 返回 - 请求页码: $pageNum, 返回当前页: ${paginatedData.current}, 总页数: ${paginatedData.pages}, 原始记录数: ${allRecords.length}, 过滤后记录数: ${records.length}');
return {
'records': records,

7
lib/controller/mine/mine_controller.dart

@ -3,14 +3,9 @@ import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/mine/user_count_data.dart';
import 'package:dating_touchme_app/network/user_api.dart';
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart';
import 'package:dating_touchme_app/pages/mine/matchmaker_update_page.dart';
import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart';
import 'package:dating_touchme_app/pages/mine/rose_page.dart';
import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import '../../pages/setting/match_spread_page.dart';
import '../../pages/setting/setting_page.dart';
class MineController extends GetxController {
@ -19,7 +14,7 @@ class MineController extends GetxController {
final blockList = <Map>[
// {"icon": Assets.imagesRose, "title": "我的玫瑰", "subTitle": "新人限时福利", "path": () => RosePage()},
{"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()},
// {"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()},
// {"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => null},
{"icon": Assets.imagesCert, "title": "认证中心", "subTitle": GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", "path": () => AuthCenterPage()},
// {"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": () => MatchSpreadPage()},

4
lib/model/home/marriage_data.dart

@ -20,6 +20,7 @@ class MarriageData {
final String createTime;
final int genderCode;
final List<PhotoItem> photoList;
final bool isLive; //
// UI展示
String get name => nickName;
@ -47,6 +48,7 @@ class MarriageData {
required this.createTime,
required this.photoList,
required this.genderCode,
this.isLive = false,
});
factory MarriageData.fromJson(Map<String, dynamic> json) {
@ -69,6 +71,7 @@ class MarriageData {
createTime: json['createTime'] ?? '',
genderCode: json['genderCode'] ?? 0,
photoList: (json['photoList'] as List<dynamic>?)?.map((e) => PhotoItem.fromJson(e as Map<String, dynamic>)).toList() ?? [],
isLive: json['isLive'] ?? json['liveStatus'] ?? false, // isLive或liveStatus字段
);
}
@ -98,6 +101,7 @@ class MarriageData {
id: photo.id ?? '',
miId: photo.miId ?? 0,
)).toList(),
isLive: false, // UserInfoData转换时默认为false
);
}
}

62
lib/pages/home/content_card.dart

@ -4,6 +4,8 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:dating_touchme_app/model/home/marriage_data.dart';
import 'package:dating_touchme_app/pages/home/user_information_page.dart';
import 'package:dating_touchme_app/pages/message/chat_page.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
// //线//Hi/
class _CardHeader extends StatelessWidget {
@ -12,7 +14,7 @@ class _CardHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
final bool isLive = true; //item.isLive ?? false;
final bool isLive = item.isLive;
final bool isOnline = true; //item.isOnline ?? false;
return Row(
@ -222,23 +224,46 @@ class _CardHeader extends StatelessWidget {
),
// - HI按钮相同位置
InkWell(
onTap: () {
onTap: () async {
//
if (isLive) {
//
print('进入直播间');
} else if (isOnline) {
// HI按钮点击逻辑
print('HI点击');
// HI按钮点击逻辑 -
try {
if (item.userId.isEmpty) {
SmartDialog.showToast('用户ID不存在,无法发送消息');
return;
}
await Get.to(() => ChatPage(
userId: item.userId,
userData: item,
));
} catch (e) {
print('❌ [ContentCard] 跳转聊天页面失败: $e');
SmartDialog.showToast('跳转失败,请重试');
}
} else {
//
print('发送消息');
// -
try {
if (item.userId.isEmpty) {
SmartDialog.showToast('用户ID不存在,无法发送消息');
return;
}
await Get.to(() => ChatPage(
userId: item.userId,
userData: item,
));
} catch (e) {
print('❌ [ContentCard] 跳转聊天页面失败: $e');
SmartDialog.showToast('跳转失败,请重试');
}
}
},
child: Image.asset(
_getButtonImage(),
// width: (item.isLive ?? false) ? 60 : 40,
width: (true) ? 60 : 40,
_getButtonImage(isLive, isOnline),
width: isLive ? 60 : 40,
height: 20,
),
),
@ -246,17 +271,14 @@ class _CardHeader extends StatelessWidget {
);
}
String _getButtonImage() {
// if (item.isLive ?? false) {
// return Assets.imagesLiveIcon; // HI位置
// } else if (item.isOnline ?? false) {
// return Assets.imagesHiIcon; // 线HI按钮
// } else {
// return Assets.imagesSendMessageIcon; // 线HI位置
// }
// }
return Assets.imagesLiveIcon; // HI位置
String _getButtonImage(bool isLive, bool isOnline) {
if (isLive) {
return Assets.imagesLiveIcon; // HI位置
} else if (isOnline) {
return Assets.imagesHiIcon; // 线HI按钮
} else {
return Assets.imagesSendMessageIcon; // 线HI位置
}
}
}

65
lib/pages/home/user_information_page.dart

@ -236,38 +236,39 @@ class UserInformationPage extends StatelessWidget {
),
],
),
Container(
width: 63.w,
height: 27.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(27.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
Assets.imagesPlayer,
width: 15.w,
height: 15.w,
),
SizedBox(width: 4.w,),
Image.asset(
Assets.imagesVoice,
width: 15.w,
height: 13.w,
),
SizedBox(width: 4.w,),
Text(
"6'",
style: TextStyle(
fontSize: 11.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
)
],
),
)
//
// Container(
// width: 63.w,
// height: 27.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(27.w)),
// color: const Color.fromRGBO(117, 98, 249, .1)
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// Assets.imagesPlayer,
// width: 15.w,
// height: 15.w,
// ),
// SizedBox(width: 4.w,),
// Image.asset(
// Assets.imagesVoice,
// width: 15.w,
// height: 13.w,
// ),
// SizedBox(width: 4.w,),
// Text(
// "6'",
// style: TextStyle(
// fontSize: 11.w,
// color: const Color.fromRGBO(117, 98, 249, 1)
// ),
// )
// ],
// ),
// )
],
),
SizedBox(height: 8.w,),

35
lib/pages/mine/login_page.dart

@ -20,20 +20,26 @@ class LoginPage extends StatelessWidget {
builder: (controller) {
return Scaffold(
resizeToAvoidBottomInset: false,
body: Stack(
children: [
Container(
width: double.infinity,
height: 1.sh,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(Assets.imagesLoginBg),
fit: BoxFit.cover,
alignment: Alignment.topCenter,
body: GestureDetector(
onTap: () {
//
FocusScope.of(context).unfocus();
},
behavior: HitTestBehavior.translucent,
child: Stack(
children: [
Container(
width: double.infinity,
height: 1.sh,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(Assets.imagesLoginBg),
fit: BoxFit.cover,
alignment: Alignment.topCenter,
),
),
),
padding: EdgeInsets.symmetric(horizontal: 20),
child: Column(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
const SizedBox(height: 150),
// Logo和标题区域
@ -264,7 +270,8 @@ class LoginPage extends StatelessWidget {
],
),
),
],
],
),
),
);
},

34
lib/widget/live/live_recharge_popup.dart

@ -167,27 +167,25 @@ class LiveRechargePopup extends StatelessWidget {
),
],
),
Obx(() {
return Container(
width: 18.w,
height: 18.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
Container(
width: 18.w,
height: 18.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: const Color.fromRGBO(117, 98, 249, 1),
border: Border.all(
width: 1,
color: const Color.fromRGBO(117, 98, 249, 1),
border: Border.all(
width: 1,
color: const Color.fromRGBO(117, 98, 249, 1),
),
),
child: Center(
child: Icon(
Icons.check,
size: 12.w,
color: Colors.white,
),
),
child: Center(
child: Icon(
Icons.check,
size: 12.w,
color: Colors.white,
),
);
}),
),
),
],
),
],

Loading…
Cancel
Save