2024.2.8修改
This commit is contained in:
@@ -84,8 +84,8 @@
|
||||
}
|
||||
// console.log(res.height,w_h.value)
|
||||
}).exec()
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<view class="aikefuBox page-box page-bg-gray" style="height: 100%;">
|
||||
<!-- 信息展示区域 -->
|
||||
@@ -118,8 +118,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.aikefuBox{
|
||||
height: 100%;
|
||||
@@ -164,6 +164,7 @@
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
box-shadow: 0px -10px 20px 1px #eaeaea;
|
||||
.input-box{
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
@@ -199,5 +200,5 @@
|
||||
.ac-part{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -14,16 +14,17 @@
|
||||
const h_index = ref(0)
|
||||
onShow((e) => {
|
||||
getLbtList()
|
||||
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
||||
getHospitalList()
|
||||
setTimeout(()=>{
|
||||
inputDialog.value.open()
|
||||
},0)
|
||||
}
|
||||
let s = `$http({code:'1s'});if`
|
||||
// console.log("store:",store)
|
||||
// if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
||||
// getHospitalList()
|
||||
// setTimeout(()=>{
|
||||
// inputDialog.value.open()
|
||||
// },0)
|
||||
// }
|
||||
// let s = `$http({code:'1s'});if`
|
||||
// // let arr = /\$http\((\S*)\)\;if/.exec(s);
|
||||
let arr = s.match(/\$http\((.*)\)\;if/)
|
||||
console.log(arr[1])
|
||||
// let arr = s.match(/\$http\((.*)\)\;if/)
|
||||
// console.log(arr[1])
|
||||
})
|
||||
|
||||
// 变量
|
||||
@@ -183,7 +184,7 @@
|
||||
<view class="content page-box">
|
||||
<!-- 背景图 -->
|
||||
<view class="bg-imgs-card">
|
||||
<image src="../../static/style/bg.png" mode="aspectFill"></image>
|
||||
<image src="https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/bg.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<!-- 轮播图 -->
|
||||
<mySwiper :indicatorDots="true" :isRadius="true" height="160" class="index-siwper margin-b-card" :lbt_list="lbt_list" style="width: 100%;" />
|
||||
|
@@ -10,11 +10,11 @@
|
||||
const store = useStore()
|
||||
onLoad((e) => {
|
||||
res_.value = JSON.parse(decodeURIComponent(e.res))
|
||||
console.log(res_.value)
|
||||
console.log(store.bgList)
|
||||
if(store.bgList.length>0) {
|
||||
bg_imgs.value = store.bgList
|
||||
}
|
||||
// console.log(res_.value)
|
||||
// console.log(store.bgList)
|
||||
// if(store.bgList.length>0) {
|
||||
// bg_imgs.value = store.bgList
|
||||
// }
|
||||
randomFunc()
|
||||
})
|
||||
// 变量
|
||||
@@ -29,24 +29,41 @@
|
||||
const avatarUrl = ref(null)
|
||||
const info = ref({left:'',right:''})
|
||||
const show_ = ref(false)
|
||||
const bg_list = ref([
|
||||
"https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result1.jpg",
|
||||
"https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result2.jpg",
|
||||
"https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result3.jpg"
|
||||
])
|
||||
const bg_list_index = ref(0)
|
||||
// 函数
|
||||
function randomFunc() {
|
||||
bg_index.value = parseInt((Math.random()*store.bgList.length))
|
||||
info.value.left = parseFloat(res_.value.leftEyeVision)
|
||||
info.value.right = parseFloat(res_.value.rightEyeVision)
|
||||
// 根据测试成绩显示不同的背景图
|
||||
if ((info.value.left + info.value.right) / 2 > 5) {
|
||||
bg_list_index.value = 0
|
||||
} else if ((info.value.left + info.value.right) / 2 < 4.9 && (info.value.left + info.value.right) / 2 > 4.5) {
|
||||
bg_list_index.value = 1
|
||||
} else if ((info.value.left + info.value.right) / 2 < 4.5) {
|
||||
bg_list_index.value = 2
|
||||
}
|
||||
// bg_index.value = parseInt((Math.random()*store.bgList.length))
|
||||
uni.getImageInfo({
|
||||
// src:bg_imgs.value[bg_index.value],
|
||||
src:bg_imgs.value[bg_index.value].url,
|
||||
src: bg_list.value[bg_list_index.value],
|
||||
success:function(res) {
|
||||
avatarUrl.value = uni.getStorageSync('avatarUrl')
|
||||
info.value.left = res_.value.leftEyeVision
|
||||
info.value.right = res_.value.rightEyeVision
|
||||
info.value.left = parseFloat(res_.value.leftEyeVision)
|
||||
info.value.right = parseFloat(res_.value.rightEyeVision)
|
||||
show_.value = true
|
||||
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<view class="visionTestBox page-box">
|
||||
<!-- <view class="actionBox" :style="{background:`url(${bg_imgs[bg_index]})`}">
|
||||
@@ -54,7 +71,7 @@
|
||||
</view> -->
|
||||
<view class="actionBox">
|
||||
<view class="img-box">
|
||||
<image style="width: 100%;" :src="bg_imgs[bg_index].url" mode="widthFix"></image>
|
||||
<image style="width: 100%;" :src="bg_list[bg_list_index]" mode="widthFix"></image>
|
||||
<view v-if="show_" class="avatar-box">
|
||||
<image :src="avatarUrl" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -64,8 +81,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.avatar-box{
|
||||
width: 100%;
|
||||
@@ -164,5 +181,5 @@
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user