1.4.0代码提交
This commit is contained in:
parent
0a4c28d7bd
commit
ef2712f139
@ -80,15 +80,18 @@ PODS:
|
|||||||
- in_app_purchase_storekit (0.0.1):
|
- in_app_purchase_storekit (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- libwebp (1.2.4):
|
- libwebp (1.3.2):
|
||||||
- libwebp/demux (= 1.2.4)
|
- libwebp/demux (= 1.3.2)
|
||||||
- libwebp/mux (= 1.2.4)
|
- libwebp/mux (= 1.3.2)
|
||||||
- libwebp/webp (= 1.2.4)
|
- libwebp/sharpyuv (= 1.3.2)
|
||||||
- libwebp/demux (1.2.4):
|
- libwebp/webp (= 1.3.2)
|
||||||
|
- libwebp/demux (1.3.2):
|
||||||
- libwebp/webp
|
- libwebp/webp
|
||||||
- libwebp/mux (1.2.4):
|
- libwebp/mux (1.3.2):
|
||||||
- libwebp/demux
|
- libwebp/demux
|
||||||
- libwebp/webp (1.2.4)
|
- libwebp/sharpyuv (1.3.2)
|
||||||
|
- libwebp/webp (1.3.2):
|
||||||
|
- libwebp/sharpyuv
|
||||||
- local_notifications_for_us (0.0.1):
|
- local_notifications_for_us (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- Mantle (2.2.0):
|
- Mantle (2.2.0):
|
||||||
@ -110,12 +113,12 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- Reachability (3.2)
|
- Reachability (3.2)
|
||||||
- ReactiveObjC (3.1.1)
|
- ReactiveObjC (3.1.1)
|
||||||
- SDWebImage (5.16.0):
|
- SDWebImage (5.18.5):
|
||||||
- SDWebImage/Core (= 5.16.0)
|
- SDWebImage/Core (= 5.18.5)
|
||||||
- SDWebImage/Core (5.16.0)
|
- SDWebImage/Core (5.18.5)
|
||||||
- SDWebImageWebPCoder (0.12.0):
|
- SDWebImageWebPCoder (0.14.2):
|
||||||
- libwebp (~> 1.0)
|
- libwebp (~> 1.0)
|
||||||
- SDWebImage/Core (~> 5.16)
|
- SDWebImage/Core (~> 5.17)
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@ -323,7 +326,7 @@ SPEC CHECKSUMS:
|
|||||||
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
|
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
|
||||||
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
|
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
|
||||||
in_app_purchase_storekit: 4fb7ee9e824b1f09107fbfbbce8c4b276366dc43
|
in_app_purchase_storekit: 4fb7ee9e824b1f09107fbfbbce8c4b276366dc43
|
||||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
|
||||||
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
|
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
|
||||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
@ -334,8 +337,8 @@ SPEC CHECKSUMS:
|
|||||||
plain_notification_token_for_us: c804c7a9f79af55980cec08457cb8cdf73200db7
|
plain_notification_token_for_us: c804c7a9f79af55980cec08457cb8cdf73200db7
|
||||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||||
ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
|
ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
|
||||||
SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
|
SDWebImage: 7ac2b7ddc5e8484c79aa90fc4e30b149d6a2c88f
|
||||||
SDWebImageWebPCoder: f0f287cee4cd96a59937fbf3c77a8cfda9ba67b0
|
SDWebImageWebPCoder: 633b813fca24f1de5e076bcd7f720c038b23892b
|
||||||
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
||||||
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
|
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
|
||||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/app/chat/widget/wish_dialog.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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -21,7 +22,8 @@ class ChatMsgInventWishItem extends StatelessWidget {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (!(message.isSelf ?? false)) {
|
if (!(message.isSelf ?? false)) {
|
||||||
// showGiftPannel(giftData['id'].toString());
|
|
||||||
|
showWishPannel();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -81,12 +83,9 @@ class ChatMsgInventWishItem extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
showGiftPannel(String giftId) {
|
showWishPannel() {
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
ChatGiftPannel(
|
WishDialog(accId:message.userID!,),
|
||||||
accid: message.sender!.toString(),
|
|
||||||
giftId: giftId,
|
|
||||||
),
|
|
||||||
isScrollControlled: false,
|
isScrollControlled: false,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -336,6 +336,18 @@ class CircleLogic extends GetxController {
|
|||||||
} on Exception {}
|
} on Exception {}
|
||||||
update();
|
update();
|
||||||
} else if (bean.code == 21201) {
|
} else if (bean.code == 21201) {
|
||||||
|
showOKToast(bean.msg);
|
||||||
|
if (vicinityPage == 1) {
|
||||||
|
showVipDialog();
|
||||||
|
}
|
||||||
|
myVip = 0;
|
||||||
|
refreshController.loadComplete();
|
||||||
|
update();
|
||||||
|
} else if (bean.code == 21202) {
|
||||||
|
if (vicinityPage == 1) {
|
||||||
|
showVipDialog();
|
||||||
|
}
|
||||||
|
showOKToast(bean.msg);
|
||||||
myVip = 0;
|
myVip = 0;
|
||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
update();
|
update();
|
||||||
|
|||||||
@ -52,10 +52,18 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
|
var sub;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
sub = EventBusManager.on<ChangeIndex>().listen((event) {
|
||||||
|
currentIndex = event.index;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
currentIndex = Random().nextInt(3);
|
currentIndex = Random().nextInt(3);
|
||||||
_pageController = PageController(initialPage: currentIndex);
|
_pageController = PageController(initialPage: currentIndex);
|
||||||
_tabController =
|
_tabController =
|
||||||
@ -74,6 +82,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
sub.cancel();
|
||||||
_tabController.removeListener(_handleTabChange); // 移除监听
|
_tabController.removeListener(_handleTabChange); // 移除监听
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
_pageController.dispose();
|
_pageController.dispose();
|
||||||
@ -1175,3 +1184,9 @@ class OptionFindclass {
|
|||||||
|
|
||||||
OptionFindclass(this.genderList, this.orientationList, this.roleList);
|
OptionFindclass(this.genderList, this.orientationList, this.roleList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class ChangeIndex {
|
||||||
|
int index;
|
||||||
|
ChangeIndex(this.index);
|
||||||
|
}
|
||||||
@ -6,9 +6,12 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../common/Widgets/open_vip_tip/view.dart';
|
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||||
|
import '../../network/api.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
import '../../util/device.dart';
|
import '../../util/device.dart';
|
||||||
import '../../util/eventBus.dart';
|
import '../../util/eventBus.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
|
import '../minefragment/logic.dart';
|
||||||
import '../select_circle/logic.dart';
|
import '../select_circle/logic.dart';
|
||||||
|
|
||||||
typedef void ScreenCallback(List<int> genderList,List<int> orientationList,List<int> roleList);
|
typedef void ScreenCallback(List<int> genderList,List<int> orientationList,List<int> roleList);
|
||||||
@ -46,7 +49,13 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
}
|
}
|
||||||
StreamSubscription? subscription = null;
|
StreamSubscription? subscription = null;
|
||||||
void initGerder() async {
|
void initGerder() async {
|
||||||
myVip = await getVip();
|
|
||||||
|
var data = await DioManager.instance.get(url: Api.getUserMine);
|
||||||
|
var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||||
|
data, (data) => MineResponseBean.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
myVip = bean.data.user.vip;
|
||||||
|
}
|
||||||
subscription = EventBusManager.on<CommentVipEvent>().listen((event) {
|
subscription = EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||||
myVip = event.vip;
|
myVip = event.vip;
|
||||||
});
|
});
|
||||||
@ -228,6 +237,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if(myVip<1){
|
if(myVip<1){
|
||||||
|
showOKToast('开通VIP才能使用该功能哦~');
|
||||||
showRechargeDialog();
|
showRechargeDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -321,7 +331,8 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if(myVip<2){
|
if(myVip<2){
|
||||||
showRechargeDialog();
|
showOKToast('开通年VIP才可以使用该功能哦~');
|
||||||
|
showRechargeDialog(isYear: true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -393,14 +404,13 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
showRechargeDialog(){
|
showRechargeDialog({bool isYear = false}){
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: Open_vip_tipPage(true),
|
body: Open_vip_tipPage(isYear),
|
||||||
),
|
),
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: false);
|
enableDrag: false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,8 +114,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
text,
|
text,
|
||||||
) async {
|
) async {
|
||||||
print("收到新消息" + text);
|
print("收到新消息" + text);
|
||||||
unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString();
|
// unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString();
|
||||||
//getUnreadSize();
|
getUnreadSize();
|
||||||
}, onRecvC2CCustomMessage: (
|
}, onRecvC2CCustomMessage: (
|
||||||
String msgID,
|
String msgID,
|
||||||
V2TimUserInfo sender,
|
V2TimUserInfo sender,
|
||||||
@ -375,6 +375,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
|
|
||||||
updateIndex(int index) {
|
updateIndex(int index) {
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
|
getUnreadSize();
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
final logic = Get.put(CircleLogic());
|
final logic = Get.put(CircleLogic());
|
||||||
logic.loadCirclePeopleData();
|
logic.loadCirclePeopleData();
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class LoginLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void login() async {
|
void login() async {
|
||||||
if (!GetUtils.isPhoneNumber(phoneEditingController.text)) {
|
if (phoneEditingController.text.length != 11) {
|
||||||
showOKToast('请输入正确的手机号');
|
showOKToast('请输入正确的手机号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -164,6 +164,27 @@ class LoginLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.put(url: Api.refreshToken, params: {});
|
||||||
|
var bean = BaseResponse<LoginData>.fromJson(
|
||||||
|
data, (data) => LoginData.fromJson(data));
|
||||||
|
if (bean.code == 200) {
|
||||||
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
|
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,
|
||||||
|
bean.data!.Authorization.toString());
|
||||||
|
});
|
||||||
|
Get.offNamed(AppRoutes.Home);
|
||||||
|
return;
|
||||||
|
} else if (bean.code == 30002) {
|
||||||
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
|
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,
|
||||||
|
bean.data!.Authorization.toString());
|
||||||
|
Get.offNamed(AppRoutes.Complete_materialPage);
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -104,9 +104,9 @@ class MinefragmentLogic extends GetxController {
|
|||||||
|
|
||||||
if (userInfoBean != null) {
|
if (userInfoBean != null) {
|
||||||
avatar = userInfoBean!.avatarThumb;
|
avatar = userInfoBean!.avatarThumb;
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar);
|
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar ?? '');
|
||||||
name = userInfoBean!.nickname;
|
name = userInfoBean!.nickname;
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.NAME, name);
|
sharedPreferences.setString(SharedPreferencesHelper.NAME, name ?? '');
|
||||||
gender = userInfoBean!.gender;
|
gender = userInfoBean!.gender;
|
||||||
role = userInfoBean!.role;
|
role = userInfoBean!.role;
|
||||||
age = userInfoBean!.age;
|
age = userInfoBean!.age;
|
||||||
|
|||||||
@ -171,15 +171,10 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
bool hasMore = true;
|
bool hasMore = true;
|
||||||
List<String> chatImIdList = [];
|
List<String> chatImIdList = [];
|
||||||
Map recommendCircleFriendData = {};
|
Map recommendCircleFriendData = {};
|
||||||
|
|
||||||
|
|
||||||
var sub;
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
sub = EventBusManager.on().listen((event) {
|
|
||||||
loadRecommendCircleFriendData();
|
|
||||||
});
|
|
||||||
loadRecommendCircleFriendData();
|
loadRecommendCircleFriendData();
|
||||||
final controller = getController();
|
final controller = getController();
|
||||||
widget.scrollController!.addListener(() {
|
widget.scrollController!.addListener(() {
|
||||||
@ -397,7 +392,6 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
sub.cancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -795,12 +789,38 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
user.nickname ?? '',
|
children: [
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontSize: 16.sp,
|
user.nickname ?? '',
|
||||||
color: Color(0XFFF7FAFA),
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold),
|
fontSize: 16.sp,
|
||||||
|
color: Color(0XFFF7FAFA),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
SizedBox(width: 8.sp,),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ShaderMask(
|
||||||
|
shaderCallback: (Rect bounds) {
|
||||||
|
return const LinearGradient(
|
||||||
|
begin: Alignment.centerRight,
|
||||||
|
end: Alignment.centerLeft,
|
||||||
|
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||||
|
).createShader(Offset.zero & bounds.size);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'匹配度' + (recommendCircleFriendData['recommend_score'].toString() ?? '') + '%',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.sp,),
|
SizedBox(height: 4.sp,),
|
||||||
Row(
|
Row(
|
||||||
@ -1105,6 +1125,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
recommendCircleFriendData = data['data'][0];
|
recommendCircleFriendData = data['data'][0];
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
} else {
|
||||||
|
showOKToast(data['msg']);
|
||||||
|
if (data['code'] == 21201 || data['code'] == 21202) {
|
||||||
|
showVipDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,9 +139,11 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
|
|||||||
if (userInfo!.customInfo!.containsKey('Vip')) {
|
if (userInfo!.customInfo!.containsKey('Vip')) {
|
||||||
if (userInfo!.customInfo!['Vip'] != null) {
|
if (userInfo!.customInfo!['Vip'] != null) {
|
||||||
String infoStr = userInfo!.customInfo!['Vip']!;
|
String infoStr = userInfo!.customInfo!['Vip']!;
|
||||||
Map infoMap = jsonDecode(infoStr);
|
if (infoStr.isNotEmpty) {
|
||||||
if (infoMap.containsKey('type')) {
|
Map infoMap = jsonDecode(infoStr);
|
||||||
vipType = infoMap['type'];
|
if (infoMap.containsKey('type')) {
|
||||||
|
vipType = infoMap['type'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,36 +13,100 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
|
V2TimConversation? con;
|
||||||
int page = 0;
|
int page = 0;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
bool isMore = true;
|
bool isMore = true;
|
||||||
List<Lists> lists = [];
|
List<Lists> lists = [];
|
||||||
|
|
||||||
|
List<V2TimMessage> msgLists = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
makeRead();
|
makeRead();
|
||||||
initList();
|
con = Get.arguments;
|
||||||
|
if (con!.showName! == '互动通知') {
|
||||||
|
// 拉取单聊历史消息
|
||||||
|
loadMsgList();
|
||||||
|
} else {
|
||||||
|
initList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
loadMsgList() async {
|
||||||
|
String msgId = '';
|
||||||
|
if (msgLists.isNotEmpty) {
|
||||||
|
msgId = msgLists.last.msgID!;
|
||||||
|
}
|
||||||
|
var result = await TencentImSDKPlugin.v2TIMManager.getMessageManager().getC2CHistoryMessageList(
|
||||||
|
userID: con!.userID!,
|
||||||
|
count: 10,
|
||||||
|
lastMsgID: msgId.isNotEmpty ? msgId : null,
|
||||||
|
);
|
||||||
|
if (result.code == 0) {
|
||||||
|
if (result.data!.isNotEmpty) {
|
||||||
|
if (msgLists.isNotEmpty) {
|
||||||
|
msgLists.addAll(result.data!);
|
||||||
|
} else {
|
||||||
|
msgLists = result.data!;
|
||||||
|
}
|
||||||
|
refreshController.loadComplete();
|
||||||
|
} else {
|
||||||
|
isMore = false;
|
||||||
|
refreshController.loadNoData();
|
||||||
|
}
|
||||||
|
isLoad = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initList() async {
|
initList() async {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
lists.clear();
|
lists.clear();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 系统
|
||||||
|
// */
|
||||||
|
// SYSTEM(1, 100),
|
||||||
|
// /**
|
||||||
|
// * 活动驿站
|
||||||
|
// */
|
||||||
|
// ACTIVITY(2, 101),
|
||||||
|
// /**
|
||||||
|
// * 会员中心
|
||||||
|
// */
|
||||||
|
// VIP(3, 102),
|
||||||
|
// /**
|
||||||
|
// * 资产中心
|
||||||
|
// */
|
||||||
|
// WALLET(4, 103),
|
||||||
|
// /**
|
||||||
|
// * 乐园圈子
|
||||||
|
// */
|
||||||
|
// GROUP(5, 104);
|
||||||
|
|
||||||
|
|
||||||
|
Map typeMap = {
|
||||||
|
'官方通知':1,
|
||||||
|
'活动驿站':2,
|
||||||
|
'会员中心':3,
|
||||||
|
'资产中心':4,
|
||||||
|
'乐园圈子':5,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
int type = typeMap.containsKey(con!.showName! ?? '') ? typeMap[con!.showName!] : 1;
|
||||||
|
|
||||||
var data =
|
var data =
|
||||||
await DioManager.instance.get(url: Api.getNotices, params: {
|
await DioManager.instance.get(url: Api.getNotices+ '/${type}', params: {
|
||||||
'last_id':page > 0 ? page : '','size':'10'
|
'last_id':page > 0 ? page : '','size':'10',
|
||||||
});
|
});
|
||||||
// pagevar bean = BaseResponse<UserList>.fromJson(
|
|
||||||
// data, (data) => UserList.fromJson(data));
|
|
||||||
// if (bean.isSuccess()) {
|
|
||||||
// lists.addAll(bean.data.lists);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
List bean = data['data']['lists'];
|
List bean = data['data']['lists'];
|
||||||
@ -59,7 +123,10 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
isLoad = false;
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if (page == 0) {
|
if (page == 0) {
|
||||||
page = lists.last.id!;
|
|
||||||
|
if(lists.isNotEmpty) {
|
||||||
|
page = lists.last.id!;
|
||||||
|
}
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
} else {
|
} else {
|
||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
@ -68,6 +135,7 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
|
|
||||||
void onRefresh() async {
|
void onRefresh() async {
|
||||||
page = 0;
|
page = 0;
|
||||||
|
|
||||||
initList();
|
initList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,6 +149,16 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onLoadingMsgList() {
|
||||||
|
if (isMore) {
|
||||||
|
loadMsgList();
|
||||||
|
} else {
|
||||||
|
refreshController.loadNoData();
|
||||||
|
}
|
||||||
|
// page = page + 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void makeRead() async {
|
void makeRead() async {
|
||||||
V2TimConversation con = Get.arguments;
|
V2TimConversation con = Get.arguments;
|
||||||
V2TimCallback markC2CMessageAsReadRes = await TencentImSDKPlugin
|
V2TimCallback markC2CMessageAsReadRes = await TencentImSDKPlugin
|
||||||
@ -117,7 +195,7 @@ class Lists {
|
|||||||
Lists.fromJson(Map<String, dynamic> json) {
|
Lists.fromJson(Map<String, dynamic> json) {
|
||||||
content = json['content'];
|
content = json['content'];
|
||||||
createTime = json['createTime'];
|
createTime = json['createTime'];
|
||||||
id = json['id'];
|
id = json['id'] ?? 0;
|
||||||
image = json['image'];
|
image = json['image'];
|
||||||
note = json['note'];
|
note = json['note'];
|
||||||
scene = json['scene'];
|
scene = json['scene'];
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: "官方通知",
|
centerTitle: logic.con != null ? logic.con!.showName! ?? '' : '',
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -38,23 +38,39 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: logic.isLoad
|
child: logic.isLoad
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
: logic.lists.isEmpty
|
: logic.lists.isEmpty && logic.msgLists.isEmpty
|
||||||
? noResultWidget()
|
? noResultWidget()
|
||||||
: SmartRefresher(
|
: logic.msgLists.isNotEmpty
|
||||||
controller: logic.refreshController,
|
? SmartRefresher(
|
||||||
enablePullUp: true,
|
controller: logic.refreshController,
|
||||||
onRefresh: logic.onRefresh,
|
enablePullUp: true,
|
||||||
onLoading: () {
|
enablePullDown:false,
|
||||||
logic.onLoading();
|
onLoading: () {
|
||||||
},
|
logic.onLoadingMsgList();
|
||||||
child: ListView.builder(
|
},
|
||||||
padding: EdgeInsets.all(10.sp),
|
child: ListView.builder(
|
||||||
itemCount: logic.lists.length,
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemBuilder: (context, index) {
|
itemCount: logic.msgLists.length,
|
||||||
return ListItem(logic.lists[index]);
|
itemBuilder: (context, index) {
|
||||||
},
|
return msgItem(logic.msgLists![index]);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: SmartRefresher(
|
||||||
|
controller: logic.refreshController,
|
||||||
|
enablePullUp: true,
|
||||||
|
onRefresh: logic.onRefresh,
|
||||||
|
onLoading: () {
|
||||||
|
logic.onLoading();
|
||||||
|
},
|
||||||
|
child: ListView.builder(
|
||||||
|
padding: EdgeInsets.all(10.sp),
|
||||||
|
itemCount: logic.lists.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ListItem(logic.lists[index]);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -62,6 +78,142 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msgItem(V2TimMessage data) {
|
||||||
|
|
||||||
|
Map<String, dynamic> info = jsonDecode(data.customElem!.data!);
|
||||||
|
if (info['ta'] != null) {
|
||||||
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
|
||||||
|
if (info.containsKey('scene')) {
|
||||||
|
if (info['scene'] != null) {
|
||||||
|
String param = info['param'];
|
||||||
|
pushPage(info['scene'], param,name: info['ta']['nickname'] ?? '');
|
||||||
|
} else {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||||
|
arguments: info['ta']['id'].toString());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||||
|
arguments: info['ta']['id'].toString());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 10.sp),
|
||||||
|
// padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ClipOval(
|
||||||
|
child: Image.network(
|
||||||
|
info['ta']['avatarUrl'] != null
|
||||||
|
? info['ta']['avatarUrl'].toString().isNotEmpty
|
||||||
|
? info['ta']['avatarUrl']
|
||||||
|
: 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png'
|
||||||
|
: 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png',
|
||||||
|
width: 50.sp,
|
||||||
|
height: 50.sp,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 8.sp),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
info['ta']['nickname'] ?? '',
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 4.sp,
|
||||||
|
// ),
|
||||||
|
// Image.asset(
|
||||||
|
// getMineImage(sexList[info['ta']['gender'] ?? 1]),
|
||||||
|
// width: 24.sp,
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 2.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: Get.width - 100.sp,
|
||||||
|
child: Text(
|
||||||
|
info['msg'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white54,
|
||||||
|
fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
info['noticeTime'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white54,
|
||||||
|
fontSize: 12.sp,),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
// "description" -> "您的喊话已通过审核,可前往【全球喊话】页面查看,多发布优质喊话并积极参与互动会有更多人给您响应哦~"
|
||||||
|
} else if (info.containsKey('description')) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 15.sp, left: 15.sp, right: 15.sp),
|
||||||
|
// padding: EdgeInsets.only(),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
color: Color(0xFF292836)),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (info.containsKey('coverUrl'))
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.sp),
|
||||||
|
topRight: Radius.circular(10.sp)),
|
||||||
|
child: Image.network(
|
||||||
|
info['coverUrl'],
|
||||||
|
width: Get.width,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
height: 114.sp,
|
||||||
|
)),
|
||||||
|
if (info.containsKey('title'))
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 15.sp, right: 17.sp, top: 8.sp),
|
||||||
|
child: Text(
|
||||||
|
info['title'],
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 15.sp, right: 15.sp, top: 8.sp, bottom: 10.sp),
|
||||||
|
child: Text(
|
||||||
|
info['description'],
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListItem(Lists data) {
|
ListItem(Lists data) {
|
||||||
V2TimConversation con = Get.arguments;
|
V2TimConversation con = Get.arguments;
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
@ -103,39 +255,23 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
widgets.add(GestureDetector(
|
widgets.add(GestureDetector(
|
||||||
onTap: () async{
|
onTap: () async {
|
||||||
switch(data.scene){
|
if (data.scene == 'url') {
|
||||||
case 'url':
|
Map<String, dynamic> bean = json.decode(data.note!);
|
||||||
Map<String, dynamic> bean = json.decode(data.note!);
|
String url = bean['url'];
|
||||||
String url = bean['url'];
|
|
||||||
|
|
||||||
|
|
||||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
|
||||||
'title': "",
|
|
||||||
"url": url
|
|
||||||
});
|
|
||||||
// Get.toNamed(AppRoutes.WebViewActivity,
|
|
||||||
// arguments: {"url":jsonDecode(url)} );
|
|
||||||
break;
|
|
||||||
case "my_main":
|
|
||||||
final homeLogic = Get.put(HomeLogic());
|
|
||||||
homeLogic.tabController.animateTo(3);
|
|
||||||
homeLogic.updateIndex(3);
|
|
||||||
|
|
||||||
Get.back();
|
|
||||||
|
|
||||||
break;
|
|
||||||
case "user_home":
|
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity);
|
|
||||||
break;
|
|
||||||
case "none":
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
|
Get.toNamed(AppRoutes.WebViewActivity,
|
||||||
|
arguments: {'title': "", "url": url});
|
||||||
|
} else {
|
||||||
|
if (data.note == null) {
|
||||||
|
// Map<String, dynamic> bean = json.decode(data.note!);
|
||||||
|
pushPage(data.scene!, '');
|
||||||
|
} else {
|
||||||
|
Map<String, dynamic> bean = json.decode(data.note!);
|
||||||
|
pushPage(data.scene!, bean['param']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(bottom: 8.sp, left: 16.sp),
|
margin: EdgeInsets.only(bottom: 8.sp, left: 16.sp),
|
||||||
|
|||||||
@ -42,6 +42,8 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
bool isSuccess = await createCustomMsg(data['data']['account_id'].toString().split('_').last,data['data']['account_id']);
|
bool isSuccess = await createCustomMsg(data['data']['account_id'].toString().split('_').last,data['data']['account_id']);
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
await sendTextMsg(data['data']['account_id']);
|
await sendTextMsg(data['data']['account_id']);
|
||||||
|
} else {
|
||||||
|
logic.listScrollController.animateTo(0, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);
|
||||||
}
|
}
|
||||||
} else if(data['code'] == 21201){
|
} else if(data['code'] == 21201){
|
||||||
showOKToast(data['msg']);
|
showOKToast(data['msg']);
|
||||||
|
|||||||
@ -286,7 +286,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
controller.index = index;
|
controller.index = index;
|
||||||
controller.update();
|
controller.update();
|
||||||
}else{
|
}else{
|
||||||
showOKToast("只有年会员才可使用至尊喊话哦~");
|
showOKToast("只有年会员才可使用该功能哦~");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -38,6 +38,12 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showOKToast(data['msg']);
|
||||||
|
Get.back();
|
||||||
|
if (data['code'] == 21201 || data['code'] == 21202) {
|
||||||
|
showVipDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,12 +174,38 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
user.nickname ?? '',
|
children: [
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontSize: 16.sp,
|
user.nickname ?? '',
|
||||||
color: Color(0XFFF7FAFA),
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold),
|
fontSize: 16.sp,
|
||||||
|
color: Color(0XFFF7FAFA),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
SizedBox(width: 4.sp,),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
ShaderMask(
|
||||||
|
shaderCallback: (Rect bounds) {
|
||||||
|
return const LinearGradient(
|
||||||
|
begin: Alignment.centerRight,
|
||||||
|
end: Alignment.centerLeft,
|
||||||
|
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||||
|
).createShader(Offset.zero & bounds.size);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'匹配度' + (recommendCircleFriendData['recommend_score'].toString() ?? '') + '%',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 4.sp,
|
height: 4.sp,
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
class Api {
|
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/';
|
||||||
|
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
@ -172,7 +172,7 @@ class Api {
|
|||||||
|
|
||||||
|
|
||||||
//附近列表
|
//附近列表
|
||||||
static const postNearbyList = 'user-service/nearby/queryNearByUserList';
|
static const postNearbyList = '/user-service/nearby/queryNearByUserList/v2';
|
||||||
|
|
||||||
|
|
||||||
//获取IM配置信息
|
//获取IM配置信息
|
||||||
@ -193,7 +193,7 @@ class Api {
|
|||||||
static const getMatch = 'msg-service/im/chat/match';
|
static const getMatch = 'msg-service/im/chat/match';
|
||||||
|
|
||||||
//系统通知
|
//系统通知
|
||||||
static const getNotices = 'msg-service/system/notices';
|
static const getNotices = 'msg-service/notices';
|
||||||
|
|
||||||
|
|
||||||
//敏感词-屏蔽词 校验
|
//敏感词-屏蔽词 校验
|
||||||
@ -299,7 +299,7 @@ class Api {
|
|||||||
static const chatRecord = '/msg-service/message/chat/log/save';
|
static const chatRecord = '/msg-service/message/chat/log/save';
|
||||||
|
|
||||||
//聊天推荐圈友
|
//聊天推荐圈友
|
||||||
static const chatRecommendFriend = '/msg-service/im/chat/recommend';
|
static const chatRecommendFriend = '/msg-service/im/chat/recommend/v2';
|
||||||
//是否显示送礼物
|
//是否显示送礼物
|
||||||
static const isShow_give_gift = '/msg-service/message/show_give_gift/';
|
static const isShow_give_gift = '/msg-service/message/show_give_gift/';
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:circle_app/common/errorcode.dart';
|
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
||||||
|
|
||||||
import '../util/SharedPreferencesHelper.dart';
|
import '../util/SharedPreferencesHelper.dart';
|
||||||
import '../util/device.dart';
|
import '../util/device.dart';
|
||||||
@ -257,8 +255,8 @@ class DioManager {
|
|||||||
pushLoginPage();
|
pushLoginPage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState) && responseMap["code"] != 21201) {
|
if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState) && responseMap["code"] != 21201 && responseMap['code'] != 404) {
|
||||||
showOKToast(responseMap['msg']);
|
showOKToast(responseMap['msg']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return responseMap;
|
return responseMap;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'dart:io';
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:circle_app/app/chat/view.dart';
|
import 'package:circle_app/app/chat/view.dart';
|
||||||
|
import 'package:circle_app/app/circle/view.dart';
|
||||||
import 'package:circle_app/app/circle/widgets/discover.dart';
|
import 'package:circle_app/app/circle/widgets/discover.dart';
|
||||||
import 'package:circle_app/app/userinfo/logic.dart';
|
import 'package:circle_app/app/userinfo/logic.dart';
|
||||||
import 'package:circle_app/common/values/values.dart';
|
import 'package:circle_app/common/values/values.dart';
|
||||||
@ -10,6 +11,8 @@ import 'package:circle_app/main.dart';
|
|||||||
import 'package:circle_app/network/api.dart';
|
import 'package:circle_app/network/api.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:circle_app/util/eventBus.dart';
|
import 'package:circle_app/util/eventBus.dart';
|
||||||
|
import 'package:event_bus/event_bus.dart';
|
||||||
|
import 'package:flutter/foundation.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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -24,7 +27,9 @@ import 'package:url_launcher/url_launcher.dart';
|
|||||||
import 'package:video_compress/video_compress.dart';
|
import 'package:video_compress/video_compress.dart';
|
||||||
|
|
||||||
import '../app/circle/logic.dart';
|
import '../app/circle/logic.dart';
|
||||||
|
import '../app/home/logic.dart';
|
||||||
import '../app/select_circle/logic.dart';
|
import '../app/select_circle/logic.dart';
|
||||||
|
import '../common/Widgets/open_vip_tip/view.dart';
|
||||||
import '../network/dio_manager.dart';
|
import '../network/dio_manager.dart';
|
||||||
import 'SharedPreferencesHelper.dart';
|
import 'SharedPreferencesHelper.dart';
|
||||||
|
|
||||||
@ -214,6 +219,7 @@ List<String> orientationList = [];
|
|||||||
List<String> roleList = [];
|
List<String> roleList = [];
|
||||||
|
|
||||||
String getGenderContent(int number) {
|
String getGenderContent(int number) {
|
||||||
|
if (number == null) return '';
|
||||||
if (genderList.length != 0) {
|
if (genderList.length != 0) {
|
||||||
return genderList[number - 1];
|
return genderList[number - 1];
|
||||||
} else {
|
} else {
|
||||||
@ -914,3 +920,67 @@ Future<List<V2TimUserFullInfo>> loadConverstationListData() async {
|
|||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showVipDialog() {
|
||||||
|
Get.bottomSheet(
|
||||||
|
Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Open_vip_tipPage(false),
|
||||||
|
),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false).then((value) {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
pushPage(String action,String param,{String name = ''}) {
|
||||||
|
// public final static String MY_MAIN = "my_main";//我的主页
|
||||||
|
// public final static String MY_USER_HOME = "my_user_home";//我的个人主页
|
||||||
|
// public final static String TO_USER_HOME = "to_user_home";//他人用户主页
|
||||||
|
// public final static String MY_GIFT_HALL = "my_gift_hall";//礼物馆
|
||||||
|
// public final static String TO_GIFT_HALL = "to_gift_hall";//他人礼物馆
|
||||||
|
// public final static String USER_HOME_CALLOUT = "user_home_callout";//个人主页喊话栏目
|
||||||
|
// public final static String CHAT = "chat";//私聊
|
||||||
|
// public final static String STORY_PERSONAGE = "story_personage";//故事达人
|
||||||
|
// public final static String FIND_PAGE = "find_page";//发现栏目
|
||||||
|
// public final static String CUSTOM_SERVICE = "custom_service";//客服
|
||||||
|
// public final static String INVITE = "invite";//邀请页
|
||||||
|
// public final static String WALLET = "wallet";//个人资产/钱包
|
||||||
|
if (action == 'my_main') {
|
||||||
|
final homeLogic = Get.put(HomeLogic());
|
||||||
|
homeLogic.tabController.animateTo(3);
|
||||||
|
homeLogic.updateIndex(3);
|
||||||
|
Get.back();
|
||||||
|
} else if (action == 'my_user_home') {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
|
} else if (action == 'find_page') {
|
||||||
|
final homeLogic = Get.put(HomeLogic());
|
||||||
|
homeLogic.tabController.animateTo(0);
|
||||||
|
homeLogic.updateIndex(0);
|
||||||
|
Get.back();
|
||||||
|
EventBusManager.fire(ChangeIndex(2));
|
||||||
|
} else if (action == 'to_user_home' || action == 'user_home_callout') {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,arguments: param);
|
||||||
|
} else if (action == 'my_gift_hall') {
|
||||||
|
Get.toNamed(AppRoutes.GiftShopPage,arguments: '');
|
||||||
|
} else if (action == 'to_gift_hall') {
|
||||||
|
Get.toNamed(AppRoutes.GiftShopPage,arguments: param);
|
||||||
|
} else if (action == 'invite') {
|
||||||
|
Get.toNamed(AppRoutes.Invite);
|
||||||
|
} else if (action == 'wallet') {
|
||||||
|
Get.toNamed(AppRoutes.MyAssets);
|
||||||
|
} else if (action == 'chat') {
|
||||||
|
pushChatPage(param.split('_').last, param, name);
|
||||||
|
} else if (action == 'custom_service') {
|
||||||
|
var con;
|
||||||
|
if(kDebugMode){
|
||||||
|
con = V2TimConversation(
|
||||||
|
conversationID: "c2c_qpqz_dev_10_102", userID: "qpqz_dev_10_102", showName: "测试乐园客服", type: 1);
|
||||||
|
}else{
|
||||||
|
con = V2TimConversation(
|
||||||
|
conversationID: "c2c_qpqz_prod_10_102", userID: "qpqz_prod_10_102", showName: "乐园客服", type: 1);
|
||||||
|
}
|
||||||
|
Get.toNamed(AppRoutes.Chat, arguments: con);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -614,14 +614,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.3"
|
version: "1.1.3"
|
||||||
flutter_install_app:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_install_app
|
|
||||||
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
flutter_intl:
|
flutter_intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user