@aks-dev/easyui 1.0.89 → 1.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/mode.ts +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "移动端App开发工具包",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
package/utils/mode.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-18 18:40:07
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 09:18:06
5
+ * @LastEditTime: 2022-07-20 09:28:33
6
6
  * @FilePath: /@aks-dev/easyui/utils/mode.ts
7
7
  */
8
8
  import type { CallBack } from '.'
@@ -31,18 +31,19 @@ export const panHandlersCallback = (props: { GrantCallback: CallBack, MoveCallba
31
31
  }
32
32
 
33
33
 
34
+
34
35
  export const callTelephone = (phone: number | string) => {
35
36
 
36
37
  let tel = 'tel:' + phone
37
38
  Linking.canOpenURL(tel).then((supported) => {
38
- if (!supported) {
39
- console.warn('[sg:mode]', '模拟器不支持拨打电话')
40
- } else {
39
+ console.log({ supported, tel })
40
+ if (supported) {
41
41
  Linking.openURL(tel)
42
+ } else {
43
+ console.warn('[sg:callTelephone 不支持]', { supported, tel }.toString())
42
44
  }
43
45
  }).catch(error => {
44
- //alert(error.toString())
45
- console.warn('[sg:mode]', error.toString())
46
+ console.warn('[sg:callTelephone catch]', { error, tel }.toString())
46
47
  })
47
48
 
48
49
  }