# Conflicts:
#	lib/constants/api.dart
#	lib/model/user_info_model.g.dart
#	lib/ui/home/content_connect_page.dart
master
戴余标 2 years ago
commit c1ce6b68ae

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

@ -51,6 +51,9 @@ class _App {
///VIP ///VIP
String get updateVip => '/app/user/updateVip'; String get updateVip => '/app/user/updateVip';
///
String get trialVip => '/app/user/trialVip';
} }
class _Content{ class _Content{

@ -73,6 +73,10 @@ class $AssetsImagesGen {
/// File path: assets/images/bg.png /// File path: assets/images/bg.png
AssetGenImage get bg => const AssetGenImage('assets/images/bg.png'); AssetGenImage get bg => const AssetGenImage('assets/images/bg.png');
/// File path: assets/images/bouncedbg.png
AssetGenImage get bouncedbg =>
const AssetGenImage('assets/images/bouncedbg.png');
/// File path: assets/images/emptylist.png /// File path: assets/images/emptylist.png
AssetGenImage get emptylist => AssetGenImage get emptylist =>
const AssetGenImage('assets/images/emptylist.png'); const AssetGenImage('assets/images/emptylist.png');

@ -76,6 +76,7 @@ class ApiClient {
return baseModel; return baseModel;
} }
// /// // ///
// Future<String> uploadImage(File file) async { // Future<String> uploadImage(File file) async {
// var response = await _dio.post( // var response = await _dio.post(

@ -1,6 +1,5 @@
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:project_telephony/ui/user/content_details_page.dart';
part 'user_info_model.g.dart'; part 'user_info_model.g.dart';

@ -1,3 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/base/base_style.dart';
@ -42,74 +43,70 @@ class _ContentConnectPageState extends State<ContentConnectPage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
title: Text( title: Text(
'选择短信内容', '选择短信内容',
style: Theme.of(context).textTheme.headline6, style: Theme.of(context).textTheme.headline6,
),
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor,
), ),
leading: const CloudBackButton(isSpecial: true), backgroundColor: Colors.white,
backgroundColor: kForeGroundColor, body: Column(
), children: [
backgroundColor: Colors.white, Container(
body: Column( width:double.infinity,
children: [ height: 88.w,
Container( margin: EdgeInsets.symmetric(horizontal: 66.w),
width: double.infinity, padding: EdgeInsets.all(8.w),
height: 88.w, decoration:BoxDecoration(color: const Color(0xFFF9F9F9),borderRadius: BorderRadius.all(Radius.circular(44.w))),
margin: EdgeInsets.symmetric(horizontal: 66.w), child: TabBar(
padding: EdgeInsets.all(8.w), // indicator: Decoration(),
decoration: BoxDecoration( controller: _tabController,
color: const Color(0xFFF9F9F9), labelColor:const Color(0xFF1890FF),
borderRadius: BorderRadius.all(Radius.circular(44.w))), unselectedLabelColor:const Color(0xFF999999),
child: TabBar( unselectedLabelStyle:const TextStyle(fontWeight:FontWeight.bold),
controller: _tabController, labelStyle:const TextStyle(fontWeight:FontWeight.bold),
labelColor: const Color(0xFF1890FF), onTap: (num) {
unselectedLabelColor: const Color(0xFF999999), if(num==0){
unselectedLabelStyle: _answerRefreshController.callRefresh();
const TextStyle(fontWeight: FontWeight.bold), }else{
labelStyle: const TextStyle(fontWeight: FontWeight.bold), _wasAnswerRefreshController.callRefresh();
onTap: (num) { }
if (num == 0) { },
_answerRefreshController.callRefresh(); indicator: RectangularIndicator(
} else { color: Colors.white,
_wasAnswerRefreshController.callRefresh(); bottomLeftRadius: 44.w,
} bottomRightRadius: 44.w,
}, topLeftRadius: 44.w,
indicator: RectangularIndicator( topRightRadius: 44.w,
color: Colors.white, // paintingStyle: PaintingStyle.fill,
bottomLeftRadius: 44.w,
bottomRightRadius: 44.w,
topLeftRadius: 44.w,
topRightRadius: 44.w,
),
tabs: const [
Tab(
text: "被叫接听",
), ),
Tab( // indicatorSize: TabBarIndicatorSize.label,
text: "主叫接听", // isScrollable: true,
) tabs: const [
]), // _tab(0, "被叫接听"),_tab(1, "主叫接听"),
), Tab(text: "被叫接听",),Tab(text: "主叫接听",)
Expanded(
child: TabBarView( ]),
controller: _tabController,
children: [
AnswerIdleList(
refreshController: _answerRefreshController,
isIdle: false,
),
AnswerIdleList(
refreshController: _wasAnswerRefreshController,
isIdle: true,
),
],
), ),
), Expanded(
], child: TabBarView(controller: _tabController, children: [
), // _getBox(),
); AnswerIdleList(
// contant: const [],
refreshController: _answerRefreshController, isIdle: false,
),
AnswerIdleList(
// contant: const [],
refreshController: _wasAnswerRefreshController, isIdle: true,
)
]))
],
));
} }
@override @override

