Compare commits
No commits in common. "76b79e8c75a25ae824ff8143b3773fbe0ce2696b" and "4840ed65f9bb79c4fb8e1791be1e2998a7cd9413" have entirely different histories.
76b79e8c75
...
4840ed65f9
@ -65,8 +65,8 @@ android {
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 14
|
||||
versionName "1.1.4"
|
||||
versionCode 6
|
||||
versionName "1.0.5"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -24,9 +24,6 @@
|
||||
android:name="android.permission.READ_MEDIA_IMAGES"/>
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_MEDIA_VIDEO"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 这个权限用于访问GPS定位 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name = "com.huawei.android.launcher.permission.CHANGE_BADGE "/>
|
||||
@ -74,6 +71,7 @@
|
||||
android:hardwareAccelerated="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:showWhenLocked="true"
|
||||
android:turnScreenOn="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_back" />
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item>
|
||||
<item>
|
||||
<bitmap
|
||||
|
||||
|
After Width: | Height: | Size: 20 KiB |
@ -12,7 +12,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
classpath 'com.android.tools.build:gradle:7.2.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 35 KiB |
BIN
circle_app/assets/images/base/launch_image.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 259 KiB |
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 587 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
@ -381,7 +381,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.3;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -530,7 +530,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.3;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -573,7 +573,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.3;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
||||
@ -50,8 +50,6 @@ class AboutappLogic extends GetxController {
|
||||
getUpVersion() async {
|
||||
if(isUpdate){
|
||||
showReportDialog(Get.context!, _updateInfo!.constraint == 0, _updateInfo!);
|
||||
}else {
|
||||
showOKToast("暂无新版本");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ class AboutappPage extends StatelessWidget {
|
||||
),
|
||||
):Container(),
|
||||
Text(
|
||||
"",
|
||||
logic.version,
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
|
||||
@ -54,10 +54,7 @@ class Call_outLogic extends GetxController {
|
||||
if (myConfigData != null) {
|
||||
// print(myConfigData.name);
|
||||
numbers.addAll(myConfigData);
|
||||
if(numbers.length>0){
|
||||
circleName = numbers[0].name;
|
||||
}
|
||||
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
vip = sharedPreferences.getInt(SharedPreferencesHelper.VIP);
|
||||
print(vip);
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:circle_app/app/chat/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
||||
import 'package:circle_app/app/minefragment/logic.dart';
|
||||
@ -34,11 +31,8 @@ import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField
|
||||
import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
||||
import 'package:tencent_extended_text_field/extended_text_field.dart';
|
||||
import 'package:tencent_keyboard_visibility/tencent_keyboard_visibility.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:video_thumbnail/video_thumbnail.dart';
|
||||
|
||||
import '../../../../../util/eventBus.dart';
|
||||
import '../../../../call_out/logic.dart';
|
||||
|
||||
GlobalKey<_TIMTextFieldLayoutNarrowState> TIMnarrowTextFieldKey = GlobalKey();
|
||||
|
||||
@ -158,7 +152,6 @@ class TIMTextFieldLayoutNarrow extends StatefulWidget {
|
||||
|
||||
class _TIMTextFieldLayoutNarrowState
|
||||
extends TIMUIKitState<TIMTextFieldLayoutNarrow> {
|
||||
|
||||
final TUISettingModel settingModel = serviceLocator<TUISettingModel>();
|
||||
final ImagePicker _picker = ImagePicker();
|
||||
|
||||
@ -182,10 +175,9 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
});
|
||||
}
|
||||
if (null == commentBlackEvent) {
|
||||
commentBlackEvent =
|
||||
EventBusManager.on<CommentBlackEvent>().listen((event) {
|
||||
if (event.userId == widget.userId) {
|
||||
if(null==commentBlackEvent){
|
||||
commentBlackEvent = EventBusManager.on<CommentBlackEvent>().listen((event) {
|
||||
if(event.userId == widget.userId){
|
||||
isBlack = event.isBlack;
|
||||
}
|
||||
});
|
||||
@ -193,16 +185,15 @@ class _TIMTextFieldLayoutNarrowState
|
||||
|
||||
getBlack();
|
||||
}
|
||||
|
||||
StreamSubscription? commentBlackEvent = null;
|
||||
|
||||
StreamSubscription? commentBlackEvent =null;
|
||||
@override
|
||||
void dispose() {
|
||||
print("TIMTextFieldLayoutNarrow解绑");
|
||||
if (null != commentBlackEvent) {
|
||||
if(null!=commentBlackEvent){
|
||||
EventBusManager.cancelSubscription(commentBlackEvent!);
|
||||
}
|
||||
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@ -223,6 +214,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void setSendButton() {
|
||||
final value = widget.textEditingController.text;
|
||||
if (isWebDevice() || isAndroidDevice()) {
|
||||
@ -676,7 +668,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 64.sp,
|
||||
height: 40.sp,
|
||||
width: Get.width,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
@ -700,8 +692,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
showSendSoundText = !showSendSoundText;
|
||||
});
|
||||
} else {
|
||||
var data =
|
||||
await Permission.microphone.request();
|
||||
var data = await Permission.microphone.request();
|
||||
if (data.isGranted) {
|
||||
setState(() {
|
||||
showEmojiPanel = false;
|
||||
@ -709,8 +700,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
showSendSoundText = !showSendSoundText;
|
||||
});
|
||||
} else {
|
||||
Permissions.showPermissionConfirmDialog(
|
||||
context, Permission.microphone.value);
|
||||
Permissions.showPermissionConfirmDialog(context, Permission.microphone.value);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
@ -723,50 +713,27 @@ class _TIMTextFieldLayoutNarrowState
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
|
||||
onTap: () async {
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
return;
|
||||
}
|
||||
await getImageFile();
|
||||
getImageFile();
|
||||
},
|
||||
child:
|
||||
Image.asset(getMsgImage('photo'), width: 40.sp),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
return;
|
||||
}
|
||||
await getTakeImageFile();
|
||||
getTakeImageFile();
|
||||
},
|
||||
child: Image.asset(getMsgImage('take_photo'),
|
||||
width: 40.sp),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
return;
|
||||
}
|
||||
await getVideoFile(ImageSource.gallery);
|
||||
},
|
||||
child: Image.asset(getMsgImage('icon_video'),
|
||||
width: 40.sp),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
return;
|
||||
}
|
||||
await getVideoFile(ImageSource.camera);
|
||||
},
|
||||
child: Image.asset(getMsgImage('icon_video_camera'),
|
||||
width: 40.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -808,29 +775,22 @@ class _TIMTextFieldLayoutNarrowState
|
||||
);
|
||||
}
|
||||
|
||||
Future checkVipStatus(int plate) async {
|
||||
Future checkVipStatus() async {
|
||||
if (!isVip) {
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||
isVip = true;
|
||||
return true;
|
||||
} else {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getIsVips + plate.toString());
|
||||
|
||||
if (data['code'] == 200) {
|
||||
isVip = !data['data'];
|
||||
}
|
||||
// var data = await DioManager.instance.get(url: Api.getUserMine);
|
||||
// var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||
// data, (data) => MineResponseBean.fromJson(data));
|
||||
// if (bean.isSuccess()) {
|
||||
// User userInfoBean = bean.data.user!;
|
||||
// isVip = userInfoBean.vip > 0;
|
||||
// }
|
||||
var data = await DioManager.instance.get(url: Api.getUserMine);
|
||||
var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||
data, (data) => MineResponseBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
User userInfoBean = bean.data.user!;
|
||||
isVip = userInfoBean.vip > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isVip) {
|
||||
showOKToast('开通会员之后才能发送图片');
|
||||
Get.bottomSheet(
|
||||
@ -847,91 +807,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
return isVip;
|
||||
}
|
||||
|
||||
VideoPlayerController? videoPlayerController;
|
||||
|
||||
Future getVideoFile(ImageSource imageSource) async {
|
||||
bool isOK = await checkVipStatus(imageSource == ImageSource.camera ? 2 : 4);
|
||||
|
||||
if (!isOK) {
|
||||
return;
|
||||
}
|
||||
|
||||
await requestStoragePermission();
|
||||
|
||||
XFile? pickedFile;
|
||||
String? thumbnailPath; // 声明 thumbnailPath 变量
|
||||
|
||||
try {
|
||||
pickedFile = await _picker.pickVideo(
|
||||
source: imageSource, maxDuration: const Duration(seconds: 30)
|
||||
);
|
||||
if (pickedFile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
videoPlayerController = VideoPlayerController.file(
|
||||
File(pickedFile.path),
|
||||
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
||||
);
|
||||
await videoPlayerController?.initialize().then((_) async {
|
||||
thumbnailPath = await VideoThumbnail.thumbnailFile(
|
||||
video: pickedFile!.path,
|
||||
imageFormat: ImageFormat.JPEG,
|
||||
maxWidth: 100,
|
||||
quality: 50,
|
||||
);
|
||||
});
|
||||
|
||||
final Duration videoDuration = videoPlayerController!.value.duration;
|
||||
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
||||
|
||||
await widget.model.sendVideoMessage(
|
||||
videoPath: pickedFile.path,
|
||||
snapshotPath: thumbnailPath,
|
||||
// 在此处可用
|
||||
convID: widget.conversationID,
|
||||
convType: widget.conversationType,
|
||||
duration: durationInSeconds.toInt(),
|
||||
inputElement: context,
|
||||
);
|
||||
if (imageSource == ImageSource.camera) {
|
||||
DioManager.instance.get(url: Api.getAddTrialCount + "2");
|
||||
} else {
|
||||
DioManager.instance.get(url: Api.getAddTrialCount + "4");
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
// setState(() {
|
||||
// _pickImageError = e;
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
Future<ThumbnailResult> getFirstPic(url) async {
|
||||
Uint8List? bytes = await VideoThumbnail.thumbnailData(video: url);
|
||||
final Completer<ThumbnailResult> completer = Completer();
|
||||
if (bytes != null) {
|
||||
int _imageDataSize = bytes.length;
|
||||
print("image size: $_imageDataSize");
|
||||
|
||||
final _image = Image.memory(bytes);
|
||||
_image.image
|
||||
.resolve(ImageConfiguration())
|
||||
.addListener(ImageStreamListener((ImageInfo info, bool _) {
|
||||
completer.complete(ThumbnailResult(
|
||||
image: _image,
|
||||
dataSize: _imageDataSize,
|
||||
height: info.image.height,
|
||||
width: info.image.width,
|
||||
));
|
||||
}));
|
||||
}
|
||||
|
||||
return completer.future;
|
||||
}
|
||||
|
||||
Future getImageFile() async {
|
||||
bool isOK = await checkVipStatus(3);
|
||||
bool isOK = await checkVipStatus();
|
||||
if (!isOK) {
|
||||
return;
|
||||
}
|
||||
@ -944,7 +821,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
convID: widget.conversationID,
|
||||
convType: widget.conversationType,
|
||||
inputElement: context);
|
||||
var data = await DioManager.instance.get(url: Api.getAddTrialCount + "3");
|
||||
} catch (e) {
|
||||
print(e);
|
||||
// setState(() {
|
||||
@ -954,43 +830,24 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
|
||||
Future getTakeImageFile() async {
|
||||
bool isOK = await checkVipStatus(1);
|
||||
bool isOK = await checkVipStatus();
|
||||
if (!isOK) {
|
||||
return;
|
||||
}
|
||||
await requestStoragePermission();
|
||||
|
||||
|
||||
try {
|
||||
final XFile? pickedFile = await _picker.pickImage(
|
||||
source: ImageSource.camera,
|
||||
);
|
||||
if(null==pickedFile){
|
||||
return;
|
||||
}
|
||||
widget.model.sendImageMessage(
|
||||
imagePath: pickedFile.path,
|
||||
imagePath: pickedFile!.path,
|
||||
convID: widget.conversationID,
|
||||
convType: widget.conversationType,
|
||||
inputElement: context);
|
||||
DioManager.instance.get(url: Api.getAddTrialCount + "1");
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
//实在找不到问题 先加个权限试试
|
||||
Future<void> requestStoragePermission() async {
|
||||
final status = await Permission.storage.request();
|
||||
if (status.isGranted) {
|
||||
// 权限已授予,可以执行存储操作
|
||||
} else if (status.isDenied) {
|
||||
showOKToast("请打开存储权限。将为你带来更好的服务");
|
||||
// 权限被拒绝,您可以显示一条消息来解释为什么需要权限
|
||||
} else if (status.isPermanentlyDenied) {
|
||||
showOKToast("请打开存储权限。将为你带来更优的服务");
|
||||
// 权限被永久拒绝,用户无法在应用程序内授予权限
|
||||
// 您可以引导用户进入应用程序设置以手动启用权限
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_handleCameraAndMic() async {
|
||||
// // 请求权限
|
||||
// Map<PermissionGroup, PermissionStatus> permissions = await PermissionHandler().requestPermissions(
|
||||
|
||||
@ -14,6 +14,7 @@ import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_chat_controller.dart';
|
||||
|
||||
import '../../util/eventBus.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class ChatPage extends StatefulWidget {
|
||||
|
||||
@ -110,7 +111,6 @@ class _ChatPageState extends State<ChatPage> {
|
||||
Widget build(BuildContext context) {
|
||||
V2TimConversation con = Get.arguments;
|
||||
return TIMChat(
|
||||
|
||||
conversation: Get.arguments,
|
||||
customStickerPanel: renderCustomStickerPanel,
|
||||
onTapAvatar :(String userId,TapDownDetails tapDownDetails)async{
|
||||
@ -121,7 +121,6 @@ class _ChatPageState extends State<ChatPage> {
|
||||
},
|
||||
controller : _timuiKitChatController,
|
||||
config: TIMUIKitChatConfig(
|
||||
|
||||
// 仅供演示,非全部配置项,实际使用中,可只传和默认项不同的参数,无需传入所有开关
|
||||
isAllowClickAvatar: true,
|
||||
isUseDefaultEmoji: true,
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class CircleState {
|
||||
String msg = '';
|
||||
int index = 0;
|
||||
@ -83,7 +79,6 @@ class Chat {
|
||||
int? count;
|
||||
List<Users>? users;
|
||||
|
||||
|
||||
Chat({this.accountId, this.count, this.users});
|
||||
|
||||
Chat.fromJson(Map<String, dynamic> json) {
|
||||
|
||||
@ -43,7 +43,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
void initState() {
|
||||
super.initState();
|
||||
_pageController = PageController();
|
||||
_tabController = TabController(length: 1, vsync: this);
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
_tabController.addListener(_handleTabChange);
|
||||
}
|
||||
|
||||
@ -77,9 +77,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
{
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body:
|
||||
|
||||
SafeArea(
|
||||
body: SafeArea(
|
||||
child: GetBuilder(builder: (CircleLogic controller) {
|
||||
return Stack(
|
||||
children: [
|
||||
@ -100,7 +98,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
},
|
||||
children: [
|
||||
circleList(controller),
|
||||
// vicinityList(controller),
|
||||
vicinityList(controller),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -594,71 +592,87 @@ class _CirclePageState extends State<CirclePage>
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// logic.isShowCircle
|
||||
// ? Positioned(
|
||||
logic.isShowCircle
|
||||
? Positioned(
|
||||
left: 0,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.Invite);
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(0.6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 5.sp,
|
||||
bottom: 4.sp,
|
||||
left: 8.sp,
|
||||
right: 8.sp,
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
"邀请得会员",
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
|
||||
// Positioned(
|
||||
// left: 0,
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// Get.toNamed(AppRoutes.Invite);
|
||||
// Get.toNamed(AppRoutes.VisitorListActivity);
|
||||
// },
|
||||
// child: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(17.0),
|
||||
// gradient: const LinearGradient(
|
||||
// colors: [
|
||||
// Color(0xFF06F9FA),
|
||||
// Color(0xFFDC5BFD),
|
||||
// ],
|
||||
// ),
|
||||
// color: const Color(0xFF392D53),
|
||||
// ),
|
||||
// child: Container(
|
||||
// margin: EdgeInsets.all(0.6.sp),
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(17.0),
|
||||
// color: const Color(0xFF392D53),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.only(
|
||||
// top: 5.sp,
|
||||
// bottom: 4.sp,
|
||||
// left: 8.sp,
|
||||
// right: 8.sp,
|
||||
// ),
|
||||
// child: const Center(
|
||||
// child: Text(
|
||||
// "邀请得会员",
|
||||
// style: TextStyle(
|
||||
// fontSize: 11,
|
||||
// color: Colors.white,
|
||||
// child: SizedBox(
|
||||
// width: 30.sp * widgets.length,
|
||||
// height: 44.sp,
|
||||
// child: Stack(
|
||||
// alignment: Alignment.centerLeft,
|
||||
// children: widgets,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ))
|
||||
//
|
||||
// : GestureDetector(
|
||||
// onTap: () {
|
||||
// showCityPiker(context);
|
||||
// },
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Image.asset(
|
||||
// getCircleImage('icon_city'),
|
||||
// width: 24.sp,
|
||||
// ),
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(left: 4.sp, top: 4.sp),
|
||||
// child: Text(
|
||||
// modifyCityName(logic.cityName),
|
||||
// style:
|
||||
// TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
// ))
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
showCityPiker(context);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage('icon_city'),
|
||||
width: 24.sp,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 4.sp, top: 4.sp),
|
||||
child: Text(
|
||||
modifyCityName(logic.cityName),
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
//padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||
@ -693,14 +707,14 @@ class _CirclePageState extends State<CirclePage>
|
||||
),
|
||||
),
|
||||
),
|
||||
// Tab(
|
||||
// child: Text(
|
||||
// '附近',
|
||||
// style: TextStyle(
|
||||
// fontSize: 18.sp,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Tab(
|
||||
child: Text(
|
||||
'附近',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
labelStyle: TextStyle(
|
||||
color: const Color(0xFF00FFF4),
|
||||
|
||||
@ -2,7 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
||||
@ -1,19 +1,14 @@
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:device_info/device_info.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../common/values/pushconfig.dart';
|
||||
import '../../main.dart';
|
||||
import '../../util/PaymentUtils.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/device.dart';
|
||||
@ -41,6 +36,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
|
||||
print(getAgreemement());
|
||||
return false;
|
||||
},
|
||||
@ -82,7 +78,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: "感谢您信任并使用微乐园APP,在你使用微乐园的服务之前,请认真阅读",
|
||||
text: "感谢您信任并使用跨友APP,在你使用跨友的服务之前,请认真阅读",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
@ -90,7 +86,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "《用户协议》",
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: Color(0xFF21BEAB),
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
@ -98,7 +94,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
navigateToUserAgreement();
|
||||
},
|
||||
),
|
||||
const TextSpan(
|
||||
TextSpan(
|
||||
text: "和",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -106,7 +102,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
),
|
||||
TextSpan(
|
||||
text: "《隐私政策》",
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: Color(0xFF21BEAB),
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
@ -116,7 +112,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
"的全部内容,以了解用户权力义务和个人信息处理规则。微乐园仅会将您的信息用于提供服务和改善体验,我们将权力保障您的信息安全,请同意后使用,若您不同意本隐私政策,很遗憾,我们将无法为您提供完整的产品和服务。",
|
||||
"的全部内容,以了解用户权力义务和个人信息处理规则。跨友仅会将您的信息用于提供服务和改善体验,我们将权力保障您的信息安全,请同意后使用,若您不同意本隐私政策,很遗憾,我们将无法为您提供完整的产品和服务。",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
@ -130,32 +126,19 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// 点击操作
|
||||
SmartDialog.showLoading();
|
||||
var connectivityResult =
|
||||
await Connectivity().checkConnectivity();
|
||||
|
||||
if (connectivityResult == ConnectivityResult.none) {
|
||||
showOKToast("请检查网络连接是否正常");
|
||||
print('没网');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var sp = await SharedPreferencesHelper.getInstance();
|
||||
sp.setBool(SharedPreferencesHelper.AGREEMENT, true);
|
||||
} catch (e) {}
|
||||
uploadBuzIDAndToken();
|
||||
SmartDialog.dismiss();
|
||||
pushLoginPage();
|
||||
uploadBuzIDAndToken();
|
||||
},
|
||||
child: Container(
|
||||
width: 240.sp,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 44,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
@ -176,8 +159,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
// 点击不同意按钮的操作
|
||||
// exit(1);
|
||||
SystemNavigator.pop();
|
||||
exit(1);
|
||||
},
|
||||
child: Text(
|
||||
"不同意并退出应用",
|
||||
@ -196,29 +178,25 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
);
|
||||
}
|
||||
|
||||
// Future<bool> uploadBuzIDAndToken() async {
|
||||
// if (Platform.isAndroid) {
|
||||
// initWxApi();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
||||
// await ChannelPush.init((msg) {});
|
||||
//
|
||||
// int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||
//
|
||||
// String token = await ChannelPush.getDeviceToken();
|
||||
// ChannelPush.uploadToken();
|
||||
//
|
||||
// print("token=" + token);
|
||||
// if (token != "") {
|
||||
// V2TimCallback res = await coreInstance.setOfflinePushConfig(
|
||||
// token: token, businessID: businessID);
|
||||
//
|
||||
// print("token=" + res.code.toString());
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
void uploadBuzIDAndToken() async {
|
||||
if (Platform.isAndroid) {
|
||||
initWxApi();
|
||||
}
|
||||
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
||||
await ChannelPush.init((msg) {});
|
||||
|
||||
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||
|
||||
String token = await ChannelPush.getDeviceToken();
|
||||
ChannelPush.uploadToken();
|
||||
|
||||
print("token=" + token);
|
||||
if (token != "") {
|
||||
V2TimCallback res = await coreInstance.setOfflinePushConfig(
|
||||
token: token, businessID: businessID);
|
||||
|
||||
print("token=" + res.code.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:circle_app/app/circle/logic.dart';
|
||||
import 'package:circle_app/app/minefragment/logic.dart';
|
||||
|
||||
@ -67,7 +67,7 @@ class LoginLogic extends GetxController {
|
||||
if (bean.code == 200) {
|
||||
showOKToast('发送成功!');
|
||||
if (kDebugMode) {
|
||||
//print("验证码:${bean.data!.code}");
|
||||
print("验证码:${bean.data!.code}");
|
||||
// codeEditingController.text = bean.data!.code.toString();
|
||||
// update();
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
class MinefragmentLogic extends GetxController {
|
||||
final MinefragmentState state = MinefragmentState();
|
||||
User? userInfoBean;
|
||||
bool isProxy = false;
|
||||
String ageMsg = "";
|
||||
var isVip = 0.obs;
|
||||
var likeCount = 0;
|
||||
@ -35,12 +34,6 @@ class MinefragmentLogic extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||
isProxy = true;
|
||||
} else {
|
||||
isProxy = false;
|
||||
}
|
||||
getMode();
|
||||
EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||
isVip.value = event.vip;
|
||||
|
||||
@ -19,18 +19,10 @@ import 'logic.dart';
|
||||
|
||||
const vipIcon = 'assets/images/home/icon_vip.png';
|
||||
|
||||
const MyImageWidget = Image(
|
||||
const MyImageWidget = const Image(
|
||||
image: AssetImage(vipIcon),
|
||||
fit: BoxFit.fill,
|
||||
);
|
||||
|
||||
const vipIcon1 = 'assets/images/home/icon_one_vip.png';
|
||||
|
||||
const MyImageWidget1 = Image(
|
||||
image: AssetImage(vipIcon1),
|
||||
fit: BoxFit.fill,
|
||||
);
|
||||
|
||||
class MinefragmentPage extends StatelessWidget {
|
||||
MinefragmentPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -68,7 +60,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
showRechargeDialog(logic);
|
||||
},
|
||||
child: Stack(children: [
|
||||
logic.isProxy ? MyImageWidget1 : MyImageWidget,
|
||||
MyImageWidget,
|
||||
Positioned(
|
||||
top: 54.sp,
|
||||
left: 72.sp,
|
||||
@ -90,7 +82,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
|
||||
Widget _circleLiveView(MinefragmentLogic logic) {
|
||||
return Column(
|
||||
children: [_circleItemView(logic), _helpItemView(),_setUpItemView()],
|
||||
children: [_circleItemView(logic), _invienItemView(), _helpItemView(),_setUpItemView()],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ import 'package:tencent_cloud_chat_uikit/ui/widgets/customize_ball_pulse_header.
|
||||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/wide_popup.dart';
|
||||
|
||||
import '../../../util/eventBus.dart';
|
||||
import 'tim_uikit_conversation_item.dart';
|
||||
|
||||
typedef TIMConversationItemBuilder = Widget Function(
|
||||
@ -191,11 +190,9 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
model.setSelectedConversation(conversation);
|
||||
}
|
||||
|
||||
_clearHistory(V2TimConversation conversationItem) async{
|
||||
await _timuiKitConversationController.clearHistoryMessage(
|
||||
_clearHistory(V2TimConversation conversationItem) {
|
||||
_timuiKitConversationController.clearHistoryMessage(
|
||||
conversation: conversationItem);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
EventBusManager.fire(RefreshUnread());
|
||||
}
|
||||
|
||||
_pinConversation(V2TimConversation conversation) {
|
||||
@ -204,11 +201,9 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
isPinned: !conversation.isPinned!);
|
||||
}
|
||||
|
||||
_deleteConversation(V2TimConversation conversation) async{
|
||||
await _timuiKitConversationController.deleteConversation(
|
||||
_deleteConversation(V2TimConversation conversation) {
|
||||
_timuiKitConversationController.deleteConversation(
|
||||
conversationID: conversation.conversationID);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
EventBusManager.fire(RefreshUnread());
|
||||
}
|
||||
|
||||
List<V2TimConversation?> getFilteredConversation() {
|
||||
|
||||
@ -17,9 +17,6 @@ class Select_circleLogic extends GetxController {
|
||||
|
||||
for (var entry in entries.asMap().entries) {
|
||||
MyConfigData bean = MyConfigData(entry.value.key, entry.value.value, false);
|
||||
if(selectCircle.isEmpty){
|
||||
arrList.add(bean);
|
||||
}else{
|
||||
selectCircle.forEach((element) {
|
||||
if(entry.value.key==element.id){
|
||||
bean.isSelect = true;
|
||||
@ -28,8 +25,6 @@ class Select_circleLogic extends GetxController {
|
||||
arrList.add(bean);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
interestMap.forEach((key, value) {
|
||||
MyConfigData bean = MyConfigData(key, value, false);
|
||||
@ -41,7 +36,7 @@ class Select_circleLogic extends GetxController {
|
||||
arrList.add(bean);
|
||||
});
|
||||
}
|
||||
print(arrList.length.toString());
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
@ -9,7 +8,6 @@ import 'package:get/get.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../dialog/YesAgreementDialog.dart';
|
||||
import '../select_circle/logic.dart';
|
||||
import 'state.dart';
|
||||
|
||||
import '../../network/api.dart';
|
||||
@ -27,31 +25,10 @@ class SplashLogic extends GetxController {
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
// await Future.delayed(Duration(seconds: 30));
|
||||
|
||||
var data1 =
|
||||
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
if (bean1.code == 200) {
|
||||
configBean = bean1.data!;
|
||||
|
||||
configBean.genderMap.forEach((key, value) {
|
||||
genderList.add(value);
|
||||
});
|
||||
|
||||
configBean.orientationMap.forEach((key, value) {
|
||||
orientationList.add(value);
|
||||
});
|
||||
configBean.roleMap.forEach((key, value) {
|
||||
roleList.add(value);
|
||||
});
|
||||
}
|
||||
|
||||
if ((await getAuthorization()).isEmpty) {
|
||||
if (Platform.isIOS) {
|
||||
pushLoginPage();
|
||||
|
||||
@ -15,7 +15,7 @@ class SplashPage extends StatelessWidget {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/base/launch_back.webp'),
|
||||
image: AssetImage('assets/images/base/launch_image.webp'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
|
||||
@ -133,11 +133,7 @@ class UserinfoLogic extends GetxController {
|
||||
}
|
||||
onLineCity = isOnline ? "在线" : "离线";
|
||||
if (userInfoBean?.city != null) {
|
||||
if (isOnline) {
|
||||
onLineCity = "$onLineCity·${userInfoBean!.city}";
|
||||
} else {
|
||||
onLineCity = userInfoBean!.city! ?? '';
|
||||
}
|
||||
} else {
|
||||
onLineCity = "$onLineCity·外星";
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
shape: BoxShape.circle,
|
||||
color: logic.isOnline
|
||||
? const Color(0xFF00FFF4)
|
||||
: const Color(0x00000000),
|
||||
: const Color(0xFF787575),
|
||||
),
|
||||
),
|
||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||
@ -404,17 +404,6 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
}
|
||||
|
||||
Widget titleTab(UserinfoLogic controller) {
|
||||
String buttonText = "";
|
||||
|
||||
if (controller.isMe) {
|
||||
if (logic.isShowAlbum) {
|
||||
buttonText = controller.isEdit ? "完成" : "管理";
|
||||
} else {
|
||||
buttonText = "发布喊话";
|
||||
}
|
||||
} else {
|
||||
buttonText = controller.isUrgeStatus ? "已催更" : "催更";
|
||||
}
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||
@ -452,13 +441,10 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
);
|
||||
},
|
||||
),
|
||||
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
|
||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||
? Container()
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
if(!logic.isShowAlbum&&controller.isMe){
|
||||
List<MyConfigData> numbers = [];
|
||||
var data = Get.toNamed(AppRoutes.Call_out, arguments: {'numbers': numbers});
|
||||
return ;
|
||||
}
|
||||
if (controller.isMe) {
|
||||
controller.isEdit = !controller.isEdit;
|
||||
controller.update();
|
||||
@ -467,7 +453,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
}
|
||||
},
|
||||
child: Visibility(
|
||||
// visible: logic.isShowAlbum,
|
||||
visible: logic.isShowAlbum,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
@ -485,7 +471,13 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
horizontal: 12.sp,
|
||||
),
|
||||
child: Text(
|
||||
buttonText,
|
||||
controller.isMe
|
||||
? controller.isEdit
|
||||
? "完成"
|
||||
: "管理"
|
||||
: controller.isUrgeStatus
|
||||
? "已催更"
|
||||
: "催更",
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
@ -517,7 +509,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
style: const TextStyle(color: Colors.white30),
|
||||
),
|
||||
),
|
||||
controller.state.imaglist.isEmpty && !controller.isMe
|
||||
controller.state.imaglist.isEmpty && !controller.isEdit
|
||||
? Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@ -550,21 +542,19 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
crossAxisCount: 3,
|
||||
),
|
||||
itemCount: controller.isMe
|
||||
// ? controller.isEdit
|
||||
// ? controller.state.imaglist.length < 15
|
||||
// ? controller.state.imaglist.length
|
||||
? controller.state.imaglist.length+1
|
||||
: controller.state.imaglist.length ,
|
||||
? controller.isEdit
|
||||
? controller.state.imaglist.length < 15
|
||||
? controller.state.imaglist.length + 1
|
||||
: controller.state.imaglist.length
|
||||
: controller.state.imaglist.length
|
||||
: controller.state.imaglist.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
// print("123123123123");
|
||||
if (controller.isMe ) {
|
||||
if (controller.isMe &&
|
||||
controller.isEdit &&
|
||||
controller.state.imaglist.length < 15) {
|
||||
if (index == 0) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if(controller.state.imaglist.length >= 15){
|
||||
showOKToast("最大只可上传15张图片哦~");
|
||||
return ;
|
||||
}
|
||||
controller.getImageFile();
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
|
||||
import 'package:device_info/device_info.dart';
|
||||
import 'package:tencent_chat_push_for_china/model/appInfo.dart';
|
||||
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||
|
||||
@ -13,7 +12,6 @@ class PushConfig{
|
||||
|
||||
// Business ID for XiaoMi
|
||||
static const XMPushBuzID = 30672;
|
||||
static const String XMChannelID = "111363";
|
||||
|
||||
// APP Info of XiaoMi
|
||||
static const String XMPushAPPID = "2882303761520264048";
|
||||
@ -74,32 +72,14 @@ class ChannelPush{
|
||||
appInfo: PushConfig.appInfo,
|
||||
);
|
||||
print("token=初始化"+isInit.toString());
|
||||
AndroidDeviceInfo androidInfo;
|
||||
try {
|
||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||
androidInfo = await deviceInfo.androidInfo;
|
||||
} catch (e) {
|
||||
// 处理异常
|
||||
return true;
|
||||
}
|
||||
if (androidInfo.brand == 'Xiaomi'||androidInfo.brand == 'Redmi') {
|
||||
cPush.createNotificationChannel(
|
||||
channelId: PushConfig.XMChannelID,
|
||||
channelName: "消息推送",
|
||||
channelDescription:
|
||||
"The notification for chat message from Tencent Cloud IM"
|
||||
);
|
||||
}else{
|
||||
|
||||
// create new notification channel
|
||||
cPush.createNotificationChannel(
|
||||
channelId: PushConfig.OPPOChannelID,
|
||||
channelName: "消息推送",
|
||||
channelDescription:
|
||||
"The notification for chat message from Tencent Cloud IM"
|
||||
);
|
||||
}
|
||||
// create new notification channel
|
||||
|
||||
|
||||
|
||||
// require the permission for notification
|
||||
cPush.requireNotificationPermission();
|
||||
|
||||
@ -13,12 +13,10 @@ import 'package:circle_app/util/SharedPreferencesHelper.dart';
|
||||
import 'package:circle_app/util/device.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.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';
|
||||
import 'package:oktoast/oktoast.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat_separate_view_model.dart';
|
||||
@ -39,32 +37,8 @@ void main() {
|
||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
runApp(const MyApp());
|
||||
if (Platform.isAndroid) {
|
||||
getLostData();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Future<void> getLostData() async {
|
||||
final ImagePicker picker = ImagePicker();
|
||||
final LostDataResponse response = await picker.retrieveLostData();
|
||||
if (response.isEmpty) {
|
||||
return;
|
||||
}
|
||||
final List<XFile>? files = response.files;
|
||||
if (files != null) {
|
||||
_handleLostFiles(files);
|
||||
} else {
|
||||
_handleError(response.exception);
|
||||
}
|
||||
}
|
||||
void _handleLostFiles(List<XFile> file) {}
|
||||
Future<void> _handleError(dynamic error) async {
|
||||
// 处理错误,例如记录错误或显示错误消息
|
||||
print('Error occurred: $error');
|
||||
// 在界面上显示错误消息
|
||||
showToast('内存异常,请重新上传');
|
||||
|
||||
}
|
||||
int IM_SDK_APP_ID = 1400799631;
|
||||
|
||||
String IOS_APP_ID = "";
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
|
||||
|
||||
class Api {
|
||||
static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||
// static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||
|
||||
|
||||
// static const baseUrl = 'http://192.168.3.55:2000/' ;
|
||||
static const baseUrl = 'http://192.168.3.55:2000/' ;
|
||||
|
||||
|
||||
// 获取验证码
|
||||
@ -81,15 +80,6 @@ class Api {
|
||||
static const getUserMine = 'user-service/my/main';
|
||||
|
||||
|
||||
//发消息是否需要vip弹窗
|
||||
static const getIsVips = 'mall-service/vips/show/';
|
||||
|
||||
|
||||
|
||||
//发视频图片消息增加计数
|
||||
static const getAddTrialCount = 'mall-service/vips/trialCount/';
|
||||
|
||||
|
||||
//个人信息
|
||||
static const getUserInfo = 'user-service/my/home';
|
||||
|
||||
|
||||
@ -183,19 +183,7 @@ String getAgeCOntent(int gender, int age, int role, int orientation) {
|
||||
return "${getGenderContent(gender)}·${age}·${getRoleContent(role)}·${getOrientationContent(orientation)}";
|
||||
}
|
||||
|
||||
late ConfigBean configBean;
|
||||
List<MyConfigData> numbers = [];
|
||||
|
||||
List<String> genderList = [];
|
||||
|
||||
List<String> orientationList = [];
|
||||
|
||||
List<String> roleList = [];
|
||||
|
||||
String getGenderContent(int number) {
|
||||
if(genderList.length!=0){
|
||||
return genderList[number-1];
|
||||
}else {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return "男";
|
||||
@ -212,13 +200,9 @@ String getGenderContent(int number) {
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String getOrientationContent(int number) {
|
||||
if(orientationList.length!=0){
|
||||
return orientationList[number-1];
|
||||
}else {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return "异性恋";
|
||||
@ -237,13 +221,9 @@ String getOrientationContent(int number) {
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String getRoleContent(int number) {
|
||||
if(roleList.length!=0){
|
||||
return roleList[number-1];
|
||||
}else {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return "Sado";
|
||||
@ -258,7 +238,6 @@ String getRoleContent(int number) {
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef void MyCallback(String path);
|
||||
|
||||