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.
67 lines
1.1 KiB
Vue
67 lines
1.1 KiB
Vue
<template>
|
|
<view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
ref
|
|
} from 'vue'
|
|
import {
|
|
XcxGetUserInfoAction,
|
|
$image,
|
|
$response
|
|
} from '@/api'
|
|
import {
|
|
onShow,onLoad
|
|
} from '@dcloudio/uni-app'
|
|
const $props = defineProps({
|
|
hospital: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
});
|
|
const id_number = ref('')
|
|
const token = ref('')
|
|
|
|
const GetUserInfo = async () => {
|
|
const response = await XcxGetUserInfoAction({
|
|
token:token.value
|
|
})
|
|
$response(response, () => {
|
|
id_number.value = response.data.id_number
|
|
if(id_number.value){
|
|
uni.navigateTo({
|
|
url: `/pages/main/list/list?hospital=1&id_number=${id_number.value}`
|
|
})
|
|
}else{
|
|
uni.$lu.toast("身份证不能为空")
|
|
}
|
|
})
|
|
}
|
|
|
|
onLoad((e)=>{
|
|
token.value=e.token
|
|
GetUserInfo()
|
|
// return false;
|
|
// try{
|
|
// if(token.value.length>18){
|
|
// let base64Str=decodeURIComponent(token.value)
|
|
// token.value=atob(base64Str)
|
|
// }
|
|
// }catch(e){
|
|
// console.error('解码失败', e)
|
|
// uni.$lu.toast("解码失败"+e)
|
|
// return false
|
|
// }
|
|
|
|
|
|
|
|
})
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|