Commit 7fd63951 authored by guanghui.shi's avatar guanghui.shi

推送,箭头,UI调整

parent 0c6dc18d
......@@ -191,6 +191,7 @@
self.pageControl.indictorSpace = 5;
self.pageControl.pageIndicatorTintColor = [UIColor colorWithHexString:@"#acacac"];
self.pageControl.currentPageIndicatorTintColor = [UIColor yyMainThemeColor];
self.pageControl.hidesForSinglePage = YES;
[self.view addSubview:_pageControl];
[self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) {
......
......@@ -41,6 +41,7 @@
//消息通知
self.notificationView = [[QGMarqueeView alloc] init];
self.notificationView.textColor = [UIColor whiteColor];
self.notificationView.hiddenIndicator = YES;
[gradientView addSubview:self.notificationView];
[self.notificationView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.bottom.inset(0);
......
......@@ -17,7 +17,7 @@
return @"vcc/app/promoter/followerList";
break;
case QGBusinessRequestServerMethodSharePoster:
return @"/vcc/app/promoter/share";
return @"vcc/app/promoter/share";
break;
default:
......
......@@ -104,7 +104,7 @@
}];
//返现推广文案视图
self.promoterView = [UIView creatViewWithSuperView:self.contentView backgroundColor:[[UIColor yyMainThemeColor] colorWithAlphaComponent:0.1]];
self.promoterView = [UIView creatViewWithSuperView:self.contentView backgroundColor:[[UIColor yyMainThemeColor] colorWithAlphaComponent:0.05]];
[self.promoterView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(15);
make.top.mas_equalTo(self.goodsSalePriceLabel.mas_bottom).offset(-3);
......
......@@ -18,6 +18,10 @@
#import "MJRefresh.h"
#import "UIView+Extend.h"
#import "SystemManager.h"
#import "CWWebViewController.h"
@interface QGEditListBaseVC () <UITableViewDelegate, UITableViewDataSource>
@end
......@@ -291,7 +295,27 @@
} else {
if (!model.navExpire || ![model.navExpire boolValue]) {
[QGApplicationOpenURL handleAllSupportUrl:[(QGMessageListModel *) model nav_url]];
NSString *urlStr = model.nav_url;
NSURL *url = [NSURL URLWithString:urlStr];
//如果直接转失败,则编码一下 再转
if (!url) {
urlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
url = [NSURL URLWithString:urlStr];
}
XYQBJumpType jumpType = [[QGApplicationOpenURL shareInstance] autoParseURL:url];
/// 针对webView特别处理
if (jumpType == XYQBJumpTypeHttp) {
CWWebViewController *webVC = [[CWWebViewController alloc]init];
webVC.urlString = [(QGMessageListModel *) model nav_url];
webVC.callBackBlock = ^(NSString *tag, NSDictionary *params) {
if ([tag isEqualToString:WebView_ReopenBrowserWithNewUrl]) {
[QGApplicationOpenURL handleAllSupportUrl:params[@"urlString"]];
}
};
[self.navigationController pushViewController:webVC animated:YES];
}else{
[QGApplicationOpenURL handleAllSupportUrl:[(QGMessageListModel *) model nav_url]];
}
}
}
}
......
......@@ -36,6 +36,9 @@ typedef void(^QGMarqueeViewClickBlock)(NSInteger selectIndex);
/// 点击消息触发的回调
@property (nonatomic, copy) QGMarqueeViewClickBlock clickEventBlock;
/// 是否隐藏右侧箭头
@property (nonatomic, assign)BOOL hiddenIndicator;
@end
NS_ASSUME_NONNULL_END
......@@ -127,7 +127,7 @@
self.textContentView.clipsToBounds = YES;
[self.textContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.imageView.mas_right).offset(10);
make.right.equalTo(self.accessoryButton.mas_left).offset(-12);
make.right.equalTo(self.accessoryButton.mas_left).inset(12);
make.top.equalTo(self).inset(2);
make.bottom.equalTo(self).inset(2);
}];
......@@ -277,6 +277,29 @@
}
}
- (void)setHiddenIndicator:(BOOL)hiddenIndicator
{
_hiddenIndicator = hiddenIndicator;
if (hiddenIndicator) {
self.accessoryButton.hidden = YES;
[self.textContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.imageView.mas_right).offset(10);
make.right.equalTo(self).inset(12);
make.top.equalTo(self).inset(2);
make.bottom.equalTo(self).inset(2);
}];
}else{
self.accessoryButton.hidden = NO;
[self.textContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.imageView.mas_right).offset(10);
make.right.equalTo(self.accessoryButton.mas_left).inset(12);
make.top.equalTo(self).inset(2);
make.bottom.equalTo(self).inset(2);
}];
}
}
/// 初始化scrollView的位置
- (void)scrollToMiddle
{
......
......@@ -124,7 +124,10 @@
///设置推送账号
+ (void)setPushAccount:(NSString *)account
{
[MiPushSDK setAccount:account];
QGUserInfo *userInfo = [QGUserInfo sharedUserInfo];
if (userInfo.userName) {
[MiPushSDK setAccount:userInfo.userName];
}
[MiPushSDK subscribe:@"login"];
[MiPushSDK unsubscribe:@"logout"];
......@@ -141,8 +144,8 @@
///取消推送账号
+ (void)unsetPushAccount:(NSString *)account
{
if (account.length > 0) {
[MiPushSDK unsetAccount:account];
if (QGUserInfo.sharedUserInfo.userName.length > 0) {
[MiPushSDK unsetAccount:QGUserInfo.sharedUserInfo.userName];
}
[MiPushSDK subscribe:@"logout"];
[MiPushSDK unsubscribe:@"login"];
......
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