提交修改

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

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

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

@ -355,7 +355,7 @@ class _LoginPageState extends State<LoginPage> {
TextSpan( TextSpan(
text: '《短信帮手隐私协议》', text: '《短信帮手隐私协议》',
style: TextStyle(color: kPrimaryColor, fontSize: 12 * 2.sp), 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() { void _paySuccess() {
_easyRefreshController.callRefresh(); _easyRefreshController.callRefresh();
// Get.offAll(const TabNavigator(index: 1,));
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -121,15 +122,15 @@ class _MembersPageState extends State<MembersPage> {
Get.snackbar('提示', "请先选择充值月份"); Get.snackbar('提示', "请先选择充值月份");
} else { } else {
if (_selectIndex == 0) { if (_selectIndex == 0) {
print("这是数据${_piceList[_selectIndex].pice}"); // print("这是数据${_chooseItem?.pice}");
_wxPayFunc(_piceList[_selectIndex].pice); _wxPayFunc(_chooseItem?.pice);
} else { } else {
var result = var result =
await isAliPayInstalled(); // await isAliPayInstalled(); //
if (!result) { if (!result) {
Get.snackbar('提示', "请先安装支付宝"); Get.snackbar('提示', "请先安装支付宝");
} else { } else {
_aliPay(); _aliPay(_chooseItem?.pice);
// aliPay("paySign").then((payResult) { // aliPay("paySign").then((payResult) {
// // map["paySign"] // // map["paySign"]
// print("支付宝:$payResult"); // 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; bool isInstalled = await fluwx.isWeChatInstalled;
if (!isInstalled) { if (!isInstalled) {
BotToast.showText(text: "请先安装微信"); BotToast.showText(text: "请先安装微信");
return; return;
} }
// //
_wxPay(pay); _wxPay(pay!);
// var wxPayModel = WxPayModel.fromJson({ // var wxPayModel = WxPayModel.fromJson({
// "prepayId": "wx121434071826969924754d7d3309520000", // "prepayId": "wx121434071826969924754d7d3309520000",
// "partnerId": "1622850618", // "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: { var base = await apiClient.request(API.pay.alipay, data: {
'amount': nowPrice,// 'amount': pay,//
// 'amount': 0.01, // 'amount': 0.01,
}); });
if (base.code == 0) { if (base.code == 0) {

@ -63,6 +63,23 @@ class _UserPageState extends State<UserPage> {
super.initState(); super.initState();
// _easyRefreshController.callRefresh(); // _easyRefreshController.callRefresh();
// UserTool.userProvider.updateUserInfo(); // 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(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
// _load(); // _load();
_getRequests();
// await UserTool.userProvider.updateUserInfo(); // await UserTool.userProvider.updateUserInfo();
if (UserTool.userProvider.isLogin) { if (UserTool.userProvider.isLogin) {
// print(UserTool.userProvider.userInfo.end * 1000); // print(UserTool.userProvider.userInfo.end * 1000);
@ -237,6 +255,23 @@ class _UserPageState extends State<UserPage> {
UserTool.userProvider.userInfo.end * 1000, UserTool.userProvider.userInfo.end * 1000,
format: DateFormats.y_mo_d); format: DateFormats.y_mo_d);
UserTool.userProvider.updateUserInfo(); 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(() {}); setState(() {});
} }

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

Loading…
Cancel
Save