This commit is contained in:
2020-07-18 22:27:14 +08:00
parent 9b102b7768
commit 3ec3770fd1
2 changed files with 22 additions and 20 deletions

View File

@@ -589,28 +589,30 @@ function TRPNewOrder:setEventDelegate()
-- 相机
local permission = MyCamera.getImage(self:wrapFunc(self.onGetImage))
if permission ~= NativeCamera.Permission.Granted then
CLUIUtl.showConfirm(
"没有使用相机的权限,打开设置允许使用相机",
function()
if not MyCamera.openSetting() then
MyUtl.toastW("打开权限设置失败")
end
end,
nil
)
NativeCamera.RequestPermission()
-- CLUIUtl.showConfirm(
-- "没有使用相机的权限,打开设置允许使用相机",
-- function()
-- if not MyCamera.openSetting() then
-- MyUtl.toastW("打开权限设置失败")
-- end
-- end,
-- nil
-- )
end
elseif popList.value == "2" then
local permission = MyGallery.getImage(self:wrapFunc(self.onGetImage))
if permission ~= NativeGallery.Permission.Granted then
CLUIUtl.showConfirm(
"没有使用相册的权限,打开设置允许使用相册",
function()
if not MyGallery.openSetting() then
MyUtl.toastW("打开权限设置失败")
end
end,
nil
)
NativeCamera.RequestPermission()
-- CLUIUtl.showConfirm(
-- "没有使用相册的权限,打开设置允许使用相册",
-- function()
-- if not MyGallery.openSetting() then
-- MyUtl.toastW("打开权限设置失败")
-- end
-- end,
-- nil
-- )
end
end
end