微信支付宝支付
This commit is contained in:
parent
9d2f928014
commit
6c5f3bfd47
1
circle_app/.gitignore
vendored
1
circle_app/.gitignore
vendored
@ -8,6 +8,7 @@
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
pubspec.lock
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
|
||||
BIN
circle_app/assets/images/mine/icon_cooperate_ali.png
Normal file
BIN
circle_app/assets/images/mine/icon_cooperate_ali.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
circle_app/assets/images/mine/icon_cooperate_wx.png
Normal file
BIN
circle_app/assets/images/mine/icon_cooperate_wx.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
circle_app/assets/images/mine/icon_pay_is_no_select.png
Normal file
BIN
circle_app/assets/images/mine/icon_pay_is_no_select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
circle_app/assets/images/mine/icon_pay_select.png
Normal file
BIN
circle_app/assets/images/mine/icon_pay_select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
circle_app/assets/images/mine/icon_recommend_pay_way.png
Normal file
BIN
circle_app/assets/images/mine/icon_recommend_pay_way.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
circle_app/assets/images/mine/icon_yean_vip.png
Normal file
BIN
circle_app/assets/images/mine/icon_yean_vip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
@ -27,7 +27,7 @@ class AccountPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
appBar: const MyAppBar(
|
||||
centerTitle: '账号中心',
|
||||
),
|
||||
body: Scaffold(
|
||||
@ -68,15 +68,15 @@ class AccountPage extends StatelessWidget {
|
||||
Text(
|
||||
"换绑手机号",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 16.0.sp,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Text(
|
||||
logic.photo,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 16.0.sp,
|
||||
),
|
||||
),
|
||||
@ -122,11 +122,11 @@ class AccountPage extends StatelessWidget {
|
||||
Text(
|
||||
"注销账号",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 16.0.sp,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
getHomeImage("icon_in"),
|
||||
width: 24.0.sp,
|
||||
@ -273,13 +273,13 @@ class AccountPage extends StatelessWidget {
|
||||
height: 42.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.0.sp),
|
||||
color: Color(0xFF21BEAB),
|
||||
color: const Color(0xFF21BEAB),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"退出登录",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 16.0.sp,
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -9,7 +8,6 @@ import '../../components/my_app_bar.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'logic.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
class BlacklistPage extends StatelessWidget {
|
||||
@ -32,10 +30,12 @@ class BlacklistPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(centerTitle: '黑名单',),
|
||||
appBar: const MyAppBar(centerTitle: '黑名单',),
|
||||
body: SafeArea(
|
||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
child: ListView.builder(
|
||||
|
||||
itemCount: logic.lists.length,
|
||||
@ -45,8 +45,6 @@ class BlacklistPage extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
),
|
||||
),),
|
||||
);
|
||||
@ -55,108 +53,106 @@ class BlacklistPage extends StatelessWidget {
|
||||
|
||||
|
||||
Widget ListItem(User item) {
|
||||
return Container(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(children: [
|
||||
ClipOval(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
imgList.add(item.avatar);
|
||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': 0
|
||||
});
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: item.avatar,
|
||||
width: 53.sp,
|
||||
height: 53.sp,
|
||||
),
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(children: [
|
||||
ClipOval(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
imgList.add(item.avatar);
|
||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': 0
|
||||
});
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: item.avatar,
|
||||
width: 53.sp,
|
||||
height: 53.sp,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
|
||||
child: item.vip > 0 ?
|
||||
Image(
|
||||
image: AssetImage(getBaseImage("vip")),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
) : Container(),)
|
||||
],),
|
||||
SizedBox(width: 10.sp),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
item.nickname,
|
||||
style: const TextStyle(color: Colors.white70,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(width: 4.sp),
|
||||
// SizedBox(height: 8.sp),
|
||||
_buildInfoRow(item),
|
||||
// Placeholder image
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: 8.sp),
|
||||
Container(
|
||||
width: 150.sp,
|
||||
child: Text(
|
||||
item.signature,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFB7BECC)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Pla
|
||||
Spacer(),
|
||||
GestureDetector(onTap: () {
|
||||
logic.setBlock(item.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
width: 80,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child:
|
||||
Center(
|
||||
child: Text(
|
||||
"移出黑名单",
|
||||
style: TextStyle(fontSize: 14, color: Colors.white),
|
||||
Positioned(
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
|
||||
child: item.vip > 0 ?
|
||||
Image(
|
||||
image: AssetImage(getBaseImage("vip")),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
) : Container(),)
|
||||
],),
|
||||
SizedBox(width: 10.sp),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
item.nickname,
|
||||
style: const TextStyle(color: Colors.white70,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(width: 4.sp),
|
||||
// SizedBox(height: 8.sp),
|
||||
_buildInfoRow(item),
|
||||
// Placeholder image
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: 8.sp),
|
||||
SizedBox(
|
||||
width: 150.sp,
|
||||
child: Text(
|
||||
item.signature,
|
||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||
),
|
||||
),),
|
||||
],
|
||||
),
|
||||
),),
|
||||
);
|
||||
),
|
||||
],
|
||||
),
|
||||
// Pla
|
||||
const Spacer(),
|
||||
GestureDetector(onTap: () {
|
||||
logic.setBlock(item.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
width: 80,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child:
|
||||
const Center(
|
||||
child: Text(
|
||||
"移出黑名单",
|
||||
style: TextStyle(fontSize: 14, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),),
|
||||
],
|
||||
),
|
||||
),);
|
||||
}
|
||||
Widget _buildInfoRow(User userInfoBean) {
|
||||
String ageMsg = getAgeCOntent(userInfoBean!.gender, userInfoBean!.age,
|
||||
userInfoBean!.role, userInfoBean!.orientation);
|
||||
String ageMsg = getAgeCOntent(userInfoBean.gender, userInfoBean.age,
|
||||
userInfoBean.role, userInfoBean.orientation);
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
Color.fromRGBO(181, 211, 255, 1.0),
|
||||
@ -169,7 +165,7 @@ class BlacklistPage extends StatelessWidget {
|
||||
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||
child: Text(
|
||||
ageMsg ,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10,
|
||||
),
|
||||
|
||||
@ -74,6 +74,9 @@ class Call_outLogic extends GetxController {
|
||||
quniuData, (quniuData) => QnTokenData.fromJson(quniuData));
|
||||
quToken = qiniuBean.data!.token.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
showRechargeDialog(){
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
@ -145,15 +148,11 @@ class Call_outLogic extends GetxController {
|
||||
// return;
|
||||
// }
|
||||
showToast(beandata.msg);
|
||||
var callOutBean = BaseResponse<List<String>>.fromJson(
|
||||
data,
|
||||
(jsonData) => List<String>.from(jsonData),
|
||||
);
|
||||
var callOutBean = BaseResponse<List<String>>.fromJson(data, (jsonData) => List<String>.from(jsonData),);
|
||||
|
||||
textEditingController.text =
|
||||
filterSensitiveWords(textEditingController.text, callOutBean.data!);
|
||||
print(
|
||||
filterSensitiveWords(textEditingController.text, callOutBean.data!));
|
||||
print(filterSensitiveWords(textEditingController.text, callOutBean.data!));
|
||||
update();
|
||||
} else if (beandata.code == 30505) {
|
||||
var callOutBean = BaseResponse<CirclePaymentBean>.fromJson(
|
||||
|
||||
@ -6,7 +6,6 @@ import 'package:get/get.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
import '../../router/app_routers.dart';
|
||||
import '../circle/widgets/video_item.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class Call_outPage extends StatelessWidget {
|
||||
@ -46,182 +45,180 @@ class Call_outPage extends StatelessWidget {
|
||||
),
|
||||
body: SafeArea(
|
||||
child: GetBuilder(builder: (Call_outLogic controller) {
|
||||
return Container(
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () async {
|
||||
logic.startSelectCircleActivity();
|
||||
},
|
||||
child: Container(
|
||||
height: 45.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'选择圈子:',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
logic.circleName == ''
|
||||
? Container()
|
||||
: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.sp, right: 7.sp),
|
||||
height: 21.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(
|
||||
21 * 0.5.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color(0xff0AFCFF),
|
||||
Color(0xffD739EA)
|
||||
])),
|
||||
child: Text(
|
||||
logic.circleName ?? '',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
getHomeImage('icon_in'),
|
||||
width: 24.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
getCircleImage('line'),
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 15.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 200.sp,
|
||||
child: TextField(
|
||||
controller: controller.textEditingController,
|
||||
onChanged: (value) {
|
||||
controller.update();
|
||||
},
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 14.0.sp),
|
||||
maxLines: 32,
|
||||
maxLength: 200,
|
||||
decoration: InputDecoration(
|
||||
hintStyle: TextStyle(
|
||||
color: Color.fromRGBO(
|
||||
255, 255, 255, 0.6),
|
||||
fontSize: 14.sp),
|
||||
hintText: '请输入...(左下角上传图片或视频哦)',
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp),
|
||||
counter: Text('')),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 15.sp,
|
||||
top: 190.sp,
|
||||
child: Text(
|
||||
'${controller.textEditingController.text.length}/200',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 12.sp),
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 220.sp),
|
||||
child: _imageAdapter(controller)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 220.sp,left: 15.sp,right: 15.sp),
|
||||
|
||||
child:_showVideo(controller) ,)
|
||||
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
height: 60.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp, bottom: 5.sp),
|
||||
return Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () async {
|
||||
logic.startSelectCircleActivity();
|
||||
},
|
||||
child: Container(
|
||||
height: 45.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showImg();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('photo'),
|
||||
width: 30.sp,
|
||||
),
|
||||
Text(
|
||||
'选择圈子:',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showVideo();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('video'),
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if(controller.vip ==2){
|
||||
controller.isCheck = !controller.isCheck;
|
||||
controller.update();
|
||||
}else{
|
||||
controller.showRechargeDialog();
|
||||
}
|
||||
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage(controller.isCheck
|
||||
? 'check'
|
||||
: 'uncheck'),
|
||||
width: 17.5.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'使用至尊喊话',
|
||||
Expanded(child: Container()),
|
||||
logic.circleName == ''
|
||||
? Container()
|
||||
: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.sp, right: 7.sp),
|
||||
height: 21.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(
|
||||
21 * 0.5.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color(0xff0AFCFF),
|
||||
Color(0xffD739EA)
|
||||
])),
|
||||
child: Text(
|
||||
logic.circleName,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
fontSize: 12.sp),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
getHomeImage('icon_in'),
|
||||
width: 24.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'内容规范',
|
||||
style: TextStyle(
|
||||
color: Color(0xff00FFF4),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
getCircleImage('line'),
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 15.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 200.sp,
|
||||
child: TextField(
|
||||
controller: controller.textEditingController,
|
||||
onChanged: (value) {
|
||||
controller.update();
|
||||
},
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 14.0.sp),
|
||||
maxLines: 32,
|
||||
maxLength: 200,
|
||||
decoration: InputDecoration(
|
||||
hintStyle: TextStyle(
|
||||
color: const Color.fromRGBO(
|
||||
255, 255, 255, 0.6),
|
||||
fontSize: 14.sp),
|
||||
hintText: '请输入...(左下角上传图片或视频哦)',
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp),
|
||||
counter: const Text('')),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 15.sp,
|
||||
top: 190.sp,
|
||||
child: Text(
|
||||
'${controller.textEditingController.text.length}/200',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 12.sp),
|
||||
)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 220.sp),
|
||||
child: _imageAdapter(controller)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 220.sp,left: 15.sp,right: 15.sp),
|
||||
|
||||
child:_showVideo(controller) ,)
|
||||
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
height: 60.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp, bottom: 5.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showImg();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('photo'),
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showVideo();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('video'),
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if(controller.vip ==2){
|
||||
controller.isCheck = !controller.isCheck;
|
||||
controller.update();
|
||||
}else{
|
||||
controller.showRechargeDialog();
|
||||
}
|
||||
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage(controller.isCheck
|
||||
? 'check'
|
||||
: 'uncheck'),
|
||||
width: 17.5.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'使用至尊喊话',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'内容规范',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
@ -235,47 +232,44 @@ class Call_outPage extends StatelessWidget {
|
||||
return Container();
|
||||
} else {
|
||||
return _mixVideo(controller);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Widget _maxVideo(Call_outLogic controller){
|
||||
return Container(
|
||||
width:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 9*15.sp : 16*15.sp,
|
||||
height:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 16*15.sp :9*15.sp,
|
||||
|
||||
child: Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child: VideoItemWidget(controller.state.videolist[0])),
|
||||
// Center(child:controller.videoPlayerController!.value.isPlaying ? Container() : Image(image: AssetImage(getMineImage("icon_play")),width: 30.sp,height: 30.sp,),),
|
||||
Positioned(
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// showToast("删除");
|
||||
_showDelVideoDialog(Get.context!, controller);
|
||||
},
|
||||
child: Image(
|
||||
image: AssetImage(getMineImage("icon_img_del")),
|
||||
width: 20.sp,
|
||||
height: 20.sp,
|
||||
),
|
||||
))
|
||||
|
||||
// ClosedCaption(text: controller.videoPlayerController!.value.caption.text),
|
||||
// _ControlsOverlay(controller: controller.videoPlayerController),
|
||||
// VideoProgressIndicator(controller.videoPlayerController!, allowScrubbing: true),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
// Widget _maxVideo(Call_outLogic controller){
|
||||
// return SizedBox(
|
||||
// width:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 9*15.sp : 16*15.sp,
|
||||
// height:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 16*15.sp :9*15.sp,
|
||||
//
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(6.sp),
|
||||
// child: VideoItemWidget(controller.state.videolist[0])),
|
||||
// // Center(child:controller.videoPlayerController!.value.isPlaying ? Container() : Image(image: AssetImage(getMineImage("icon_play")),width: 30.sp,height: 30.sp,),),
|
||||
// Positioned(
|
||||
// top: 0,
|
||||
// right: 0,
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// // showToast("删除");
|
||||
// _showDelVideoDialog(Get.context!, controller);
|
||||
// },
|
||||
// child: Image(
|
||||
// image: AssetImage(getMineImage("icon_img_del")),
|
||||
// width: 20.sp,
|
||||
// height: 20.sp,
|
||||
// ),
|
||||
// ))
|
||||
//
|
||||
// // ClosedCaption(text: controller.videoPlayerController!.value.caption.text),
|
||||
// // _ControlsOverlay(controller: controller.videoPlayerController),
|
||||
// // VideoProgressIndicator(controller.videoPlayerController!, allowScrubbing: true),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
Widget _mixVideo(Call_outLogic controller){
|
||||
return Container(
|
||||
return SizedBox(
|
||||
width:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 135.sp : 240.sp,
|
||||
height:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 240.sp :135.sp,
|
||||
child: GestureDetector(
|
||||
@ -320,7 +314,7 @@ class Call_outPage extends StatelessWidget {
|
||||
|
||||
Widget _imageAdapter(Call_outLogic controller) {
|
||||
return GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // 每行显示的项目数量
|
||||
),
|
||||
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
||||
@ -340,7 +334,7 @@ class Call_outPage extends StatelessWidget {
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: double.infinity, // 设置容器宽度为屏幕宽度
|
||||
height: double.infinity, // 设置容器高度为屏幕高度
|
||||
child: ClipRRect(
|
||||
@ -387,14 +381,14 @@ class Call_outPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 160.sp,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -406,7 +400,7 @@ class Call_outPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -432,7 +426,7 @@ class Call_outPage extends StatelessWidget {
|
||||
"是否确认删除该照片。",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
@ -447,7 +441,7 @@ class Call_outPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(top: 30.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
@ -461,7 +455,7 @@ class Call_outPage extends StatelessWidget {
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -481,7 +475,7 @@ class Call_outPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
@ -495,7 +489,7 @@ class Call_outPage extends StatelessWidget {
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -529,14 +523,14 @@ class Call_outPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 160.sp,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -548,7 +542,7 @@ class Call_outPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -574,7 +568,7 @@ class Call_outPage extends StatelessWidget {
|
||||
"是否确认删除该视频。",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
@ -589,7 +583,7 @@ class Call_outPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(top: 30.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
@ -603,7 +597,7 @@ class Call_outPage extends StatelessWidget {
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -625,7 +619,7 @@ class Call_outPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
@ -639,7 +633,7 @@ class Call_outPage extends StatelessWidget {
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
|
||||
@ -35,19 +35,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
List<String> genderList = ['男', '女,' 'MTF', 'FTM', 'CD', '酷儿'];
|
||||
|
||||
List<String> orientationList = [
|
||||
'异性恋',
|
||||
'同性恋',
|
||||
'双性恋',
|
||||
'泛性恋',
|
||||
'无性恋',
|
||||
'智性恋',
|
||||
'性单恋'
|
||||
];
|
||||
|
||||
List<String> roleList = ['Sado', 'Maso', 'Dom', 'Sub', 'Switch'];
|
||||
|
||||
ListLogic? listsLg;
|
||||
|
||||
@ -421,7 +409,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
],
|
||||
),
|
||||
)),
|
||||
GestureDetector(
|
||||
GestureDetector(//加入圈子
|
||||
onTap: () async {
|
||||
if (widget.bean.isJoin) {
|
||||
_showOutCircleDialog(
|
||||
@ -475,7 +463,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -487,7 +475,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -617,6 +605,22 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: ()async {
|
||||
var sp = await SharedPreferencesHelper.getInstance();
|
||||
String myUserId = sp.getMyUserId();
|
||||
|
||||
if(lists.user?.id!.toString() == myUserId){
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: {});
|
||||
return;
|
||||
}
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
||||
|
||||
});
|
||||
return;
|
||||
}
|
||||
pushHomePage(lists, lists.id.toString());
|
||||
},
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@ -624,21 +628,12 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
getCircleImage('avatar_bg'),
|
||||
width: 42.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
return;
|
||||
}
|
||||
pushHomePage(lists, lists.id.toString());
|
||||
},
|
||||
child: ClipOval(
|
||||
child: Image.network(
|
||||
lists.user!.avatar!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
lists.user!.avatar!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -690,7 +685,9 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
'${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
||||
lists.user!.role!, lists.user!.orientation!),
|
||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
@ -907,6 +904,21 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: ()async {
|
||||
var sp = await SharedPreferencesHelper.getInstance();
|
||||
String myUserId = sp.getMyUserId();
|
||||
if(lists.user?.id!.toString() == myUserId){
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: "");
|
||||
return;
|
||||
}
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
||||
|
||||
});
|
||||
return;
|
||||
}
|
||||
pushHomePage(lists, lists.id.toString());
|
||||
},
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@ -914,23 +926,14 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
getCircleImage('avatar_bg'),
|
||||
width: 42.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
return;
|
||||
}
|
||||
pushHomePage(
|
||||
lists, widget.bean.id.toString());
|
||||
},
|
||||
child: ClipOval(
|
||||
child: Image.network(
|
||||
lists.user!.avatar!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
))
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
lists.user!.avatar!,
|
||||
width: 40.sp,
|
||||
height: 40.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
Expanded(
|
||||
@ -981,7 +984,8 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
'${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
||||
lists.user!.role!, lists.user!.orientation!),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
|
||||
@ -58,7 +58,7 @@ class HelpPage extends StatelessWidget {
|
||||
padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 300.sp,
|
||||
child: Align(
|
||||
alignment: Alignment.topCenter,
|
||||
@ -73,10 +73,10 @@ class HelpPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 300,
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.sp),
|
||||
color: Color(0xFF2E2E3B),
|
||||
color: const Color(0xFF2E2E3B),
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
@ -85,7 +85,7 @@ class HelpPage extends StatelessWidget {
|
||||
Text(
|
||||
'猜你想问',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
@ -126,7 +126,7 @@ class HelpPage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
logic.msgList[index].question,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white),
|
||||
),
|
||||
Image(
|
||||
@ -181,7 +181,7 @@ class HelpPage extends StatelessWidget {
|
||||
width: 14.sp,
|
||||
height: 14.sp,
|
||||
),
|
||||
label: Text(
|
||||
label: const Text(
|
||||
'意见反馈',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
|
||||
@ -5,6 +5,7 @@ import 'package:circle_app/app/circle/view.dart';
|
||||
import 'package:circle_app/app/msg/view.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:circle_app/view/ExitAppConfirmation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -33,7 +34,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
onTap: () {
|
||||
// Get.toNamed(AppRoutes.Complete_materialPage);
|
||||
},
|
||||
child: Stack(children: [
|
||||
child: ExitAppConfirmation(child: Stack(children: [
|
||||
Scaffold(
|
||||
// backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
|
||||
bottomNavigationBar: Container(
|
||||
@ -61,14 +62,14 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
body: PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (int index) {
|
||||
controller.updateIndex(index);
|
||||
},
|
||||
onPageChanged: (int index) {
|
||||
controller.updateIndex(index);
|
||||
},
|
||||
children: controller.tabs,
|
||||
),
|
||||
),
|
||||
|
||||
],),
|
||||
],),)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ class LoginLogic extends GetxController {
|
||||
//倒计时
|
||||
starDownTimer() {
|
||||
if (sendCodeBtn == false && seconds == 60) {
|
||||
isPhoto = true;
|
||||
getCode();
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -109,7 +108,7 @@ class LoginPage extends StatelessWidget {
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 200.sp,
|
||||
child: TextField(
|
||||
controller: logic.codeEditingController,
|
||||
@ -142,7 +141,7 @@ class LoginPage extends StatelessWidget {
|
||||
width: 76.sp,
|
||||
height: 29.sp,
|
||||
decoration: BoxDecoration(
|
||||
color:logic.isPhoto ? Color(0xFF21BEAB) : Colors.white30,
|
||||
color:logic.isPhoto ? logic.sendCodeBtn? Colors.white30: const Color(0xFF21BEAB) : Colors.white30,
|
||||
borderRadius: BorderRadius.circular(
|
||||
29.sp / 2)
|
||||
),
|
||||
|
||||
@ -10,7 +10,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class MinefragmentLogic extends GetxController {
|
||||
final MinefragmentState state = MinefragmentState();
|
||||
User? userInfoBean = null;
|
||||
User? userInfoBean;
|
||||
String ageMsg = "";
|
||||
var isVip = 0;
|
||||
var like_count = 0;
|
||||
@ -27,7 +27,7 @@ class MinefragmentLogic extends GetxController {
|
||||
int orientation = -1;
|
||||
|
||||
String enterHomeInfoMsg = "进入主页";
|
||||
String JoinedCircle = "";
|
||||
String joinedCircle = "";
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
@ -43,7 +43,7 @@ class MinefragmentLogic extends GetxController {
|
||||
like_count = bean.data.likeCount ?? 0;
|
||||
like_me_count = bean.data.likeMeCount ?? 0;
|
||||
recent_visit_count = bean.data.recentVisitCount ?? 0;
|
||||
JoinedCircle = "${"加入了"+bean.data.joininterestcount.toString()}个圈子";
|
||||
joinedCircle = "${"加入了${bean.data.joininterestcount}"}个圈子";
|
||||
SharedPreferences sharedPreferences =
|
||||
await SharedPreferences.getInstance();
|
||||
|
||||
|
||||
@ -46,14 +46,12 @@ class MinefragmentPage extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
_buildAvatarRow(logic),
|
||||
_FriendsRow(logic),
|
||||
Container(
|
||||
child: Image(
|
||||
image: AssetImage(getHomeImage("icon_vip")),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
_friendsRow(logic),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_vip")),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
_CircleLiveView(logic),
|
||||
_circleLiveView(logic),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -62,13 +60,13 @@ class MinefragmentPage extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
|
||||
Widget _CircleLiveView(MinefragmentLogic logic) {
|
||||
Widget _circleLiveView(MinefragmentLogic logic) {
|
||||
return Column(
|
||||
children: [_CircleItemView(logic), _HelpItemView(), _SetUpItemView()],
|
||||
children: [_circleItemView(logic), _helpItemView(), _setUpItemView()],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _SetUpItemView() {
|
||||
Widget _setUpItemView() {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
@ -110,7 +108,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _HelpItemView() {
|
||||
Widget _helpItemView() {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
@ -151,7 +149,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _CircleItemView(MinefragmentLogic logic) {
|
||||
Widget _circleItemView(MinefragmentLogic logic) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
@ -179,7 +177,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
logic.JoinedCircle,
|
||||
logic.joinedCircle,
|
||||
style: const TextStyle(color: Colors.white30),
|
||||
),
|
||||
Image(
|
||||
@ -195,7 +193,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _FriendsRow(MinefragmentLogic logic) {
|
||||
Widget _friendsRow(MinefragmentLogic logic) {
|
||||
return Center(
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
@ -242,11 +240,9 @@ class MinefragmentPage extends StatelessWidget {
|
||||
onTap: ()async {
|
||||
logic.like_me_count_new = 0;
|
||||
logic.update();
|
||||
if(null!=logic.like_me_count){
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
||||
});
|
||||
}
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
||||
});
|
||||
Get.toNamed(AppRoutes.LikeListActivity);
|
||||
},
|
||||
child: Stack(
|
||||
@ -300,11 +296,9 @@ class MinefragmentPage extends StatelessWidget {
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () async{
|
||||
logic.recent_visit_count_new = 0;
|
||||
if(null!=logic.recent_visit_count){
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setInt(SharedPreferencesHelper.RECENTVISITCOUNT, logic.recent_visit_count);
|
||||
});
|
||||
}
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setInt(SharedPreferencesHelper.RECENTVISITCOUNT, logic.recent_visit_count);
|
||||
});
|
||||
Get.toNamed(AppRoutes.VisitorListActivity);
|
||||
},
|
||||
child: Stack(
|
||||
|
||||
@ -31,7 +31,7 @@ class ReportPage extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: '举报',
|
||||
actionWdiget: Text(
|
||||
actionWdiget: const Text(
|
||||
"提交",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -52,13 +52,13 @@ class ReportPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 120.sp,
|
||||
child: _reportAdapter(controller),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(16, 20, 16, 0),
|
||||
padding: const EdgeInsets.fromLTRB(16, 20, 16, 0),
|
||||
child: ListView(
|
||||
children: [
|
||||
Text(
|
||||
@ -71,7 +71,7 @@ class ReportPage extends StatelessWidget {
|
||||
SizedBox(height: 20.sp),
|
||||
// 添加 RecyclerView(ListView) 的内容
|
||||
// 例如: MyRecyclerViewWidget(),
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 130.sp,
|
||||
child: _imageAdapter(controller)),
|
||||
Text(
|
||||
@ -81,19 +81,19 @@ class ReportPage extends StatelessWidget {
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
const SizedBox(height: 30),
|
||||
Container(
|
||||
// margin: EdgeInsets.only(left: 10, right: 10),
|
||||
height: 200.sp,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF4C3E5F),
|
||||
color: const Color(0xFF4C3E5F),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
padding: EdgeInsets.all(16.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 200.sp,
|
||||
child: TextField(
|
||||
controller: controller.textEditingController,
|
||||
@ -106,13 +106,13 @@ class ReportPage extends StatelessWidget {
|
||||
maxLength: 200,
|
||||
decoration: InputDecoration(
|
||||
hintStyle: TextStyle(
|
||||
color: Color.fromRGBO(
|
||||
color: const Color.fromRGBO(
|
||||
255, 255, 255, 0.6),
|
||||
fontSize: 14.sp),
|
||||
hintText: '违规补充说明,帮助审核处理,选填',
|
||||
border: InputBorder.none,
|
||||
|
||||
counter: Text('')),
|
||||
counter: const Text('')),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@ -164,7 +164,7 @@ class ReportPage extends StatelessWidget {
|
||||
|
||||
Widget _reportAdapter(ReportLogic controller) {
|
||||
return GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
// crossAxisSpacing: 6.sp,
|
||||
childAspectRatio: 3,
|
||||
@ -189,7 +189,7 @@ class ReportPage extends StatelessWidget {
|
||||
|
||||
Widget _imageAdapter(ReportLogic controller) {
|
||||
return GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // 每行显示的项目数量
|
||||
),
|
||||
itemCount: controller.state.imaglist.length<3 ? controller.state.imaglist.length+1: controller.state.imaglist.length, // Replace with your item count// 项目的总数量,包括固定图片和接口获取的项目
|
||||
@ -231,7 +231,7 @@ class ReportPage extends StatelessWidget {
|
||||
EdgeInsets.only(left: 8.sp, right: 8.sp, top: 6.sp, bottom: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20.sp),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
@ -260,9 +260,9 @@ class ReportPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20.0), // 设置圆角半径
|
||||
border: Border.all(
|
||||
color: Color(0xFF392D53),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
color: Color(0xFF392D53),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
@ -270,7 +270,7 @@ class ReportPage extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text(
|
||||
bean.name,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 11.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
@ -287,7 +287,7 @@ class ReportPage extends StatelessWidget {
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: double.infinity, // 设置容器宽度为屏幕宽度
|
||||
height: double.infinity, // 设置容器高度为屏幕高度
|
||||
child: ClipRRect(
|
||||
|
||||
@ -16,7 +16,7 @@ class UserinfoLogic extends GetxController {
|
||||
var userId = Get.arguments ?? "";
|
||||
final UserinfoState state = UserinfoState();
|
||||
final ImagePicker _picker = ImagePicker();
|
||||
UserBean? userInfoBean = null;
|
||||
UserBean? userInfoBean;
|
||||
String imId = '';
|
||||
String ageMsg = "";
|
||||
var isVip = 0;
|
||||
@ -34,7 +34,7 @@ class UserinfoLogic extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
|
||||
SmartDialog.showLoading();
|
||||
if (userId != '') {
|
||||
SharedPreferences sharedPreferences =
|
||||
await SharedPreferences.getInstance();
|
||||
@ -86,12 +86,12 @@ class UserinfoLogic extends GetxController {
|
||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
isLike = bean.data.is_follow;
|
||||
isLike = bean.data.isFollow;
|
||||
isLikeFoMsg =
|
||||
"${bean.data.imageUrgeCount}位圈友感兴趣,其中${bean.data.likeMeCount}位已催您更新";
|
||||
userInfoBean = bean.data!.user;
|
||||
isVip = userInfoBean!.vip;
|
||||
imId = bean.data.account_id;
|
||||
imId = bean.data.accountId;
|
||||
onLineCity = userInfoBean!.isOnline == true ? "在线" : "离线";
|
||||
if (userInfoBean!.city != null) {
|
||||
onLineCity = "$onLineCity·${userInfoBean!.city}";
|
||||
@ -123,7 +123,7 @@ class UserinfoLogic extends GetxController {
|
||||
//}
|
||||
}
|
||||
update();
|
||||
|
||||
SmartDialog.dismiss();
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getqiniuToken, params: {});
|
||||
var bean = BaseResponse<QnTokenData>.fromJson(
|
||||
@ -209,7 +209,7 @@ class UserinfoLogic extends GetxController {
|
||||
update();
|
||||
}
|
||||
});
|
||||
} catch (e) {}
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,23 +300,23 @@ class ResponseBean {
|
||||
UserBean user;
|
||||
int likeMeCount;
|
||||
int imageUrgeCount;
|
||||
bool is_follow;
|
||||
String account_id;
|
||||
bool isFollow;
|
||||
String accountId;
|
||||
|
||||
ResponseBean(
|
||||
{required this.user,
|
||||
required this.likeMeCount,
|
||||
required this.imageUrgeCount,
|
||||
required this.account_id,
|
||||
required this.is_follow});
|
||||
required this.accountId,
|
||||
required this.isFollow});
|
||||
|
||||
factory ResponseBean.fromJson(Map<String, dynamic> json) {
|
||||
return ResponseBean(
|
||||
account_id: json['account_id'],
|
||||
accountId: json['account_id'],
|
||||
user: UserBean.fromJson(json['user']),
|
||||
likeMeCount: json['like_me_count'],
|
||||
imageUrgeCount: json['image_urge_count'],
|
||||
is_follow: json['is_follow'],
|
||||
isFollow: json['is_follow'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
||||
Positioned(
|
||||
bottom: 27.sp,
|
||||
width: Get.width,
|
||||
child: _MeInfoButton(logic),
|
||||
child: _meInfoButton(logic),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -97,7 +97,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
||||
|
||||
|
||||
|
||||
Widget _MeInfoButton(UserinfoLogic controller) {
|
||||
Widget _meInfoButton(UserinfoLogic controller) {
|
||||
if (controller.isMe) {
|
||||
return const SizedBox();
|
||||
} else {
|
||||
|
||||
@ -23,19 +23,6 @@ class HomeCallOutView extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _HomeCallOutViewState extends State<HomeCallOutView> {
|
||||
List<String> genderList = ['男', '女,' 'MTF', 'FTM', 'CD', '酷儿'];
|
||||
|
||||
List<String> orientationList = [
|
||||
'异性恋',
|
||||
'同性恋',
|
||||
'双性恋',
|
||||
'泛性恋',
|
||||
'无性恋',
|
||||
'智性恋',
|
||||
'性单恋'
|
||||
];
|
||||
|
||||
List<String> roleList = ['Sado', 'Maso', 'Dom', 'Sub', 'Switch'];
|
||||
|
||||
HomeCallOutLogic? listsLg;
|
||||
|
||||
@ -252,8 +239,12 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
||||
Color(0xff8DFFF8),
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
|
||||
child: Text(
|
||||
'${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
||||
lists.user!.role!, lists.user!.orientation!),
|
||||
|
||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
@ -483,7 +474,9 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
'${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
||||
lists.user!.role!, lists.user!.orientation!),
|
||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
|
||||
@ -1,121 +1,250 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:alipay_kit/alipay_kit.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
joiinCircileTipWdiget(String cicleId,String pirce,String oldPrice,String title) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
alignment: Alignment.center,
|
||||
child:
|
||||
Stack(
|
||||
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../util/PaymentUtils.dart';
|
||||
import 'open_vip_tip/logic.dart';
|
||||
bool isZfbPrice = true;
|
||||
joiinCircileTipWdiget(String cicleId,String pirce,String oldPrice,String title,MyCallback myCallback) {
|
||||
return StatefulBuilder(
|
||||
builder:(BuildContext context, StateSetter setState) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 339.sp,
|
||||
height: 330.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getCircleImage('add_tip_bg'))))),
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('close'),
|
||||
width: 24.sp,
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 24.sp,
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
left: 17.sp,
|
||||
top: 64.sp,
|
||||
child: Text(
|
||||
'为什么要解锁圈子?',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
top: 98.sp,
|
||||
child: Container(
|
||||
child:
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Text(
|
||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的;3、谢绝只会白嫖的猎奇人士。',
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 0.8),
|
||||
fontSize: 12.sp)),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 18.sp,
|
||||
child: Container(
|
||||
width: 168.sp,
|
||||
height: 42.sp,
|
||||
alignment: Alignment.center,
|
||||
height: 330.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [Color(0xff0AFCFF), Color(0xffD739EA)])),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getCircleImage('add_tip_bg'))))),
|
||||
Positioned(
|
||||
top: 5.sp,
|
||||
right: 12.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('close'),
|
||||
width: 24.sp,
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 24.sp,
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
title,
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 72.sp,
|
||||
)),
|
||||
Positioned(
|
||||
left: 17.sp,
|
||||
top: 64.sp,
|
||||
child: Text(
|
||||
'为什么要解锁圈子?',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
)),
|
||||
Positioned(
|
||||
top: 98.sp,
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Text(
|
||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的;3、谢绝只会白嫖的猎奇人士。',
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 0.8),
|
||||
fontSize: 12.sp)),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 108.sp,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'¥$pirce',
|
||||
style: TextStyle(
|
||||
color: Color(0xffE845FF),
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isZfbPrice = true;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
isZfbPrice
|
||||
? getMineImage("icon_pay_select")
|
||||
: getMineImage("icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_ali'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'支付宝支付',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_recommend_pay_way'),
|
||||
width: 32.0.sp,
|
||||
height: 16.0.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'(原价$oldPrice)',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.lineThrough,
|
||||
decorationColor: Colors.white70,
|
||||
SizedBox(width: 24.0.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isZfbPrice = false;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
!isZfbPrice
|
||||
? getMineImage("icon_pay_select")
|
||||
: getMineImage("icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_wx'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'微信支付',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
Positioned(
|
||||
bottom: 18.sp,
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
unlockingPayment(myCallback);
|
||||
},
|
||||
child: Container(
|
||||
width: 168.sp,
|
||||
height: 42.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [Color(0xff0AFCFF), Color(0xffD739EA)])),
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 72.sp,
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'¥$pirce',
|
||||
style: TextStyle(
|
||||
color: Color(0xffE845FF),
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'(原价$oldPrice)',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.lineThrough,
|
||||
decorationColor: Colors.white70,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
});
|
||||
}
|
||||
showJoinCiclePiker(String cicleId,String pirce,String oldPrice,int type) {
|
||||
unlockingPayment(MyCallback myCallback)async{
|
||||
if (isZfbPrice) {
|
||||
var data = await DioManager.instance.post(url: Api.postAliPayOrder, params: {
|
||||
//"product_id": priceBean[index].id,
|
||||
"type": 1});
|
||||
var bean = BaseResponse<PayUrlBean>.fromJson(data, (data) => PayUrlBean.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
var data = await AlipayKitPlatform.instance.pay(
|
||||
orderInfo: bean.data.payUrl,
|
||||
isShowLoading :true
|
||||
);
|
||||
}else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
|
||||
} else{
|
||||
initWxApi();
|
||||
var data = await DioManager.instance.post(url: Api.postWxOrder, params: {
|
||||
// "product_id": priceBean[index].id,
|
||||
"type": 1});
|
||||
var bean = BaseResponse<PaymentData>.fromJson(data, (data) => PaymentData.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
openWxPay(bean.data);
|
||||
}else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef void MyCallback(bool payResult);
|
||||
|
||||
showJoinCiclePiker(String cicleId,String pirce,String oldPrice,int type,MyCallback payResult) {
|
||||
|
||||
String title = ['解锁圈子才能发布喊话','解锁圈子才能查看主页','解锁圈子才能主动私聊'][type];
|
||||
return Get.bottomSheet(
|
||||
joiinCircileTipWdiget(cicleId,pirce,oldPrice,title),
|
||||
joiinCircileTipWdiget(cicleId,pirce,oldPrice,title,payResult),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false
|
||||
);
|
||||
|
||||
@ -1,8 +1,143 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:alipay_kit/alipay_kit.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../network/api.dart';
|
||||
import '../../../network/dio_manager.dart';
|
||||
import '../../../util/PaymentUtils.dart';
|
||||
import 'state.dart';
|
||||
import 'package:fluwx/fluwx.dart' as fluwx;
|
||||
|
||||
class Open_vip_tipLogic extends GetxController {
|
||||
List<PriceBean> priceBean = [];
|
||||
bool isZfbPrice = true;
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
var data = await DioManager.instance.get(url: Api.getVipPrice, params: {});
|
||||
var vipPriceList = BaseResponse<List<PriceBean>>.fromJson(data, (data) =>
|
||||
List<PriceBean>.from(data.map((item) => PriceBean.fromJson(item))),
|
||||
);
|
||||
priceBean = vipPriceList.data;
|
||||
update();
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
final Open_vip_tipState state = Open_vip_tipState();
|
||||
|
||||
startPayment() async {
|
||||
if (isZfbPrice) {
|
||||
var data = await DioManager.instance.post(url: Api.postAliPayOrder, params: {"product_id": priceBean[index].id, "type": 2});
|
||||
var bean = BaseResponse<PayUrlBean>.fromJson(data, (data) => PayUrlBean.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
AlipayKitPlatform.instance.pay(
|
||||
orderInfo: bean.data.payUrl,
|
||||
isShowLoading :true
|
||||
);
|
||||
}else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
|
||||
} else{
|
||||
initWxApi();
|
||||
var data = await DioManager.instance.post(url: Api.postWxOrder, params: {"product_id": priceBean[index].id, "type": 2});
|
||||
var bean = BaseResponse<PaymentData>.fromJson(data, (data) => PaymentData.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
openWxPay(bean.data);
|
||||
}else {
|
||||
showToast(bean.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//注册微信
|
||||
void initWxApi() {
|
||||
fluwx.registerWxApi(
|
||||
appId: "wx6c6f4c89465dac4b",
|
||||
universalLink: "dcc5bd5012a417eb585684700fbd1307",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class PayUrlBean {
|
||||
String payUrl;
|
||||
|
||||
PayUrlBean({
|
||||
required this.payUrl,
|
||||
});
|
||||
|
||||
factory PayUrlBean.fromJson(Map<String, dynamic> json) {
|
||||
return PayUrlBean(
|
||||
payUrl: json['pay_url'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class PaymentData {
|
||||
String appId;
|
||||
String mchId;
|
||||
String nonceStr;
|
||||
String sign;
|
||||
String prepayId;
|
||||
String packageX;
|
||||
String timestamp;
|
||||
|
||||
PaymentData({
|
||||
required this.appId,
|
||||
required this.mchId,
|
||||
required this.nonceStr,
|
||||
required this.sign,
|
||||
required this.prepayId,
|
||||
required this.packageX,
|
||||
required this.timestamp,
|
||||
});
|
||||
|
||||
factory PaymentData.fromJson(Map<String, dynamic> json) {
|
||||
return PaymentData(
|
||||
appId: json['appid'],
|
||||
mchId: json['mchId'],
|
||||
nonceStr: json['nonceStr'],
|
||||
sign: json['sign'],
|
||||
prepayId: json['prepayId'],
|
||||
packageX: json['packageX'],
|
||||
timestamp: json['timestamp'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class PriceBean {
|
||||
int id;
|
||||
String title;
|
||||
double amount;
|
||||
double oldAmount;
|
||||
String iosItem;
|
||||
|
||||
PriceBean({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.amount,
|
||||
required this.oldAmount,
|
||||
required this.iosItem,
|
||||
});
|
||||
|
||||
factory PriceBean.fromJson(Map<String, dynamic> json) {
|
||||
return PriceBean(
|
||||
id: json['id'],
|
||||
title: json['title'],
|
||||
amount: json['amount'].toDouble(),
|
||||
oldAmount: json['old_amount'].toDouble(),
|
||||
iosItem: json['ios_item'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,24 +14,29 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List vipFuncList = ["身份标识",
|
||||
"专属客服",
|
||||
"无限畅聊",
|
||||
"至尊喊话",
|
||||
"图片私聊",
|
||||
"视频私聊",
|
||||
"看谁喜欢你",
|
||||
"看谁看过你",
|
||||
"缘分匹配"];
|
||||
List vipFuncList = [
|
||||
"身份标识",
|
||||
"专属客服",
|
||||
"无限畅聊",
|
||||
"至尊喊话",
|
||||
"图片私聊",
|
||||
"视频私聊",
|
||||
"看谁喜欢你",
|
||||
"看谁看过你",
|
||||
"缘分匹配"
|
||||
];
|
||||
|
||||
List vipDescList = ['会员专属,更显尊贵',"给您更加贴心的服务",
|
||||
"可以随心所欲畅聊",
|
||||
"发布的喊话在圈内凸显",
|
||||
"聊天可以一直使用图片",
|
||||
"聊天可以一直使用视频",
|
||||
"看到所有喜欢你的人",
|
||||
"看到所有看过你的人",
|
||||
"为您匹配更合适的人"];
|
||||
List vipDescList = [
|
||||
'会员专属,更显尊贵',
|
||||
"给您更加贴心的服务",
|
||||
"可以随心所欲畅聊",
|
||||
"发布的喊话在圈内凸显",
|
||||
"聊天可以一直使用图片",
|
||||
"聊天可以一直使用视频",
|
||||
"看到所有喜欢你的人",
|
||||
"看到所有看过你的人",
|
||||
"为您匹配更合适的人"
|
||||
];
|
||||
// for (int i = 1; i < 10; i++) {
|
||||
//
|
||||
// }
|
||||
@ -39,13 +44,13 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
return GetBuilder(builder: (Open_vip_tipLogic controller) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
body: SizedBox(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
height: 453.sp,
|
||||
height: 483.sp,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
@ -78,38 +83,126 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
height: 180.sp,
|
||||
child: Swiper(
|
||||
itemCount: vipFuncList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return funcItem(vipFuncList[index],
|
||||
vipDescList[index], index+1);
|
||||
},
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return funcItem(vipFuncList[index],
|
||||
vipDescList[index], index + 1);
|
||||
},
|
||||
loop: true,
|
||||
autoplay:true,
|
||||
autoplay: true,
|
||||
pagination: new SwiperPagination(
|
||||
builder: DotSwiperPaginationBuilder(
|
||||
color: Color(0x99FFFFFF),
|
||||
size:4.sp,
|
||||
activeColor: Color(0xFF00FFD2),
|
||||
activeSize: 4.sp
|
||||
)
|
||||
),//如果不填则不显示指示点
|
||||
),
|
||||
builder: DotSwiperPaginationBuilder(
|
||||
color: Color(0x99FFFFFF),
|
||||
size: 4.sp,
|
||||
activeColor: Color(0xFF00FFD2),
|
||||
activeSize: 4.sp)), //如果不填则不显示指示点
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: 227.sp,
|
||||
child: controller.priceBean.isEmpty
|
||||
? Container()
|
||||
: Container(
|
||||
width: 339.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
typeItem(
|
||||
controller, controller.index == 0, 0),
|
||||
typeItem(
|
||||
controller, controller.index == 1, 1),
|
||||
typeItem(
|
||||
controller, controller.index == 2, 2),
|
||||
],
|
||||
))),
|
||||
Positioned(
|
||||
bottom: 108.sp,
|
||||
child: Container(
|
||||
width: 339.sp,
|
||||
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
typeItem(controller, controller.index == 0, 0),
|
||||
typeItem(controller, controller.index == 1, 1),
|
||||
typeItem(controller, controller.index == 2, 2),
|
||||
],
|
||||
))),
|
||||
margin: EdgeInsets.only(top: 24.0.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// 处理支付宝支付逻辑
|
||||
controller.isZfbPrice = true;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
controller.isZfbPrice?
|
||||
getMineImage("icon_pay_select"): getMineImage("icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_ali'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'支付宝支付',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_recommend_pay_way'),
|
||||
width: 32.0.sp,
|
||||
height: 16.0.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.0.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.isZfbPrice = false;
|
||||
controller.update();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
!controller.isZfbPrice?
|
||||
getMineImage("icon_pay_select"): getMineImage("icon_pay_is_no_select"),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 8.0.sp),
|
||||
Image.asset(
|
||||
getMineImage('icon_cooperate_wx'),
|
||||
width: 20.0.sp,
|
||||
height: 20.0.sp,
|
||||
),
|
||||
SizedBox(width: 4.0.sp),
|
||||
Text(
|
||||
'微信支付',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 14.0.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 48.sp,
|
||||
child: Container(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
controller.startPayment();
|
||||
},
|
||||
child: Container(
|
||||
width: 168.sp,
|
||||
height: 42.sp,
|
||||
alignment: Alignment.center,
|
||||
@ -125,9 +218,9 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
child: Text(
|
||||
'立即解锁',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
)),
|
||||
),)),
|
||||
Positioned(
|
||||
bottom: 17.sp,
|
||||
child: Container(
|
||||
@ -164,6 +257,8 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
typeItem(Open_vip_tipLogic controller, bool isSelected, int index) {
|
||||
double pricePerDay = controller.priceBean[index].amount / 30;
|
||||
String formattedPricePerDay = '${pricePerDay.toStringAsFixed(2)}元/天';
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
controller.index = index;
|
||||
@ -191,25 +286,25 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(
|
||||
'3个月',
|
||||
controller.priceBean[index].title,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
Text(
|
||||
'0.67元/天',
|
||||
formattedPricePerDay,
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'58元',
|
||||
controller.priceBean[index].amount.toString(),
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'388元',
|
||||
"${controller.priceBean[index].oldAmount}元",
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 10.sp,
|
||||
@ -222,6 +317,13 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
controller.priceBean[index].title=="年度会员"? Positioned(
|
||||
top: 0.sp,
|
||||
left: 0.sp,
|
||||
child: Image.asset(getMineImage("icon_yean_vip")),
|
||||
width: 44.sp,
|
||||
height: 18.sp,
|
||||
) :Container()
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
@ -24,6 +24,24 @@ class Api {
|
||||
static const getCircleList = 'user-service/app/config';
|
||||
|
||||
|
||||
//获取vip价格
|
||||
static const getVipPrice = 'mall-service/vips';
|
||||
|
||||
|
||||
|
||||
|
||||
//支付宝支付
|
||||
static const postAliPayOrder = 'mall-service/alipay/order';
|
||||
|
||||
|
||||
|
||||
|
||||
//微信支付
|
||||
static const postWxOrder = 'mall-service/wxpay/order';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//刷新token
|
||||
static const refreshToken = 'user-service/login/token/refresh';
|
||||
|
||||
@ -39,9 +39,9 @@ class DioManager {
|
||||
// 请求基地址
|
||||
baseUrl: baseUrl,
|
||||
// 连接服务器超时时间,单位是毫秒
|
||||
connectTimeout: Duration(seconds: 30000000000),
|
||||
connectTimeout: const Duration(seconds: 300),
|
||||
// 接收数据的最长时限
|
||||
receiveTimeout: Duration(seconds: 30000000000),
|
||||
receiveTimeout: const Duration(seconds: 300),
|
||||
));
|
||||
_dio!.interceptors.add(LogInterceptor(responseBody: true));
|
||||
// _dio!.interceptors.add(ConnectivityInterceptor());
|
||||
@ -175,7 +175,7 @@ class DioManager {
|
||||
'Imei': await getImei(),
|
||||
'Brand': await getBrand(),
|
||||
});
|
||||
print(">>>>>"+params.toString());
|
||||
print(">>>>>$params");
|
||||
|
||||
/// 不同请求方法,不同的请求参数,按实际项目需求分.
|
||||
/// 这里 get 是 queryParameters,其它用 data. FormData 也是 data
|
||||
|
||||
32
circle_app/lib/util/PaymentUtils.dart
Normal file
32
circle_app/lib/util/PaymentUtils.dart
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
import 'package:circle_app/util/util.dart';
|
||||
|
||||
import '../common/Widgets/open_vip_tip/logic.dart';
|
||||
import 'package:fluwx/fluwx.dart' as fluwx;
|
||||
//微信支付
|
||||
Future<void> openWxPay(PaymentData data) async {
|
||||
//是否安装微信
|
||||
bool isInstalled = await fluwx.isWeChatInstalled;
|
||||
if (!isInstalled) {
|
||||
showToast("请先安装微信");
|
||||
return;
|
||||
}
|
||||
//调起支付
|
||||
fluwx.payWithWeChat(
|
||||
appId: data.appId,
|
||||
partnerId: data.mchId,
|
||||
prepayId: data.prepayId,
|
||||
packageValue: data.packageX,
|
||||
nonceStr: data.nonceStr,
|
||||
timeStamp: int.parse(data.timestamp),
|
||||
sign: data.sign,
|
||||
);
|
||||
//监听微信回调
|
||||
fluwx.weChatResponseEventHandler.listen((event) {
|
||||
if(event.isSuccessful) {
|
||||
showToast("微信支付成功");
|
||||
} else {
|
||||
showToast(event.errStr??"微信支付成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
40
circle_app/lib/view/ExitAppConfirmation.dart
Normal file
40
circle_app/lib/view/ExitAppConfirmation.dart
Normal file
@ -0,0 +1,40 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../util/util.dart';
|
||||
|
||||
class ExitAppConfirmation extends StatefulWidget {
|
||||
final Widget child;
|
||||
|
||||
ExitAppConfirmation({required this.child});
|
||||
|
||||
@override
|
||||
_ExitAppConfirmationState createState() => _ExitAppConfirmationState();
|
||||
}
|
||||
|
||||
class _ExitAppConfirmationState extends State<ExitAppConfirmation> {
|
||||
DateTime? _lastPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: _onBackPressed,
|
||||
child: widget.child,
|
||||
);
|
||||
}
|
||||
|
||||
Future<bool> _onBackPressed() {
|
||||
final currentTime = DateTime.now();
|
||||
|
||||
if (_lastPressed == null ||
|
||||
currentTime.difference(_lastPressed!) > Duration(seconds: 2)) {
|
||||
_lastPressed = currentTime;
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// const SnackBar(content: Text('再按一次返回键退出应用')),
|
||||
// );
|
||||
showToast("再按一次返回键退出应用");
|
||||
return Future.value(false);
|
||||
}
|
||||
return Future.value(true);
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class HometabBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => HometabLogic());
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'state.dart';
|
||||
|
||||
class HometabLogic extends GetxController {
|
||||
final HometabState state = HometabState();
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
class HometabState {
|
||||
HometabState() {
|
||||
///Initialize variables
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:circle_app/app/minefragment/view.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class HometabPage extends StatefulWidget {
|
||||
HometabPage({Key? key}) : super(key: key);
|
||||
|
||||
// final logic = Get.find<HometabLogic>();
|
||||
// final state = Get.find<HometabLogic>().state;
|
||||
|
||||
@override
|
||||
_TabsState createState() => _TabsState();
|
||||
}
|
||||
class _TabsState extends State<HometabPage>{
|
||||
int _currentIndex = 0;
|
||||
List _pageList = [
|
||||
MinefragmentPage(),
|
||||
MinefragmentPage(),
|
||||
MinefragmentPage(),
|
||||
];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: implement build
|
||||
return Scaffold(
|
||||
|
||||
body: this._pageList[this._currentIndex],
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
currentIndex: this._currentIndex,
|
||||
onTap: (int index){
|
||||
setState(() {
|
||||
this._currentIndex = index;
|
||||
});
|
||||
},
|
||||
iconSize: 30,
|
||||
fixedColor: Colors.red,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
items: [
|
||||
BottomNavigationBarItem(icon: Icon(Icons.home),label: ''),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: ''),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: ''),
|
||||
],
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import audioplayers_darwin
|
||||
import connectivity_macos
|
||||
import desktop_drop
|
||||
import device_info_plus_macos
|
||||
import fc_native_video_thumbnail_for_us
|
||||
@ -18,10 +19,12 @@ import photo_manager
|
||||
import shared_preferences_foundation
|
||||
import sqflite
|
||||
import url_launcher_macos
|
||||
import video_compress
|
||||
import wakelock_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
|
||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
||||
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
FcNativeVideoThumbnailPlugin.register(with: registry.registrar(forPlugin: "FcNativeVideoThumbnailPlugin"))
|
||||
@ -34,5 +37,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
VideoCompressPlugin.register(with: registry.registrar(forPlugin: "VideoCompressPlugin"))
|
||||
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -88,6 +88,10 @@ dependencies:
|
||||
flutter_install_app: 1.3.0
|
||||
#网络拦截
|
||||
connectivity: ^3.0.6
|
||||
# 支付宝SDK插件
|
||||
alipay_kit: 5.0.0
|
||||
# 微信SDK插件
|
||||
fluwx: ^3.8.1+1
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include <desktop_drop/desktop_drop_plugin.h>
|
||||
#include <fc_native_video_thumbnail_for_us/fc_native_video_thumbnail_for_us_plugin_c_api.h>
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <geolocator_windows/geolocator_windows.h>
|
||||
#include <pasteboard/pasteboard_plugin.h>
|
||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
@ -23,6 +24,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("FcNativeVideoThumbnailForUsPluginCApi"));
|
||||
FileSelectorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||
GeolocatorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("GeolocatorWindows"));
|
||||
PasteboardPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("PasteboardPlugin"));
|
||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||
|
||||
@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_drop
|
||||
fc_native_video_thumbnail_for_us
|
||||
file_selector_windows
|
||||
geolocator_windows
|
||||
pasteboard
|
||||
permission_handler_windows
|
||||
url_launcher_windows
|
||||
|
||||
Loading…
Reference in New Issue
Block a user