(actionLabel, action)
| 2914 | } |
| 2915 | |
| 2916 | async function withIcloudLoginHelp(actionLabel, action) { |
| 2917 | try { |
| 2918 | return await action(); |
| 2919 | } catch (err) { |
| 2920 | if (isIcloudLoginRequiredError(err)) { |
| 2921 | await promptIcloudLogin(err, actionLabel); |
| 2922 | throw new Error('请先在新打开的 iCloud 页面中完成登录,再回来点击“我已登录”。'); |
| 2923 | } |
| 2924 | throw err; |
| 2925 | } |
| 2926 | } |
| 2927 | |
| 2928 | async function icloudRequest(method, url, options = {}) { |
| 2929 | const { data } = options; |
no test coverage detected