10.22提交
@ -54,6 +54,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "问题反馈"
|
"navigationBarTitleText": "问题反馈"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/visionTest",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "视力测试"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -52,18 +52,29 @@
|
|||||||
}
|
}
|
||||||
const single = ref('')
|
const single = ref('')
|
||||||
function maskClick(e){
|
function maskClick(e){
|
||||||
console.log('maskClick事件:', e);
|
// console.log('maskClick事件:', e);
|
||||||
}
|
}
|
||||||
const hValue = ref('') // 医院
|
const hValue = ref('') // 医院
|
||||||
const hValueId = ref('') // 医院id
|
const hValueId = ref('') // 医院id
|
||||||
function onClickH(e) {
|
function onClickH(e) {
|
||||||
console.log(hValue.value)
|
// console.log(hValue.value)
|
||||||
|
}
|
||||||
|
function toExam() { // 视力测试
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/visionTest"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<view class="content page-box">
|
<view class="content page-box">
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<mySwiper :indicatorDots="true" :isRadius="true" height="160" class="index-siwper margin-b-card" :lbt_list="lbt_list" style="width: 100%;" />
|
<mySwiper :indicatorDots="true" :isRadius="true" height="160" class="index-siwper margin-b-card" :lbt_list="lbt_list" style="width: 100%;" />
|
||||||
|
<view class="main-cards" @tap="toExam">
|
||||||
|
<view class="mc-row">
|
||||||
|
<view>视力测试</view>
|
||||||
|
<uni-icons type="forward" color="#9bc027" size="20"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="main-cards">
|
<view class="main-cards">
|
||||||
<view class="mc-part" style="margin-left: 0;">
|
<view class="mc-part" style="margin-left: 0;">
|
||||||
<view class="mc-part-text">已完成事项</view>
|
<view class="mc-part-text">已完成事项</view>
|
||||||
@ -130,6 +141,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.mc-row{
|
||||||
|
display:flex;
|
||||||
|
// width: 100%;
|
||||||
|
// justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
border: 1px solid #9bc027;
|
||||||
|
padding: 20px 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #9bc027;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
.radio{
|
.radio{
|
||||||
margin-right:20rpx;
|
margin-right:20rpx;
|
||||||
}
|
}
|
||||||
|
254
pages/index/visionTest.vue
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
<script setup>
|
||||||
|
// 引入依赖
|
||||||
|
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
|
||||||
|
import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
|
||||||
|
import { onLoad } from "@dcloudio/uni-app"
|
||||||
|
// import mySwiper from "@/components/mySwiper.vue"
|
||||||
|
import {ref,onMounted,nextTick} from "vue"
|
||||||
|
import {useStore} from '@/store/index.js'
|
||||||
|
const store = useStore()
|
||||||
|
onLoad((e) => {
|
||||||
|
if(!store.userInfo?.has_operation) { // 未填写手术信息
|
||||||
|
setTimeout(()=>{
|
||||||
|
// console.log(inputDialog.value)
|
||||||
|
inputDialog.value.open()
|
||||||
|
},0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 变量
|
||||||
|
const inputDialog = ref()
|
||||||
|
const inputDialog2 = ref()
|
||||||
|
const inputDialog3 = ref()
|
||||||
|
const step1 = ref('先测右眼,请遮住左眼')
|
||||||
|
const step2 = ref('请遮住右眼')
|
||||||
|
const countDown = ref(5)
|
||||||
|
const scale_ = ref(1)
|
||||||
|
const current_img = ref("") // 当前图片
|
||||||
|
const current_img_index = ref(null)
|
||||||
|
const sizes = ref([{
|
||||||
|
size:23,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:19,
|
||||||
|
vision:4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size:15,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:11,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:9,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:7,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:6,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:4,
|
||||||
|
vision:4.2
|
||||||
|
},{
|
||||||
|
size:3,
|
||||||
|
vision:4.2
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const show_size = ref({
|
||||||
|
width:'29px'
|
||||||
|
})
|
||||||
|
const num = ref(0)
|
||||||
|
const now = ref(1)
|
||||||
|
const vision_info = ref({
|
||||||
|
left:4,
|
||||||
|
right:4.1
|
||||||
|
})
|
||||||
|
// 函数
|
||||||
|
function toStart() { // 开始测试
|
||||||
|
inputDialog.value.close()
|
||||||
|
inputDialog2.value.open()
|
||||||
|
let s = setInterval(() => {
|
||||||
|
countDown.value--
|
||||||
|
if(countDown.value == 0) {
|
||||||
|
clearInterval(s)
|
||||||
|
inputDialog2.value.close()
|
||||||
|
}
|
||||||
|
},1000)
|
||||||
|
randomFunc()
|
||||||
|
}
|
||||||
|
function toClose() {
|
||||||
|
inputDialog.value.close()
|
||||||
|
}
|
||||||
|
function randomFunc() {
|
||||||
|
let ran = Math.ceil(Math.random()*4)
|
||||||
|
if(current_img_index.value == ran) {
|
||||||
|
randomFunc()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
current_img.value = "../../static/"+ran+".png"
|
||||||
|
current_img_index.value = ran
|
||||||
|
}
|
||||||
|
// console.log(current_img.value)
|
||||||
|
}
|
||||||
|
function chooseFunc(index) {
|
||||||
|
// 先执行加减分
|
||||||
|
if(!index){ // 扣分
|
||||||
|
|
||||||
|
}
|
||||||
|
// 换图片
|
||||||
|
randomFunc()
|
||||||
|
|
||||||
|
// 判断是否结束,换眼
|
||||||
|
if(num.value>8) { // 结束换眼
|
||||||
|
if(now.value == 2) { // 结束测试
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
show_size.value.width = '29px'
|
||||||
|
countDown.value = 5
|
||||||
|
step1.value = '测左眼,请遮住右眼'
|
||||||
|
num.value = 8
|
||||||
|
now.value = 2
|
||||||
|
toStart()
|
||||||
|
}
|
||||||
|
else{ // 改变尺寸
|
||||||
|
show_size.value.width = sizes.value[num.value].size+'px'
|
||||||
|
num.value++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function okFunc() { // 结束测试
|
||||||
|
inputDialog3.value.open()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<view class="visionTestBox page-box">
|
||||||
|
<view class="actionBox">
|
||||||
|
<!-- 测试区域 -->
|
||||||
|
<view class="ab-show-box">
|
||||||
|
<image :src="current_img" :style="show_size" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<!-- 操作区域 -->
|
||||||
|
<view class="ab-action-box">
|
||||||
|
<view class="ac-row">
|
||||||
|
<image @tap="chooseFunc(1)" class="ac-row-card" src="../../static/1.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="ac-row">
|
||||||
|
<image @tap="chooseFunc(3)" class="ac-row-card" src="../../static/3.png" mode=""></image>
|
||||||
|
<view @tap="chooseFunc(0)" class="ac-row-card ac-row-card-text">看不清</view>
|
||||||
|
<image @tap="chooseFunc(4)" class="ac-row-card" src="../../static/4.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="ac-row">
|
||||||
|
<image @tap="chooseFunc(2)" class="ac-row-card" src="../../static/2.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-popup ref="inputDialog" :is-mask-click='true'>
|
||||||
|
<view class="pop-box">
|
||||||
|
<view class="pb-title">测试须知</view>
|
||||||
|
<view class="pb-content">
|
||||||
|
<view class="content-text">
|
||||||
|
使用uni-app自带的editor组件,该组件支持App、H5、微信小程序,其他家小程序自身未提供这类解决方案。
|
||||||
|
</view>
|
||||||
|
<view class="okBtn" @tap="toStart">确定</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
<uni-popup ref="inputDialog2" :is-mask-click='false' style="width: 100%;">
|
||||||
|
<view class="pop-box">
|
||||||
|
<view class="pb-title">测试须知</view>
|
||||||
|
<view class="pb-content">
|
||||||
|
<view class="content-text">
|
||||||
|
<view class="ct-title">{{countDown}}</view>
|
||||||
|
<view>{{step1}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="okBtn" @tap="toStart">确定</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
<uni-popup ref="inputDialog3" :is-mask-click='true'>
|
||||||
|
<view class="pop-box">
|
||||||
|
<view class="pb-title">测试结束</view>
|
||||||
|
<view class="pb-content">
|
||||||
|
<view class="content-text">
|
||||||
|
测试结束,当前视力为{{vision_info.left}}(左),{{vision_info.right}}(右)。
|
||||||
|
</view>
|
||||||
|
<view class="okBtn" @tap="okFunc">确定</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.visionTestBox,.actionBox{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.actionBox{
|
||||||
|
.ab-show-box{
|
||||||
|
// width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
border: 2rpx solid #d0d0d0;
|
||||||
|
margin: 10rpx;
|
||||||
|
margin-top: 0px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
image{
|
||||||
|
// width: 29px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ab-action-box{
|
||||||
|
.ac-row{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.ac-row-card-text{
|
||||||
|
padding: 10rpx !important;
|
||||||
|
width: 80rpx !important;
|
||||||
|
height: 80rpx !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.ac-row-card{
|
||||||
|
// white-space: nowrap;
|
||||||
|
margin: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-shadow: 2rpx 20rpx 40rpx #dfdfdf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content-text{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.ct-title{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34px;
|
||||||
|
color: #26758d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.okBtn{
|
||||||
|
width: 100%;
|
||||||
|
color: white;
|
||||||
|
background-color: #26758d;
|
||||||
|
padding: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.pop-box{
|
||||||
|
.pb-title{
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
background-color: white;
|
||||||
|
padding: 20rpx;
|
||||||
|
width: 80%;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
</style>
|
BIN
static/1.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/2.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/3.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/4.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
1
unpackage/dist/dev/mp-weixin/app.js
vendored
@ -11,6 +11,7 @@ if (!Math) {
|
|||||||
"./pages/user/star.js";
|
"./pages/user/star.js";
|
||||||
"./pages/user/setting.js";
|
"./pages/user/setting.js";
|
||||||
"./pages/user/feedback.js";
|
"./pages/user/feedback.js";
|
||||||
|
"./pages/index/visionTest.js";
|
||||||
}
|
}
|
||||||
const _sfc_main = {
|
const _sfc_main = {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
3
unpackage/dist/dev/mp-weixin/app.json
vendored
@ -8,7 +8,8 @@
|
|||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/user/star",
|
"pages/user/star",
|
||||||
"pages/user/setting",
|
"pages/user/setting",
|
||||||
"pages/user/feedback"
|
"pages/user/feedback",
|
||||||
|
"pages/index/visionTest"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
|
@ -66,12 +66,15 @@ const _sfc_main = {
|
|||||||
}
|
}
|
||||||
const single = common_vendor.ref("");
|
const single = common_vendor.ref("");
|
||||||
function maskClick(e) {
|
function maskClick(e) {
|
||||||
console.log("maskClick事件:", e);
|
|
||||||
}
|
}
|
||||||
const hValue = common_vendor.ref("");
|
const hValue = common_vendor.ref("");
|
||||||
common_vendor.ref("");
|
common_vendor.ref("");
|
||||||
function onClickH(e) {
|
function onClickH(e) {
|
||||||
console.log(hValue.value);
|
}
|
||||||
|
function toExam() {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: "/pages/index/visionTest"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return {
|
return {
|
||||||
@ -82,41 +85,47 @@ const _sfc_main = {
|
|||||||
lbt_list: lbt_list.value
|
lbt_list: lbt_list.value
|
||||||
}),
|
}),
|
||||||
b: common_vendor.p({
|
b: common_vendor.p({
|
||||||
|
type: "forward",
|
||||||
|
color: "#9bc027",
|
||||||
|
size: "20"
|
||||||
|
}),
|
||||||
|
c: common_vendor.o(toExam),
|
||||||
|
d: common_vendor.p({
|
||||||
type: "forward",
|
type: "forward",
|
||||||
color: "#ffa2a2",
|
color: "#ffa2a2",
|
||||||
size: "20"
|
size: "20"
|
||||||
}),
|
}),
|
||||||
c: common_vendor.p({
|
e: common_vendor.p({
|
||||||
type: "forward",
|
type: "forward",
|
||||||
color: "#f9b275",
|
color: "#f9b275",
|
||||||
size: "20"
|
size: "20"
|
||||||
}),
|
}),
|
||||||
d: common_vendor.p({
|
f: common_vendor.p({
|
||||||
type: "forward",
|
type: "forward",
|
||||||
color: "#8fdc8a",
|
color: "#8fdc8a",
|
||||||
size: "20"
|
size: "20"
|
||||||
}),
|
}),
|
||||||
e: common_vendor.o(radioChange),
|
g: common_vendor.o(radioChange),
|
||||||
f: common_vendor.o(maskClick),
|
h: common_vendor.o(maskClick),
|
||||||
g: common_vendor.o(($event) => single.value = $event),
|
i: common_vendor.o(($event) => single.value = $event),
|
||||||
h: common_vendor.p({
|
j: common_vendor.p({
|
||||||
type: "date",
|
type: "date",
|
||||||
["clear-icon"]: false,
|
["clear-icon"]: false,
|
||||||
modelValue: single.value
|
modelValue: single.value
|
||||||
}),
|
}),
|
||||||
i: common_vendor.o(onClickH),
|
k: common_vendor.o(onClickH),
|
||||||
j: common_vendor.o(($event) => hValue.value = $event),
|
l: common_vendor.o(($event) => hValue.value = $event),
|
||||||
k: common_vendor.p({
|
m: common_vendor.p({
|
||||||
suffixIcon: "search",
|
suffixIcon: "search",
|
||||||
focus: true,
|
focus: true,
|
||||||
placeholder: "请输入内容",
|
placeholder: "请输入内容",
|
||||||
modelValue: hValue.value
|
modelValue: hValue.value
|
||||||
}),
|
}),
|
||||||
l: common_vendor.o(toClose),
|
n: common_vendor.o(toClose),
|
||||||
m: common_vendor.sr(inputDialog, "1cf27b2a-4", {
|
o: common_vendor.sr(inputDialog, "1cf27b2a-5", {
|
||||||
"k": "inputDialog"
|
"k": "inputDialog"
|
||||||
}),
|
}),
|
||||||
n: common_vendor.p({
|
p: common_vendor.p({
|
||||||
["is-mask-click"]: false
|
["is-mask-click"]: false
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
@ -1 +1 @@
|
|||||||
<view class="content page-box data-v-1cf27b2a"><my-swiper wx:if="{{a}}" class="index-siwper margin-b-card data-v-1cf27b2a" style="width:100%" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"/><view class="main-cards data-v-1cf27b2a"><view class="mc-part data-v-1cf27b2a" style="margin-left:0"><view class="mc-part-text data-v-1cf27b2a">已完成事项</view><image class="data-v-1cf27b2a" src="/static/done.png" mode="widthFix"></image></view><view class="mc-part mc-part2 data-v-1cf27b2a" style="margin-right:0"><view class="mc-part-text data-v-1cf27b2a">待完成事项</view><image class="data-v-1cf27b2a" style="transform:rotate(0deg)" src="/static/undone.png" mode="widthFix"></image></view></view><view class="attention-card data-v-1cf27b2a"><view class="part-title data-v-1cf27b2a"> 注意事项 </view><view class="ac-parts data-v-1cf27b2a"><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00)"> 术前注意事项 <uni-icons wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{b}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00)"> 术中注意事项 <uni-icons wx:if="{{c}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{c}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00)"> 术后注意事项 <uni-icons wx:if="{{d}}" class="data-v-1cf27b2a" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{d}}"></uni-icons></view></view></view><uni-popup wx:if="{{n}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="inputDialog" u-i="1cf27b2a-4" bind:__l="__l" u-p="{{n}}"><view class="pop-box data-v-1cf27b2a"><view class="pb-title data-v-1cf27b2a">完善手术信息</view><view class="pb-content data-v-1cf27b2a"><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">已经手术</view><view class="pb-item-right data-v-1cf27b2a"><radio-group class="data-v-1cf27b2a" bindchange="{{e}}"><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="1"/>是</label><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="0"/>否</label></radio-group></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">手术时间</view><view class="pb-item-right data-v-1cf27b2a"><uni-datetime-picker wx:if="{{h}}" class="data-v-1cf27b2a" bindmaskClick="{{f}}" u-i="1cf27b2a-5,1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></uni-datetime-picker></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">医院名称</view><view class="pb-item-right data-v-1cf27b2a"><uni-easyinput wx:if="{{k}}" class="data-v-1cf27b2a" bindiconClick="{{i}}" u-i="1cf27b2a-6,1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></uni-easyinput></view></view></view></view><view class="pop-close data-v-1cf27b2a" bindtap="{{l}}"> 关闭 </view></uni-popup></view>
|
<view class="content page-box data-v-1cf27b2a"><my-swiper wx:if="{{a}}" class="index-siwper margin-b-card data-v-1cf27b2a" style="width:100%" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"/><view class="main-cards data-v-1cf27b2a" bindtap="{{c}}"><view class="mc-row data-v-1cf27b2a"><view class="data-v-1cf27b2a">视力测试</view><uni-icons wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{b}}"></uni-icons></view></view><view class="main-cards data-v-1cf27b2a"><view class="mc-part data-v-1cf27b2a" style="margin-left:0"><view class="mc-part-text data-v-1cf27b2a">已完成事项</view><image class="data-v-1cf27b2a" src="/static/done.png" mode="widthFix"></image></view><view class="mc-part mc-part2 data-v-1cf27b2a" style="margin-right:0"><view class="mc-part-text data-v-1cf27b2a">待完成事项</view><image class="data-v-1cf27b2a" style="transform:rotate(0deg)" src="/static/undone.png" mode="widthFix"></image></view></view><view class="attention-card data-v-1cf27b2a"><view class="part-title data-v-1cf27b2a"> 注意事项 </view><view class="ac-parts data-v-1cf27b2a"><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00)"> 术前注意事项 <uni-icons wx:if="{{d}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{d}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00)"> 术中注意事项 <uni-icons wx:if="{{e}}" class="data-v-1cf27b2a" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{e}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00)"> 术后注意事项 <uni-icons wx:if="{{f}}" class="data-v-1cf27b2a" u-i="1cf27b2a-4" bind:__l="__l" u-p="{{f}}"></uni-icons></view></view></view><uni-popup wx:if="{{p}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="inputDialog" u-i="1cf27b2a-5" bind:__l="__l" u-p="{{p}}"><view class="pop-box data-v-1cf27b2a"><view class="pb-title data-v-1cf27b2a">完善手术信息</view><view class="pb-content data-v-1cf27b2a"><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">已经手术</view><view class="pb-item-right data-v-1cf27b2a"><radio-group class="data-v-1cf27b2a" bindchange="{{g}}"><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="1"/>是</label><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="0"/>否</label></radio-group></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">手术时间</view><view class="pb-item-right data-v-1cf27b2a"><uni-datetime-picker wx:if="{{j}}" class="data-v-1cf27b2a" bindmaskClick="{{h}}" u-i="1cf27b2a-6,1cf27b2a-5" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></uni-datetime-picker></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">医院名称</view><view class="pb-item-right data-v-1cf27b2a"><uni-easyinput wx:if="{{m}}" class="data-v-1cf27b2a" bindiconClick="{{k}}" u-i="1cf27b2a-7,1cf27b2a-5" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></uni-easyinput></view></view></view></view><view class="pop-close data-v-1cf27b2a" bindtap="{{n}}"> 关闭 </view></uni-popup></view>
|
@ -23,6 +23,17 @@
|
|||||||
/* 垂直间距 */
|
/* 垂直间距 */
|
||||||
/* 透明度 */
|
/* 透明度 */
|
||||||
/* 文章场景相关 */
|
/* 文章场景相关 */
|
||||||
|
.mc-row.data-v-1cf27b2a {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
border: 1px solid #9bc027;
|
||||||
|
padding: 20px 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #9bc027;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
.radio.data-v-1cf27b2a {
|
.radio.data-v-1cf27b2a {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
162
unpackage/dist/dev/mp-weixin/pages/index/visionTest.js
vendored
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const store_index = require("../../store/index.js");
|
||||||
|
require("../../api/index.js");
|
||||||
|
require("../../api/request.js");
|
||||||
|
require("../../config/index.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||||
|
_easycom_uni_popup2();
|
||||||
|
}
|
||||||
|
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||||
|
if (!Math) {
|
||||||
|
_easycom_uni_popup();
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "visionTest",
|
||||||
|
setup(__props) {
|
||||||
|
const store = store_index.useStore();
|
||||||
|
common_vendor.onLoad((e) => {
|
||||||
|
var _a;
|
||||||
|
if (!((_a = store.userInfo) == null ? void 0 : _a.has_operation)) {
|
||||||
|
setTimeout(() => {
|
||||||
|
inputDialog.value.open();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const inputDialog = common_vendor.ref();
|
||||||
|
const inputDialog2 = common_vendor.ref();
|
||||||
|
const inputDialog3 = common_vendor.ref();
|
||||||
|
const step1 = common_vendor.ref("先测右眼,请遮住左眼");
|
||||||
|
common_vendor.ref("请遮住右眼");
|
||||||
|
const countDown = common_vendor.ref(5);
|
||||||
|
common_vendor.ref(1);
|
||||||
|
const current_img = common_vendor.ref("");
|
||||||
|
const current_img_index = common_vendor.ref(null);
|
||||||
|
const sizes = common_vendor.ref([
|
||||||
|
{
|
||||||
|
size: 23,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 19,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 15,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 11,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 9,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 7,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 6,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 4,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 3,
|
||||||
|
vision: 4.2
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
const show_size = common_vendor.ref({
|
||||||
|
width: "29px"
|
||||||
|
});
|
||||||
|
const num = common_vendor.ref(0);
|
||||||
|
const now = common_vendor.ref(1);
|
||||||
|
const vision_info = common_vendor.ref({
|
||||||
|
left: 4,
|
||||||
|
right: 4.1
|
||||||
|
});
|
||||||
|
function toStart() {
|
||||||
|
inputDialog.value.close();
|
||||||
|
inputDialog2.value.open();
|
||||||
|
let s = setInterval(() => {
|
||||||
|
countDown.value--;
|
||||||
|
if (countDown.value == 0) {
|
||||||
|
clearInterval(s);
|
||||||
|
inputDialog2.value.close();
|
||||||
|
}
|
||||||
|
}, 1e3);
|
||||||
|
randomFunc();
|
||||||
|
}
|
||||||
|
function randomFunc() {
|
||||||
|
let ran = Math.ceil(Math.random() * 4);
|
||||||
|
if (current_img_index.value == ran) {
|
||||||
|
randomFunc();
|
||||||
|
} else {
|
||||||
|
current_img.value = "../../static/" + ran + ".png";
|
||||||
|
current_img_index.value = ran;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function chooseFunc(index) {
|
||||||
|
randomFunc();
|
||||||
|
if (num.value > 8) {
|
||||||
|
if (now.value == 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
show_size.value.width = "29px";
|
||||||
|
countDown.value = 5;
|
||||||
|
step1.value = "测左眼,请遮住右眼";
|
||||||
|
num.value = 8;
|
||||||
|
now.value = 2;
|
||||||
|
toStart();
|
||||||
|
} else {
|
||||||
|
show_size.value.width = sizes.value[num.value].size + "px";
|
||||||
|
num.value++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function okFunc() {
|
||||||
|
inputDialog3.value.open();
|
||||||
|
}
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: current_img.value,
|
||||||
|
b: common_vendor.s(show_size.value),
|
||||||
|
c: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
d: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
e: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
f: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
g: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
h: common_vendor.o(toStart),
|
||||||
|
i: common_vendor.sr(inputDialog, "29752d91-0", {
|
||||||
|
"k": "inputDialog"
|
||||||
|
}),
|
||||||
|
j: common_vendor.p({
|
||||||
|
["is-mask-click"]: true
|
||||||
|
}),
|
||||||
|
k: common_vendor.t(countDown.value),
|
||||||
|
l: common_vendor.t(step1.value),
|
||||||
|
m: common_vendor.sr(inputDialog2, "29752d91-1", {
|
||||||
|
"k": "inputDialog2"
|
||||||
|
}),
|
||||||
|
n: common_vendor.p({
|
||||||
|
["is-mask-click"]: false
|
||||||
|
}),
|
||||||
|
o: common_vendor.t(vision_info.value.left),
|
||||||
|
p: common_vendor.t(vision_info.value.right),
|
||||||
|
q: common_vendor.o(okFunc),
|
||||||
|
r: common_vendor.sr(inputDialog3, "29752d91-2", {
|
||||||
|
"k": "inputDialog3"
|
||||||
|
}),
|
||||||
|
s: common_vendor.p({
|
||||||
|
["is-mask-click"]: true
|
||||||
|
})
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-29752d91"], ["__file", "F:/项目2023/视力表/vision-record/pages/index/visionTest.vue"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
6
unpackage/dist/dev/mp-weixin/pages/index/visionTest.json
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "视力测试",
|
||||||
|
"usingComponents": {
|
||||||
|
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||||
|
}
|
||||||
|
}
|
1
unpackage/dist/dev/mp-weixin/pages/index/visionTest.wxml
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
<view class="visionTestBox page-box data-v-29752d91"><view class="actionBox data-v-29752d91"><view class="ab-show-box data-v-29752d91"><image class="data-v-29752d91" src="{{a}}" style="{{b}}" mode="widthFix"></image></view><view class="ab-action-box data-v-29752d91"><view class="ac-row data-v-29752d91"><image bindtap="{{c}}" class="ac-row-card data-v-29752d91" src="/static/1.png" mode=""></image></view><view class="ac-row data-v-29752d91"><image bindtap="{{d}}" class="ac-row-card data-v-29752d91" src="/static/3.png" mode=""></image><view bindtap="{{e}}" class="ac-row-card ac-row-card-text data-v-29752d91">看不清</view><image bindtap="{{f}}" class="ac-row-card data-v-29752d91" src="/static/4.png" mode=""></image></view><view class="ac-row data-v-29752d91"><image bindtap="{{g}}" class="ac-row-card data-v-29752d91" src="/static/2.png" mode=""></image></view></view></view><uni-popup wx:if="{{j}}" class="r data-v-29752d91" u-s="{{['d']}}" u-r="inputDialog" u-i="29752d91-0" bind:__l="__l" u-p="{{j}}"><view class="pop-box data-v-29752d91"><view class="pb-title data-v-29752d91">测试须知</view><view class="pb-content data-v-29752d91"><view class="content-text data-v-29752d91"> 使用uni-app自带的editor组件,该组件支持App、H5、微信小程序,其他家小程序自身未提供这类解决方案。 </view><view class="okBtn data-v-29752d91" bindtap="{{h}}">确定</view></view></view></uni-popup><uni-popup wx:if="{{n}}" class="r data-v-29752d91" u-s="{{['d']}}" u-r="inputDialog2" style="width:100%" u-i="29752d91-1" bind:__l="__l" u-p="{{n}}"><view class="pop-box data-v-29752d91"><view class="pb-title data-v-29752d91">测试须知</view><view class="pb-content data-v-29752d91"><view class="content-text data-v-29752d91"><view class="ct-title data-v-29752d91">{{k}}</view><view class="data-v-29752d91">{{l}}</view></view></view></view></uni-popup><uni-popup wx:if="{{s}}" class="r data-v-29752d91" u-s="{{['d']}}" u-r="inputDialog3" u-i="29752d91-2" bind:__l="__l" u-p="{{s}}"><view class="pop-box data-v-29752d91"><view class="pb-title data-v-29752d91">测试结束</view><view class="pb-content data-v-29752d91"><view class="content-text data-v-29752d91"> 测试结束,当前视力为{{o}}(左),{{p}}(右)。 </view><view class="okBtn data-v-29752d91" bindtap="{{q}}">确定</view></view></view></uni-popup></view>
|
87
unpackage/dist/dev/mp-weixin/pages/index/visionTest.wxss
vendored
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
/* 颜色变量 */
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
/* 背景颜色 */
|
||||||
|
/* 边框颜色 */
|
||||||
|
/* 尺寸变量 */
|
||||||
|
/* 文字尺寸 */
|
||||||
|
/* 图片尺寸 */
|
||||||
|
/* Border Radius */
|
||||||
|
/* 水平间距 */
|
||||||
|
/* 垂直间距 */
|
||||||
|
/* 透明度 */
|
||||||
|
/* 文章场景相关 */
|
||||||
|
.visionTestBox.data-v-29752d91, .actionBox.data-v-29752d91 {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.actionBox .ab-show-box.data-v-29752d91 {
|
||||||
|
height: 50%;
|
||||||
|
border: 2rpx solid #d0d0d0;
|
||||||
|
margin: 10rpx;
|
||||||
|
margin-top: 0px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.actionBox .ab-action-box .ac-row.data-v-29752d91 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.actionBox .ab-action-box .ac-row .ac-row-card-text.data-v-29752d91 {
|
||||||
|
padding: 10rpx !important;
|
||||||
|
width: 80rpx !important;
|
||||||
|
height: 80rpx !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.actionBox .ab-action-box .ac-row .ac-row-card.data-v-29752d91 {
|
||||||
|
margin: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-shadow: 2rpx 20rpx 40rpx #dfdfdf;
|
||||||
|
}
|
||||||
|
.content-text.data-v-29752d91 {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.content-text .ct-title.data-v-29752d91 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34px;
|
||||||
|
color: #26758d;
|
||||||
|
}
|
||||||
|
.okBtn.data-v-29752d91 {
|
||||||
|
width: 100%;
|
||||||
|
color: white;
|
||||||
|
background-color: #26758d;
|
||||||
|
padding: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.pop-box.data-v-29752d91 {
|
||||||
|
background-color: white;
|
||||||
|
padding: 20rpx;
|
||||||
|
width: 80%;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.pop-box .pb-title.data-v-29752d91 {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
BIN
unpackage/dist/dev/mp-weixin/static/1.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/2.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/3.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
unpackage/dist/dev/mp-weixin/static/4.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |