完善一些需求
This commit is contained in:
parent
66740977ab
commit
46831e4b2a
@ -43,10 +43,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
// ndk {
|
|
||||||
// abiFilters 'armeabi-v7a','arm64-v8a'
|
|
||||||
// ldLibs "log"
|
|
||||||
// }
|
|
||||||
debug {
|
debug {
|
||||||
storeFile file('../leyuan.jks')
|
storeFile file('../leyuan.jks')
|
||||||
storePassword 'leyuan'
|
storePassword 'leyuan'
|
||||||
@ -69,16 +66,21 @@ android {
|
|||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
ndk {
|
||||||
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
|
ldLibs "log"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
//flutter build apk --no-sound-null-safety
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
project.ext.enableFlutterNullSafety = false
|
project.ext.enableFlutterNullSafety = false
|
||||||
}
|
}
|
||||||
debug{
|
debug {
|
||||||
project.ext.enableFlutterNullSafety = false
|
project.ext.enableFlutterNullSafety = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 407 KiB |
@ -18,6 +18,7 @@ import '../../network/dio_manager.dart';
|
|||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/SharedPreferencesHelper.dart';
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
import '../../util/qiniu.dart';
|
import '../../util/qiniu.dart';
|
||||||
|
import '../circle/logic.dart';
|
||||||
import '../select_circle/logic.dart';
|
import '../select_circle/logic.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
import '../../common/config.dart';
|
import '../../common/config.dart';
|
||||||
@ -50,9 +51,11 @@ class Call_outLogic extends GetxController {
|
|||||||
circleName = numbers[0].name;
|
circleName = numbers[0].name;
|
||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
vip = sharedPreferences.getInt(SharedPreferencesHelper.VIP);
|
vip = sharedPreferences.getInt(SharedPreferencesHelper.VIP);
|
||||||
|
print(vip);
|
||||||
if (vip == 2) {
|
if (vip == 2) {
|
||||||
isCheck = true;
|
isCheck = true;
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
update();
|
update();
|
||||||
@ -127,6 +130,7 @@ class Call_outLogic extends GetxController {
|
|||||||
myBean.add(MyBean(type: 2, url: state.videolist[0]).toJson());
|
myBean.add(MyBean(type: 2, url: state.videolist[0]).toJson());
|
||||||
}
|
}
|
||||||
print(myBean.toString());
|
print(myBean.toString());
|
||||||
|
SmartDialog.showLoading();
|
||||||
var data = await DioManager.instance.post(url: Api.SendShout, params: {
|
var data = await DioManager.instance.post(url: Api.SendShout, params: {
|
||||||
'album': myBean,
|
'album': myBean,
|
||||||
'content': textEditingController.text.trim(),
|
'content': textEditingController.text.trim(),
|
||||||
@ -138,9 +142,11 @@ class Call_outLogic extends GetxController {
|
|||||||
data,
|
data,
|
||||||
(jsonData) => jsonData,
|
(jsonData) => jsonData,
|
||||||
);
|
);
|
||||||
|
SmartDialog.dismiss();
|
||||||
if (beandata.isSuccess()) {
|
if (beandata.isSuccess()) {
|
||||||
showToast(beandata.msg);
|
showToast(beandata.msg);
|
||||||
|
final logic = Get.put(CircleLogic());
|
||||||
|
logic.refresh();
|
||||||
// Navigator.pop(Get.context!, numbers);
|
// Navigator.pop(Get.context!, numbers);
|
||||||
Get.back();
|
Get.back();
|
||||||
} else if (beandata.code == 30503) {
|
} else if (beandata.code == 30503) {
|
||||||
|
|||||||
@ -181,29 +181,32 @@ class Call_outPage extends StatelessWidget {
|
|||||||
controller.isCheck = !controller.isCheck;
|
controller.isCheck = !controller.isCheck;
|
||||||
controller.update();
|
controller.update();
|
||||||
}else{
|
}else{
|
||||||
|
showToast("至尊喊话为年会员特权,开通年会员即可享受哦~");
|
||||||
controller.showRechargeDialog();
|
controller.showRechargeDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Image.asset(
|
children: [
|
||||||
getCircleImage(controller.isCheck
|
Image.asset(
|
||||||
? 'check'
|
getCircleImage(controller.isCheck
|
||||||
: 'uncheck'),
|
? 'check'
|
||||||
width: 17.5.sp,
|
: 'uncheck'),
|
||||||
),
|
width: 17.5.sp,
|
||||||
SizedBox(
|
),
|
||||||
width: 4.sp,
|
SizedBox(
|
||||||
),
|
width: 4.sp,
|
||||||
Text(
|
),
|
||||||
'使用至尊喊话',
|
Text(
|
||||||
style: TextStyle(
|
'使用至尊喊话',
|
||||||
color: Colors.white,
|
style: TextStyle(
|
||||||
fontSize: 16.sp),
|
color: Colors.white,
|
||||||
)
|
fontSize: 16.sp),
|
||||||
],
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -182,9 +182,6 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<JoinUser> urlList = widget.bean.lastJoinUsers;
|
List<JoinUser> urlList = widget.bean.lastJoinUsers;
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -589,7 +586,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
String myUserId = sp.getMyUserId();
|
String myUserId = sp.getMyUserId();
|
||||||
|
|
||||||
if(lists.user?.id!.toString() == myUserId){
|
if(lists.user?.id!.toString() == myUserId){
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: {});
|
Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.bean.is_limit) {
|
if (widget.bean.is_limit) {
|
||||||
@ -612,7 +609,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
lists.user!.avatar!,
|
lists.user!.avatar!,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -884,7 +881,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
var sp = await SharedPreferencesHelper.getInstance();
|
var sp = await SharedPreferencesHelper.getInstance();
|
||||||
String myUserId = sp.getMyUserId();
|
String myUserId = sp.getMyUserId();
|
||||||
if(lists.user?.id!.toString() == myUserId){
|
if(lists.user?.id!.toString() == myUserId){
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: "");
|
Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.bean.is_limit&&widget.bean.amount > 0) {
|
if (widget.bean.is_limit&&widget.bean.amount > 0) {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
|||||||
import 'package:flutter_pickers/time_picker/model/pduration.dart';
|
import 'package:flutter_pickers/time_picker/model/pduration.dart';
|
||||||
import 'package:flutter_pickers/time_picker/model/suffix.dart';
|
import 'package:flutter_pickers/time_picker/model/suffix.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@ -35,7 +34,7 @@ class Complete_materialPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Scaffold(
|
Scaffold(
|
||||||
appBar: MyAppBar(
|
appBar: const MyAppBar(
|
||||||
centerTitle: '完善您的个人形象',
|
centerTitle: '完善您的个人形象',
|
||||||
isBack: true,
|
isBack: true,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -28,6 +28,7 @@ class MinefragmentLogic extends GetxController {
|
|||||||
|
|
||||||
String enterHomeInfoMsg = "进入主页";
|
String enterHomeInfoMsg = "进入主页";
|
||||||
String joinedCircle = "";
|
String joinedCircle = "";
|
||||||
|
String vipMsg = "九大专属特权等你领取";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
|
|||||||
@ -51,12 +51,17 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showRechargeDialog();
|
showRechargeDialog();
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Image(
|
child: Stack(children: [
|
||||||
image: AssetImage(getHomeImage("icon_vip")),
|
Image(
|
||||||
fit: BoxFit.fill,
|
image: AssetImage(getHomeImage("icon_vip")),
|
||||||
),
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 54.sp,
|
||||||
|
left: 71.3.sp,
|
||||||
|
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),))
|
||||||
|
],),
|
||||||
),
|
),
|
||||||
_circleLiveView(logic),
|
_circleLiveView(logic),
|
||||||
],
|
],
|
||||||
@ -365,7 +370,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () async{
|
onTap: () async{
|
||||||
await Get.toNamed(AppRoutes.UserInfoActivity, arguments: "");
|
await Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
logic.onInit();
|
logic.onInit();
|
||||||
},
|
},
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
controller: logic.swiperController,
|
controller: logic.swiperController,
|
||||||
index:logic.index,
|
index:logic.index,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
logic.imgList[index], fit: BoxFit.contain,)
|
logic.imgList[index], fit: BoxFit.contain,)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import 'package:get/get_core/src/get_main.dart';
|
|||||||
import 'package:get/get_state_manager/src/simple/get_state.dart';
|
import 'package:get/get_state_manager/src/simple/get_state.dart';
|
||||||
|
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
|
//TODO 上线前再删
|
||||||
class TextPage extends StatefulWidget {
|
class TextPage extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
State<TextPage> createState() => _MyTabbedScreenState();
|
State<TextPage> createState() => _MyTabbedScreenState();
|
||||||
|
|||||||
@ -141,6 +141,8 @@ class UserinfoLogic extends GetxController {
|
|||||||
showToast("催更成功");
|
showToast("催更成功");
|
||||||
isUrgeStatus = true;
|
isUrgeStatus = true;
|
||||||
update();
|
update();
|
||||||
|
}else {
|
||||||
|
showToast(bean.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -410,11 +410,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
itemCount: controller.isMe
|
itemCount: controller.isMe
|
||||||
? controller.isEdit
|
? controller.isEdit
|
||||||
|
? controller.state.imaglist.length<15
|
||||||
? controller.state.imaglist.length + 1
|
? controller.state.imaglist.length + 1
|
||||||
|
:controller.state.imaglist.length
|
||||||
: controller.state.imaglist.length
|
: controller.state.imaglist.length
|
||||||
: controller.state.imaglist.length,
|
: controller.state.imaglist.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
if (controller.isMe && controller.isEdit) {
|
if (controller.isMe && controller.isEdit&&controller.state.imaglist.length<15) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -65,7 +64,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
child: Text(
|
child: Text(
|
||||||
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的;3、谢绝只会白嫖的猎奇人士。',
|
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的;3、谢绝只会白嫖的猎奇人士。',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color.fromRGBO(247, 250, 250, 0.8),
|
color: const Color.fromRGBO(247, 250, 250, 0.8),
|
||||||
fontSize: 12.sp)),
|
fontSize: 12.sp)),
|
||||||
)),
|
)),
|
||||||
Platform.isIOS
|
Platform.isIOS
|
||||||
@ -102,7 +101,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
Text(
|
Text(
|
||||||
'支付宝支付',
|
'支付宝支付',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA),
|
color: const Color(0xFFF7FAFA),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -141,7 +140,7 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
Text(
|
Text(
|
||||||
'微信支付',
|
'微信支付',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA),
|
color: const Color(0xFFF7FAFA),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -180,31 +179,29 @@ joiinCircileTipWdiget(String cicleId, String pirce, String oldPrice,
|
|||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 72.sp,
|
bottom: 72.sp,
|
||||||
child: Container(
|
child: Row(
|
||||||
child: Row(
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
'¥$pirce',
|
||||||
'¥$pirce',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Color(0xffE845FF),
|
||||||
color: Color(0xffE845FF),
|
|
||||||
fontSize: 16.sp,
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.sp,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'(原价$oldPrice)',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white70,
|
|
||||||
fontSize: 16.sp,
|
fontSize: 16.sp,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w600),
|
||||||
decoration: TextDecoration.lineThrough,
|
),
|
||||||
decorationColor: Colors.white70,
|
SizedBox(
|
||||||
),
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'(原价$oldPrice)',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 16.sp,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
decoration: TextDecoration.lineThrough,
|
||||||
|
decorationColor: Colors.white70,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -85,7 +85,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 44.sp,
|
top: 44.sp,
|
||||||
child: Container(
|
child: SizedBox(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
height: 180.sp,
|
height: 180.sp,
|
||||||
child: Swiper(
|
child: Swiper(
|
||||||
@ -98,9 +98,9 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
autoplay: true,
|
autoplay: true,
|
||||||
pagination: SwiperPagination(
|
pagination: SwiperPagination(
|
||||||
builder: DotSwiperPaginationBuilder(
|
builder: DotSwiperPaginationBuilder(
|
||||||
color: Color(0x99FFFFFF),
|
color: const Color(0x99FFFFFF),
|
||||||
size: 4.sp,
|
size: 4.sp,
|
||||||
activeColor: Color(0xFF00FFD2),
|
activeColor: const Color(0xFF00FFD2),
|
||||||
activeSize: 4.sp)), //如果不填则不显示指示点
|
activeSize: 4.sp)), //如果不填则不显示指示点
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
@ -155,7 +155,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'支付宝支付',
|
'支付宝支付',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA),
|
color: const Color(0xFFF7FAFA),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -192,7 +192,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'微信支付',
|
'微信支付',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA),
|
color: const Color(0xFFF7FAFA),
|
||||||
fontSize: 14.0.sp,
|
fontSize: 14.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -235,29 +235,27 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
),)),
|
),)),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 17.sp,
|
bottom: 17.sp,
|
||||||
child: Container(
|
child: Row(
|
||||||
child: Row(
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
'点击加入即表示同意',
|
||||||
'点击加入即表示同意',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 11.sp,
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.sp,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'《合伙人协议》',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff00FFF4),
|
|
||||||
fontSize: 11.sp,
|
fontSize: 11.sp,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'《合伙人协议》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xff00FFF4),
|
||||||
|
fontSize: 11.sp,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -296,7 +294,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
width: isSelected ? 96.sp : 98.sp,
|
width: isSelected ? 96.sp : 98.sp,
|
||||||
height: isSelected ? 108.sp : 110.sp,
|
height: isSelected ? 108.sp : 110.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(255, 255, 255, 0.1),
|
color: const Color.fromRGBO(255, 255, 255, 0.1),
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -338,43 +336,41 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
controller.priceBean[index].isYearVip ? Positioned(
|
controller.priceBean[index].isYearVip ? Positioned(
|
||||||
top: 0.sp,
|
top: 0.sp,
|
||||||
left: 0.sp,
|
left: 0.sp,
|
||||||
child: Image.asset(getMineImage("icon_yean_vip")),
|
|
||||||
width: 44.sp,
|
width: 44.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
|
child: Image.asset(getMineImage("icon_yean_vip")),
|
||||||
) :Container()
|
) :Container()
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
funcItem(String func, String funcDesc, int index) {
|
funcItem(String func, String funcDesc, int index) {
|
||||||
return Container(
|
return Column(
|
||||||
child: Column(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
children: [
|
Image.asset(
|
||||||
Image.asset(
|
getBaseImage('vip_fun_$index'),
|
||||||
getBaseImage('vip_fun_$index'),
|
width: 70.sp,
|
||||||
width: 70.sp,
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
height: 14.sp,
|
||||||
height: 14.sp,
|
),
|
||||||
),
|
Text(
|
||||||
Text(
|
func,
|
||||||
func,
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.sp,
|
||||||
|
),
|
||||||
|
Text(funcDesc,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp,
|
fontSize: 12.sp,
|
||||||
fontWeight: FontWeight.w500),
|
))
|
||||||
),
|
],
|
||||||
SizedBox(
|
|
||||||
height: 4.sp,
|
|
||||||
),
|
|
||||||
Text(funcDesc,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 12.sp,
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,9 @@ Future<void> openWxPay(PaymentData data, WxPayCallback callback) async {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
late final StreamSubscription<AlipayResp> _paySubs;
|
|
||||||
|
StreamSubscription<AlipayResp>? _paySubs = null;
|
||||||
|
|
||||||
/// 返回码,标识支付状态,含义如下:
|
/// 返回码,标识支付状态,含义如下:
|
||||||
/// 9000——订单支付成功 下面的result有值
|
/// 9000——订单支付成功 下面的result有值
|
||||||
/// 8000——正在处理中
|
/// 8000——正在处理中
|
||||||
@ -61,29 +63,45 @@ late final StreamSubscription<AlipayResp> _paySubs;
|
|||||||
/// 6002——网络连接出错
|
/// 6002——网络连接出错
|
||||||
void _listenPay(AlipayResp resp) {
|
void _listenPay(AlipayResp resp) {
|
||||||
final String content = 'pay: ${resp.resultStatus} - ${resp.result}';
|
final String content = 'pay: ${resp.resultStatus} - ${resp.result}';
|
||||||
if(resp.resultStatus == 9000){
|
if (resp.resultStatus == 9000) {
|
||||||
callback(true,resp.result);
|
callback(true, resp.result);
|
||||||
}else{
|
} else {
|
||||||
callback(false,resp.result);
|
switch(resp.resultStatus){
|
||||||
|
case 8000:
|
||||||
|
showToast("正在处理中");
|
||||||
|
break;
|
||||||
|
case 4000:
|
||||||
|
showToast("订单支付失败");
|
||||||
|
break;
|
||||||
|
case 5000:
|
||||||
|
showToast("重复请求");
|
||||||
|
break;
|
||||||
|
case 6001:
|
||||||
|
showToast("取消支付");
|
||||||
|
break;
|
||||||
|
case 6002:
|
||||||
|
showToast("网络连接出错");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
callback(false, resp.result);
|
||||||
}
|
}
|
||||||
|
|
||||||
print(content );
|
print("payment"+content);
|
||||||
}
|
}
|
||||||
late WxPayCallback callback ;
|
|
||||||
openAliPay(String payUrl,WxPayCallback myCallback)async{
|
late WxPayCallback callback;
|
||||||
|
|
||||||
|
openAliPay(String payUrl, WxPayCallback myCallback) async {
|
||||||
callback = myCallback;
|
callback = myCallback;
|
||||||
bool isInstalled =await AlipayKitPlatform.instance.isInstalled();
|
bool isInstalled = await AlipayKitPlatform.instance.isInstalled();
|
||||||
if (!isInstalled) {
|
if (!isInstalled) {
|
||||||
showToast("请先安装支付宝");
|
showToast("请先安装支付宝");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(null==_paySubs){
|
if (null == _paySubs) {
|
||||||
_paySubs = AlipayKitPlatform.instance.payResp().listen(_listenPay);
|
_paySubs = AlipayKitPlatform.instance.payResp().listen(_listenPay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var data = await AlipayKitPlatform.instance
|
||||||
var data = await AlipayKitPlatform.instance.pay(
|
.pay(orderInfo: payUrl, isShowLoading: true);
|
||||||
orderInfo: payUrl,
|
|
||||||
isShowLoading :true
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user