uni-auth 1.2.1 → 1.2.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-auth",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -9,5 +9,14 @@
9
9
  "keywords": [],
10
10
  "author": "",
11
11
  "license": "ISC",
12
- "description": "UniApp 授权模块"
12
+ "description": "UniApp 授权模块",
13
+ "peerDependencies": {
14
+ "vue": "^3.0.0",
15
+ "@dcloudio/uni-app": "^3.0.0"
16
+ },
17
+ "peerDependenciesMeta": {
18
+ "vue": {
19
+ "optional": false
20
+ }
21
+ }
13
22
  }
@@ -4,6 +4,7 @@ export const contentEnum = {
4
4
  相册: `允许${appName}访问您的相册/相机权限来获取您的照片用于上传您的图片和相册等信息`,
5
5
  相机: `允许${appName}访问您的相册/相机权限及摄像头来方便用户拍摄上传图片等信息`,
6
6
  麦克风: `允许${appName}访问您的麦克风来获取您的声音用于录音等信息`,
7
+ 位置: `允许${appName}访问您的位置,用于为你提供推荐优质房源服务`,
7
8
  },
8
9
  android: {
9
10
  相册: `允许${appName}访问您的相册/相机,您可以上传/拍摄照片及视频;`,
@@ -20,6 +21,7 @@ export const APP = {
20
21
  相册: 'albumAuthorized',
21
22
  相机: 'cameraAuthorized',
22
23
  麦克风: 'microphoneAuthorized',
24
+ 位置: 'locationAuthorized',
23
25
  },
24
26
  android: {
25
27
  相册: 'android.permission.WRITE_EXTERNAL_STORAGE',
@@ -27,6 +29,7 @@ export const APP = {
27
29
  麦克风: 'android.permission.RECORD_AUDIO',
28
30
  设备信息: 'android.permission.READ_PHONE_STATE',
29
31
  电话: 'android.permission.CALL_PHONE',
32
+ 位置: 'android.permission.ACCESS_FINE_LOCATION',
30
33
  },
31
34
  }
32
35
 
@@ -25,7 +25,8 @@ onMounted(() => {
25
25
  if (systemInfo.value.platform !== 'ios') {
26
26
  permissionListener.value = uni.createRequestPermissionListener()
27
27
  permissionListener.value.onConfirm((e) => {
28
- list.value = e.map((item) => getPermissionKeyByValue(item))
28
+ list.value = e.map((item) => getPermissionKeyByValue(item)).filter((item) => item)
29
+
29
30
  isPermissionAlertShow.value = true
30
31
  })
31
32
  permissionListener.value.onComplete((e) => {
@@ -61,34 +62,46 @@ function getPermissionKeyByValue(permissionValue) {
61
62
  position: fixed;
62
63
  top: 0;
63
64
  left: 0;
65
+ right: 0;
64
66
  width: 90%;
65
- min-height: 120rpx;
66
- background: #f2f2f2;
67
- box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
68
- z-index: 999999;
69
- border-radius: 14rpx;
70
- margin-left: 5%;
71
- margin-right: 5%;
72
- animation: identifier 1s ease-in-out;
73
- padding: 20rpx 30rpx;
67
+ margin: 0 auto;
68
+ background: #ffffff;
69
+ border-radius: 24rpx;
70
+ padding: 32rpx 32rpx 24rpx;
74
71
  box-sizing: border-box;
72
+ z-index: 999999;
73
+ box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
74
+ animation: slideDown 0.3s ease-out;
75
75
  }
76
- @keyframes identifier {
76
+
77
+ @keyframes slideDown {
77
78
  0% {
78
- transform: translateY(-300rpx);
79
+ transform: translateY(-100%);
79
80
  }
80
81
  100% {
81
82
  transform: translateY(0);
82
83
  }
83
84
  }
85
+
84
86
  .title {
87
+ font-size: 32rpx;
85
88
  font-weight: 600;
86
- font-size: 26rpx;
87
- margin-bottom: 20rpx;
89
+ color: #222;
90
+ line-height: 1.4;
91
+ margin-bottom: 24rpx;
88
92
  }
93
+
89
94
  .msg {
90
- font-size: 24rpx;
91
- letter-spacing: 2rpx;
92
- margin-bottom: 10rpx;
95
+ font-size: 28rpx;
96
+ color: #555;
97
+ line-height: 1.5;
98
+ margin-bottom: 16rpx;
99
+ padding: 6rpx 16rpx;
100
+ border-left: 6rpx solid #f0f0f0;
101
+ background: rgba(64, 128, 255, 0.04);
102
+ }
103
+
104
+ .msg:last-child {
105
+ margin-bottom: 0;
93
106
  }
94
107
  </style>