You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
997 B
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年8月12日 19:47:35
*/
import {
ref
} from 'vue'
import {
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
const $props = defineProps({
openid: {
type: String,
default: ''
}
});
const tip_str = ref('授权登录中,请稍候...')
const checkOpenid = () => {
let openid = ''
if (!!$props.openid) {
openid = decodeURIComponent($props.openid)
}
if (!!openid) {
uni.setStorageSync('OPENID', openid)
uni.navigateTo({
url: "/pages/main/index/index"
})
} else {
tip_str.value = '未获取到授权信息,请从小程序进入'
}
}
onShow(() => {
checkOpenid()
})
</script>
<template>
<view class="tip_wrapper">
{{ tip_str }}
</view>
</template>
<style scoped>
.tip_wrapper {
height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>