一些细节问题 和上架相关的问题
This commit is contained in:
parent
c5e5003aa5
commit
71ea3d19ad
@ -13,12 +13,12 @@ if (flutterRoot == null) {
|
|||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
if (flutterVersionCode == null) {
|
if (flutterVersionCode == null) {
|
||||||
flutterVersionCode = '1'
|
flutterVersionCode = '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = '1.0'
|
flutterVersionName = '1.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
@ -65,17 +65,17 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode 1
|
||||||
versionName flutterVersionName
|
versionName "1.0.0"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
]
|
]
|
||||||
|
|
||||||
// ndk {
|
ndk {
|
||||||
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
// ldLibs "log"
|
ldLibs "log"
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@ -2,9 +2,11 @@ import 'package:circle_app/network/dio_manager.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
|
|
||||||
|
import '../../util/eventBus.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class ChatLogic extends GetxController {
|
class ChatLogic extends GetxController {
|
||||||
|
|
||||||
final ChatState state = ChatState();
|
final ChatState state = ChatState();
|
||||||
V2TimConversation? selectedConversation;
|
V2TimConversation? selectedConversation;
|
||||||
|
|
||||||
@ -15,6 +17,7 @@ class ChatLogic extends GetxController {
|
|||||||
selectedConversation = Get.arguments;
|
selectedConversation = Get.arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sendData() async {
|
sendData() async {
|
||||||
var data = await DioManager.instance.get(url: 'url',params: {});
|
var data = await DioManager.instance.get(url: 'url',params: {});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,12 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
// final logic = Get.find<ChatLogic>();
|
// final logic = Get.find<ChatLogic>();
|
||||||
//
|
//
|
||||||
// final state = Get.find<ChatLogic>().state;
|
// final state = Get.find<ChatLogic>().state;
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
// TODO: implement dispose
|
||||||
|
EventBusManager.fire(RefreshUnread());
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
final TIMUIKitChatController _timuiKitChatController =
|
final TIMUIKitChatController _timuiKitChatController =
|
||||||
TIMUIKitChatController();
|
TIMUIKitChatController();
|
||||||
@ -44,6 +50,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
initEventBus()async{
|
initEventBus()async{
|
||||||
EventBusManager.on<SendCoustomMessage>().listen((event) async{
|
EventBusManager.on<SendCoustomMessage>().listen((event) async{
|
||||||
V2TimValueCallback<V2TimMessage>? sendMessageRes =
|
V2TimValueCallback<V2TimMessage>? sendMessageRes =
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_core/src/get_main.dart';
|
import 'package:get/get_core/src/get_main.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../../../util/SharedPreferencesHelper.dart';
|
import '../../../util/SharedPreferencesHelper.dart';
|
||||||
import '../../../util/eventBus.dart';
|
import '../../../util/eventBus.dart';
|
||||||
@ -194,6 +195,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
||||||
showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2,(payResult){
|
showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2,(payResult){
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
|
var logic = Get.find<CircleLogic>();
|
||||||
|
for (var element in logic.circle.lists) {
|
||||||
|
if (element.id == widget.bean.id) {
|
||||||
|
element.is_limit = false;
|
||||||
|
element.isJoin = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logic.update();
|
||||||
|
}
|
||||||
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
},widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -661,6 +673,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
|
var logic = Get.find<CircleLogic>();
|
||||||
|
for (var element in logic.circle.lists) {
|
||||||
|
if (element.id == widget.bean.id) {
|
||||||
|
element.is_limit = false;
|
||||||
|
element.isJoin = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logic.update();
|
||||||
|
}
|
||||||
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
},widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -956,6 +979,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
if (widget.bean.is_limit&&widget.bean.amount > 0) {
|
if (widget.bean.is_limit&&widget.bean.amount > 0) {
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
|
var logic = Get.find<CircleLogic>();
|
||||||
|
for (var element in logic.circle.lists) {
|
||||||
|
if (element.id == widget.bean.id) {
|
||||||
|
element.is_limit = false;
|
||||||
|
element.isJoin = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logic.update();
|
||||||
|
}
|
||||||
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
},widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1144,10 +1178,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 12.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () async{
|
||||||
|
|
||||||
|
|
||||||
pushMsgPage(lists, widget.bean.id.toString());
|
pushMsgPage(lists, widget.bean.id.toString());
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
SharedPreferences sharedPreferences =await SharedPreferences.getInstance();
|
||||||
|
// SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
|
int userId = sharedPreferences.getInt(SharedPreferencesHelper.USERID)??0;
|
||||||
|
String avatar = sharedPreferences.getString(SharedPreferencesHelper.AVATAR)??"";
|
||||||
|
String name = sharedPreferences.getString(SharedPreferencesHelper.NAME)??"";
|
||||||
|
lists.chat!.users!.add(Users(avatar: avatar,id: userId,nickname: name));
|
||||||
|
widget.logic.update();
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:circle_app/app/util/paymentUtil.dart';
|
import 'package:circle_app/util/paymentUtil.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
|||||||
@ -9,6 +9,7 @@ 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 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
|
|
||||||
import '../../common/values/pushconfig.dart';
|
import '../../common/values/pushconfig.dart';
|
||||||
|
import '../../util/PaymentUtils.dart';
|
||||||
import '../../util/SharedPreferencesHelper.dart';
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
import '../../util/device.dart';
|
import '../../util/device.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
@ -179,6 +180,9 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
|||||||
|
|
||||||
|
|
||||||
void uploadBuzIDAndToken() async {
|
void uploadBuzIDAndToken() async {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
initWxApi();
|
||||||
|
}
|
||||||
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
||||||
await ChannelPush.init((msg) {});
|
await ChannelPush.init((msg) {});
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'猜你想问',
|
'常见问题',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xFFB7BECC),
|
color: const Color(0xFFB7BECC),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
|
|||||||
@ -7,7 +7,12 @@ import 'package:circle_app/util/util.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:tencent_cloud_chat_uikit/data_services/core/core_services.dart';
|
||||||
|
import 'package:tencent_cloud_chat_uikit/data_services/message/message_services.dart';
|
||||||
|
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||||
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
|
|
||||||
|
import '../../util/eventBus.dart';
|
||||||
import '../circle/view.dart';
|
import '../circle/view.dart';
|
||||||
import '../dialog/UpdateDialog.dart';
|
import '../dialog/UpdateDialog.dart';
|
||||||
import '../minefragment/view.dart';
|
import '../minefragment/view.dart';
|
||||||
@ -23,15 +28,72 @@ class HomeLogic extends GetxController {
|
|||||||
|
|
||||||
final List<Widget> tabs = [];
|
final List<Widget> tabs = [];
|
||||||
var circlePage = CirclePage();
|
var circlePage = CirclePage();
|
||||||
|
static final MessageService _messageService =
|
||||||
|
serviceLocator<MessageService>();
|
||||||
|
final RxString unreadSIze = "0".obs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
getIMData();
|
getIMData();
|
||||||
|
|
||||||
tabs.add(MsgPage());
|
tabs.add(MsgPage());
|
||||||
tabs.add(CirclePage());
|
tabs.add(CirclePage());
|
||||||
tabs.add(MinefragmentPage());
|
tabs.add(MinefragmentPage());
|
||||||
|
|
||||||
|
EventBusManager.on<RefreshUnread>().listen((event) {
|
||||||
|
getUnreadSize();
|
||||||
|
});
|
||||||
|
getUnreadSize();
|
||||||
|
var msgListener = V2TimSimpleMsgListener(onRecvC2CTextMessage: (
|
||||||
|
msgID,
|
||||||
|
userInfo,
|
||||||
|
text,
|
||||||
|
) async {
|
||||||
|
getUnreadSize();
|
||||||
|
});
|
||||||
|
_messageService.addSimpleMsgListener(listener: msgListener);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var data = await DioManager.instance.get(url: Api.APP_VERSION);
|
||||||
|
var bean = BaseResponse<UpdateInfo>.fromJson(
|
||||||
|
data, (data) => UpdateInfo.fromJson(data));
|
||||||
|
if (bean.isSuccess() && bean.data.update == 1) {
|
||||||
|
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getUnreadSize() async {
|
||||||
|
V2TimValueCallback<int> getTotalUnreadMessageCountRes =
|
||||||
|
await TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getConversationManager()
|
||||||
|
.getTotalUnreadMessageCount();
|
||||||
|
print("未读数量" + getTotalUnreadMessageCountRes.desc.toString()+getTotalUnreadMessageCountRes.code.toString());
|
||||||
|
|
||||||
|
if (getTotalUnreadMessageCountRes.code == 0) {
|
||||||
|
unreadSIze.value = getTotalUnreadMessageCountRes.data.toString();
|
||||||
|
setOfflinePushStatus(status: AppStatus.foreground);
|
||||||
|
}else{
|
||||||
|
getUnreadSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<V2TimCallback> setOfflinePushStatus(
|
||||||
|
{required AppStatus status, int? totalCount}) {
|
||||||
|
if (status == AppStatus.foreground) {
|
||||||
|
// 当应用status为前台时,上报doForeground()
|
||||||
|
return TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getOfflinePushManager()
|
||||||
|
.doForeground();
|
||||||
|
} else {
|
||||||
|
// 当应用status为后台时,上报doBackground(),并带上未读数
|
||||||
|
return TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getOfflinePushManager()
|
||||||
|
.doBackground(unreadCount: totalCount ?? 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -40,12 +102,7 @@ class HomeLogic extends GetxController {
|
|||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
FlutterNativeSplash.remove();
|
FlutterNativeSplash.remove();
|
||||||
var data = await DioManager.instance.get(url: Api.APP_VERSION);
|
|
||||||
var bean = BaseResponse<UpdateInfo>.fromJson(
|
|
||||||
data, (data) => UpdateInfo.fromJson(data));
|
|
||||||
if (bean.isSuccess() && bean.data.update == 1) {
|
|
||||||
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void showReportDialog(
|
void showReportDialog(
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
height: 49.sp + MediaQuery.of(context).padding.bottom,
|
height: 49.sp + MediaQuery.of(context).padding.bottom,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
padding: EdgeInsets.only(left: 50.sp, right: 50.sp, top: 8.sp),
|
padding: EdgeInsets.only(left: 50.sp, right: 50.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFF423055),
|
color: const Color(0xFF423055),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -74,9 +74,8 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
|
|
||||||
funcItem(int index, String image, bool isSelected, HomeLogic controller) {
|
funcItem(int index, String image, bool isSelected, HomeLogic controller) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 80,
|
width: 80.sp,
|
||||||
|
height: 36.sp,
|
||||||
height: 36,
|
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -85,6 +84,13 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
controller.updateIndex(index);
|
controller.updateIndex(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children:[
|
||||||
|
Container(
|
||||||
|
|
||||||
|
margin: EdgeInsets.only(top: 8.sp),
|
||||||
|
child: Center(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
isSelected
|
isSelected
|
||||||
? getTabbarImage('${image}_selected')
|
? getTabbarImage('${image}_selected')
|
||||||
@ -93,6 +99,37 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
height: 34.sp,
|
height: 34.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
// Obx(() => null)
|
||||||
|
Obx(() => Visibility(
|
||||||
|
visible: index == 0 &&controller.unreadSIze!="0",
|
||||||
|
child: Positioned(
|
||||||
|
// right: 4.sp,
|
||||||
|
top: 4.sp,
|
||||||
|
child:
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: int.parse(controller.unreadSIze.value) > 99 ? 30.sp : 20.sp),
|
||||||
|
height: 18.sp,
|
||||||
|
padding: EdgeInsets.only(left: 5.sp,right: 5.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.red,
|
||||||
|
borderRadius: BorderRadius.circular(11.sp)
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
int.parse(controller.unreadSIze.value) > 99 ? '99+' : controller.unreadSIze.value, // The number in the red dot
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.0.sp, // Font size of the text
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
)))
|
||||||
|
|
||||||
|
]
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import 'package:scroll_to_index/scroll_to_index.dart';
|
|||||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_conversation_controller.dart';
|
import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_conversation_controller.dart';
|
||||||
|
|
||||||
|
import '../../util/eventBus.dart';
|
||||||
import 'TIMUIKitConversation/tim_uikit_conversation.dart';
|
import 'TIMUIKitConversation/tim_uikit_conversation.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
@ -206,13 +207,14 @@ class MsgPage extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () async{
|
||||||
V2TimConversation conv = V2TimConversation(
|
V2TimConversation conv = V2TimConversation(
|
||||||
type: 1,
|
type: 1,
|
||||||
userID: '10040818',
|
userID: '10040818',
|
||||||
conversationID: 'c2c_10040818',
|
conversationID: 'c2c_10040818',
|
||||||
showName: '456');
|
showName: '456');
|
||||||
Get.toNamed(AppRoutes.Chat, arguments: conv);
|
Get.toNamed(AppRoutes.Chat, arguments: conv);
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -320,13 +322,14 @@ class MsgPage extends StatelessWidget {
|
|||||||
return TIMConversation(
|
return TIMConversation(
|
||||||
autoScrollController: logic.scrollController,
|
autoScrollController: logic.scrollController,
|
||||||
scrollController: logic.listScrollController,
|
scrollController: logic.listScrollController,
|
||||||
onTapItem: (selectedConv) {
|
onTapItem: (selectedConv) async{
|
||||||
String type = selectedConv.userID!.split('_')[2];
|
String type = selectedConv.userID!.split('_')[2];
|
||||||
if (int.parse(type) == 11) {
|
if (int.parse(type) == 11) {
|
||||||
Get.toNamed(AppRoutes.Sys_notify_list, arguments: selectedConv);
|
Get.toNamed(AppRoutes.Sys_notify_list, arguments: selectedConv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Get.toNamed(AppRoutes.Chat, arguments: selectedConv);
|
Get.toNamed(AppRoutes.Chat, arguments: selectedConv);
|
||||||
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder<SwiperLogic>(builder: (logic) {
|
return GetBuilder<SwiperLogic>(builder: (logic) {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: null,
|
appBar: null,
|
||||||
backgroundColor: Colors.black87,
|
backgroundColor: Colors.black87,
|
||||||
@ -31,6 +32,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
controller: logic.swiperController,
|
controller: logic.swiperController,
|
||||||
index:logic.index,
|
index:logic.index,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
print("img="+logic.imgList[index]);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
|
|||||||
@ -657,15 +657,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
sendmsg(){
|
|
||||||
OfflinePushInfo(
|
|
||||||
title : '测试', // 推送通知标题。留空字符串时,按照优先级,IM后台自动替换成 sender的昵称 => sender ID。因此,如无特殊需求,该字段建议留空,可达到和微信一致的效果
|
|
||||||
desc : '测试', // 推送第二行小字部分
|
|
||||||
disablePush : false,
|
|
||||||
ext : 'null', // 推送内额外信息,对方可于单击通知跳转时拿到。建议传含Conversation信息的JSON,用于收件方跳转至对应Chat。可参见下方TUIKit的实例代码。
|
|
||||||
androidOPPOChannelID : 'new_message', // OPPO的channel ID
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Widget _buildAvatar1(UserinfoLogic controller) {
|
Widget _buildAvatar1(UserinfoLogic controller) {
|
||||||
if (controller.userInfoBean == null) {
|
if (controller.userInfoBean == null) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
|
|||||||
@ -1,17 +1,24 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../common/Widgets/open_vip_tip/logic.dart';
|
||||||
import '../../network/api.dart';
|
import '../../network/api.dart';
|
||||||
import '../../network/dio_manager.dart';
|
import '../../network/dio_manager.dart';
|
||||||
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
|
import '../../util/eventBus.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class VisitorlistLogic extends GetxController {
|
class VisitorlistLogic extends GetxController {
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
refreshController.dispose();
|
refreshController.dispose();
|
||||||
super.dispose();
|
if (null != subscription) {
|
||||||
|
EventBusManager.cancelSubscription(subscription!);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
@ -20,23 +27,42 @@ class VisitorlistLogic extends GetxController {
|
|||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
List<UserListItem> lists = [];
|
List<UserListItem> lists = [];
|
||||||
|
StreamSubscription? subscription = null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
|
subscription = EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||||
|
isVip = event.vip;
|
||||||
|
page = 1;
|
||||||
initList();
|
initList();
|
||||||
|
});
|
||||||
|
refreshVipStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshVipStatus() async {
|
||||||
|
var data = await DioManager.instance.get(url: Api.getVipStatus);
|
||||||
|
var bean =
|
||||||
|
BaseResponse<VipInfo>.fromJson(data, (data) => VipInfo.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
|
sharedPreferences.setInt(
|
||||||
|
SharedPreferencesHelper.VIP, bean.data.vipLevel);
|
||||||
|
isVip = bean.data.vipLevel;
|
||||||
|
initList();
|
||||||
|
// update();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initList() async {
|
initList() async {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
lists.clear();
|
lists.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
var data =
|
var data = await DioManager.instance
|
||||||
await DioManager.instance.get(url: Api.visitList, params: {
|
.get(url: Api.visitList, params: {'page': page});
|
||||||
'page': page
|
|
||||||
});
|
|
||||||
var bean = BaseResponse<UserList>.fromJson(
|
var bean = BaseResponse<UserList>.fromJson(
|
||||||
data, (data) => UserList.fromJson(data));
|
data, (data) => UserList.fromJson(data));
|
||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
@ -51,12 +77,8 @@ class VisitorlistLogic extends GetxController {
|
|||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
final int id;
|
final int id;
|
||||||
final String nickname;
|
final String nickname;
|
||||||
@ -147,4 +169,3 @@ class UserList {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/main.dart';
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -5,6 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
@ -14,7 +17,9 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
VisitorlistPage({Key? key}) : super(key: key);
|
VisitorlistPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final logic = Get.find<VisitorlistLogic>();
|
final logic = Get.find<VisitorlistLogic>();
|
||||||
final state = Get.find<VisitorlistLogic>().state;
|
final state = Get
|
||||||
|
.find<VisitorlistLogic>()
|
||||||
|
.state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -29,48 +34,104 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: const MyAppBar(
|
appBar: const MyAppBar(
|
||||||
centerTitle:"最近访客",
|
centerTitle: "最近访客",
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: Stack(
|
||||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
children: [
|
||||||
|
Container(
|
||||||
|
child: logic.isLoad
|
||||||
|
? loaddingWidget(true)
|
||||||
|
: logic.lists.isEmpty
|
||||||
|
? noResultWidget()
|
||||||
|
: SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
enablePullUp:true,
|
enablePullUp: true,
|
||||||
child: ListView.builder(
|
child: Stack(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
children: [
|
||||||
|
ListView.builder(
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemCount: logic.lists.length,
|
itemCount: logic.lists.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return ListItem(logic.lists[index],index);
|
return ListItem(logic.lists[index], index);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
logic.isVip > 0 ? Container() : Positioned(
|
||||||
|
bottom: 150,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showRechargeDialog();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 55.sp,
|
||||||
|
right: 55.sp),
|
||||||
|
child: Text(
|
||||||
|
"开通会员查看访客",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget ListItem(UserListItem item,int index) {
|
Widget ListItem(UserListItem item, int index) {
|
||||||
|
//print("是不是vip"+logic.isVip.toString());
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.user.id.toString());
|
if (logic.isVip > 0 || index < 3) {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||||
|
arguments: item.user.id.toString());
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
child: ImageFiltered(
|
||||||
|
imageFilter: ImageFilter.blur(
|
||||||
|
sigmaX: (logic.isVip > 0 || index < 3) ? 0 : 5,
|
||||||
|
sigmaY: (logic.isVip > 0 || index < 3) ? 0 : 5,
|
||||||
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: const EdgeInsets.only(bottom: 21),
|
margin: const EdgeInsets.only(bottom: 21),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Stack(children: [
|
Stack(
|
||||||
|
children: [
|
||||||
ClipOval(
|
ClipOval(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (logic.isVip > 0 || index < 3) {
|
||||||
var imgList = <String>[];
|
var imgList = <String>[];
|
||||||
imgList.add(item.user.avatar);
|
imgList.add(item.user.avatar);
|
||||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
Get.toNamed(AppRoutes.Swiper,
|
||||||
'imaglist': imgList,
|
arguments: {'imaglist': imgList, 'index': 0});
|
||||||
'index': 0
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -84,14 +145,16 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
right: 0.sp,
|
right: 0.sp,
|
||||||
left: 0.sp,
|
left: 0.sp,
|
||||||
bottom: 0.sp,
|
bottom: 0.sp,
|
||||||
|
child: item.user.vip != 0
|
||||||
child: item.user.vip!=0 ?
|
? Image(
|
||||||
Image(
|
|
||||||
image: AssetImage(getBaseImage("vip")),
|
image: AssetImage(getBaseImage("vip")),
|
||||||
width: 44.sp,
|
width: 44.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
):Container(),)
|
)
|
||||||
],),
|
: Container(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(width: 10.sp),
|
SizedBox(width: 10.sp),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -100,7 +163,10 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.user.nickname,
|
item.user.nickname,
|
||||||
style: const TextStyle(color :Colors.white70,fontSize: 14, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp),
|
SizedBox(width: 4.sp),
|
||||||
// SizedBox(height: 8.sp),
|
// SizedBox(height: 8.sp),
|
||||||
@ -115,15 +181,20 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
item.user.signature,
|
item.user.signature,
|
||||||
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Pla
|
// Pla
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(onTap: (){
|
GestureDetector(
|
||||||
pushChatPage(item.user.id.toString(),item.accountId, item.user.nickname);
|
onTap: () {
|
||||||
|
if (logic.isVip > 0 || index < 3) {
|
||||||
|
pushChatPage(item.user.id.toString(), item.accountId,
|
||||||
|
item.user.nickname);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 60.sp,
|
width: 60.sp,
|
||||||
@ -133,21 +204,25 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
borderRadius: BorderRadius.circular(14.sp),
|
borderRadius: BorderRadius.circular(14.sp),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text("私聊", style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
child: Text("私聊",
|
||||||
)
|
style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
||||||
|
|
||||||
,
|
|
||||||
),),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),);
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
,
|
||||||
|
),)
|
||||||
|
,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Widget _buildInfoRow(UserListItem userInfoBean) {
|
Widget _buildInfoRow(UserListItem userInfoBean) {
|
||||||
String ageMsg = getAgeCOntent(userInfoBean.user.gender, userInfoBean.user.age,
|
String ageMsg = getAgeCOntent(
|
||||||
userInfoBean.user.role, userInfoBean.user.orientation);
|
userInfoBean.user.gender,
|
||||||
|
userInfoBean.user.age,
|
||||||
|
userInfoBean.user.role,
|
||||||
|
userInfoBean.user.orientation);
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -165,7 +240,7 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
ageMsg ,
|
ageMsg,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 10.sp,
|
fontSize: 10.sp,
|
||||||
@ -173,12 +248,10 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 6.sp),
|
SizedBox(width: 6.sp),
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _onRefresh() async {
|
void _onRefresh() async {
|
||||||
logic.page = 1;
|
logic.page = 1;
|
||||||
logic.initList();
|
logic.initList();
|
||||||
@ -188,4 +261,17 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
logic.page = logic.page + 1;
|
logic.page = logic.page + 1;
|
||||||
logic.initList();
|
logic.initList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showRechargeDialog() async {
|
||||||
|
Get.bottomSheet(
|
||||||
|
Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Open_vip_tipPage(false),
|
||||||
|
),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false)
|
||||||
|
.then((value) {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:circle_app/app/util/paymentUtil.dart';
|
import 'package:circle_app/util/paymentUtil.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -29,7 +29,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 339.sp,
|
width: 339.sp,
|
||||||
height: 330.sp,
|
height: 400.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
@ -65,10 +65,10 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
width: 339.sp,
|
width: 339.sp,
|
||||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的;3、谢绝只会白嫖的猎奇人士。',
|
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:\n\n1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;\n\n2、杜绝未入圈用户随意骚扰或影响已入圈的;\n\n3、谢绝只会白嫖的猎奇人士。',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color.fromRGBO(247, 250, 250, 0.8),
|
color: const Color.fromRGBO(247, 250, 250, 0.8),
|
||||||
fontSize: 12.sp)),
|
fontSize: 14.sp)),
|
||||||
)),
|
)),
|
||||||
Platform.isIOS
|
Platform.isIOS
|
||||||
? Container(
|
? Container(
|
||||||
@ -166,6 +166,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
IOSPayment.instance.iosPay(iosItem, cicleId, 1);
|
IOSPayment.instance.iosPay(iosItem, cicleId, 1);
|
||||||
} else {
|
} else {
|
||||||
unlockingPayment(cicleId, myCallback);
|
unlockingPayment(cicleId, myCallback);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:circle_app/app/util/paymentUtil.dart';
|
import 'package:circle_app/util/paymentUtil.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:io';
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:circle_app/app/splash/binding.dart';
|
import 'package:circle_app/app/splash/binding.dart';
|
||||||
import 'package:circle_app/app/util/paymentUtil.dart';
|
import 'package:circle_app/util/paymentUtil.dart';
|
||||||
import 'package:circle_app/common/values/pushconfig.dart';
|
import 'package:circle_app/common/values/pushconfig.dart';
|
||||||
import 'package:circle_app/network/api.dart';
|
import 'package:circle_app/network/api.dart';
|
||||||
import 'package:circle_app/network/dio_manager.dart';
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
@ -65,6 +65,10 @@ void uploadBuzIDAndToken() async {
|
|||||||
if(!isAgreemement){
|
if(!isAgreemement){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
initWxApi();
|
||||||
|
}
|
||||||
await ChannelPush.init((msg) {});
|
await ChannelPush.init((msg) {});
|
||||||
|
|
||||||
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||||
@ -264,9 +268,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
void initState() {
|
void initState() {
|
||||||
initIM();
|
initIM();
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
if (Platform.isAndroid) {
|
|
||||||
initWxApi();
|
|
||||||
}
|
|
||||||
|
|
||||||
// uploadBuzIDAndToken();
|
// uploadBuzIDAndToken();
|
||||||
loadBgImage();
|
loadBgImage();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
class Api {
|
class Api {
|
||||||
static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||||
|
|||||||
@ -45,6 +45,7 @@ Future<void> openWxPay(PaymentData data, WxPayCallback callback) async {
|
|||||||
if (event.isSuccessful) {
|
if (event.isSuccessful) {
|
||||||
showOKToast("微信支付成功");
|
showOKToast("微信支付成功");
|
||||||
callback(true, null);
|
callback(true, null);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print(event.errStr);
|
print(event.errStr);
|
||||||
showOKToast(event.errStr ?? "微信支付失败");
|
showOKToast(event.errStr ?? "微信支付失败");
|
||||||
|
|||||||
@ -58,3 +58,8 @@ class CallRefreshCircle {
|
|||||||
class ScrollToTop {
|
class ScrollToTop {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class RefreshUnread {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user