@ -3,11 +3,14 @@ import 'dart:async';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:flutter_background_service/flutter_background_service.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:project_telephony/ui/home/content_connect_page.dart'; import 'package:project_telephony/ui/home/content_connect_page.dart';
import 'package:project_telephony/ui/home/content_refuse_page.dart'; import 'package:project_telephony/ui/home/content_refuse_page.dart';
import 'package:project_telephony/ui/user/privacy_rights_page.dart'; import 'package:project_telephony/ui/user/privacy_rights_page.dart';
import 'package:project_telephony/ui/user/privacy_rights_page.dart'; import 'package:project_telephony/ui/widget/appdialog.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
@ -28,6 +31,8 @@ bool kg=false;
final service = FlutterBackgroundService(); final service = FlutterBackgroundService();
@override @override
class _HomePageState extends State<HomePage> with WidgetsBindingObserver { class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -77,6 +82,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
), ),
), ),
Positioned(top: 48.w, child: _warning()), Positioned(top: 48.w, child: _warning()),
// Positioned(child: PloneBottom(onTap: (){
// showDialog(context: context, builder: (context){
// return const AppDialog();
// });
//
// })),
Positioned(bottom: 64.w, child: _getBody()), Positioned(bottom: 64.w, child: _getBody()),
Align( Align(
child: SizedBox( child: SizedBox(

@ -79,9 +79,9 @@ class _TabNavigatorState extends State<TabNavigator>
return true; return true;
}, },
child: TabBarView( child: TabBarView(
children: _pages,
controller: _tabController, controller: _tabController,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
children: _pages,
), ),
), ),
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(

@ -24,6 +24,7 @@ import '../../utils/hive_store.dart';
import '../../utils/toast/cloud_toast.dart'; import '../../utils/toast/cloud_toast.dart';
import '../../utils/user_tool.dart'; import '../../utils/user_tool.dart';
import '../home/call.dart'; import '../home/call.dart';
import '../widget/appdialog.dart';
import 'content_details_page.dart'; import 'content_details_page.dart';
import '../home/home_page.dart'; import '../home/home_page.dart';
@ -49,6 +50,7 @@ class _UserPageState extends State<UserPage> {
final service = FlutterBackgroundService(); final service = FlutterBackgroundService();
final EasyRefreshController _easyRefreshController = EasyRefreshController(); final EasyRefreshController _easyRefreshController = EasyRefreshController();
String? endDate; String? endDate;
@override @override
void dispose() { void dispose() {
_easyRefreshController.dispose(); _easyRefreshController.dispose();
@ -61,28 +63,39 @@ class _UserPageState extends State<UserPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
// showDialog(context: context, builder: (context){
// return const AppDialog();
// });
// _easyRefreshController.callRefresh(); // _easyRefreshController.callRefresh();
// UserTool.userProvider.updateUserInfo(); // UserTool.userProvider.updateUserInfo();
// if (UserTool.userProvider.isLogin) { // if (UserTool.userProvider.isLogin) {
//
// // print(UserTool.userProvider.userInfo.end * 1000); // // print(UserTool.userProvider.userInfo.end * 1000);
// // print(DateTime.now().millisecondsSinceEpoch); // // print(DateTime.now().millisecondsSinceEpoch);
// if (UserTool.userProvider.userInfo.isVip != 1) { // // if (UserTool.userProvider.userInfo.isVip != 1) {
// isVip = false; // // isVip = false;
// vle = false; // // vle = false;
// } else { // // } else {
// isVip = true; // // isVip = true;
// vle = await service.isRunning(); // // vle = await service.isRunning();
// } // // }
// //service.isRunning() as bool; // //service.isRunning() as bool;
// // endDate = DateUtil.formatDateMs( // // endDate = DateUtil.formatDateMs(
// // UserTool.userProvider.userInfo.end * 1000, // // UserTool.userProvider.userInfo.end * 1000,
// // format: DateFormats.y_mo_d); // // format: DateFormats.y_mo_d);
// } else { // }
// else {
// vle = false; // vle = false;
// } // }
} }
// getRes() async{
// var res=await apiClient.request(API.app.trialVip);
// if(res.code==0){
// showDialog(context: context, builder: (context){
// return const AppDialog();
// });
// }
// }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -105,8 +118,15 @@ class _UserPageState extends State<UserPage> {
_getRequests(); _getRequests();
// await UserTool.userProvider.updateUserInfo(); // await UserTool.userProvider.updateUserInfo();
if (UserTool.userProvider.isLogin) { if (UserTool.userProvider.isLogin) {
// var res=await apiClient.request(API.app.trialVip);
if(UserTool.userProvider.userInfo.isTrial==0){
showDialog(context: context, builder: (context){
return const AppDialog();
});
}
// print(UserTool.userProvider.userInfo.end * 1000); // print(UserTool.userProvider.userInfo.end * 1000);
// print(DateTime.now().millisecondsSinceEpoch); // print(DateTime.now().millisecondsSinceEpoch);
if (UserTool.userProvider.userInfo.isVip != 1) { if (UserTool.userProvider.userInfo.isVip != 1) {
isVip = false; isVip = false;
vle = false; vle = false;

@ -0,0 +1,193 @@
import 'package:flutter/material.dart';
import 'package:project_telephony/utils/headers.dart';
import '../../constants/api.dart';
import '../../model/network/api_client.dart';
import '../../utils/toast/cloud_toast.dart';
class AppDialog extends Dialog {
final String title;
final String confirm; //
// final String content; //
// final bool? showCancel;
// final OnDialogClickListener? clickListener;
const AppDialog( // this.showCancel,
// this.clickListener,
{
Key? key,
this.title = "恭喜您获得会员体验卡",
this.confirm = "立即领取",
// this.content = "内容",
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 95.w,vertical: 452.w),
decoration: BoxDecoration(
image:
DecorationImage(image: AssetImage(Assets.images.bouncedbg.path))),
child: Column(
children: [
32.hb,
Text(
title,
style: TextStyle(
fontSize: 36.sp,
),
),
80.hb,
_getVip(),
218.hb,
Row(
children: [
72.wb,
_getText("接听发送"),
64.wb,
_getText("拒接发送"),
64.wb,
_getText("提升形象"),
],
),
50.hb,
_getBotton(confirm, context),
],
),
);
/**/
//
// Stack(
// children: [
// Align(
// child: Image.asset(
// Assets.images.bouncedbg.path,
// width: 560.w,
// height: 720.w,
// fit: BoxFit.fill,
// ),
// ),
// Positioned(
// top: 64.w,
// left: 100.w,
// child: Text(
// title,
// style: TextStyle(
// fontSize: 36.sp,
// ),
// )),
// Positioned(top: 108.w, left: 96.w, child: _getVip()),
// Positioned(
// child: Row(
// children: [
// _getText("接听发送"),
// 64.wb,
// _getText("拒接发送"),
// 64.wb,
// _getText("提升形象"),
// ],
// )),
// Positioned(child: _getBotton(confirm, context)),
// ],
// );
}
}
_getBotton(String bContent, context) {
return GestureDetector(
onTap: () async{
var res=await apiClient.request(API.app.trialVip);
if(res.code==0){
// showDialog(context: context, builder: (context){
// return const AppDialog();
// });
CloudToast.show(res.msg);
// BoxShadow.show(res.msg);
}else{
CloudToast.show(res.msg);
Navigator.pop(context);
}
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 64.w),
padding: EdgeInsets.symmetric(horizontal: 155.w,vertical: 28.w),
height: 88.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.w),
gradient: const LinearGradient(
colors: [Color(0xFFFFEAB0), Color(0xFFFFF6D8)],
end: Alignment.centerLeft,
begin: Alignment.centerRight)),
child: Text(
bContent,
style: TextStyle(fontSize: 28.sp,fontWeight:FontWeight.bold),
),
),
);
}
_getText(String content) {
return Text(
content,
style: TextStyle(color: const Color(0xFF1890FF), fontSize: 24.w),
);
}
_getVip() {
return SizedBox(
width: 370.w,
height: 100.w,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text.rich(TextSpan(children: [
TextSpan(
text: "03",
style: TextStyle(
color: const Color(0xFFFFEAB0),
fontSize: 56.sp,
fontFamily: "BlackItalic",
fontWeight: FontWeight.bold)),
TextSpan(
text: "",
style: TextStyle(
color: const Color(0xFFFFEAB0),
fontSize: 24.sp,
// height: 1.0,
))
])),
const Spacer(),
Column(
children: [
Text(
"VIP",
style: TextStyle(
color: const Color(0xFFE7F3FF),
fontSize: 32.sp,
fontFamily: "BlackItalic",
fontWeight: FontWeight.bold),
)
],
)
],
),
Text(
"短信帮手会员体验卡",
style: TextStyle(
color: const Color(0xFFFFEAB0),
fontSize: 24.sp,
),
)
],
),
);
}
// abstract class OnDialogClickListener {
// void onConfirm();
//
// void onCancel();
// }

@ -93,6 +93,7 @@ dependencies:
url_launcher: ^6.1.5 url_launcher: ^6.1.5
#tabBar样式切换 #tabBar样式切换
tab_indicator_styler: ^2.0.0 tab_indicator_styler: ^2.0.0
# # jdk # # jdk
# jverify: ^2.2.5 # jverify: ^2.2.5
## pub 集成 ## pub 集成

Loading…
Cancel
Save