1.4.0代码提交

This commit is contained in:
CYH 2023-12-26 19:18:42 +08:00
parent 0a4c28d7bd
commit ef2712f139
19 changed files with 526 additions and 130 deletions

View File

@ -80,15 +80,18 @@ PODS:
- in_app_purchase_storekit (0.0.1):
- Flutter
- FlutterMacOS
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.2.4):
- libwebp/mux (1.3.2):
- 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):
- Flutter
- Mantle (2.2.0):
@ -110,12 +113,12 @@ PODS:
- Flutter
- Reachability (3.2)
- ReactiveObjC (3.1.1)
- SDWebImage (5.16.0):
- SDWebImage/Core (= 5.16.0)
- SDWebImage/Core (5.16.0)
- SDWebImageWebPCoder (0.12.0):
- SDWebImage (5.18.5):
- SDWebImage/Core (= 5.18.5)
- SDWebImage/Core (5.18.5)
- SDWebImageWebPCoder (0.14.2):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.16)
- SDWebImage/Core (~> 5.17)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
@ -323,7 +326,7 @@ SPEC CHECKSUMS:
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
in_app_purchase_storekit: 4fb7ee9e824b1f09107fbfbbce8c4b276366dc43
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
@ -334,8 +337,8 @@ SPEC CHECKSUMS:
plain_notification_token_for_us: c804c7a9f79af55980cec08457cb8cdf73200db7
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
SDWebImageWebPCoder: f0f287cee4cd96a59937fbf3c77a8cfda9ba67b0
SDWebImage: 7ac2b7ddc5e8484c79aa90fc4e30b149d6a2c88f
SDWebImageWebPCoder: 633b813fca24f1de5e076bcd7f720c038b23892b
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f

View File

