Browse Source

dd

master
chenbin 4 years ago
parent
commit
3ec3770fd1

+ 2
- 2
Assets/trCRM/upgradeRes4Dev/priority/lua/public/CLLInclude.lua View File

@@ -245,8 +245,8 @@ CLUIElementPopList = CS.CLUIElementPopList
245 245
 ---@type System.Uri
246 246
 Uri = CS.System.Uri
247 247
 -------------------------------------------------------
248
----@type NativeGalleryUtl
249
-NativeGalleryUtl = CS.NativeGalleryUtl
248
+---@type NativeGallery
249
+NativeGallery = CS.NativeGallery
250 250
 ---@type MyLocation
251 251
 MyLocation = CS.MyLocation
252 252
 ---@type Dist.SpringWebsocket.Client4Stomp

+ 20
- 18
Assets/trCRM/upgradeRes4Dev/priority/lua/ui/panel/TRPNewOrder.lua View File

@@ -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

Loading…
Cancel
Save