|
@@ -445,6 +445,12 @@ NSPopoverDelegate>
|
|
|
KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject;
|
|
|
NSString *name = [KMAdvertisementModelTransition transitionLanguageWithLangeuage:info.name];
|
|
|
self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(name, nil)];
|
|
|
+
|
|
|
+ NSURL *url = [NSURL URLWithString: [KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight: YES]];
|
|
|
+ __weak typeof(self)weakSelf = self;
|
|
|
+ weakSelf.bgImg.image = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage *image) {
|
|
|
+ weakSelf.bgImg.image = image;
|
|
|
+ }];
|
|
|
}
|
|
|
}
|
|
|
} else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
|
|
@@ -462,6 +468,12 @@ NSPopoverDelegate>
|
|
|
KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject;
|
|
|
NSString *name = [KMAdvertisementModelTransition transitionLanguageWithLangeuage:info.name];
|
|
|
self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(name, nil)];
|
|
|
+
|
|
|
+ NSURL *url = [NSURL URLWithString: [KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight: YES]];
|
|
|
+ __weak typeof(self)weakSelf = self;
|
|
|
+ weakSelf.bgImg.image = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage *image) {
|
|
|
+ weakSelf.bgImg.image = image;
|
|
|
+ }];
|
|
|
}
|
|
|
}
|
|
|
} else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type7
|
|
@@ -484,6 +496,20 @@ NSPopoverDelegate>
|
|
|
totalWidth += userImageWidth;
|
|
|
totalWidth += 8;
|
|
|
} else {
|
|
|
+ if (KMAdvertisementManager.manager.info.topRightInfoContent != nil) {
|
|
|
+ if (KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject != nil) {
|
|
|
+ KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject;
|
|
|
+ NSString *name = [KMAdvertisementModelTransition transitionLanguageWithLangeuage:info.name];
|
|
|
+ self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(name, nil)];
|
|
|
+
|
|
|
+ NSURL *url = [NSURL URLWithString: [KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight: YES]];
|
|
|
+ __weak typeof(self)weakSelf = self;
|
|
|
+ weakSelf.bgImg.image = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage *image) {
|
|
|
+ weakSelf.bgImg.image = image;
|
|
|
+ }];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
self.signUpView.hidden = NO;
|
|
|
self.signUpView.frame = CGRectMake(totalWidth, 0, signUpWidth, self.view.frame.size.height);
|
|
|
totalWidth+=CGRectGetWidth(self.signUpView.bounds);
|