Browse Source

添加url schema

xiongzhu 7 years ago
parent
commit
c54331271b

+ 1 - 1
model/Classes/Controllers/Controller/ShareVC/ShareCardController.m

@@ -62,7 +62,7 @@
 }
 
 - (void)shareWxTimeline {
-    [self shareToWechat:WXSceneTimeline withTitle:@"千模" description:[NSString stringWithFormat:@"%@%@", [ModelUser user].pet, @",千模平台优秀模特,马上跟她视频认识一下吧。"] url:[NSString stringWithFormat:@"%@%@?modelpk=%@", PublicUrl, @"/modelCard.jsp", [ModelUser user].modelpk]];
+    [self shareToWechat:WXSceneTimeline withTitle:[NSString stringWithFormat:@"%@%@", [ModelUser user].pet, @",千模平台优秀模特,马上跟她视频认识一下吧。"] description:[NSString stringWithFormat:@"%@%@", [ModelUser user].pet, @",千模平台优秀模特,马上跟她视频认识一下吧。"] url:[NSString stringWithFormat:@"%@%@?modelpk=%@", PublicUrl, @"/modelCard.jsp", [ModelUser user].modelpk]];
 }
 
 - (void)shareToWechat:(enum WXScene)scene withTitle:(NSString *)title description:(NSString *)description url:(NSString *)url {

+ 5 - 3
model/Classes/Controllers/Controller/ShareVC/SharePopViewController.h

@@ -7,11 +7,13 @@
 //
 
 #import <UIKit/UIKit.h>
+
 @protocol ShareDelegate <NSObject>
--(void)shareWxSession;
--(void)shareWxTimeline;
+- (void)shareWxSession;
+
+- (void)shareWxTimeline;
 @end
 
 @interface SharePopViewController : UIViewController
-@property(nonatomic, retain) id<ShareDelegate> delegate;
+@property(nonatomic, retain) id <ShareDelegate> delegate;
 @end

+ 2 - 2
model/Classes/Controllers/Controller/ShareVC/ShareViewController.m

@@ -131,8 +131,8 @@
 }
 
 - (void)shareWxTimeline {
-    NSString *description = self.type == 1 ? @"找模特、艺人做商演;找空姐、校花做朋友。" : @"更多商演订单,视频面试可收取佣金,小姐妹们快来注册。";
-    [self shareToWechat:WXSceneTimeline withTitle:self.type == 1 ? @"千模通告" : @"千模模特版" description:description url:shareUrl(@(self.type), [[NSUserDefaults standardUserDefaults] objectForKey:@"qrcode"])];
+    NSString *description = self.type == 1 ? @"千模通告,找模特、艺人做商演;找空姐、校花做朋友。" : @"千模模特版,更多商演订单,视频面试可收取佣金,小姐妹们快来注册。";
+    [self shareToWechat:WXSceneTimeline withTitle:description description:description url:shareUrl(@(self.type), [[NSUserDefaults standardUserDefaults] objectForKey:@"qrcode"])];
 }
 
 - (void)shareToWechat:(enum WXScene)scene withTitle:(NSString *)title description:(NSString *)description url:(NSString *)url {

+ 10 - 0
model/Info.plist

@@ -32,6 +32,16 @@
 				<string>wx2a873aba839dbb4b</string>
 			</array>
 		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>chmoModel</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>chmoModel</string>
+			</array>
+		</dict>
 	</array>
 	<key>CFBundleVersion</key>
 	<string>1</string>