Commit 1018359e authored by Mazy's avatar Mazy

Merge remote-tracking branch 'refs/remotes/origin/master'

parents 31d7db51 70ec9b22
...@@ -56,6 +56,8 @@ static NSString *ID = @"id"; ...@@ -56,6 +56,8 @@ static NSString *ID = @"id";
- (void)showUpgradeLlert; - (void)showUpgradeLlert;
- (void)getFirendInfoWithPhone:(NSString * _Nullable)phone;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -338,6 +338,9 @@ ...@@ -338,6 +338,9 @@
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) { [[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
[self getHasNewMsg]; [self getHasNewMsg];
[self getFriendList]; [self getFriendList];
[self getFirendInfoWithPhone:nil];
} failure:^(id _Nonnull error) { } failure:^(id _Nonnull error) {
}]; }];
......
...@@ -281,6 +281,9 @@ ...@@ -281,6 +281,9 @@
- (void)getFirendInfoWithPhone:(NSString *)phone{ - (void)getFirendInfoWithPhone:(NSString *)phone{
if (!phone) {
phone = _phoneTF.text;
}
self.addBtn.userInteractionEnabled = YES; self.addBtn.userInteractionEnabled = YES;
self.addBtn.backgroundColor = kMassColor; self.addBtn.backgroundColor = kMassColor;
...@@ -314,7 +317,7 @@ ...@@ -314,7 +317,7 @@
return; return;
} }
[[TQNetworkTools shared] getWithAction:userFind parameters:@{@"phone":phone} success:^(id _Nonnull response) { [[TQNetworkTools shared] getWithAction:userFind parameters:@{@"phone":[NSString stringWithFormat:@"%@%@", currentCountryCode, phone], /*@"phoneCode":currentCountryCode*/} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
...@@ -452,11 +455,11 @@ ...@@ -452,11 +455,11 @@
- (void)addFriendWithPhone:(NSString *)phone{ - (void)addFriendWithPhone:(NSString *)phone{
[MobClick event:@"add_person"]; [MobClick event:@"add_person"];
[[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone, @"phoneCode":currentCountryCode} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":[NSString stringWithFormat:@"%@%@", currentCountryCode, phone], /*@"phoneCode":currentCountryCode*/} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
[MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view]; [MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view];
}else if ([[response objectForKey:@"status"] integerValue] == 105) { }else {
[MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view]; [MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view];
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
[customViewArr addObject:customView]; [customViewArr addObject:customView];
[customView mas_makeConstraints:^(MASConstraintMaker *make) { [customView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(bgview).mas_offset(start+interval*count); make.top.mas_equalTo(bgview).mas_offset(start+interval*count);
make.width.mas_equalTo(KScaleWidth(200)); make.width.mas_equalTo(KScaleWidth(240));
make.right.mas_equalTo(bgview.mas_right).mas_offset(-KScaleWidth(23)); make.right.mas_equalTo(bgview.mas_right).mas_offset(-KScaleWidth(23));
make.height.mas_equalTo(interval); make.height.mas_equalTo(interval);
}]; }];
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
} }
- (void)setupView { - (void)setupView {
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = kColorFromRGB(0x568EFC);
UIImageView * maskImV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kNavigationBarHeight)]; UIImageView * maskImV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kNavigationBarHeight)];
maskImV.image = [UIImage imageNamed:@"goods_top_mask"]; maskImV.image = [UIImage imageNamed:@"goods_top_mask"];
...@@ -157,6 +157,11 @@ ...@@ -157,6 +157,11 @@
self.payFinish(); self.payFinish();
} }
if (self.presentingViewController){
[self dismissViewControllerAnimated:YES completion:nil];
return;
}
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} faliure:^{ } faliure:^{
...@@ -173,7 +178,11 @@ ...@@ -173,7 +178,11 @@
} }
- (IBAction)restoreBtnClick:(id)sender{ - (IBAction)restoreBtnClick:(id)sender{
[ZTPurchaseManager restorePurchasesWithSuccess:^{ [ZTPurchaseManager restorePurchasesWithView:self.view success:^{
if (self.presentingViewController) {
[self dismissViewControllerAnimated:YES completion:nil];
return;
}
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
}]; }];
} }
......
...@@ -129,8 +129,8 @@ class ZTPurchaseManager: NSObject { ...@@ -129,8 +129,8 @@ class ZTPurchaseManager: NSObject {
} }
// 恢复购买 // 恢复购买
@objc class func restorePurchases(success: @escaping(()->Void)) { @objc class func restorePurchases(view:UIView, success: @escaping(()->Void)) {
let hud = MBProgressHUD.showAdded(to: UIApplication.shared.delegate!.window!!, animated: true) let hud = MBProgressHUD.showAdded(to: view, animated: true)
SwiftyStoreKit.restorePurchases(atomically: true) { results in SwiftyStoreKit.restorePurchases(atomically: true) { results in
hud.hide(animated: true); hud.hide(animated: true);
if results.restoreFailedPurchases.count > 0 { if results.restoreFailedPurchases.count > 0 {
......
...@@ -12,8 +12,4 @@ class ZJLocationAttentionFooter: UIView { ...@@ -12,8 +12,4 @@ class ZJLocationAttentionFooter: UIView {
@IBOutlet weak var bottom_addBtn: UIButton! @IBOutlet weak var bottom_addBtn: UIButton!
override func awakeFromNib() {
bottom_addBtn.setTitle(NSLocalizedString("location_no_address_remind", comment: ""), for: .normal)
}
} }
...@@ -336,6 +336,8 @@ extension ZJLocationAttentionVC: UITableViewDelegate, UITableViewDataSource { ...@@ -336,6 +336,8 @@ extension ZJLocationAttentionVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footerView = Bundle.main.loadNibNamed("ZJLocationAttentionFooter", owner: self, options: .none)?.last as! ZJLocationAttentionFooter let footerView = Bundle.main.loadNibNamed("ZJLocationAttentionFooter", owner: self, options: .none)?.last as! ZJLocationAttentionFooter
footerView.bottom_addBtn.addTarget(self, action: #selector(add_address), for: .touchUpInside) footerView.bottom_addBtn.addTarget(self, action: #selector(add_address), for: .touchUpInside)
footerView.bottom_addBtn.setTitle(NSLocalizedString("location_address_add", comment: ""), for: .normal)
return footerView return footerView
} }
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
} }
self.addressMainTitleLabel.text = placemark.name; self.addressMainTitleLabel.text = placemark.name;
self.addressSubTitleLabel.text = [NSString stringWithFormat:@"%@%@%@", placemark.subLocality, placemark.thoroughfare, placemark.subThoroughfare?:@""]; self.addressSubTitleLabel.text = [NSString stringWithFormat:@"%@%@%@", placemark.subLocality?:@"", placemark.thoroughfare?:@"", placemark.subThoroughfare?:@""];
// 市 // 市
NSLog(@"locality,%@",placemark.addressDictionary); NSLog(@"locality,%@",placemark.addressDictionary);
......
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
NSString * phone = phoneTextfield.text; NSString * phone = phoneTextfield.text;
NSString * phoneCode = currentCountryCode; NSString * phoneCode = currentCountryCode;
[[TQNetworkTools shared] postWithAction:loginWithPhone parameters:@{@"phoneNo":phone, @"phoneCode":phoneCode, @"code":codeTextfield.text} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:loginWithPhone parameters:@{@"phoneNo":[NSString stringWithFormat:@"%@%@", phoneCode, phone], /*@"phoneCode":phoneCode,*/ @"code":codeTextfield.text} success:^(id _Nonnull response) {
NSLog(@"---------------loginWithPhone %@", response); NSLog(@"---------------loginWithPhone %@", response);
......
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
- (void)addFriendWithPhone:(NSString *)phone{ - (void)addFriendWithPhone:(NSString *)phone{
[MobClick event:@"add_person"]; [MobClick event:@"add_person"];
[[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone, @"phoneCode":currentCountryCode} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":[NSString stringWithFormat:@"%@%@", currentCountryCode, phone]/*, @"phoneCode":currentCountryCode*/} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
[MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view]; [MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view];
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
return; return;
} }
[[TQNetworkTools shared] postWithAction:addFriendContactByPhoneNo parameters:@{@"phoneNo":phone, @"phoneCode":code} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:addFriendContactByPhoneNo parameters:@{@"phoneNo":[NSString stringWithFormat:@"%@%@", code, phone], /*@"phoneCode":code*/} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
[self getEmergencyContactList]; [self getEmergencyContactList];
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
}]; }];
UILabel * nickNameLab = [[UILabel alloc] init]; UILabel * nickNameLab = [[UILabel alloc] init];
nickNameLab.text = kLocalizedString(@"Nickname"); nickNameLab.text = kLocalizedString(@"friend_nickname");
nickNameLab.textColor = kColorWithRGB(33, 33, 33); nickNameLab.textColor = kColorWithRGB(33, 33, 33);
nickNameLab.font = [UIFont systemFontOfSize:KFont(17)]; nickNameLab.font = [UIFont systemFontOfSize:KFont(17)];
nickNameLab.textAlignment = NSTextAlignmentCenter; nickNameLab.textAlignment = NSTextAlignmentCenter;
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
[nickNameLab mas_makeConstraints:^(MASConstraintMaker *make) { [nickNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(titleLabel.mas_bottom).mas_offset(KScaleWidth(40)); make.top.equalTo(titleLabel.mas_bottom).mas_offset(KScaleWidth(40));
make.left.equalTo(bgview); make.left.equalTo(bgview);
make.size.mas_offset(CGSizeMake(KScaleWidth(74), KScaleWidth(14))); make.size.mas_offset(CGSizeMake(80, KScaleWidth(14)));
}]; }];
nickNameTextField = [[UITextField alloc] init]; nickNameTextField = [[UITextField alloc] init];
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
[nickNameTextField mas_makeConstraints:^(MASConstraintMaker *make) { [nickNameTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(nickNameLab.mas_right).mas_offset(KScaleWidth(9)); make.left.equalTo(nickNameLab.mas_right).mas_offset(KScaleWidth(9));
make.right.equalTo(bgview.mas_right).mas_offset(-KScaleWidth(23)); make.right.equalTo(bgview.mas_right).mas_offset(-KScaleWidth(23));
make.centerY.equalTo(nickNameLab); make.centerY.equalTo(nickNameLab).mas_offset(KScaleWidth(2));
make.height.mas_equalTo(KScaleWidth(60)); make.height.mas_equalTo(KScaleWidth(60));
}]; }];
// //
......
...@@ -80,18 +80,32 @@ ...@@ -80,18 +80,32 @@
Data * data = [[Data alloc] init]; Data * data = [[Data alloc] init];
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"]; NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
BOOL open = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"first_open_navigate"]] isEqualToString:@"1"]; BOOL open = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"first_open_navigate"]] isEqualToString:@"1"];
if (!open) {
// 切换至tabVc
window.rootViewController = finishMainVC; NSString *currentVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
}else{ //本地保存的版本号
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
NSString *localVersion = [userDefault objectForKey:kAPP_Version];
if (![currentVersion isEqualToString:localVersion]) {
[data removeDicForKey:@"agree"];
}
if (open && ![[data Read] objectForKey:@"agree"]) {
window.rootViewController = self.vc; window.rootViewController = self.vc;
self.vc.clickCallBack = ^(BOOL agree) { self.vc.clickCallBack = ^(BOOL agree) {
if (agree) { if (agree) {
[userDefault setObject:currentVersion forKey:kAPP_Version];
[userDefault synchronize];
[data WirteDic:@"" Key:@"agree"];
window.rootViewController = finishMainVC; window.rootViewController = finishMainVC;
}else{ }else{
exit(0); exit(0);
} }
}; };
}else{
// 切换至tabVc
window.rootViewController = finishMainVC;
} }
// ZJGuideConfig * config = [ZJGuideConfig shared]; // ZJGuideConfig * config = [ZJGuideConfig shared];
// //当前运行的版本 // //当前运行的版本
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
//#if DEBUG //#if DEBUG
// //
#define ServerReport @"http://report.zhangxinhulian.com" //#define ServerReport @"https://report.linking100.com"
#define ServerHost @"https://feedapitest.zhangxinhulian.com" //#define ServerHost @"https://feedapitest.zhangxinhulian.com"
#define ServerHostFeed @"https://feedapitest.zhangxinhulian.com" //#define ServerHostFeed @"https://feedapitest.zhangxinhulian.com"
// //
//#else //#else
//#define ServerReport @"http://report.zhangxinhulian.com" #define ServerReport @"https://report.linking100.com"
//#define ServerHost @"https://feedapi.zhangxinhulian.com" #define ServerHost @"https://feedapi.linking100.com"
//#define ServerHostFeed @"https://feedapi.zhangxinhulian.com" #define ServerHostFeed @"https://feedapi.linking100.com"
//#endif //#endif
...@@ -150,6 +150,7 @@ appName = "Family Mapp"; ...@@ -150,6 +150,7 @@ appName = "Family Mapp";
"location_address_remind"="Location remind"; "location_address_remind"="Location remind";
"location_address_choose"="Select Location"; "location_address_choose"="Select Location";
"location_address_edit"="Edit location"; "location_address_edit"="Edit location";
"location_address_add"="Add Location";
//mine //mine
"mine_sign"="Sign in"; "mine_sign"="Sign in";
......
...@@ -147,6 +147,7 @@ appName = "Family Mapp"; ...@@ -147,6 +147,7 @@ appName = "Family Mapp";
"location_address_remind"="地点提醒"; "location_address_remind"="地点提醒";
"location_address_choose"="选择地点"; "location_address_choose"="选择地点";
"location_address_edit"="编辑地点"; "location_address_edit"="编辑地点";
"location_address_add"="添加地点";
//mine //mine
"mine_sign"="点击登录"; "mine_sign"="点击登录";
......
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