|
@@ -589,28 +589,30 @@ function TRPNewOrder:setEventDelegate()
|
589
|
589
|
-- 相机
|
590
|
590
|
local permission = MyCamera.getImage(self:wrapFunc(self.onGetImage))
|
591
|
591
|
if permission ~= NativeCamera.Permission.Granted then
|
592
|
|
- CLUIUtl.showConfirm(
|
593
|
|
- "没有使用相机的权限,打开设置允许使用相机",
|
594
|
|
- function()
|
595
|
|
- if not MyCamera.openSetting() then
|
596
|
|
- MyUtl.toastW("打开权限设置失败")
|
597
|
|
- end
|
598
|
|
- end,
|
599
|
|
- nil
|
600
|
|
- )
|
|
592
|
+ NativeCamera.RequestPermission()
|
|
593
|
+ -- CLUIUtl.showConfirm(
|
|
594
|
+ -- "没有使用相机的权限,打开设置允许使用相机",
|
|
595
|
+ -- function()
|
|
596
|
+ -- if not MyCamera.openSetting() then
|
|
597
|
+ -- MyUtl.toastW("打开权限设置失败")
|
|
598
|
+ -- end
|
|
599
|
+ -- end,
|
|
600
|
+ -- nil
|
|
601
|
+ -- )
|
601
|
602
|
end
|
602
|
603
|
elseif popList.value == "2" then
|
603
|
604
|
local permission = MyGallery.getImage(self:wrapFunc(self.onGetImage))
|
604
|
605
|
if permission ~= NativeGallery.Permission.Granted then
|
605
|
|
- CLUIUtl.showConfirm(
|
606
|
|
- "没有使用相册的权限,打开设置允许使用相册",
|
607
|
|
- function()
|
608
|
|
- if not MyGallery.openSetting() then
|
609
|
|
- MyUtl.toastW("打开权限设置失败")
|
610
|
|
- end
|
611
|
|
- end,
|
612
|
|
- nil
|
613
|
|
- )
|
|
606
|
+ NativeCamera.RequestPermission()
|
|
607
|
+ -- CLUIUtl.showConfirm(
|
|
608
|
+ -- "没有使用相册的权限,打开设置允许使用相册",
|
|
609
|
+ -- function()
|
|
610
|
+ -- if not MyGallery.openSetting() then
|
|
611
|
+ -- MyUtl.toastW("打开权限设置失败")
|
|
612
|
+ -- end
|
|
613
|
+ -- end,
|
|
614
|
+ -- nil
|
|
615
|
+ -- )
|
614
|
616
|
end
|
615
|
617
|
end
|
616
|
618
|
end
|