Compare commits
4 Commits
dc946ec669
...
prod
Author | SHA1 | Date | |
---|---|---|---|
c4edb4ec3d | |||
e31e6d8fc5 | |||
eef9377e02 | |||
3579868cc7 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ node_modules/*
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
unpackage
|
unpackage
|
||||||
|
.hbuilderx
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
// isdev 为 true 表示开发环境 false 表示发布环境
|
// isdev 为 true 表示开发环境 false 表示发布环境
|
||||||
const isdev = true;
|
const isdev = true;
|
||||||
const baseUrl = isdev ? 'http://5a0a6573.r9.cpolar.top' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
|
const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
|
||||||
// const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境
|
// const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境
|
||||||
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
|
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
|
||||||
|
|
||||||
|
@@ -115,6 +115,11 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "客服中心"
|
"navigationBarTitleText": "客服中心"
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/index/result",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "测试结果"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@@ -46,14 +46,7 @@
|
|||||||
is_loading.value = false
|
is_loading.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 滚动条设置
|
|
||||||
uni.createSelectorQuery().in(instance).select('#scroll-view-content').boundingClientRect((res)=>{
|
|
||||||
let top = res.height-w_h.value+100;
|
|
||||||
if(top>0){
|
|
||||||
scrollTop.value = top;
|
|
||||||
}
|
|
||||||
// console.log(res.height,w_h.value)
|
|
||||||
}).exec()
|
|
||||||
records.value.push({
|
records.value.push({
|
||||||
content:in_content.value,
|
content:in_content.value,
|
||||||
type:2
|
type:2
|
||||||
@@ -83,6 +76,14 @@
|
|||||||
duration:2000
|
duration:2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 滚动条设置
|
||||||
|
uni.createSelectorQuery().in(instance).select('#scroll-view-content').boundingClientRect((res)=>{
|
||||||
|
let top = res.height-w_h.value+100;
|
||||||
|
if(top>0){
|
||||||
|
scrollTop.value = top;
|
||||||
|
}
|
||||||
|
// console.log(res.height,w_h.value)
|
||||||
|
}).exec()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
163
pages/index/result.vue
Normal file
163
pages/index/result.vue
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<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'
|
||||||
|
import api from "@/api/index.js"
|
||||||
|
const store = useStore()
|
||||||
|
onLoad((e) => {
|
||||||
|
res_.value = JSON.parse(decodeURIComponent(e.res))
|
||||||
|
console.log(res_.value)
|
||||||
|
randomFunc()
|
||||||
|
})
|
||||||
|
// 变量
|
||||||
|
const res_ = ref(null)
|
||||||
|
const userInfo = ref(null)
|
||||||
|
const bg_imgs = 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_index = ref(0)
|
||||||
|
const avatarUrl = ref(null)
|
||||||
|
const info = ref({left:'',right:''})
|
||||||
|
const show_ = ref(false)
|
||||||
|
// 函数
|
||||||
|
function randomFunc() {
|
||||||
|
bg_index.value = parseInt((Math.random()*3))
|
||||||
|
uni.getImageInfo({
|
||||||
|
src:bg_imgs.value[bg_index.value],
|
||||||
|
success:function(res) {
|
||||||
|
avatarUrl.value = uni.getStorageSync('avatarUrl')
|
||||||
|
info.value.left = res_.value.leftEyeVision
|
||||||
|
info.value.right = res_.value.rightEyeVision
|
||||||
|
show_.value = true
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<view class="visionTestBox page-box">
|
||||||
|
<!-- <view class="actionBox" :style="{background:`url(${bg_imgs[bg_index]})`}">
|
||||||
|
测试
|
||||||
|
</view> -->
|
||||||
|
<view class="actionBox">
|
||||||
|
<view class="img-box">
|
||||||
|
<image style="width: 100%;" :src="bg_imgs[bg_index]" mode="widthFix"></image>
|
||||||
|
<view v-if="show_" class="avatar-box">
|
||||||
|
<image :src="avatarUrl" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view v-if="show_" class="res-text-row">
|
||||||
|
<view class="rtr-left">{{info.left}}</view>
|
||||||
|
<view class="rtr-right">{{info.right}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.avatar-box{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top:280rpx;
|
||||||
|
image{
|
||||||
|
width: 260rpx;
|
||||||
|
margin: 0px auto;
|
||||||
|
display: block;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.img-box{
|
||||||
|
position: relative;
|
||||||
|
.res-text-row{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 47%;
|
||||||
|
font-weight: 900;
|
||||||
|
color:gray;
|
||||||
|
.rtr-left{
|
||||||
|
margin-left: 20%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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{
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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>
|
@@ -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(()=>{
|
||||||
@@ -74,8 +73,14 @@
|
|||||||
left:4,
|
left:4,
|
||||||
right:4
|
right:4
|
||||||
})
|
})
|
||||||
|
const is_test = ref(true)
|
||||||
// 函数
|
// 函数
|
||||||
function toStart() { // 开始测试
|
function toStart() { // 开始测试
|
||||||
|
// if(is_test.value) {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:'/pages/index/result'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
inputDialog.value.close()
|
inputDialog.value.close()
|
||||||
inputDialog2.value.open()
|
inputDialog2.value.open()
|
||||||
let s = setInterval(() => {
|
let s = setInterval(() => {
|
||||||
@@ -141,19 +146,23 @@
|
|||||||
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.redirectTo({
|
||||||
|
url:"/pages/index/result?res="+encodeURIComponent(JSON.stringify(params))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
import {ref,onMounted,nextTick} from "vue"
|
import {ref,onMounted,nextTick} from "vue"
|
||||||
import {useStore} from '@/store/index.js'
|
import {useStore} from '@/store/index.js'
|
||||||
import api from "@/api/index"
|
import api from "@/api/index"
|
||||||
|
import emptyCard from "@/components/emptyCard.vue"
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getList()
|
getList()
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="list-box">
|
<view class="list-box">
|
||||||
<view class="lb-card" v-for="(item,i) in list" @tap="toDetail(item)">
|
<view v-if="list.length>0" class="lb-card" v-for="(item,i) in list" @tap="toDetail(item)">
|
||||||
<view class="lb-left">
|
<view class="lb-left">
|
||||||
<image :src="item.cover_img" mode="aspectFill"></image>
|
<image :src="item.cover_img" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
<view class="lb-content text-ellipsis-1 small-text" v-html="item.content"></view>
|
<view class="lb-content text-ellipsis-1 small-text" v-html="item.content"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<emptyCard v-else></emptyCard>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -63,6 +63,7 @@ export const useStore = defineStore('main2', {
|
|||||||
this.access_token = access_token
|
this.access_token = access_token
|
||||||
this.isLogin = true
|
this.isLogin = true
|
||||||
this.userInfo = uni.getStorageSync('userInfo')
|
this.userInfo = uni.getStorageSync('userInfo')
|
||||||
|
this.operation_info = uni.getStorageSync('operation_info')
|
||||||
// this.getUserInfo()
|
// this.getUserInfo()
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
Reference in New Issue
Block a user