邀请有奖UI改动,修改bugly出现的问题
This commit is contained in:
parent
3cd8c1aa43
commit
2551b68635
@ -381,7 +381,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
MARKETING_VERSION = 1.4.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -530,7 +530,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
MARKETING_VERSION = 1.4.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -573,7 +573,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
MARKETING_VERSION = 1.4.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@ -446,8 +446,6 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool isSendLoging = false;
|
||||
onSubmitted() async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
@ -547,14 +545,17 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
}
|
||||
Future.delayed(Duration(seconds: 1), () {isSending = false;});
|
||||
if (words.isEmpty) {
|
||||
try {
|
||||
var msgResult = await MessageUtils.handleMessageError(
|
||||
widget.model.sendTextMessage(
|
||||
text: text,
|
||||
convID: widget.conversationID,
|
||||
convType: convType),
|
||||
context);
|
||||
addChatRecord(text, msgResult!.data!.msgID ?? '', msgResult!.data!.timestamp.toString() ?? '');
|
||||
} catch (e) {
|
||||
|
||||
addChatRecord(text, msgResult!.data!.msgID! ?? '', msgResult!.data!.timestamp!.toString() ?? '');
|
||||
}
|
||||
} else {
|
||||
showOKToast('含违规词汇,无法发送');
|
||||
return;
|
||||
|
||||
@ -841,6 +841,11 @@ class _TIMTextFieldLayoutNarrowState
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
chatActionWidget('hello', '打招呼', () async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showIsCancelBlackDialog(context);
|
||||
return;
|
||||
}
|
||||
var reulst =
|
||||
await DioManager.instance.get(url: Api.msgRandOne);
|
||||
String text = reulst['data'];
|
||||
@ -1470,9 +1475,14 @@ class _TIMTextFieldLayoutNarrowState
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
|
||||
if (bean.isSuccess()) {
|
||||
try {
|
||||
userInfoBean = bean.data.user;
|
||||
unLockWxNum = bean.data.unLockWxNum;
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,15 +171,15 @@ class _ChatPageState extends State<ChatPage> {
|
||||
}
|
||||
|
||||
if (message.elemType ==1) {
|
||||
return ((userInfoBean!.nickname! ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname! ?? '昵称待审核') +':' : '') + message.textElem!.text! ?? '';
|
||||
return ((userInfoBean!.nickname ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname ?? '昵称待审核') +':' : '') + message.textElem!.text! ?? '';
|
||||
} else if (message.elemType == 3) {
|
||||
return ((userInfoBean!.nickname! ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname! ?? '昵称待审核') +':' : '') + '发了一张图片';
|
||||
return ((userInfoBean!.nickname ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname ?? '昵称待审核') +':' : '') + '发了一张图片';
|
||||
} else if (message.elemType == 4) {
|
||||
return ((userInfoBean!.nickname! ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname! ?? '昵称待审核') +':' : '') + '发了一条语音';
|
||||
return ((userInfoBean!.nickname ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname ?? '昵称待审核') +':' : '') + '发了一条语音';
|
||||
} else if (message.elemType == 5) {
|
||||
return ((userInfoBean!.nickname! ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname! ?? '昵称待审核') +':' : '') + '发了一条视频';
|
||||
return ((userInfoBean!.nickname ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname ?? '昵称待审核') +':' : '') + '发了一条视频';
|
||||
} else {
|
||||
return ((userInfoBean!.nickname! ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname! ?? '昵称待审核') +':' : '') + '发了一条消息';
|
||||
return ((userInfoBean!.nickname ?? '昵称待审核').isNotEmpty ? (userInfoBean!.nickname ?? '昵称待审核') +':' : '') + '发了一条消息';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -105,6 +105,7 @@ class CircleLogic extends GetxController {
|
||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
|
||||
if (bean1.isSuccess()) {
|
||||
ConfigBean configBean = bean1.data!;
|
||||
|
||||
configBean.genderMap.forEach((key, value) {
|
||||
@ -121,6 +122,7 @@ class CircleLogic extends GetxController {
|
||||
dis_roleList.add(MyConfigData(key, value, false));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
List<Province> provinceList = [];
|
||||
|
||||
|
||||
@ -59,6 +59,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
|
||||
sub = EventBusManager.on<ChangeIndex>().listen((event) {
|
||||
currentIndex = event.index;
|
||||
_tabController.index = currentIndex;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
@ -638,7 +639,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Text(
|
||||
"邀请得会员",
|
||||
"邀请赚钱",
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Colors.white,
|
||||
|
||||
@ -113,6 +113,10 @@ class _DiscoverState extends State<Discover>
|
||||
//弹窗提示
|
||||
checkIsPopWxTip();
|
||||
}
|
||||
|
||||
if (lastPage == list.length - 2) {
|
||||
loadData();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -823,15 +827,26 @@ class _DiscoverState extends State<Discover>
|
||||
}
|
||||
|
||||
loadWxNumData() async {
|
||||
|
||||
loadWXEditStatus() async {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.checkWxNumState,);
|
||||
if (data['code'] == 200) {
|
||||
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
||||
|
||||
if (data['code'] == 200) {
|
||||
if (data['code'] != 4000) {
|
||||
if (data['data']['user']['wxNum'] == null) {
|
||||
showAddWxPicker(false);
|
||||
} else if (data['data']['user']['wxNum'].toString().isEmpty) {
|
||||
showAddWxPicker(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// wxStatusInfo['${data['code']}'] = data['msg'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void sendNoLookData(String userId, int index) async {
|
||||
|
||||
@ -150,7 +150,6 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
pushLoginPage();
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -53,12 +53,18 @@ class FeedbackLogic extends GetxController {
|
||||
|
||||
getFeedBack() async{
|
||||
|
||||
if (textEditingController.text.isEmpty && state.imaglist.isEmpty) {
|
||||
showOKToast('请输入反馈内容或者提交反馈图片');
|
||||
return;
|
||||
}
|
||||
|
||||
List myBean = [];
|
||||
if (!state.imaglist.isEmpty) {
|
||||
state.imaglist.forEach((element) {
|
||||
myBean.add(MyBean(type: 1, url: element).toJson());
|
||||
});
|
||||
}
|
||||
|
||||
textEditingController.text;
|
||||
|
||||
var data =
|
||||
|
||||
@ -15,6 +15,7 @@ import 'package:circle_app/util/util.dart';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@ -79,8 +80,6 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
unreadSIze.value = '0';
|
||||
// 设置网络变化监听
|
||||
connectListener();
|
||||
// 获取网络连接状态
|
||||
getConnectType();
|
||||
getIMData();
|
||||
|
||||
setFirstData();
|
||||
@ -93,8 +92,6 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
sub = EventBusManager.on<RefreshUnread>().listen((event) {
|
||||
getUnreadSize();
|
||||
});
|
||||
// getUnreadSize();
|
||||
|
||||
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
@ -114,7 +111,6 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
text,
|
||||
) async {
|
||||
print("收到新消息" + text);
|
||||
// unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString();
|
||||
getUnreadSize();
|
||||
}, onRecvC2CCustomMessage: (
|
||||
String msgID,
|
||||
@ -214,7 +210,6 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
break;
|
||||
|
||||
case AppLifecycleState.resumed: //从后台切换前台,界面可见
|
||||
|
||||
break;
|
||||
|
||||
case AppLifecycleState.paused: // 界面不可见,后台
|
||||
@ -222,7 +217,6 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
break;
|
||||
|
||||
case AppLifecycleState.detached: // APP结束时调用
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -442,30 +436,9 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
}
|
||||
|
||||
/// 获取联网类型
|
||||
void getConnectType() async {
|
||||
var connectResult = await (Connectivity().checkConnectivity());
|
||||
|
||||
if (connectResult == ConnectivityResult.mobile) {
|
||||
// _netType = "4G";
|
||||
} else if (connectResult == ConnectivityResult.wifi) {
|
||||
// _netType = "wifi";
|
||||
} else if (connectResult == ConnectivityResult.none) {
|
||||
// _netType = "未连接";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// 判断网络是否连接
|
||||
Future<bool> isConnected() async {
|
||||
var connectResult = await (Connectivity().checkConnectivity());
|
||||
return connectResult != ConnectivityResult.none;
|
||||
}
|
||||
|
||||
/// 设置网络切换监听
|
||||
connectListener() {
|
||||
connectivitySub = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
|
||||
|
||||
if (result == ConnectivityResult.none) {
|
||||
if (currentIndex == 0) {
|
||||
var logic = Get.put(CircleLogic());
|
||||
@ -482,6 +455,9 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
10
circle_app/lib/app/invent_record/binding.dart
Normal file
10
circle_app/lib/app/invent_record/binding.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class Invent_recordBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => Invent_recordLogic());
|
||||
}
|
||||
}
|
||||
57
circle_app/lib/app/invent_record/logic.dart
Normal file
57
circle_app/lib/app/invent_record/logic.dart
Normal file
@ -0,0 +1,57 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
|
||||
import 'state.dart';
|
||||
|
||||
class Invent_recordLogic extends GetxController {
|
||||
final Invent_recordState state = Invent_recordState();
|
||||
bool isLoad = true;
|
||||
bool isMore = true;
|
||||
int index = 1;
|
||||
|
||||
|
||||
List data = [];
|
||||
ScrollController scrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
scrollController.addListener(() {
|
||||
if (scrollController.position.pixels ==
|
||||
scrollController.position.maxScrollExtent) {
|
||||
if (isMore) {
|
||||
loadData();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
loadData();
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var result = await DioManager.instance.post(url:Get.arguments == 0 ? Api.inviteRecord : Api.inviteRankRecord,params: {'page':index,'pageSize':10});
|
||||
isLoad = false;
|
||||
if (result['code'] == 200) {
|
||||
if (result['data'] != null) {
|
||||
List dataList = result['data'];
|
||||
|
||||
isMore = dataList.length >= 10;
|
||||
|
||||
if (index == 1) {
|
||||
data = result['data'];
|
||||
} else {
|
||||
data.addAll(result['data']);
|
||||
}
|
||||
|
||||
index = index + 1;
|
||||
} else {
|
||||
isMore = false;
|
||||
}
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
5
circle_app/lib/app/invent_record/state.dart
Normal file
5
circle_app/lib/app/invent_record/state.dart
Normal file
@ -0,0 +1,5 @@
|
||||
class Invent_recordState {
|
||||
Invent_recordState() {
|
||||
///Initialize variables
|
||||
}
|
||||
}
|
||||
320
circle_app/lib/app/invent_record/view.dart
Normal file
320
circle_app/lib/app/invent_record/view.dart
Normal file
@ -0,0 +1,320 @@
|
||||
import 'package:circle_app/common/colors/app_color.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../components/my_app_bar.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class Invent_recordPage extends StatelessWidget {
|
||||
Invent_recordPage({Key? key}) : super(key: key);
|
||||
|
||||
final logic = Get.find<Invent_recordLogic>();
|
||||
final state = Get.find<Invent_recordLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: Get.arguments == 0 ? '邀请记录及返利' : '推荐大使邀请榜',
|
||||
),
|
||||
body: GetBuilder<Invent_recordLogic>(builder: (logic) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x99282733),
|
||||
border: Border.all(color: Color(0x0AFFFFFF), width: 1.sp),
|
||||
borderRadius: BorderRadius.circular(4.sp)),
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp, bottom: 10.sp),
|
||||
child: logic.isLoad
|
||||
? loaddingWidget(true)
|
||||
: logic.data.isEmpty
|
||||
? noResultWidget()
|
||||
: ListView.builder(
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (Get.arguments == 0) {
|
||||
if (index == 0) {
|
||||
return titileWidget();
|
||||
} else if (index == logic.data!.length + 1) {
|
||||
return loaddingWidget(logic.isMore);
|
||||
}
|
||||
var data = logic.data[index - 1];
|
||||
return rowWidget(
|
||||
data['nickName'],
|
||||
data['inviteTime'],
|
||||
'${data['sysProfit']}票',
|
||||
'${data['rebate'] > 0 ? data['rebate'] : 0}票(${data['rebateRate']}%)',
|
||||
data['userId'].toString());
|
||||
} else {
|
||||
if (index == 0) {
|
||||
return allTitileWidget();
|
||||
} else if (index == logic.data!.length + 1) {
|
||||
return loaddingWidget(logic.isMore);
|
||||
}
|
||||
var data = logic.data[index - 1];
|
||||
return allRowWidget(
|
||||
data['nickname'],
|
||||
data['inviteCount'].toString(),
|
||||
data['vipDays'].toString() + '天',
|
||||
'${data['directProfit'] > 0 ? data['directProfit'] : 0}票',
|
||||
'${data['rebate'] > 0 ? data['rebate'] : 0}票',
|
||||
data['userId'].toString());
|
||||
}
|
||||
},
|
||||
itemCount: logic.data!.length + 2,
|
||||
controller: logic.scrollController,
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
allTitileWidget() {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
child: infoText('推广大使'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('邀请人数'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('获会员时长'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('直接返利'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('间接返利'),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
allRowWidget(
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String str5,
|
||||
String userId,
|
||||
) {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: userId);
|
||||
},
|
||||
child: infoText(str1, AppColor.mainColor)),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str2, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str3, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str4, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str5, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
infoText(String info, [Color color = const Color(0xFFF7FAFA)]) {
|
||||
return Center(
|
||||
child: Text(
|
||||
info,
|
||||
style: TextStyle(color: color, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
titileWidget() {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
child: infoText('圈友'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('填码时间'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('平台返利'),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText('平台为你返利'),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
rowWidget(
|
||||
String str1,
|
||||
String str2,
|
||||
String str3,
|
||||
String str4,
|
||||
String userId,
|
||||
) {
|
||||
return Container(
|
||||
height: 41.sp,
|
||||
// margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: userId);
|
||||
},
|
||||
child: infoText(str1, AppColor.mainColor)),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str2, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str3, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
Expanded(
|
||||
child: infoText(str4, Colors.white),
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 1,
|
||||
color: Color(0x0AFFFFFF),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -12,25 +12,55 @@ class InviteLogic extends GetxController {
|
||||
TextEditingController codeEditingController = TextEditingController();
|
||||
|
||||
Data? homeData;
|
||||
List inveiteData = [];
|
||||
|
||||
List allInveiteData = [];
|
||||
|
||||
List sysData = [];
|
||||
String directProfit = '';
|
||||
String rebate = '';
|
||||
int selectedIndex = 0;
|
||||
|
||||
|
||||
int myPage = 1;
|
||||
int otherPage = 1;
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
loadData();
|
||||
loadMyInviteData();
|
||||
loadAllInviteData();
|
||||
}
|
||||
|
||||
loadMyInviteData() async {
|
||||
var resultData = await DioManager.instance.post(url: Api.inviteRecord,params: {'page':myPage,'pageSize':10});
|
||||
if (resultData['code'] == 200) {
|
||||
inveiteData = resultData['data'];
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
loadAllInviteData() async {
|
||||
var resultData = await DioManager.instance.post(url: Api.inviteRankRecord,);
|
||||
if (resultData['code'] == 200) {
|
||||
allInveiteData = resultData['data'];
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var resultData = await DioManager.instance.get(url: Api.inviteTotal);
|
||||
if (resultData['code'] == 200) {
|
||||
rebate = resultData['data']['rebate'].toString();
|
||||
directProfit = resultData['data']['directProfit'].toString();
|
||||
}
|
||||
|
||||
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||
if (data['code'] == 200) {
|
||||
Autogenerated result = Autogenerated.fromJson(data);
|
||||
|
||||
homeData = result.data;
|
||||
|
||||
}
|
||||
|
||||
var recorddata = await DioManager.instance.get(url: Api.inviteSysRecord);
|
||||
if (recorddata['code'] == 200) {
|
||||
sysData = recorddata['data'];
|
||||
@ -78,11 +108,26 @@ class Autogenerated {
|
||||
}
|
||||
}
|
||||
|
||||
class Superior {
|
||||
int? id;
|
||||
String? avatar;
|
||||
String? nickname;
|
||||
Superior(
|
||||
{this.id,this.avatar,this.nickname}
|
||||
);
|
||||
Superior.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'] ?? 0;
|
||||
avatar = json['avatar'] ?? '';
|
||||
nickname = json['nickname'] ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? achieveCount;
|
||||
int? achieveRewardDay;
|
||||
int? diffAwardCount;
|
||||
List<InviteAwardConf>? inviteAwardConf;
|
||||
Superior? superior;
|
||||
int? inviteAwardCount;
|
||||
String? inviteCode;
|
||||
String? link;
|
||||
@ -95,6 +140,7 @@ class Data {
|
||||
this.inviteAwardConf,
|
||||
this.inviteAwardCount,
|
||||
this.inviteCode,
|
||||
this.superior,
|
||||
this.link,
|
||||
this.inviteCount});
|
||||
|
||||
@ -110,6 +156,7 @@ class Data {
|
||||
}
|
||||
inviteAwardCount = json['invite_award_count'];
|
||||
inviteCode = json['invite_code'];
|
||||
superior = json['superior'] != null ? Superior.fromJson(json['superior']) : null;
|
||||
link = json['site_link'];
|
||||
inviteCount = json['invite_count'];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@ import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -22,11 +23,15 @@ class LoginLogic extends GetxController {
|
||||
int loginType = 0;
|
||||
bool isGetCode = false;
|
||||
|
||||
String clipboardStr = '';
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
FlutterNativeSplash.remove();
|
||||
readClipboardData();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
@ -70,6 +75,20 @@ class LoginLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
/// 从剪贴板读取信息
|
||||
void readClipboardData() async {
|
||||
var dataText = await Clipboard.getData(Clipboard.kTextPlain);
|
||||
if (dataText != null) {
|
||||
if ((dataText!.text! ?? '').isNotEmpty) {
|
||||
String codeStr = dataText!.text!;
|
||||
if (codeStr.startsWith('https://leyuan666.com/#code=')) {
|
||||
String code = codeStr.split('#code=').last;
|
||||
clipboardStr = code;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getCode() async {
|
||||
SmartDialog.showLoading(msg: '正在发送中');
|
||||
var data = await DioManager.instance.post(
|
||||
@ -133,6 +152,9 @@ class LoginLogic extends GetxController {
|
||||
"phone": phoneEditingController.text,
|
||||
"code": codeEditingController.text
|
||||
};
|
||||
if (clipboardStr.isNotEmpty) {
|
||||
params['inviteCode'] = clipboardStr;
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
"phone": phoneEditingController.text,
|
||||
|
||||
@ -355,7 +355,7 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
||||
),
|
||||
SizedBox(width: 10.sp),
|
||||
const Text(
|
||||
"邀请得会员",
|
||||
"邀请赚钱",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
|
||||
|
||||
@ -1123,8 +1123,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
);
|
||||
|
||||
if (data['code'] == 200) {
|
||||
List dataList = data['data'];
|
||||
if (dataList.isNotEmpty) {
|
||||
recommendCircleFriendData = data['data'][0];
|
||||
setState(() {});
|
||||
}
|
||||
} else {
|
||||
showOKToast(data['msg']);
|
||||
if (data['code'] == 21201 || data['code'] == 21202) {
|
||||
|
||||
@ -248,7 +248,7 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
|
||||
child: Image(
|
||||
image: AssetImage(getBaseImage(vipType == 2 ? 'year_vip' : "vip")),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
height: 20.sp,
|
||||
) ,),
|
||||
|
||||
Expanded(
|
||||
|
||||
10
circle_app/lib/app/msg/series/binding.dart
Normal file
10
circle_app/lib/app/msg/series/binding.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class SeriesBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => SeriesLogic());
|
||||
}
|
||||
}
|
||||
45
circle_app/lib/app/msg/series/logic.dart
Normal file
45
circle_app/lib/app/msg/series/logic.dart
Normal file
@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
class SeriesLogic extends GetxController {
|
||||
ScrollController scrollController = ScrollController();
|
||||
final RefreshController refreshController = RefreshController();
|
||||
List listData = [];
|
||||
bool isMore = true;
|
||||
int page = 1;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
loadData();
|
||||
}
|
||||
|
||||
void loadData() async {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.getActivityDetail+Get.arguments['id'].toString(),params: {'page':page,'pageSize':20});
|
||||
|
||||
if (data['code'] == 200) {
|
||||
List list = data['data'];
|
||||
if (list.isNotEmpty) {
|
||||
listData.addAll(list);
|
||||
isMore = false;
|
||||
refreshController.loadComplete();
|
||||
} else {
|
||||
isMore = false;
|
||||
refreshController.loadNoData();
|
||||
}
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void loadMore() {
|
||||
page = page + 1;
|
||||
loadData();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
54
circle_app/lib/app/msg/series/view.dart
Normal file
54
circle_app/lib/app/msg/series/view.dart
Normal file
@ -0,0 +1,54 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../../components/my_app_bar.dart';
|
||||
import '../../../util/util.dart';
|
||||
import '../sys_notify_list/platform_item.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class SeriesPage extends StatelessWidget {
|
||||
SeriesPage({Key? key}) : super(key: key);
|
||||
|
||||
final logic = Get.find<SeriesLogic>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(getBaseImage("bg")),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: GetBuilder<SeriesLogic>(builder: (logic) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: Get.arguments['title'],
|
||||
),
|
||||
body: logic.listData.isEmpty && logic.isMore
|
||||
? loaddingWidget(true)
|
||||
: SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
enablePullUp: true,
|
||||
enablePullDown: false,
|
||||
onLoading: () {
|
||||
logic.loadMore();
|
||||
},
|
||||
child: ListView.builder(
|
||||
controller: logic.scrollController,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == logic.listData.length) {
|
||||
return loaddingWidget(logic.isMore);
|
||||
}
|
||||
return PlatformWdiget(list: logic.listData[index]);
|
||||
},
|
||||
itemCount: logic.listData.isNotEmpty
|
||||
? logic.listData.length + 1
|
||||
: 0,
|
||||
)));
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -14,12 +14,17 @@ class Sys_notify_listLogic extends GetxController {
|
||||
|
||||
final RefreshController refreshController = RefreshController();
|
||||
V2TimConversation? con;
|
||||
int page = 0;
|
||||
int page = 1;
|
||||
|
||||
int isVip = 0;
|
||||
bool isLoad = true;
|
||||
bool isMore = true;
|
||||
List<Lists> lists = [];
|
||||
|
||||
List serieslists = [];
|
||||
|
||||
List normallists = [];
|
||||
|
||||
List<V2TimMessage> msgLists = [];
|
||||
|
||||
@override
|
||||
@ -30,12 +35,45 @@ class Sys_notify_listLogic extends GetxController {
|
||||
if (con!.showName! == '互动通知') {
|
||||
// 拉取单聊历史消息
|
||||
loadMsgList();
|
||||
} else if (con!.showName! == '活动驿站') {
|
||||
loadActivityList();
|
||||
} else {
|
||||
initList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
loadActivityList() async {
|
||||
if (serieslists.isEmpty) {
|
||||
var seriesData =
|
||||
await DioManager.instance.get(url: Api.getSeriesActivity,);
|
||||
if (seriesData['code'] == 200) {
|
||||
if (seriesData['data'] != null) {
|
||||
serieslists = seriesData['data'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var normalData =
|
||||
await DioManager.instance.post(url: Api.getNormalActivity,params: {'page':1, 'pageSize':20});
|
||||
|
||||
if (normalData['code'] == 200) {
|
||||
if (normalData['data'] != null) {
|
||||
List list = normalData['data'];
|
||||
if (list.isNotEmpty) {
|
||||
normallists.addAll(list);
|
||||
refreshController.loadComplete();
|
||||
} else {
|
||||
refreshController.loadNoData();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
refreshController.loadNoData();
|
||||
}
|
||||
isLoad = false;
|
||||
update();
|
||||
}
|
||||
|
||||
loadMsgList() async {
|
||||
String msgId = '';
|
||||
if (msgLists.isNotEmpty) {
|
||||
@ -170,6 +208,11 @@ class Sys_notify_listLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void loadMore() {
|
||||
page = page + 1;
|
||||
loadActivityList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Lists {
|
||||
|
||||
84
circle_app/lib/app/msg/sys_notify_list/platform_item.dart
Normal file
84
circle_app/lib/app/msg/sys_notify_list/platform_item.dart
Normal file
@ -0,0 +1,84 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../router/app_routers.dart';
|
||||
import '../../../util/util.dart';
|
||||
|
||||
class PlatformWdiget extends StatelessWidget {
|
||||
var list;
|
||||
PlatformWdiget({Key? key,required this.list}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: implement build
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (list['scene'] == 'url') {
|
||||
Map<String, dynamic> bean = json.decode(list['note']);
|
||||
String url = bean['url'];
|
||||
|
||||
Get.toNamed(AppRoutes.WebViewActivity,
|
||||
arguments: {'title': "", "url": url});
|
||||
} else {
|
||||
if (list['note'] == null) {
|
||||
// Map<String, dynamic> bean = json.decode(data.note!);
|
||||
pushPage(list['scene'], '');
|
||||
} else {
|
||||
Map<String, dynamic> bean = json.decode(list['note']);
|
||||
pushPage(list['note'], bean['param']);
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 15.sp, left: 5.sp, right: 5.sp),
|
||||
// padding: EdgeInsets.only(),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp), color: Color(0xFF292836)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (list['picUrl'] != null)
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10.sp),
|
||||
topRight: Radius.circular(10.sp)),
|
||||
child: Image.network(
|
||||
list['picUrl'],
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
height: 114.sp,
|
||||
)),
|
||||
if (list['name'] != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 17.sp, top: 8.sp),
|
||||
child: Text(
|
||||
list['name'],
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
if (list['description'] != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 15.sp, right: 15.sp, top: 8.sp,),
|
||||
child: Text(
|
||||
list['description'],
|
||||
style: TextStyle(color: Color(0xFFB7BECC), fontSize: 12.sp),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 15.sp, right: 15.sp, top: 10.sp, bottom: 10.sp),
|
||||
child: Text(
|
||||
'活动时间: ${list['startTime'].split('T').first}至${list['endTime'].split('T').first}',
|
||||
style: TextStyle(color: Color(0xFFB7BECC), fontSize: 12.sp),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,9 +1,13 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/app/msg/series/view.dart';
|
||||
import 'package:circle_app/app/msg/sys_notify_list/platform_item.dart';
|
||||
import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
||||
import 'package:circle_app/components/my_app_bar.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,6 +15,8 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../home/logic.dart';
|
||||
import '../series/view.dart';
|
||||
import '../series/view.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class Sys_notify_listPage extends StatelessWidget {
|
||||
@ -31,27 +37,72 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: logic.con != null ? logic.con!.showName! ?? '' : '',
|
||||
actionWdiget: logic.con != null ? logic.con!.showName == '活动驿站' ? InkWell(
|
||||
onTap: () {
|
||||
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);
|
||||
},
|
||||
child: Text('联系客服',style: TextStyle(color: Colors.white,fontSize: 15.sp),)) : Container() : Container(),
|
||||
),
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SafeArea(
|
||||
child: logic.isLoad
|
||||
? loaddingWidget(true)
|
||||
: logic.lists.isEmpty && logic.msgLists.isEmpty
|
||||
: logic.lists.isEmpty &&
|
||||
logic.msgLists.isEmpty &&
|
||||
logic.serieslists.isEmpty &&
|
||||
logic.normallists.isNotEmpty
|
||||
? noResultWidget()
|
||||
: logic.msgLists.isNotEmpty
|
||||
: logic.msgLists.isNotEmpty ||
|
||||
logic.serieslists.isEmpty ||
|
||||
logic.normallists.isNotEmpty
|
||||
? SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
enablePullUp: true,
|
||||
enablePullDown:false,
|
||||
enablePullDown: false,
|
||||
onLoading: () {
|
||||
if (logic.con!.showName == '活动驿站') {
|
||||
logic.loadMore();
|
||||
} else {
|
||||
logic.onLoadingMsgList();
|
||||
}
|
||||
},
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.all(10.sp),
|
||||
itemCount: logic.msgLists.length,
|
||||
itemCount: logic.con!.showName == '活动驿站'
|
||||
? logic.serieslists.length +
|
||||
(logic.normallists.isNotEmpty
|
||||
? 1
|
||||
: 0)
|
||||
: logic.msgLists.length,
|
||||
itemBuilder: (context, index) {
|
||||
if (logic.con!.showName == '活动驿站') {
|
||||
if (index == 0 &&
|
||||
logic.serieslists.isNotEmpty) {
|
||||
return activeHorItem();
|
||||
} else {
|
||||
if (logic.serieslists.isNotEmpty) {
|
||||
return PlatformWdiget(
|
||||
list: logic
|
||||
.normallists[index - 1]);
|
||||
}
|
||||
}
|
||||
return PlatformWdiget(
|
||||
list:
|
||||
logic.normallists[index - 1]);
|
||||
}
|
||||
return msgItem(logic.msgLists![index]);
|
||||
},
|
||||
),
|
||||
@ -73,23 +124,187 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (logic.con!.showName != '官方通知' &&
|
||||
logic.con!.showName != '系统通知' &&
|
||||
logic.con!.showName != '活动驿站' &&
|
||||
logic.con!.showName != '互动通知')
|
||||
SafeArea(
|
||||
child: Container(
|
||||
height: 40.sp,
|
||||
color: Color(0xFF090B14),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (logic.con!.showName == '会员中心') {
|
||||
showOepnVipDialog();
|
||||
} else if (logic.con!.showName == '资产中心') {
|
||||
Get.toNamed(AppRoutes.MyAssets);
|
||||
} else {
|
||||
Get.toNamed(AppRoutes.MyCircle);
|
||||
}
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 4.sp),
|
||||
child: Image.network(
|
||||
logic.con!.faceUrl!,
|
||||
width: 20.sp,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
logic.con!.showName == '会员中心'
|
||||
? '会员中心'
|
||||
: logic.con!.showName == '资产中心'
|
||||
? '资产中心'
|
||||
: '我的圈子',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
height: 20.sp,
|
||||
width: 0.5.sp,
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.HelpActivity);
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getHomeImage("mine_help"),
|
||||
width: 20.sp,
|
||||
),
|
||||
Text(
|
||||
'帮助与反馈',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
))),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
msgItem(V2TimMessage data) {
|
||||
activeHorItem() {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 0.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'系列活动',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
SizedBox(height: 10.sp),
|
||||
Container(
|
||||
width: Get.width,
|
||||
height: 165.sp,
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
height: 165.sp,
|
||||
width: 160.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.SeriesPage,
|
||||
arguments: {'id':logic.serieslists[index]['id'].toString(),'title':logic.serieslists[index]['name'] });
|
||||
},
|
||||
child: seriesWidget(logic.serieslists[index]),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: logic.serieslists.length,
|
||||
scrollDirection: Axis.horizontal,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.sp),
|
||||
Text(
|
||||
'平台活动',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
SizedBox(height: 10.sp),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
seriesWidget(var list) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(right: 15.sp),
|
||||
// padding: EdgeInsets.only(),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp), color: Color(0xFF292836)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (list['picUrl'] != null)
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10.sp),
|
||||
topRight: Radius.circular(10.sp)),
|
||||
child: Image.network(
|
||||
list['picUrl'],
|
||||
width: Get.width,
|
||||
fit: BoxFit.cover,
|
||||
height: 100.sp,
|
||||
)),
|
||||
if (list['name'] != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 17.sp, top: 8.sp),
|
||||
child: Text(
|
||||
list['name'],
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
if (list['description'] != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 15.sp, right: 5.sp, top: 8.sp, bottom: 10.sp),
|
||||
child: Text(
|
||||
list['description'],
|
||||
style: TextStyle(color: Color(0xFFB7BECC), fontSize: 12.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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'] ?? '');
|
||||
pushPage(info['scene'], param,
|
||||
name: info['ta']['nickname'] ?? '');
|
||||
} else {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: info['ta']['id'].toString());
|
||||
@ -147,9 +362,8 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
width: Get.width - 100.sp,
|
||||
child: Text(
|
||||
info['msg'],
|
||||
style: TextStyle(
|
||||
color: Colors.white54,
|
||||
fontSize: 14.sp),
|
||||
style:
|
||||
TextStyle(color: Colors.white54, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
@ -159,7 +373,8 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
info['noticeTime'],
|
||||
style: TextStyle(
|
||||
color: Colors.white54,
|
||||
fontSize: 12.sp,),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -212,8 +427,6 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ListItem(Lists data) {
|
||||
V2TimConversation con = Get.arguments;
|
||||
List<Widget> widgets = [];
|
||||
@ -270,7 +483,6 @@ class Sys_notify_listPage extends StatelessWidget {
|
||||
Map<String, dynamic> bean = json.decode(data.note!);
|
||||
pushPage(data.scene!, bean['param']);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -80,14 +80,13 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
Expanded(child: TIMConversation(
|
||||
autoScrollController: logic.scrollController,
|
||||
scrollController: logic.listScrollController,
|
||||
onTapItem: (selectedConv) async{
|
||||
onTapItem: (selectedConv) async {
|
||||
String type = selectedConv.userID!.split('_')[2];
|
||||
if (int.parse(type) == 11) {
|
||||
Get.toNamed(AppRoutes.Sys_notify_list, arguments: selectedConv);
|
||||
return;
|
||||
}
|
||||
Get.toNamed(AppRoutes.Chat, arguments: selectedConv);
|
||||
|
||||
},
|
||||
))
|
||||
],
|
||||
@ -196,15 +195,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
),
|
||||
)
|
||||
: Container(),)),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0, -1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: GestureDetector(
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.listScrollController.animateTo(
|
||||
0.0,
|
||||
@ -217,10 +208,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: const [
|
||||
Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||
]),
|
||||
color: AppColor.mainColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -59,7 +59,9 @@ class MyCircleLogic extends GetxController {
|
||||
var bean = BaseResponse<InterestsBean>.fromJson(
|
||||
data, (data) => InterestsBean.fromJson(data));
|
||||
|
||||
circle.lists.addAll(bean.data!);
|
||||
|
||||
|
||||
circle.lists.addAll(bean.data!.lists);
|
||||
|
||||
if (circle.lists.length < 20 * page) {
|
||||
isMore = false;
|
||||
|
||||
@ -219,7 +219,7 @@ class UserinfoLogic extends GetxController {
|
||||
} else {
|
||||
bool isTip = await checkIsShowTip();
|
||||
if (isTip) {
|
||||
showFloatingButtonOverlay(Get.context!,userInfoBean!.nickname!,ageMsg,userInfoBean!.avatarThumb,0,(){
|
||||
showFloatingButtonOverlay(Get.context!,userInfoBean!.nickname ?? '',ageMsg,userInfoBean!.avatarThumb,0,(){
|
||||
setLike();
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import '../../network/dio_manager.dart';
|
||||
import '../../util/PaymentUtils.dart';
|
||||
import 'RechargeScreenDialog.dart';
|
||||
import 'open_vip_tip/logic.dart';
|
||||
import 'open_vip_tip/view.dart';
|
||||
|
||||
bool isZfbPrice = true;
|
||||
|
||||
@ -286,3 +287,13 @@ Future showRechargeScreenDialog() {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
showOepnVipDialog() async {
|
||||
return Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
}
|
||||
@ -34,10 +34,13 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
);
|
||||
|
||||
if (data['code'] == 200) {
|
||||
List dataList = data['data'];
|
||||
if (dataList.isNotEmpty) {
|
||||
recommendCircleFriendData = data['data'][0];
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
showOKToast(data['msg']);
|
||||
Get.back();
|
||||
|
||||
@ -55,12 +55,13 @@ void main() {
|
||||
if (isAgreemement) {
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
FlutterBugly.init(
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
if (Platform.isAndroid) {
|
||||
getLostData();
|
||||
|
||||
@ -205,9 +205,17 @@ class Api {
|
||||
//邀请好友主页
|
||||
static const inviteMainPage = 'user-service/invite/mainPage';
|
||||
|
||||
//邀请统计
|
||||
static const inviteTotal = '/user-service/invite/total';
|
||||
//系统随机的邀请记录
|
||||
static const inviteSysRecord = 'user-service/invite/record/rand';
|
||||
|
||||
//邀请记录
|
||||
static const inviteRecord = '/user-service/invite/record';
|
||||
|
||||
//邀请总榜
|
||||
static const inviteRankRecord = '/user-service/invite/rank/all';
|
||||
|
||||
//填写邀请码
|
||||
static const inviteFillIn = 'user-service/invite/fillin';
|
||||
|
||||
@ -300,6 +308,7 @@ class Api {
|
||||
|
||||
//聊天推荐圈友
|
||||
static const chatRecommendFriend = '/msg-service/im/chat/recommend/v2';
|
||||
|
||||
//是否显示送礼物
|
||||
static const isShow_give_gift = '/msg-service/message/show_give_gift/';
|
||||
|
||||
@ -309,5 +318,14 @@ class Api {
|
||||
//是否弹窗
|
||||
static const popup = '/user-service/follow/popup/';
|
||||
|
||||
//获取普通活动
|
||||
static const getNormalActivity = '/msg-service/activity/normal';
|
||||
|
||||
//获取系列活动
|
||||
static const getSeriesActivity = '/msg-service/activity/series';
|
||||
|
||||
//获取系列活动详细信息
|
||||
static const getActivityDetail = '/msg-service/activity/series/detail/';
|
||||
|
||||
|
||||
}
|
||||
@ -40,7 +40,11 @@ class DioManager {
|
||||
int type = Random().nextInt(2);
|
||||
_dio ??= Dio(BaseOptions(
|
||||
// baseUrl2
|
||||
baseUrl: type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
||||
baseUrl:
|
||||
|
||||
Api.baseUrl,
|
||||
|
||||
// type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
||||
// 连接服务器超时时间,单位是毫秒
|
||||
connectTimeout: const Duration(seconds: 30),
|
||||
// 接收数据的最长时限
|
||||
|
||||
@ -79,6 +79,10 @@ import '../app/externalshare/binding.dart';
|
||||
import '../app/externalshare/view.dart';
|
||||
import '../app/good_reviews/binding.dart';
|
||||
import '../app/good_reviews/view.dart';
|
||||
import '../app/invent_record/binding.dart';
|
||||
import '../app/invent_record/view.dart';
|
||||
import '../app/msg/series/binding.dart';
|
||||
import '../app/msg/series/view.dart';
|
||||
import '../app/my_assets/binding.dart';
|
||||
import '../app/privacy/binding.dart';
|
||||
import '../app/quick/binding.dart';
|
||||
@ -267,7 +271,15 @@ class AppPages {
|
||||
GetPage(name: AppRoutes.GiftShopPage, page: () => Gift_shopPage(),
|
||||
binding: Gift_shopBinding(),),
|
||||
GetPage(name: AppRoutes.Quick, page: () => QuickPage(),
|
||||
binding: QuickBinding(),)
|
||||
|
||||
binding: QuickBinding(),),
|
||||
GetPage(
|
||||
name: AppRoutes.SeriesPage,
|
||||
page: () => SeriesPage(),
|
||||
binding: SeriesBinding(),
|
||||
),
|
||||
GetPage(
|
||||
name: AppRoutes.Invite_Record,
|
||||
page: () => Invent_recordPage(),
|
||||
binding: Invent_recordBinding()),
|
||||
];
|
||||
}
|
||||
|
||||
@ -27,9 +27,9 @@ abstract class AppRoutes {
|
||||
static const MyCircle = '/myCircle';
|
||||
static const SetPasswordActivity = '/SetPasswordActivity';
|
||||
static const MyFeedBackListActivity = '/mine/MyFeedBackListActivity';
|
||||
|
||||
static const SeriesPage = '/notice/SeriesPage';
|
||||
static const Sys_notify_list = '/msg/Sys_notify_list';
|
||||
|
||||
static const Invite_Record = '/Invite/record';
|
||||
static const PrivacyActivity = '/user/PrivacyActivity';
|
||||
|
||||
static const Signal_circle_list = '/msg/chat/signal_circle_list';
|
||||
|
||||
@ -179,14 +179,12 @@ String convertToTenThousand(int number) {
|
||||
pushLoginPage() async {
|
||||
await logoutIM();
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
bool agreement =
|
||||
sharedPreferences.getBool(SharedPreferencesHelper.AGREEMENT) ?? false;
|
||||
String loginPhone =
|
||||
sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ?? "";
|
||||
print(loginPhone);
|
||||
sharedPreferences.clear();
|
||||
sharedPreferences.setString(SharedPreferencesHelper.LOGINPHONE, loginPhone);
|
||||
sharedPreferences.setBool(SharedPreferencesHelper.AGREEMENT, agreement);
|
||||
sharedPreferences.setBool(SharedPreferencesHelper.AGREEMENT, true);
|
||||
sharedPreferences.setString(SharedPreferencesHelper.firstLogin, '1');
|
||||
});
|
||||
|
||||
@ -947,18 +945,20 @@ pushPage(String action,String param,{String name = ''}) {
|
||||
// public final static String INVITE = "invite";//邀请页
|
||||
// public final static String WALLET = "wallet";//个人资产/钱包
|
||||
if (action == 'my_main') {
|
||||
Get.until((route) => route.settings.name == '/home');
|
||||
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') {
|
||||
Get.until((route) => route.settings.name == '/home');
|
||||
final homeLogic = Get.put(HomeLogic());
|
||||
homeLogic.tabController.animateTo(0);
|
||||
homeLogic.updateIndex(0);
|
||||
Get.back();
|
||||
Future.delayed(Duration(milliseconds: 200),() {
|
||||
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') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user