@ -1,6 +1,7 @@
import 'dart:convert';
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_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -21,7 +22,8 @@ class ChatMsgInventWishItem extends StatelessWidget {
return GestureDetector(
onTap: () {
if (!(message.isSelf ?? false)) {
// showGiftPannel(giftData['id'].toString());
showWishPannel();
}
},
child: Container(
@ -81,12 +83,9 @@ class ChatMsgInventWishItem extends StatelessWidget {
);
}
showGiftPannel(String giftId) {
showWishPannel() {
Get.bottomSheet(
ChatGiftPannel(
accid: message.sender!.toString(),
giftId: giftId,
),
WishDialog(accId:message.userID!,),
isScrollControlled: false,
enableDrag: false,
);

View File

@ -336,6 +336,18 @@ class CircleLogic extends GetxController {
} on Exception {}
update();
} 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;
refreshController.loadComplete();
update();

View File

@ -52,10 +52,18 @@ class _CirclePageState extends State<CirclePage>
@override
bool get wantKeepAlive => true;
var sub;
@override
void initState() {
super.initState();
sub = EventBusManager.on<ChangeIndex>().listen((event) {
currentIndex = event.index;
setState(() {
});
});
currentIndex = Random().nextInt(3);
_pageController = PageController(initialPage: currentIndex);
_tabController =
@ -74,6 +82,7 @@ class _CirclePageState extends State<CirclePage>
@override
void dispose() {
sub.cancel();
_tabController.removeListener(_handleTabChange); //
_tabController.dispose();
_pageController.dispose();
@ -1175,3 +1184,9 @@ class OptionFindclass {
OptionFindclass(this.genderList, this.orientationList, this.roleList);
}
class ChangeIndex {
int index;
ChangeIndex(this.index);
}

View File

@ -6,9 +6,12 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../common/Widgets/open_vip_tip/view.dart';
import '../../network/api.dart';
import '../../network/dio_manager.dart';
import '../../util/device.dart';
import '../../util/eventBus.dart';
import '../../util/util.dart';
import '../minefragment/logic.dart';
import '../select_circle/logic.dart';
typedef void ScreenCallback(List<int> genderList,List<int> orientationList,List<int> roleList);
@ -46,7 +49,13 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
}
StreamSubscription? subscription = null;
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) {
myVip = event.vip;
});
@ -228,6 +237,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
return GestureDetector(
onTap: () {
if(myVip<1){
showOKToast('开通VIP才能使用该功能哦~');
showRechargeDialog();
return;
}
@ -321,7 +331,8 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
return GestureDetector(
onTap: () {
if(myVip<2){
showRechargeDialog();
showOKToast('开通年VIP才可以使用该功能哦~');
showRechargeDialog(isYear: true);
return;
}
setState(() {
@ -393,14 +404,13 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
);
}
showRechargeDialog(){
showRechargeDialog({bool isYear = false}){
Get.bottomSheet(
Scaffold(
backgroundColor: Colors.transparent,
body: Open_vip_tipPage(true),
body: Open_vip_tipPage(isYear),
),
isScrollControlled: true,
enableDrag: false);
}
}

View File

@ -114,8 +114,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
text,
) async {
print("收到新消息" + text);
unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString();
//getUnreadSize();
// unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString();
getUnreadSize();
}, onRecvC2CCustomMessage: (
String msgID,
V2TimUserInfo sender,
@ -375,6 +375,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
updateIndex(int index) {
currentIndex = index;
getUnreadSize();
if (index == 0) {
final logic = Get.put(CircleLogic());
logic.loadCirclePeopleData();

View File

@ -106,7 +106,7 @@ class LoginLogic extends GetxController {
}
void login() async {
if (!GetUtils.isPhoneNumber(phoneEditingController.text)) {
if (phoneEditingController.text.length != 11) {
showOKToast('请输入正确的手机号');
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;
}
}

View File

@ -104,9 +104,9 @@ class MinefragmentLogic extends GetxController {
if (userInfoBean != null) {
avatar = userInfoBean!.avatarThumb;
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar);
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar ?? '');
name = userInfoBean!.nickname;
sharedPreferences.setString(SharedPreferencesHelper.NAME, name);
sharedPreferences.setString(SharedPreferencesHelper.NAME, name ?? '');
gender = userInfoBean!.gender;
role = userInfoBean!.role;
age = userInfoBean!.age;

View File

@ -171,15 +171,10 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
bool hasMore = true;
List<String> chatImIdList = [];
Map recommendCircleFriendData = {};
var sub;
@override
void initState() {
super.initState();
sub = EventBusManager.on().listen((event) {
loadRecommendCircleFriendData();
});
loadRecommendCircleFriendData();
final controller = getController();
widget.scrollController!.addListener(() {
@ -397,7 +392,6 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
@override
void dispose() {
super.dispose();
sub.cancel();
}
@override
@ -794,6 +788,8 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
user.nickname ?? '',
@ -802,6 +798,30 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
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,),
Row(
children: [
@ -1105,6 +1125,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
if (data['code'] == 200) {
recommendCircleFriendData = data['data'][0];
setState(() {});
} else {
showOKToast(data['msg']);
if (data['code'] == 21201 || data['code'] == 21202) {
showVipDialog();
}
}
}
}

View File

@ -139,6 +139,7 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
if (userInfo!.customInfo!.containsKey('Vip')) {
if (userInfo!.customInfo!['Vip'] != null) {
String infoStr = userInfo!.customInfo!['Vip']!;
if (infoStr.isNotEmpty) {
Map infoMap = jsonDecode(infoStr);
if (infoMap.containsKey('type')) {
vipType = infoMap['type'];
@ -146,6 +147,7 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
}
}
}
}
final TUITheme theme = value.theme;
final isDesktopScreen =
TUIKitScreenUtils.getFormFactor(context) == DeviceType.Desktop;

View File

@ -13,36 +13,100 @@ class Sys_notify_listLogic extends GetxController {
}
final RefreshController refreshController = RefreshController();
V2TimConversation? con;
int page = 0;
int isVip = 0;
bool isLoad = true;
bool isMore = true;
List<Lists> lists = [];
List<V2TimMessage> msgLists = [];
@override
void onInit() async {
super.onInit();
makeRead();
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 {
if (page == 1) {
lists.clear();
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 =
await DioManager.instance.get(url: Api.getNotices, params: {
'last_id':page > 0 ? page : '','size':'10'
await DioManager.instance.get(url: Api.getNotices+ '/${type}', params: {
'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) {
List bean = data['data']['lists'];
@ -59,7 +123,10 @@ class Sys_notify_listLogic extends GetxController {
isLoad = false;
update();
if (page == 0) {
if(lists.isNotEmpty) {
page = lists.last.id!;
}
refreshController.refreshCompleted();
} else {
refreshController.loadComplete();
@ -68,6 +135,7 @@ class Sys_notify_listLogic extends GetxController {
void onRefresh() async {
page = 0;
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 {
V2TimConversation con = Get.arguments;
V2TimCallback markC2CMessageAsReadRes = await TencentImSDKPlugin
@ -117,7 +195,7 @@ class Lists {
Lists.fromJson(Map<String, dynamic> json) {
content = json['content'];
createTime = json['createTime'];
id = json['id'];
id = json['id'] ?? 0;
image = json['image'];
note = json['note'];
scene = json['scene'];

View File

@ -30,7 +30,7 @@ class Sys_notify_listPage extends StatelessWidget {
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: "官方通知",
centerTitle: logic.con != null ? logic.con!.showName! ?? '' : '',
),
body: Container(
width: Get.width,
@ -38,8 +38,24 @@ class Sys_notify_listPage extends StatelessWidget {
child: SafeArea(
child: logic.isLoad
? loaddingWidget(true)
: logic.lists.isEmpty
: logic.lists.isEmpty && logic.msgLists.isEmpty
? noResultWidget()
: logic.msgLists.isNotEmpty
? SmartRefresher(
controller: logic.refreshController,
enablePullUp: true,
enablePullDown:false,
onLoading: () {
logic.onLoadingMsgList();
},
child: ListView.builder(
padding: EdgeInsets.all(10.sp),
itemCount: logic.msgLists.length,
itemBuilder: (context, index) {
return msgItem(logic.msgLists![index]);
},
),
)
: SmartRefresher(
controller: logic.refreshController,
enablePullUp: true,
@ -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) {
V2TimConversation con = Get.arguments;
List<Widget> widgets = [];
@ -104,38 +256,22 @@ class Sys_notify_listPage extends StatelessWidget {
widgets.add(GestureDetector(
onTap: () async {
switch(data.scene){
case 'url':
if (data.scene == 'url') {
Map<String, dynamic> bean = json.decode(data.note!);
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(
margin: EdgeInsets.only(bottom: 8.sp, left: 16.sp),

View File

@ -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']);
if (!isSuccess) {
await sendTextMsg(data['data']['account_id']);
} else {
logic.listScrollController.animateTo(0, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);
}
} else if(data['code'] == 21201){
showOKToast(data['msg']);

View File

@ -286,7 +286,7 @@ class Open_vip_tipPage extends StatelessWidget {
controller.index = index;
controller.update();
}else{
showOKToast("只有年会员才可使用至尊喊话哦~");
showOKToast("只有年会员才可使用该功能哦~");
}
},

View File

@ -38,6 +38,12 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
if (mounted) {
setState(() {});
}
} else {
showOKToast(data['msg']);
Get.back();
if (data['code'] == 21201 || data['code'] == 21202) {
showVipDialog();
}
}
}
@ -167,6 +173,8 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
user.nickname ?? '',
@ -175,6 +183,30 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
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(
height: 4.sp,
),

View File

@ -1,10 +1,10 @@
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配置信息
@ -193,7 +193,7 @@ class Api {
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 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/';

View File

@ -1,10 +1,8 @@
import 'dart:convert';
import 'dart:io';
import 'package:circle_app/common/errorcode.dart';
import 'package:circle_app/router/app_routers.dart';
import 'package:circle_app/util/util.dart';
import 'package:dio/dio.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../util/SharedPreferencesHelper.dart';
import '../util/device.dart';
@ -257,7 +255,7 @@ class DioManager {
pushLoginPage();
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']);
}
}

View File

@ -3,6 +3,7 @@ import 'dart:io';
import 'dart:ui';
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/userinfo/logic.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/router/app_routers.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_screenutil/flutter_screenutil.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 '../app/circle/logic.dart';
import '../app/home/logic.dart';
import '../app/select_circle/logic.dart';
import '../common/Widgets/open_vip_tip/view.dart';
import '../network/dio_manager.dart';
import 'SharedPreferencesHelper.dart';
@ -214,6 +219,7 @@ List<String> orientationList = [];
List<String> roleList = [];
String getGenderContent(int number) {
if (number == null) return '';
if (genderList.length != 0) {
return genderList[number - 1];
} else {
@ -914,3 +920,67 @@ Future<List<V2TimUserFullInfo>> loadConverstationListData() async {
}
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);
}
}

View File

@ -614,14 +614,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: "direct main"
description: