|
|
@ -10,7 +10,6 @@
|
|
|
|
const store = useStore()
|
|
|
|
const store = useStore()
|
|
|
|
onLoad((e) => {
|
|
|
|
onLoad((e) => {
|
|
|
|
userInfo.value = JSON.parse(store.userInfo)
|
|
|
|
userInfo.value = JSON.parse(store.userInfo)
|
|
|
|
console.log(userInfo.value)
|
|
|
|
|
|
|
|
countDown.value = countDown_init
|
|
|
|
countDown.value = countDown_init
|
|
|
|
// if(!store.userInfo?.has_operation) { // 未填写手术信息
|
|
|
|
// if(!store.userInfo?.has_operation) { // 未填写手术信息
|
|
|
|
// setTimeout(()=>{
|
|
|
|
// setTimeout(()=>{
|
|
|
@ -77,11 +76,11 @@
|
|
|
|
const is_test = ref(true)
|
|
|
|
const is_test = ref(true)
|
|
|
|
// 函数
|
|
|
|
// 函数
|
|
|
|
function toStart() { // 开始测试
|
|
|
|
function toStart() { // 开始测试
|
|
|
|
if(is_test.value) {
|
|
|
|
// if(is_test.value) {
|
|
|
|
uni.navigateTo({
|
|
|
|
// uni.navigateTo({
|
|
|
|
url:'/pages/index/result'
|
|
|
|
// url:'/pages/index/result'
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
inputDialog.value.close()
|
|
|
|
inputDialog.value.close()
|
|
|
|
inputDialog2.value.open()
|
|
|
|
inputDialog2.value.open()
|
|
|
|
let s = setInterval(() => {
|
|
|
|
let s = setInterval(() => {
|
|
|
@ -147,21 +146,22 @@
|
|
|
|
uni.showLoading({
|
|
|
|
uni.showLoading({
|
|
|
|
mask:true
|
|
|
|
mask:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const res = await api.saveVision({
|
|
|
|
const params = {
|
|
|
|
leftEyeVision:vision_info.value.left+'',
|
|
|
|
leftEyeVision:vision_info.value.left+'',
|
|
|
|
rightEyeVision:vision_info.value.right+'',
|
|
|
|
rightEyeVision:vision_info.value.right+'',
|
|
|
|
userId:userInfo.value.userId
|
|
|
|
userId:userInfo.value.userId
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
const res = await api.saveVision(params)
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
if(res.code == 0) {
|
|
|
|
if(res.code == 0) {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
title:"保存成功",
|
|
|
|
title:"保存成功",
|
|
|
|
icon:"success",
|
|
|
|
icon:"success",
|
|
|
|
duration:2000,
|
|
|
|
duration:2000,
|
|
|
|
success: function (res){
|
|
|
|
success: function (res1){
|
|
|
|
// uni.navigateBack()
|
|
|
|
// uni.navigateBack()
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.redirectTo({
|
|
|
|
url:"/pages/index/result?res="+encodeURIComponent(JSON.stringify(res))
|
|
|
|
url:"/pages/index/result?res="+encodeURIComponent(JSON.stringify(params))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|