人脈紀錄 bug

sta
Wayne Hsu 3 years ago
parent 6f88141dc4
commit 41e0745686

@ -136,6 +136,7 @@ export default {
var u = navigator.userAgent;
isIOs.value = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
const uc_temp = ref()
onBeforeMount(async () => {
@ -194,6 +195,8 @@ export default {
saveConnection(card1Res.data)
}
})
// activeName.value = '0'
@ -264,7 +267,6 @@ export default {
const showUserConn = ref(false)
async function saveConnection(data){
let connData = {
userid: data.user_id,
name: data.name,
@ -294,16 +296,16 @@ export default {
if(Cookies.get('token')){
let res = await uploadUserConnections(JSON.stringify(n_user_conn))
if(res.code === 200){
uc_temp.value = n_user_conn
}
}
}
const userConnections = computed(async ()=>{
if(Cookies.get('token')){
let res = await getUserConnections()
if(res.code === 200){
return JSON.parse(res.data)
}
const userConnections = computed(()=>{
if(uc_temp.value && uc_temp.value.length > 0){
return uc_temp.value
}
return JSON.parse(localStorage.getItem('user_conn'))
})

Loading…
Cancel
Save