提交修改

master
王亚玲 2 years ago
parent 17c93d0b2a
commit 5cdb5e7ff9

@ -80,7 +80,7 @@ class UserProvider extends ChangeNotifier {
if (base.code == 0) {
await prefs.remove('conSms');
await prefs.setString('conSms', (UserTool.userProvider.userInfo.tag)==""?"${base
.data['content']}":"[${UserTool.userProvider.userInfo.tag}]${base
.data['content']}":"${UserTool.userProvider.userInfo.tag}${base
.data['content']}");
service.invoke("stopService");
if(prefs.getBool('kg')!){
@ -102,7 +102,7 @@ class UserProvider extends ChangeNotifier {
if (base.code == 0) {
await prefs.remove('refSms');
await prefs.setString('refSms', (UserTool.userProvider.userInfo.tag)==""?"${base
.data['content']}":"[${UserTool.userProvider.userInfo.tag}]${base
.data['content']}":"${UserTool.userProvider.userInfo.tag}${base
.data['content']}" );
service.invoke("stopService");
if(prefs.getBool('kg')!){

@ -114,10 +114,11 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
onTap: () {
if(!(sms && plone && callLog && kg)){
if(!(sms && plone && callLog )){
BotToast.showText(text: '功能开关未开启');
Get.to(()=>const PrivacyRightsPage(name: "权限说明"));
// Get.to(()=>const TabNavigator(index: 1,));
}else{
Get.to(()=>const PrivacyRightsPage(name: "权限说明"));
BotToast.showText(text: '功能开关未开启');
}
}
// print();

@ -355,7 +355,7 @@ class _LoginPageState extends State<LoginPage> {
TextSpan(
text: '《短信帮手隐私协议》',
style: TextStyle(color: kPrimaryColor, fontSize: 12 * 2.sp),
recognizer: _recognizer(context, 1)),
recognizer: _recognizer(context, 2)),
]))
],
),

@ -74,6 +74,7 @@ class _MembersPageState extends State<MembersPage> {
}
void _paySuccess() {
_easyRefreshController.callRefresh();
// Get.offAll(const TabNavigator(index: 1,));
}
@override
Widget build(BuildContext context) {
@ -121,15 +122,15 @@ class _MembersPageState extends State<MembersPage> {
Get.snackbar('提示', "请先选择充值月份");
} else {
if (_selectIndex == 0) {
print("这是数据${_piceList[_selectIndex].pice}");
_wxPayFunc(_piceList[_selectIndex].pice);
// print("这是数据${_chooseItem?.pice}");
_wxPayFunc(_chooseItem?.pice);
} else {
var result =
await isAliPayInstalled(); //
if (!result) {
Get.snackbar('提示', "请先安装支付宝");
} else {
_aliPay();
_aliPay(_chooseItem?.pice);
// aliPay("paySign").then((payResult) {
// // map["paySign"]
// print("支付宝:$payResult");
@ -249,14 +250,14 @@ class _MembersPageState extends State<MembersPage> {
);
}
Future _wxPayFunc(double pay) async {
Future _wxPayFunc(double? pay) async {
bool isInstalled = await fluwx.isWeChatInstalled;
if (!isInstalled) {
BotToast.showText(text: "请先安装微信");
return;
}
//
_wxPay(pay);
_wxPay(pay!);
// var wxPayModel = WxPayModel.fromJson({
// "prepayId": "wx121434071826969924754d7d3309520000",
// "partnerId": "1622850618",
@ -291,9 +292,9 @@ class _MembersPageState extends State<MembersPage> {
// }
// }
//
Future _aliPay() async {
Future _aliPay(double? pay) async {
var base = await apiClient.request(API.pay.alipay, data: {
'amount': nowPrice,//
'amount': pay,//
// 'amount': 0.01,
});
if (base.code == 0) {

@ -63,6 +63,23 @@ class _UserPageState extends State<UserPage> {
super.initState();
// _easyRefreshController.callRefresh();
// UserTool.userProvider.updateUserInfo();
// if (UserTool.userProvider.isLogin) {
// // print(UserTool.userProvider.userInfo.end * 1000);
// // print(DateTime.now().millisecondsSinceEpoch);
// if (UserTool.userProvider.userInfo.isVip != 1) {
// isVip = false;
// vle = false;
// } else {
// isVip = true;
// vle = await service.isRunning();
// }
// //service.isRunning() as bool;
// // endDate = DateUtil.formatDateMs(
// // UserTool.userProvider.userInfo.end * 1000,
// // format: DateFormats.y_mo_d);
// } else {
// vle = false;
// }
}
@ -84,6 +101,7 @@ class _UserPageState extends State<UserPage> {
header: MaterialHeader(),
onRefresh: () async {
// _load();
_getRequests();
// await UserTool.userProvider.updateUserInfo();
if (UserTool.userProvider.isLogin) {
// print(UserTool.userProvider.userInfo.end * 1000);
@ -237,6 +255,23 @@ class _UserPageState extends State<UserPage> {
UserTool.userProvider.userInfo.end * 1000,
format: DateFormats.y_mo_d);
UserTool.userProvider.updateUserInfo();
if (UserTool.userProvider.isLogin) {
// print(UserTool.userProvider.userInfo.end * 1000);
// print(DateTime.now().millisecondsSinceEpoch);
if (UserTool.userProvider.userInfo.isVip != 1) {
isVip = false;
vle = false;
} else {
isVip = true;
vle = await service.isRunning();
}
//service.isRunning() as bool;
// endDate = DateUtil.formatDateMs(
// UserTool.userProvider.userInfo.end * 1000,
// format: DateFormats.y_mo_d);
} else {
vle = false;
}
setState(() {});
}

@ -18,7 +18,11 @@ class CloudBackButton extends StatelessWidget {
? Padding(
padding: isSpecial ? EdgeInsets.only(left: 8.w) : EdgeInsets.zero,
child: IconButton(
onPressed: () => Navigator.pop(context,true),
onPressed: () {
print("返回传值");
Navigator.pop(context,true);
},
icon: Icon(
CupertinoIcons.chevron_back,
color: color,

Loading…
Cancel
Save