Commit ca5f9204 authored by lihaiwei's avatar lihaiwei

feat [] 增加弹窗提示

parent 3045120c
...@@ -63,23 +63,23 @@ ...@@ -63,23 +63,23 @@
- (void)sumbitFeedback:(UIButton *)sender{ - (void)sumbitFeedback:(UIButton *)sender{
[self.view endEditing:YES]; [self.view endEditing:YES];
if (self.textView.text.length==0){ if (self.textView.text.length==0){
// [SVProgressHUD showImage:nil status:@"请输入反馈内容"]; [SVProgressHUD showImage:nil status:@"请输入反馈内容"];
return; return;
} }
if (self.textView.text.length<5){ if (self.textView.text.length<5){
// [SVProgressHUD showImage:nil status:@"字数过少"]; [SVProgressHUD showImage:nil status:@"字数过少"];
return; return;
} }
if (self.textView.text.length>150){ if (self.textView.text.length>150){
// [SVProgressHUD showImage:nil status:@"字数过多"]; [SVProgressHUD showImage:nil status:@"字数过多"];
return; return;
} }
// [SVProgressHUD show]; [SVProgressHUD show];
[MTMineModuleService feedback:@{@"content":self.textView.text} result:^(BOOL successed) { [MTMineModuleService feedback:@{@"content":self.textView.text} result:^(BOOL successed) {
// [SVProgressHUD dismiss]; [SVProgressHUD dismiss];
if (successed) { if (successed) {
self.textView.text = @""; self.textView.text = @"";
// [SVProgressHUD showImage:nil status:@"提交成功"]; [SVProgressHUD showImage:nil status:@"提交成功"];
} }
}]; }];
} }
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
#import "MTSettingsController.h" #import "MTSettingsController.h"
#import "MTTouristLogin.h" #import "MTTouristLogin.h"
#import "MTToolManager.h" #import "MTToolManager.h"
#import "MTBindPhoneViewController.h"
@interface MTMineViewController ()<MTMineHeaderViewDelegate, MTMineVipViewDelegate, MTFuncListViewDelegate>
@interface MTMineViewController ()<MTMineHeaderViewDelegate, MTMineVipViewDelegate, MTFuncListViewDelegate, MTLogoutDelegate>
@property (nonatomic, strong) MTMineHeaderView * headerView; @property (nonatomic, strong) MTMineHeaderView * headerView;
...@@ -68,7 +70,7 @@ ...@@ -68,7 +70,7 @@
if (!self.logouted) { if (!self.logouted) {
[MTMineModuleService getUserInfo:^(MTUserInfo * _Nonnull user) { [MTMineModuleService getUserInfo:^(MTUserInfo * _Nonnull user) {
self.headerView.userInfo = user; self.headerView.userInfo = user;
// [self.unlockVipView refreshVip:user.expireTime isForever:user.isForever]; [self.vipView refreshVip:user.expireTime isForever:user.isForever];
}]; }];
} }
} }
...@@ -104,21 +106,6 @@ ...@@ -104,21 +106,6 @@
break; break;
} }
} }
- (void)HeaderViewDidClicked:(MTMineHeaderView *)header{
// SPBindPhoneController * bindPhoneController = [[SPBindPhoneController alloc]init];
// UINavigationController * navi = [[UINavigationController alloc]initWithRootViewController:bindPhoneController];
// navi.modalPresentationStyle = UIModalPresentationFullScreen;
// [self.navigationController presentViewController:navi animated:YES completion:nil];
}
- (void)unlockVipViewBuyVipClicked:(MTMineVipView *)view{
// SPBuyVipController * buyVipController = [[SPBuyVipController alloc]init];
// UINavigationController * navi = [[UINavigationController alloc]initWithRootViewController:buyVipController];
// navi.modalPresentationStyle = UIModalPresentationFullScreen;
// [self.navigationController presentViewController:navi animated:YES completion:nil];
}
- (void)logout{ - (void)logout{
self.logouted = YES; self.logouted = YES;
[[NSUserDefaults standardUserDefaults]setObject:@"" forKey:kUser_token]; [[NSUserDefaults standardUserDefaults]setObject:@"" forKey:kUser_token];
...@@ -131,6 +118,20 @@ ...@@ -131,6 +118,20 @@
}]; }];
} }
- (void)headerViewDidClicked:(MTMineHeaderView *)header{
MTBindPhoneViewController * bindPhoneController = [[MTBindPhoneViewController alloc]init];
UINavigationController * navi = [[UINavigationController alloc]initWithRootViewController:bindPhoneController];
navi.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:navi animated:YES completion:nil];
}
- (void)unlockVipViewBuyVipClicked:(MTMineVipView *)view{
// SPBuyVipController * buyVipController = [[SPBuyVipController alloc]init];
// UINavigationController * navi = [[UINavigationController alloc]initWithRootViewController:buyVipController];
// navi.modalPresentationStyle = UIModalPresentationFullScreen;
// [self.navigationController presentViewController:navi animated:YES completion:nil];
}
- (MTMineHeaderView *)headerView{ - (MTMineHeaderView *)headerView{
if (!_headerView) { if (!_headerView) {
_headerView = [[MTMineHeaderView alloc]init]; _headerView = [[MTMineHeaderView alloc]init];
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
}]; }];
UIAlertAction * confirmAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { UIAlertAction * confirmAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// [SVProgressHUD showImage:nil status:@"注销账户申请已发起"]; [SVProgressHUD showImage:nil status:@"注销账户申请已发起"];
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
}]; }];
[alertController addAction:cancelAction]; [alertController addAction:cancelAction];
......
...@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@optional @optional
/// headerview 的点击事件 /// headerview 的点击事件
/// - Parameter header: headerView /// - Parameter header: headerView
- (void)HeaderViewDidClicked:(MTMineHeaderView *)header; - (void)headerViewDidClicked:(MTMineHeaderView *)header;
@end @end
......
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
- (void)headerDidClicked{ - (void)headerDidClicked{
if (self.userInfo && !self.userInfo.mobile) { if (self.userInfo && !self.userInfo.mobile) {
if (self.delegate && [self.delegate respondsToSelector:@selector(HeaderViewDidClicked:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(headerViewDidClicked:)]) {
[self.delegate HeaderViewDidClicked:self]; [self.delegate headerViewDidClicked:self];
} }
} }
} }
......
...@@ -124,11 +124,13 @@ ...@@ -124,11 +124,13 @@
if (!_unlockBtn) { if (!_unlockBtn) {
_unlockBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _unlockBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_unlockBtn setTitle:@"立即开通" forState:UIControlStateNormal]; [_unlockBtn setTitle:@"立即开通" forState:UIControlStateNormal];
_unlockBtn.backgroundColor = [[UIColor brownColor] colorWithAlphaComponent:0.8]; // _unlockBtn.backgroundColor = [[UIColor brownColor] colorWithAlphaComponent:0.8];
_unlockBtn.layer.masksToBounds = YES; _unlockBtn.layer.masksToBounds = YES;
_unlockBtn.layer.cornerRadius = 20; _unlockBtn.layer.cornerRadius = 20;
[_unlockBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_unlockBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_unlockBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18]; _unlockBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18];
_unlockBtn.layer.borderWidth = 1.0f;
_unlockBtn.layer.borderColor = [UIColor whiteColor].CGColor;
[_unlockBtn addTarget:self action:@selector(buyVip:) forControlEvents:UIControlEventTouchUpInside]; [_unlockBtn addTarget:self action:@selector(buyVip:) forControlEvents:UIControlEventTouchUpInside];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment