Commit abe2da57 authored by 林生雨's avatar 林生雨

commit

parent bc74c8bd
...@@ -7,12 +7,7 @@ ...@@ -7,12 +7,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment=""> <list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
...@@ -208,8 +203,8 @@ ...@@ -208,8 +203,8 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="178" /> <option name="x" value="131" />
<option name="y" value="163" /> <option name="y" value="180" />
<option name="width" value="1440" /> <option name="width" value="1440" />
<option name="height" value="811" /> <option name="height" value="811" />
</component> </component>
...@@ -301,7 +296,7 @@ ...@@ -301,7 +296,7 @@
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="3" y="23" width="1440" height="811" extended-state="6" /> <frame x="3" y="23" width="1440" height="811" extended-state="6" />
<layout> <layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" /> <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" />
<window_info id="Captures" order="1" side_tool="true" /> <window_info id="Captures" order="1" side_tool="true" />
<window_info id="Structure" order="2" side_tool="true" /> <window_info id="Structure" order="2" side_tool="true" />
<window_info id="Image Layers" order="3" /> <window_info id="Image Layers" order="3" />
...@@ -316,7 +311,7 @@ ...@@ -316,7 +311,7 @@
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" /> <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.68194443" /> <window_info anchor="bottom" id="Logcat" order="4" weight="0.68194443" />
<window_info anchor="bottom" id="Debug" order="5" /> <window_info anchor="bottom" id="Debug" order="5" />
<window_info anchor="bottom" id="Terminal" order="6" visible="true" weight="0.3838665" /> <window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.5618915" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" /> <window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
......
...@@ -71,6 +71,20 @@ NSString *cacheDirectory; ...@@ -71,6 +71,20 @@ NSString *cacheDirectory;
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType]; //读取设备授权状态 AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType]; //读取设备授权状态
if(author == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied) { if(author == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied) {
NSLog(@"没给权限!!!"); NSLog(@"没给权限!!!");
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
if(status == PHAuthorizationStatusAuthorized) {
dispatch_async(dispatch_get_main_queue(), ^{
// 用户点击 "OK"
long temp=self.resultKey;
[self scanPhone:temp];
});
} else {
dispatch_async(dispatch_get_main_queue(), ^{
// 用户点击 不允许访问
NSLog(@"被拒绝 TODO!!");
});
}
}];
}else if(author == AVAuthorizationStatusNotDetermined){ }else if(author == AVAuthorizationStatusNotDetermined){
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) { [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
if(status == PHAuthorizationStatusAuthorized) { if(status == PHAuthorizationStatusAuthorized) {
......
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