uni-auth 1.0.5 → 1.0.6

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.0.5",
3
+ "version": "1.0.6",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,12 +12,11 @@ const type = ref('')
12
12
  const permissionListener = ref(null)
13
13
  const isPermissionAlertShow = ref(false)
14
14
  onMounted(() => {
15
- type.value = uni.getStorageSync('authCode') || ''
16
- uni.removeStorageSync('authCode')
17
- if (!type.value) return
18
15
  permissionListener.value = uni.createRequestPermissionListener()
19
16
  permissionListener.value.onConfirm((e) => {
20
- isPermissionAlertShow.value = true
17
+ type.value = uni.getStorageSync('authCode') || ''
18
+ uni.removeStorageSync('authCode')
19
+ if (type.value) isPermissionAlertShow.value = true
21
20
  })
22
21
  permissionListener.value.onComplete((e) => {
23
22
  isPermissionAlertShow.value = false
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { appAuth } from './util/app.js'
2
- import { wxAuth } from './util/wx.js'
2
+ // import { wxAuth } from './util/wx.js'
3
3
  export { default as AuthPop } from './components/AuthPop.vue'
4
4
 
5
5
  export async function ifUserAuth(code) {