|
|
@ -17,14 +17,14 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, nextTick, onMounted } from "vue"; |
|
|
import { ref, nextTick, onMounted } from "vue"; |
|
|
import { useUserStore } from "../stores/modules/userInfo"; |
|
|
import { useUserStore } from "../stores/modules/userInfo"; |
|
|
|
|
|
import {LoginApi} from "../api/start/login" |
|
|
|
|
|
const deviceId = ref('') |
|
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
const userStore = useUserStore(); |
|
|
// 初始化 |
|
|
// 初始化 |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
if (!userStore.userInfo) { |
|
|
if (!userStore.userInfo) { |
|
|
show(); |
|
|
show(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
@ -68,10 +68,30 @@ const goRegister = () => { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// 以访客身份继续 |
|
|
// 以访客身份继续 |
|
|
const continueAsVisitor = () => { |
|
|
|
|
|
|
|
|
const continueAsVisitor = async() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取设备ID |
|
|
|
|
|
uni.getSystemInfo({ |
|
|
|
|
|
success: (res) => { |
|
|
|
|
|
// console.log("设备号",res.deviceId); |
|
|
|
|
|
deviceId.value = res.deviceId; |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 设置访客模式 |
|
|
// 设置访客模式 |
|
|
uni.setStorageSync("visitorMode", true); |
|
|
|
|
|
hide(); |
|
|
|
|
|
|
|
|
const res = await LoginApi({ |
|
|
|
|
|
"loginType":"VISITOR", //登录方式EMAIL,PHONE,DCCODE,APPLE,GOOGLE,VISITOR |
|
|
|
|
|
"account":"" , //登陆账号 手机号/邮箱/dccode |
|
|
|
|
|
"verifyCode":"", //验证码 |
|
|
|
|
|
"password":"", //密码 |
|
|
|
|
|
"useCode":"", //是否使用验证码 true/false |
|
|
|
|
|
"idToken":"", //第三方登录idToken |
|
|
|
|
|
"deviceId":deviceId.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// hide(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// 暴露方法给外部使用 |
|
|
// 暴露方法给外部使用 |
|
|
|