{"id":187,"date":"2015-04-21T13:09:26","date_gmt":"2015-04-21T05:09:26","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=187"},"modified":"2016-07-14T22:43:51","modified_gmt":"2016-07-14T14:43:51","slug":"ios%e9%a1%b9%e7%9b%ae%e5%ae%9e%e6%88%98%e4%b9%8b%e8%87%aa%e5%ae%9a%e4%b9%89%e7%9b%b8%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/project\/2015\/04\/21\/130926187.html","title":{"rendered":"iOS\u9879\u76ee\u5b9e\u6218\u4e4b\u81ea\u5b9a\u4e49\u76f8\u673a"},"content":{"rendered":"<p><strong>\u4e00\u3001\u57fa\u672c\u601d\u8def<\/strong><br \/>\n1\u3001\u521b\u5efa\u4e00\u4e2a\u5bfc\u822a\u63a7\u5236\u5668\uff0c\u627f\u8f7d\u4e24\u4e2a\u63a7\u5236\u5668\uff1a\u62cd\u7167\u3001\u7167\u7247\u9884\u89c8\uff1b<br \/>\n2\u3001\u5206\u522b\u521b\u5efa\u8fd9\u4e24\u4e2a\u63a7\u5236\u5668\uff0c\u7531\u4e8e\u89c6\u56fe\u5747\u4e3a\u9759\u6001\u89c6\u56fe\uff0c\u6240\u4ee5\u76f4\u63a5\u7528xib\u521b\u5efa\u5373\u53ef\uff1b<br \/>\n3\u3001\u5f15\u7528AVFoundation\u6846\u67b6\uff0c\u901a\u8fc7\u5a92\u4f53\u4e0e\u6570\u636e\u6d41\u7684\u4ea4\u4e92\u6765\u83b7\u53d6\u56fe\u7247\uff1b<br \/>\n4\u3001\u5404\u79cd\u5c01\u88c5<\/p>\n<p><strong>\u4e8c\u3001\u4f7f\u7528\u5230\u7684\u51e0\u4e2a\u7c7b\u53ca\u76f8\u5173\u8bf4\u660e\uff1a<\/strong><br \/>\nSAImagePickerController\uff1a\u7ee7\u627f\u5bfc\u822a\u63a7\u5236\u5668\u7c7b\uff0c\u7528\u4ed6\u6765\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u76f8\u673a<br \/>\nSACameraCtrl\uff1a\u62cd\u7167\u63a7\u5236\u5668\uff0c\u5373\u62cd\u7167\u4e3b\u754c\u9762\uff0c\u53d6\u666f\uff0c\u6444\u50cf\u5934\u5207\u6362\u3001\u95ea\u5149\u706f\u5f00\u5173\u3001\u62cd\u7167\u6309\u94ae\u90fd\u5728\u8fd9\u4e2a\u754c\u9762\u4e0a\u5c55\u793a\uff1b<br \/>\nSAPhotoViewCtrl\uff1a\u7167\u7247\u9884\u89c8\u63a7\u5236\u5668\uff0c\u5373\u62cd\u7167\u540e\u7684\u9884\u89c8\u754c\u9762\uff0c\u67e5\u770b\u7167\u7247\u6548\u679c\u3001\u786e\u5b9a\u4f7f\u7528\u7167\u7247\u6216\u91cd\u62cd\uff1b<br \/>\nSAPreview\uff1a\u81ea\u5b9a\u4e49View\uff0c\u62cd\u7167\u53d6\u666f\u7684\u90a3\u4e2a\u89c6\u56fe\uff0c\u81ea\u5b9a\u4e49\u662f\u4e3a\u4e86\u80fd\u591f\u76d1\u542c\u5904\u7406\u8be5\u89c6\u56fe\u4e0a\u7684\u4e8b\u4ef6\uff0c\u5982\u5bf9\u7126\u7b49\u3002<\/p>\n<p><strong>\u4e09\u3001\u57fa\u672c\u754c\u9762\u9884\u89c8\uff1a<\/strong><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-188\" src=\"http:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2016\/07\/QQ20150421-1@2x.png\" alt=\"QQ20150421-1@2x\" width=\"300\" height=\"450\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-189\" src=\"http:\/\/www.yusian.com\/blog\/wp-content\/uploads\/2016\/07\/QQ20150421-2@2x.png\" alt=\"QQ20150421-2@2x\" width=\"300\" height=\"451\" \/><\/p>\n<p><strong>\u56db\u3001\u5173\u952e\u4ee3\u7801\uff1a<\/strong><br \/>\nSACameraCtrl.m<\/p>\n<pre lang=\"objc\" line=\"1\">\/\/\n\/\/? SACameraCtrl.m\n\/\/? Test\n\/\/\n\/\/? Created by \u4f59\u897f\u5b89 on 15\/4\/13.\n\/\/? Copyright (c) 2015\u5e74 Sian. All rights reserved.\n\/\/\n?\n#import \"SACameraCtrl.h\"\n#import \"SAPreview.h\"\n#import \"SAPhotoViewCtrl.h\"\n#import &lt;AVFoundation\/AVFoundation.h&gt;\n#import &lt;CoreMotion\/CoreMotion.h&gt;\n#define SourcePath [[NSBundle mainBundle] pathForResource:@\"SAImagePickerController.bundle\" ofType:nil]\n?\n@interface SACameraCtrl () \n?\n\/\/ \u8f93\u5165\u6d41\u9884\u89c8\u56fe\u5c42\n@property (nonatomic, strong)?? AVCaptureVideoPreviewLayer? *previewLayer;\n?\n@property (weak, nonatomic) IBOutlet SAPreview *preview;\n?\n\/\/ AVCaptureSession\u5bf9\u8c61\u6765\u6267\u884c\u8f93\u5165\u8bbe\u5907\u548c\u8f93\u51fa\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u9012\n@property (nonatomic, strong)?? AVCaptureSession??????????? *session;\n?\n\/\/ \u8bbe\u5907\u8f93\u5165\u6d41\n@property (nonatomic, strong)?? AVCaptureDeviceInput??????? *deviceInput;\n?\n\/\/ \u7167\u7247\u8f93\u51fa\u6d41\n@property (nonatomic, strong)?? AVCaptureStillImageOutput?? *imageOutput;\n?\n\/\/ \u56fe\u7247\u8f93\u51fa\u89c6\u56fe\n@property (nonatomic, strong)?? UIImageView???? *cameraShowView;\n?\n\/\/ \u6444\u50cf\u5934\u6570\u7ec4\n@property (nonatomic, strong, readonly) NSArray *devices;?????? \/\/ AVCaptureDevices\n?\n\/\/ \u95ea\u5149\u706f\u5207\u6362\u6309\u94ae\n@property (weak, nonatomic) IBOutlet UIButton *flashButton;\n?\n?\n@end\n?\n@implementation SACameraCtrl\n?\n- (void)viewDidLoad\n{\n????[super viewDidLoad];\n????\/\/ \u521b\u5efa\u4ea4\u4e92\u6d41\n????self.session = [[AVCaptureSession alloc] init];\n????self.session.sessionPreset = AVCaptureSessionPresetPhoto;\n?????\n????\/\/ \u5a92\u4f53\u8f93\u5165\n????AVCaptureDevice *device = [self.devices firstObject];\n????[self setDevice:device FlashMode:AVCaptureFlashModeAuto];\n????self.deviceInput = [AVCaptureDeviceInput deviceInputWithDevice:device error:NULL];\n????if([self.session canAddInput:self.deviceInput])[self.session addInput:self.deviceInput];\n?????\n????\/\/ \u5a92\u4f53\u8f93\u51fa\n????self.imageOutput = [[AVCaptureStillImageOutput alloc] init];\n????self.imageOutput.outputSettings = @{AVVideoCodecKey : AVVideoCodecJPEG};\n????AVCaptureConnection * connection = [self.imageOutput connectionWithMediaType:AVMediaTypeVideo];\n????connection.videoOrientation = AVCaptureVideoOrientationLandscapeRight;\n????if([self.session canAddOutput:self.imageOutput])[self.session addOutput:self.imageOutput];\n?????\n????\/\/ \u5a92\u4f53\u9884\u89c8\n????self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];\n????self.previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;\n????self.previewLayer.position = self.preview.center;\n????[self.preview.layer addSublayer:self.previewLayer];\n????[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];\n????[self setPreviewGesture];\n}\n?\n?\n#pragma mark - \u524d\u540e\u6444\u50cf\u5934\n- (NSArray *)devices\n{\n????return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];\n}\n?\n- (void)viewWillAppear:(BOOL)animated\n{\n????[super viewWillAppear:animated];\n????self.previewLayer.frame = self.preview.layer.bounds;\n????self.navigationController.navigationBar.hidden = YES;\n????[self.session startRunning];\n}\n?\n- (void)viewDidAppear:(BOOL)animated\n{\n????[super viewDidAppear:animated];\n????[[UIApplication sharedApplication] setStatusBarHidden:YES];\n}\n?\n- (void)viewWillDisappear:(BOOL)animated\n{\n????[super viewWillDisappear:animated];\n????[[UIApplication sharedApplication] setStatusBarHidden:NO];\n}\n?\n- (void)viewDidDisappear:(BOOL)animated\n{\n????[super viewDidDisappear:animated];\n????[self.session stopRunning];\n}\n?\n\/\/\/ \u5a92\u4f53\u9884\u89c8\u56fe\u5c42\u624b\u52bf\u4e8b\u4ef6\n- (void)setPreviewGesture\n{\n????\/\/ \u6ce8\u518c\u4e00\u4e2a\u624b\u52bf\u4e8b\u4ef6\u6765\u5b9e\u73b0\u5bf9\u7126\u529f\u80fd\n????UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPreview:)];\n????[self.preview addGestureRecognizer:tap];\n}\n?\n\/\/\/ \u9884\u89c8\u56fe\u5c42\u70b9\u51fb\u4e8b\u4ef6\n- (void)tapPreview:(UITapGestureRecognizer *)gesture\n{\n????CGPoint point = [gesture locationInView:gesture.view];\n????CGPoint p = [self.previewLayer captureDevicePointOfInterestForPoint:point];\n????[self focusAtPoint:p];\n????self.preview.aperture.center = point;\n????[self.preview showAperture];\n}\n?\n\/\/\/ \u5bf9\u7126\u4e8b\u4ef6\n- (void)focusAtPoint:(CGPoint)point\n{\n????AVCaptureDevice *device = self.deviceInput.device;\n????NSError *error;\n????if ([device isFocusModeSupported:AVCaptureFocusModeAutoFocus] &amp;&amp; [device isFocusPointOfInterestSupported])\n????{\n????????if ([device lockForConfiguration:&amp;error]) {\n????????????[device setFocusPointOfInterest:point];\n????????????[device setFocusMode:AVCaptureFocusModeAutoFocus];\n????????????[device unlockForConfiguration];\n????????} else {\n????????????SALog(@\"Error: %@\", error);\n????????}\n????}\n}\n?\n\/\/\/ \u6444\u50cf\u5934\u5207\u6362\u4e8b\u4ef6\n- (IBAction)switchCamera:(UIButton *)sender\n{\n????if (self.devices.count &lt; 2) return;\n?????\n????NSInteger oldIndex = [self.devices indexOfObject:self.deviceInput.device];\n????NSInteger newIndex = (oldIndex + 1) % self.devices.count;\n????AVCaptureDevice *newDevice = [self.devices objectAtIndex:newIndex];\n????AVCaptureDeviceInput *newInput = [AVCaptureDeviceInput deviceInputWithDevice:newDevice error:NULL];\n????if (newInput) {\n????????[self.session beginConfiguration];\n????????[self.session removeInput:self.deviceInput];\n????????[self.session addInput:newInput];\n????????[self.session commitConfiguration];\n????????self.deviceInput = newInput;\n????????self.flashButton.hidden = !newDevice.isFlashAvailable;\n????}\n}\n?\n\/\/\/ \u53d6\u6d88\u4e8b\u4ef6\n- (IBAction)cancel:(UIButton *)sender\n{\n????[self dismissViewControllerAnimated:YES completion:nil];\n}\n?\n\/\/\/ \u62cd\u7167\u4e8b\u4ef6\n- (IBAction)shutter:(UIButton *)sender\n{\n????sender.userInteractionEnabled = NO;\n????AVCaptureConnection * connection = [self.imageOutput connectionWithMediaType:AVMediaTypeVideo];\n????connection.videoOrientation = AVCaptureVideoOrientationPortrait;\n?????\n????connection.videoScaleAndCropFactor = 1.0;?? \/\/ \u83b7\u53d6\u6d41\u6bd4\u4f8b\n????if (!connection) {\n????????NSLog(@\"take photo failed!\");\n????????return;\n????}\n?????\n????[self.imageOutput captureStillImageAsynchronouslyFromConnection:connection completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {\n????????if (imageDataSampleBuffer == NULL) {\n????????????return;\n????????}\n????????NSData * imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];\n????????UIImage * image = [UIImage imageWithData:imageData];\n????????SAPhotoViewCtrl *photoView = [[SAPhotoViewCtrl alloc] initWithImage:image];\n????????[self.navigationController pushViewController:photoView animated:NO];\n????????sender.userInteractionEnabled = YES;\n????}];\n}\n?\n\/\/\/ \u95ea\u5149\u706f\u5f00\u5173\u6309\u94ae\n- (IBAction)overTurn:(UIButton *)sender\n{\n????sender.tag = (sender.tag + 1) % 3;\n????NSString *imageName = [NSString stringWithFormat:@\"camera_flashlight_%d.png\", (int)sender.tag];\n????[sender setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];\n????[self setDevice:self.deviceInput.device FlashMode:(2 - sender.tag)];\n}\n?\n\/\/\/ \u5207\u6362\u95ea\u5149\u706f\u6a21\u5f0f\n- (void)setDevice:(AVCaptureDevice *)device FlashMode:(AVCaptureFlashMode)flashModel\n{\n????if (device.isFlashAvailable == NO) return;\n????if ([device lockForConfiguration:nil]) {\n????????device.flashMode = flashModel;\n????}\n????[device unlockForConfiguration];\n}\n?\n@end<\/pre>\n<p>SAImagePickerController.m<\/p>\n<pre lang=\"objc\" line=\"1\">\/\/\n\/\/? SAImagePickerController.m\n\/\/? Test\n\/\/\n\/\/? Created by \u4f59\u897f\u5b89 on 15\/4\/15.\n\/\/? Copyright (c) 2015\u5e74 Sian. All rights reserved.\n\/\/\n?\n#import \"SAImagePickerController.h\"\n#import \"SACameraCtrl.h\"\n?\n@interface SAImagePickerController ()\n?\n@end\n?\n@implementation SAImagePickerController\n?\n+ (instancetype)pickerComplete:(SAImagePickerComplete)complete\n{\n????return [[self alloc] initWithBlock:complete];\n}\n?\n- (instancetype)initWithBlock:(SAImagePickerComplete)block\n{\n????if (self = [super init]){\n????????if (block) self.completeBlock = block;\n????}\n????return self;\n}\n?\n- (instancetype)init\n{\n????SACameraCtrl *cameraCtrl = [[SACameraCtrl alloc] init];\n????if (self = [super initWithRootViewController:cameraCtrl]){\n?????\n????}\n????return self;\n}\n?\n- (void)viewDidLoad\n{\n????[super viewDidLoad];\n}\n?\n- (void)dealloc\n{\n????SALog(@\"SAImagePickerController is dealloc\");\n}\n@end<\/pre>\n<p>SAPhotoViewCtrl.m<\/p>\n<pre lang=\"objc\" line=\"1\">\/\/\n\/\/? SAPhotoViewCtrl.m\n\/\/? Test\n\/\/\n\/\/? Created by \u4f59\u897f\u5b89 on 15\/4\/14.\n\/\/? Copyright (c) 2015\u5e74 Sian. All rights reserved.\n\/\/\n?\n#import \"SAPhotoViewCtrl.h\"\n#import \"SAImagePickerController.h\"\n?\n@interface SAPhotoViewCtrl ()\n?\n@property (nonatomic, strong) UIImage *image;\n?\n@property (nonatomic, assign) NSInteger rotate;\n?\n@end\n?\n@implementation SAPhotoViewCtrl\n?\n- (instancetype)initWithImage:(UIImage *)image\n{\n????if (self = [super initWithNibName:@\"SAPhotoViewCtrl\" bundle:nil]){\n????????self.image = image;\n????????self.rotate = 0;\n????}\n????return self;\n}\n?\n- (void)viewWillAppear:(BOOL)animated\n{\n????[super viewWillAppear:animated];\n????self.imageView.image = self.image;\n????[[UIApplication sharedApplication] setStatusBarHidden:YES];\n}\n?\n- (void)viewWillDisappear:(BOOL)animated\n{\n????[super viewWillDisappear:animated];\n????[[UIApplication sharedApplication] setStatusBarHidden:NO];\n}\n?\n- (void)viewDidLoad\n{\n????[super viewDidLoad];\n}\n?\n\/\/\/ \u65cb\u8f6c\u56fe\u7247\n- (IBAction)transForm:(UIButton *)sender\n{\n????self.rotate ++;\n????[UIView animateWithDuration:0.3 animations:^{\n????????self.imageView.transform = CGAffineTransformRotate(self.imageView.transform, - M_PI_2);\n????}];\n}\n?\n\/\/\/ \u91cd\u65b0\u62cd\u6444\n- (IBAction)reShutter:(UIButton *)sender\n{\n????[self.navigationController popViewControllerAnimated:NO];\n}\n?\n\/\/\/ \u4f7f\u7528\u7167\u7247\n- (IBAction)submitImage:(UIButton *)sender\n{\n????UIImageOrientation orientation = UIImageOrientationUp;\n????switch (self.rotate % 4) {\n????????case 0:{\n????????????orientation = UIImageOrientationRight;\n????????}break;\n????????case 1:{\n????????????orientation = UIImageOrientationUp;\n????????}break;\n????????case 2:{\n????????????orientation = UIImageOrientationLeft;\n????????}break;\n????????case 3:{\n????????????orientation = UIImageOrientationDown;\n????????}break;\n?????????????\n????????default:break;\n????}\n????CGFloat scale = [UIScreen mainScreen].scale;\n????UIImage *image = [[UIImage alloc] initWithCGImage:self.image.CGImage scale:scale orientation:orientation];\n????SAImagePickerController *pickerCtrl = (SAImagePickerController *)self.navigationController;\n????pickerCtrl.completeBlock(image);\n????[self dismissViewControllerAnimated:YES completion:^{\n????????[self.navigationController popViewControllerAnimated:NO];\n????}];\n}\n?\n@end<\/pre>\n<p>SAPreview.m<\/p>\n<pre lang=\"objc\" line=\"1\">\/\/\n\/\/? SAPreview.m\n\/\/? Test\n\/\/\n\/\/? Created by \u4f59\u897f\u5b89 on 15\/4\/14.\n\/\/? Copyright (c) 2015\u5e74 Sian. All rights reserved.\n\/\/\n?\n#import \"SAPreview.h\"\n?\n@implementation SAPreview\n?\n- (instancetype)initWithCoder:(NSCoder *)aDecoder\n{\n????if (self = [super initWithCoder:aDecoder]){\n????????UIImage *image = [UIImage imageNamed:@\"camera_aperture.png\"];\n????????self.aperture = [[UIImageView alloc] initWithImage:image];\n????}\n????return self;\n}\n?\n- (void)showAperture\n{\n????[self addSubview:self.aperture];\n????self.aperture.transform = CGAffineTransformMakeScale(2.0, 2.0);\n????[UIView animateWithDuration:0.3 animations:^{\n????????self.aperture.transform = CGAffineTransformIdentity;\n????}];\n????[self.aperture performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1.0];\n}\n?\n@end<\/pre>\n<p><strong>\u4e94\u3001\u57fa\u672c\u4f7f\u7528<\/strong><\/p>\n<p>\u4e00\u884c\u4ee3\u7801\u641e\u5b9a\uff01<\/p>\n<pre lang=\"objc\" line=\"1\">SAImagePickerController *imagePicker = [SAImagePickerController? pickerComplete:^(UIImage *image) {\n????self.imageView.image = image;\n}];\n[self presentViewController:imagePicker animated:YES completion:nil];<\/pre>\n<p><strong>\u516d\u3001Demo\u4e0b\u8f7d<\/strong><\/p>\n<p>\u94fe\u63a5: <a href=\"http:\/\/pan.baidu.com\/s\/1bnCUte3\" target=\"_blank\">http:\/\/pan.baidu.com\/s\/1bnCUte3<\/a> \u5bc6\u7801: 6k4k<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u57fa\u672c\u601d\u8def 1\u3001\u521b\u5efa\u4e00\u4e2a\u5bfc\u822a\u63a7\u5236\u5668\uff0c\u627f\u8f7d\u4e24\u4e2a\u63a7\u5236\u5668\uff1a\u62cd\u7167\u3001\u7167\u7247\u9884\u89c8\uff1b 2\u3001\u5206\u522b\u521b\u5efa\u8fd9\u4e24\u4e2a\u63a7\u5236\u5668\uff0c\u7531\u4e8e\u89c6\u56fe\u5747\u4e3a\u9759\u6001\u89c6\u56fe\uff0c\u6240\u4ee5\u76f4\u63a5\u7528xib\u521b\u5efa\u5373\u53ef\uff1b 3\u3001\u5f15\u7528AVFoundation\u6846\u67b6\uff0c\u901a\u8fc7\u5a92\u4f53\u4e0e\u6570\u636e\u6d41\u7684\u4ea4\u4e92\u6765\u83b7\u53d6\u56fe\u7247\uff1b 4\u3001\u5404\u79cd\u5c01\u88c5 \u4e8c\u3001\u4f7f\u7528\u5230\u7684\u51e0\u4e2a\u7c7b\u53ca\u76f8\u5173\u8bf4\u660e\uff1a SAImagePickerController\uff1a\u7ee7\u627f\u5bfc\u822a\u63a7\u5236\u5668\u7c7b\uff0c\u7528\u4ed6\u6765\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u76f8\u673a SACameraCtrl\uff1a\u62cd\u7167\u63a7\u5236\u5668\uff0c\u5373\u62cd\u7167\u4e3b\u754c\u9762\uff0c\u53d6\u666f\uff0c\u6444\u50cf\u5934\u5207\u6362\u3001\u95ea\u5149\u706f\u5f00\u5173\u3001\u62cd\u7167\u6309\u94ae\u90fd\u5728\u8fd9\u4e2a\u754c\u9762\u4e0a\u5c55\u793a\uff1b SAPhotoViewCtrl\uff1a\u7167\u7247\u9884\u89c8\u63a7\u5236\u5668\uff0c\u5373\u62cd\u7167\u540e\u7684\u9884\u89c8\u754c\u9762\uff0c\u67e5\u770b\u7167\u7247\u6548\u679c\u3001\u786e\u5b9a\u4f7f\u7528\u7167\u7247\u6216\u91cd\u62cd\uff1b SAPreview\uff1a\u81ea\u5b9a\u4e49View\uff0c\u62cd\u7167\u53d6\u666f\u7684\u90a3\u4e2a\u89c6\u56fe\uff0c\u81ea\u5b9a\u4e49\u662f\u4e3a\u4e86\u80fd\u591f\u76d1\u542c\u5904\u7406\u8be5\u89c6\u56fe\u4e0a\u7684\u4e8b\u4ef6\uff0c\u5982\u5bf9\u7126\u7b49\u3002 \u4e09\u3001\u57fa\u672c\u754c\u9762\u9884\u89c8\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[15],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-project","tag-module"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}