Compare commits
1 Commits
2fa219cfe0
...
prod
Author | SHA1 | Date | |
---|---|---|---|
c4edb4ec3d |
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
|
||||||
|
2
App.vue
2
App.vue
@@ -34,8 +34,6 @@
|
|||||||
// sHeight.value = res.screenHeight
|
// sHeight.value = res.screenHeight
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 获取测试结果背景图
|
|
||||||
store.getBgList()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@@ -16,15 +16,12 @@ const API = {
|
|||||||
getLbtList:data => net.GET("/banner/list",data),// 获取轮播图
|
getLbtList:data => net.GET("/banner/list",data),// 获取轮播图
|
||||||
hospital:data => net.PUT("/user/hospital",data),// 修改医院信息
|
hospital:data => net.PUT("/user/hospital",data),// 修改医院信息
|
||||||
getHospitalInfo:id => net.GET("/hospital/"+id),// 根据ID获取医院信息
|
getHospitalInfo:id => net.GET("/hospital/"+id),// 根据ID获取医院信息
|
||||||
getHospitalInfo2:data => net.GET("/hospital/notes",data),// 根据ID获取医院信息222
|
getTodoist:data => net.GET("/user/todo",data),// 获取待办事项
|
||||||
getTodoist:(data,userId) => net.GET("/user/todo",data,true,{"userId":userId}),// 获取待办事项
|
|
||||||
getVisionList:data => net.GET("/vision/list",data),// 获取测试记录
|
getVisionList:data => net.GET("/vision/list",data),// 获取测试记录
|
||||||
todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态
|
todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态
|
||||||
// 百科
|
// 百科
|
||||||
getArticleList:data => net.GET("/article/list",data),// 百科列表
|
getArticleList:data => net.GET("/article/list",data),// 百科列表
|
||||||
getArticleDetail:(data,userId) => net.GET("/article/"+data.id,null,true,{"userId":userId}),// 文章详情
|
getArticleDetail:data => net.GET("/article/"+data.id),// 文章详情
|
||||||
getArticleFavorite:(data,userId) => net.POST("/favorite",data,true,{"userId":userId}),// 收藏文章
|
|
||||||
delArticleFavorite:(data,userId) => net.DELETE("/favorite",data,true,{"userId":userId}),// 取消收藏文章
|
|
||||||
// 我的
|
// 我的
|
||||||
getStarList:data => net.GET("/favorite/list",data),// 收藏列表
|
getStarList:data => net.GET("/favorite/list",data),// 收藏列表
|
||||||
/*
|
/*
|
||||||
@@ -43,7 +40,6 @@ const API = {
|
|||||||
getCategoryList:data => net.GET('/api/goods_category/lists'), // 获取商品分类
|
getCategoryList:data => net.GET('/api/goods_category/lists'), // 获取商品分类
|
||||||
getCategory:data => net.GET('/api/goods/category',data), // 根据分类Id获取分类商品
|
getCategory:data => net.GET('/api/goods/category',data), // 根据分类Id获取分类商品
|
||||||
getCartList:data => net.GET('/api/cart/lists',data), // 获取购物车列表
|
getCartList:data => net.GET('/api/cart/lists',data), // 获取购物车列表
|
||||||
getBgList:data => net.GET('/poster/list',data), // 获取测试结果背景图列表
|
|
||||||
addCart:data => net.POST('/api/cart/add',data), // 加入购物车
|
addCart:data => net.POST('/api/cart/add',data), // 加入购物车
|
||||||
delCart:data => net.POST('/api/cart/delete',data), // 删除购物车
|
delCart:data => net.POST('/api/cart/delete',data), // 删除购物车
|
||||||
updateCart:data => net.POST('/api/cart/edit',data), // 更新购物车
|
updateCart:data => net.POST('/api/cart/edit',data), // 更新购物车
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
import config from '../config'
|
import config from '../config'
|
||||||
|
|
||||||
// import {useStore} from '@/store/index.js'
|
// import store from '../store'
|
||||||
// console.log(useStore)
|
|
||||||
// const store = useStore()
|
|
||||||
const loginUrl = 'pages/user/login';
|
const loginUrl = 'pages/user/login';
|
||||||
// function JSON_to_URLEncoded(element,key,list){
|
// function JSON_to_URLEncoded(element,key,list){
|
||||||
// var list = list || [];
|
// var list = list || [];
|
||||||
@@ -76,20 +75,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if(res.data.code === 7) { // 登录失败
|
|
||||||
// uni.showToast({
|
|
||||||
// title:res.msg,
|
|
||||||
// icon:"error",
|
|
||||||
// duration:2000,
|
|
||||||
// mask:true,
|
|
||||||
// success() {
|
|
||||||
// if(res.code === 7) // 登录失败
|
|
||||||
// {
|
|
||||||
// store.afterFailLogin(2000)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
return res.data;
|
return res.data;
|
||||||
} else {
|
} else {
|
||||||
const reg = /abort/;
|
const reg = /abort/;
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
// isdev 为 true 表示开发环境 false 表示发布环境
|
// isdev 为 true 表示开发环境 false 表示发布环境
|
||||||
const isdev = true;
|
const isdev = true;
|
||||||
const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
|
const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
|
||||||
// const baseUrl = isdev ? 'http://707788f2.r1.cpolar.top' : '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';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
|
||||||
|
|
||||||
@@ -19,4 +18,4 @@ const config = {
|
|||||||
appID:'wx2a050f9a5c87a6dc',
|
appID:'wx2a050f9a5c87a6dc',
|
||||||
isdev
|
isdev
|
||||||
}
|
}
|
||||||
export default config
|
export default config
|
||||||
|
@@ -11,12 +11,8 @@
|
|||||||
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
||||||
import ccNewsTabs from '@/uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue'
|
import ccNewsTabs from '@/uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue'
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
import emptyCard from "@/components/emptyCard.vue"
|
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
if(uni.getStorageSync('userInfo')) {
|
|
||||||
user_info.value = JSON.parse(uni.getStorageSync('userInfo'))
|
|
||||||
}
|
|
||||||
c_index.value = parseInt(e.state_index)
|
c_index.value = parseInt(e.state_index)
|
||||||
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
|
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
|
||||||
if(store.systemInfo) {
|
if(store.systemInfo) {
|
||||||
@@ -33,7 +29,6 @@
|
|||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
// 变量
|
// 变量
|
||||||
const user_info = ref(null)
|
|
||||||
const inputDialog = ref()
|
const inputDialog = ref()
|
||||||
const state_index = ref(0)
|
const state_index = ref(0)
|
||||||
const swiper_h = ref(0)
|
const swiper_h = ref(0)
|
||||||
@@ -90,13 +85,12 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask:true
|
mask:true
|
||||||
})
|
})
|
||||||
list_box.value[c_index.value].queryParams.userId = user_info.value?.userId || 0
|
const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
|
||||||
const res = await api.getTodoist(list_box.value[c_index.value].queryParams,user_info.value?.userId || 0)
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if(res.code === 0) {
|
if(res.code === 0) {
|
||||||
if(res.data && res.data.length > 0) {
|
if(res.data && res.data.length > 0) {
|
||||||
// list_box.value[c_index.value].list.push(...res.data)
|
// list.value.push(...res.data)
|
||||||
list_box.value[c_index.value].list = res.data
|
list_box.value[c_index.value].list.push(...res.data)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
list_box.value[c_index.value].queryParams.page--
|
list_box.value[c_index.value].queryParams.page--
|
||||||
@@ -174,7 +168,7 @@
|
|||||||
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
|
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
|
||||||
<swiper-item v-for="(item1,i1) in list_box">
|
<swiper-item v-for="(item1,i1) in list_box">
|
||||||
<view class="todoBox">
|
<view class="todoBox">
|
||||||
<view v-for="(item,i) in item1.list" v-if="item1.list.length>0" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
|
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
|
||||||
<view class="td-content text-ellipsis-2">
|
<view class="td-content text-ellipsis-2">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
</view>
|
</view>
|
||||||
@@ -182,7 +176,6 @@
|
|||||||
{{util.timestampToDate(item.CreatedAt)}}
|
{{util.timestampToDate(item.CreatedAt)}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<emptyCard v-else></emptyCard>
|
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
@@ -11,23 +11,18 @@
|
|||||||
import {useStore} from '@/store/index.js'
|
import {useStore} from '@/store/index.js'
|
||||||
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const h_index = ref(0)
|
|
||||||
onShow((e) => {
|
onShow((e) => {
|
||||||
getLbtList()
|
getLbtList()
|
||||||
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
||||||
getHospitalList()
|
// getHospitalList()
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
inputDialog.value.open()
|
inputDialog.value.open()
|
||||||
},0)
|
},0)
|
||||||
}
|
}
|
||||||
let s = `$http({code:'1s'});if`
|
|
||||||
// // let arr = /\$http\((\S*)\)\;if/.exec(s);
|
|
||||||
let arr = s.match(/\$http\((.*)\)\;if/)
|
|
||||||
console.log(arr[1])
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 变量
|
// 变量
|
||||||
const hospitals = ref([])
|
const hospitals = ref(null)
|
||||||
// const hospitals_show = ref(false)
|
// const hospitals_show = ref(false)
|
||||||
const inputDialog = ref()
|
const inputDialog = ref()
|
||||||
const inputClose = ref()
|
const inputClose = ref()
|
||||||
@@ -53,7 +48,6 @@
|
|||||||
const res = await api.getHospitalList(h_queryParams.value)
|
const res = await api.getHospitalList(h_queryParams.value)
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
hospitals.value = res.data.list
|
hospitals.value = res.data.list
|
||||||
console.log(hospitals.value )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function getLbtList() { // 获取轮播图
|
async function getLbtList() { // 获取轮播图
|
||||||
@@ -99,7 +93,7 @@
|
|||||||
// blur_h.value = 0
|
// blur_h.value = 0
|
||||||
}
|
}
|
||||||
function toBlur(){
|
function toBlur(){
|
||||||
// hospitals.value = null
|
hospitals.value = null
|
||||||
}
|
}
|
||||||
async function toSave() {
|
async function toSave() {
|
||||||
if(isSurgery.value == -1) {
|
if(isSurgery.value == -1) {
|
||||||
@@ -108,17 +102,15 @@
|
|||||||
if(!surgery_time.value) {
|
if(!surgery_time.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// if(!choosed_h.value || !choosed_h.value.ID) {
|
if(!choosed_h.value || !choosed_h.value.ID) {
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
|
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
let h_query = {
|
let h_query = {
|
||||||
isSurgery:parseInt(isSurgery.value),
|
isSurgery:parseInt(isSurgery.value),
|
||||||
surgery_time:surgery_time.value,
|
surgery_time:surgery_time.value,
|
||||||
userId:user_info.userId,
|
userId:user_info.userId,
|
||||||
// hospitalId:choosed_h.value?.ID
|
hospitalId:choosed_h.value?.ID
|
||||||
hospitalId:hospitals.value[h_index.value]?.ID
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// console.log(h_query);return
|
// console.log(h_query);return
|
||||||
const res = await api.hospital(h_query)
|
const res = await api.hospital(h_query)
|
||||||
@@ -173,11 +165,6 @@
|
|||||||
url:"/pages/index/note_list?index="+index
|
url:"/pages/index/note_list?index="+index
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindPickerChange(e) {
|
|
||||||
console.log(hospitals.value )
|
|
||||||
h_index.value = e.detail.value
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<view class="content page-box">
|
<view class="content page-box">
|
||||||
@@ -263,10 +250,7 @@
|
|||||||
{{item.name}}
|
{{item.name}}
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox> -->
|
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
|
||||||
<picker @change="bindPickerChange" :value="h_index" :range="hospitals" range-key="name">
|
|
||||||
<view class="uni-input">{{hospitals[h_index]?.name}}</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
|
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
|
||||||
|
@@ -99,39 +99,31 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask:true
|
mask:true
|
||||||
})
|
})
|
||||||
let operation_info = JSON.parse(uni.getStorageSync('operation_info'))
|
const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
|
||||||
if(operation_info && operation_info.hospitalId) {
|
uni.hideLoading();
|
||||||
const res = await api.getHospitalInfo2({
|
if(res.code === 0) {
|
||||||
hospitalId:operation_info.hospitalId,
|
if(res.data && res.data.length > 0) {
|
||||||
timeNum:list_box.value[c_index.value].queryParams.statet
|
// list.value.push(...res.data)
|
||||||
})
|
list_box.value[c_index.value].list.push(...res.data)
|
||||||
// return
|
|
||||||
// const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
|
|
||||||
if(res.code === 0) {
|
|
||||||
if(res.data && res.data.length > 0) {
|
|
||||||
// list_box.value[c_index.value].list.push(...res.data)
|
|
||||||
list_box.value[c_index.value].list = res.data
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
list_box.value[c_index.value].queryParams.page--
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
uni.showToast({
|
list_box.value[c_index.value].queryParams.page--
|
||||||
title:res.msg,
|
|
||||||
icon:"error",
|
|
||||||
duration:2000,
|
|
||||||
mask:true,
|
|
||||||
success() {
|
|
||||||
if(res.code === 7) // 登录失败
|
|
||||||
{
|
|
||||||
store.afterFailLogin(2000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
else{
|
||||||
|
uni.showToast({
|
||||||
|
title:res.msg,
|
||||||
|
icon:"error",
|
||||||
|
duration:2000,
|
||||||
|
mask:true,
|
||||||
|
success() {
|
||||||
|
if(res.code === 7) // 登录失败
|
||||||
|
{
|
||||||
|
store.afterFailLogin(2000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function tabChange(currentIndex) {
|
function tabChange(currentIndex) {
|
||||||
c_index.value = currentIndex
|
c_index.value = currentIndex
|
||||||
@@ -190,7 +182,7 @@
|
|||||||
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
|
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
|
||||||
<swiper-item v-for="(item1,i1) in list_box">
|
<swiper-item v-for="(item1,i1) in list_box">
|
||||||
<view class="todoBox">
|
<view class="todoBox">
|
||||||
<view v-for="(item,i) in item1.list" v-if="item1.list.length>0" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
|
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
|
||||||
<view class="td-content text-ellipsis-2">
|
<view class="td-content text-ellipsis-2">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
</view>
|
</view>
|
||||||
@@ -198,7 +190,6 @@
|
|||||||
{{util.timestampToDate(item.CreatedAt)}}
|
{{util.timestampToDate(item.CreatedAt)}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<emptyCard v-else></emptyCard>
|
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
// 引入依赖
|
// 引入依赖
|
||||||
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
|
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 uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
|
||||||
import { onLoad } from "@dcloudio/uni-app"
|
import { onLoad } from "@dcloudio/uni-app"
|
||||||
// import mySwiper from "@/components/mySwiper.vue"
|
// import mySwiper from "@/components/mySwiper.vue"
|
||||||
import {ref,onMounted,nextTick} from "vue"
|
import {ref,onMounted,nextTick} from "vue"
|
||||||
@@ -11,20 +11,16 @@
|
|||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
res_.value = JSON.parse(decodeURIComponent(e.res))
|
res_.value = JSON.parse(decodeURIComponent(e.res))
|
||||||
console.log(res_.value)
|
console.log(res_.value)
|
||||||
console.log(store.bgList)
|
|
||||||
if(store.bgList.length>0) {
|
|
||||||
bg_imgs.value = store.bgList
|
|
||||||
}
|
|
||||||
randomFunc()
|
randomFunc()
|
||||||
})
|
})
|
||||||
// 变量
|
// 变量
|
||||||
const res_ = ref(null)
|
const res_ = ref(null)
|
||||||
const userInfo = ref(null)
|
const userInfo = ref(null)
|
||||||
const bg_imgs = ref([
|
const bg_imgs = ref([
|
||||||
{url:'/static/result1.jpg'},
|
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result1.jpg',
|
||||||
{url:'/static/result2.jpg'},
|
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result2.jpg',
|
||||||
{url:'/static/result3.jpg'},
|
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result3.jpg',
|
||||||
])
|
])
|
||||||
const bg_index = ref(0)
|
const bg_index = ref(0)
|
||||||
const avatarUrl = ref(null)
|
const avatarUrl = ref(null)
|
||||||
const info = ref({left:'',right:''})
|
const info = ref({left:'',right:''})
|
||||||
@@ -33,8 +29,7 @@
|
|||||||
function randomFunc() {
|
function randomFunc() {
|
||||||
bg_index.value = parseInt((Math.random()*3))
|
bg_index.value = parseInt((Math.random()*3))
|
||||||
uni.getImageInfo({
|
uni.getImageInfo({
|
||||||
// src:bg_imgs.value[bg_index.value],
|
src:bg_imgs.value[bg_index.value],
|
||||||
src:bg_imgs.value[bg_index.value].url,
|
|
||||||
success:function(res) {
|
success:function(res) {
|
||||||
avatarUrl.value = uni.getStorageSync('avatarUrl')
|
avatarUrl.value = uni.getStorageSync('avatarUrl')
|
||||||
info.value.left = res_.value.leftEyeVision
|
info.value.left = res_.value.leftEyeVision
|
||||||
@@ -45,8 +40,8 @@
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<view class="visionTestBox page-box">
|
<view class="visionTestBox page-box">
|
||||||
<!-- <view class="actionBox" :style="{background:`url(${bg_imgs[bg_index]})`}">
|
<!-- <view class="actionBox" :style="{background:`url(${bg_imgs[bg_index]})`}">
|
||||||
@@ -54,7 +49,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="actionBox">
|
<view class="actionBox">
|
||||||
<view class="img-box">
|
<view class="img-box">
|
||||||
<image style="width: 100%;" :src="bg_imgs[bg_index].url" mode="widthFix"></image>
|
<image style="width: 100%;" :src="bg_imgs[bg_index]" mode="widthFix"></image>
|
||||||
<view v-if="show_" class="avatar-box">
|
<view v-if="show_" class="avatar-box">
|
||||||
<image :src="avatarUrl" mode="widthFix"></image>
|
<image :src="avatarUrl" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -64,8 +59,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.avatar-box{
|
.avatar-box{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -164,5 +159,5 @@
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -56,28 +56,21 @@
|
|||||||
duration:2000
|
duration:2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function toResult(params) {
|
|
||||||
console.log(params)
|
|
||||||
uni.redirectTo({
|
|
||||||
url:"/pages/index/result?res="+encodeURIComponent(JSON.stringify(params))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// encodeURIComponent(JSON.stringify(params))
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<view class="visinoListBox page-box">
|
<view class="visinoListBox page-box">
|
||||||
<view class="vl-item-box" v-if="list.length > 0">
|
<view class="vl-item-box" v-if="list.length > 0">
|
||||||
<view class="vl-item" v-for="(item,i) in list" @tap="toResult(item)">
|
<view class="vl-item" v-for="(item,i) in list">
|
||||||
<view class="vl-title">{{util.timestampToDate(item.CreatedAt)}}</view>
|
<view class="vl-title">{{util.timestampToDate(item.CreatedAt)}}</view>
|
||||||
<view class="vl-row-box">
|
<view class="vl-row-box">
|
||||||
<view class="vl-row">
|
<view class="vl-row">
|
||||||
<view class="vlr-left">右眼</view>
|
<view class="vlr-left">右眼</view>
|
||||||
<view class="vlr-right">{{item.rightEyeVision}}</view>
|
<view class="vlr-left">{{item.rightEyeVision}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="vl-row">
|
<view class="vl-row">
|
||||||
<view class="vlr-left">左眼</view>
|
<view class="vlr-left">左眼</view>
|
||||||
<view class="vlr-right">{{item.leftEyeVision}}</view>
|
<view class="vlr-left">{{item.leftEyeVision}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -90,23 +83,15 @@
|
|||||||
.vl-item-box{
|
.vl-item-box{
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
.vl-item{
|
.vl-item{
|
||||||
margin-bottom: 20rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
/* border: 1px solid #eaeaea; */
|
|
||||||
border-radius: 20rpx;
|
|
||||||
box-shadow: 5px 5px 5px #f3f3f3;
|
|
||||||
.vl-title{
|
.vl-title{
|
||||||
border-left: 10rpx solid #26758d;
|
border-left: 4rpx solid red;
|
||||||
padding-left: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
.vl-row-box{
|
.vl-row-box{
|
||||||
.vl-row{
|
.vl-row{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.vlr-left{
|
.vlr-left{
|
||||||
margin-right:20rpx
|
|
||||||
;color: gray;
|
|
||||||
}
|
}
|
||||||
.vlr-right{
|
.vlr-right{
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
|
@@ -163,7 +163,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row-box" v-else>
|
<view class="row-box" v-else>
|
||||||
<view class="rb-card" @tap="toDetail(1)" style="margin-bottom: 10px;display: none;">
|
<view class="rb-card" @tap="toDetail(1)" style="margin-bottom: 10px;">
|
||||||
<!-- <view class="rbc-title">手术历程</view> -->
|
<!-- <view class="rbc-title">手术历程</view> -->
|
||||||
<view class="rbc-content rbc-content-box">
|
<view class="rbc-content rbc-content-box">
|
||||||
<view class="rbc-content-row rbc-content-left">
|
<view class="rbc-content-row rbc-content-left">
|
||||||
|
@@ -71,9 +71,9 @@
|
|||||||
}
|
}
|
||||||
function toDetail(item) {
|
function toDetail(item) {
|
||||||
let info = encodeURIComponent(JSON.stringify(item))
|
let info = encodeURIComponent(JSON.stringify(item))
|
||||||
console.log(item)
|
// console.log(info)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/wikipedia/detail?info="+info+"&id="+item.ID
|
url:"/pages/wikipedia/detail?info="+info+"&id="+item.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -82,11 +82,11 @@
|
|||||||
<view class="list-box">
|
<view class="list-box">
|
||||||
<view class="lb-card" v-if="list.length > 0" v-for="(item,i) in list" @tap="toDetail(item)">
|
<view class="lb-card" v-if="list.length > 0" v-for="(item,i) in list" @tap="toDetail(item)">
|
||||||
<view class="lb-left">
|
<view class="lb-left">
|
||||||
<image :src="item.cover" mode="aspectFill"></image>
|
<image :src="item.cover_img" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="lb-right">
|
<view class="lb-right">
|
||||||
<view class="lb-title">{{item.title}}</view>
|
<view class="lb-title">{{item.title}}</view>
|
||||||
<view class="lb-content text-ellipsis-1 small-text">{{item.introduction}}</view>
|
<view class="lb-content text-ellipsis-1 small-text">{{item.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<emptyCard v-else></emptyCard>
|
<emptyCard v-else></emptyCard>
|
||||||
|
@@ -6,9 +6,7 @@
|
|||||||
import {useStore} from '@/store/index.js'
|
import {useStore} from '@/store/index.js'
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
import api from "@/api/index.js"
|
import api from "@/api/index.js"
|
||||||
const h_index = ref(0)
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getHospitalList()
|
|
||||||
// console.log(useStore.userInfo)
|
// console.log(useStore.userInfo)
|
||||||
userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
|
userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
console.log(userinfo.value)
|
console.log(userinfo.value)
|
||||||
@@ -44,8 +42,7 @@
|
|||||||
hospitals.value = res.data.list
|
hospitals.value = res.data.list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onInputH() {
|
function onClickH() {
|
||||||
console.log(hValue.value)
|
|
||||||
h_queryParams.value.key = hValue.value
|
h_queryParams.value.key = hValue.value
|
||||||
getHospitalList()
|
getHospitalList()
|
||||||
|
|
||||||
@@ -165,10 +162,6 @@
|
|||||||
else{
|
else{
|
||||||
uni.clearStorage();
|
uni.clearStorage();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
function bindPickerChange(e) {
|
|
||||||
console.log(hospitals.value )
|
|
||||||
h_index.value = e.detail.value
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
@@ -222,11 +215,8 @@
|
|||||||
手术医院</view>
|
手术医院</view>
|
||||||
<view class="rbc-content-row rbc-content-right">
|
<view class="rbc-content-row rbc-content-right">
|
||||||
<!-- {{h_info?.name}} -->
|
<!-- {{h_info?.name}} -->
|
||||||
<!-- <uni-combox :border="false" @input="onInputH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="userinfo.HospitalId"></uni-combox> -->
|
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
|
||||||
<!-- <uni-icons type="forward" color="gray" size="20"></uni-icons> -->
|
<uni-icons type="forward" color="gray" size="20"></uni-icons>
|
||||||
<picker @change="bindPickerChange" :value="h_index" :range="hospitals" range-key="name">
|
|
||||||
<view class="uni-input">{{hospitals[h_index]?.name}}</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@@ -9,11 +9,7 @@
|
|||||||
import emptyCard from "@/components/emptyCard.vue"
|
import emptyCard from "@/components/emptyCard.vue"
|
||||||
import api from "@/api/index.js"
|
import api from "@/api/index.js"
|
||||||
import util from "@/utils"
|
import util from "@/utils"
|
||||||
const store = useStore()
|
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
if(uni.getStorageSync('userInfo')) {
|
|
||||||
userInfo.value = JSON.parse( uni.getStorageSync('userInfo'))
|
|
||||||
}
|
|
||||||
// console.log(e)
|
// console.log(e)
|
||||||
// a_info.value = JSON.parse(decodeURIComponent(e.info))
|
// a_info.value = JSON.parse(decodeURIComponent(e.info))
|
||||||
if(!e.id) {
|
if(!e.id) {
|
||||||
@@ -28,7 +24,6 @@
|
|||||||
getDetail(e.id)
|
getDetail(e.id)
|
||||||
})
|
})
|
||||||
// 变量
|
// 变量
|
||||||
const userInfo = ref(null)
|
|
||||||
// const content = ref(null)
|
// const content = ref(null)
|
||||||
const a_info = ref(null)
|
const a_info = ref(null)
|
||||||
// 函数
|
// 函数
|
||||||
@@ -46,27 +41,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function starFunc(type) { // 点击收藏
|
async function starFunc(type) { // 点击收藏
|
||||||
if(!userInfo.value) {
|
a_info.value.isStar = type
|
||||||
store.afterFailLogin(2000)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log(a_info.value)
|
|
||||||
if(type) { // 添加收藏
|
|
||||||
const res = await api.getArticleFavorite({
|
|
||||||
wz_id:a_info.value.ID,
|
|
||||||
userId:userInfo.value.userId,
|
|
||||||
cover:a_info.value.cover_img,
|
|
||||||
title:a_info.value.title,
|
|
||||||
introductions:''
|
|
||||||
},userInfo.value.userId)
|
|
||||||
}
|
|
||||||
else{ // 取消收藏
|
|
||||||
const res = await api.delArticleFavorite({
|
|
||||||
id:a_info.value.ID,
|
|
||||||
},userInfo.value.userId)
|
|
||||||
}
|
|
||||||
a_info.value.is_favorite = type
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
@@ -82,7 +57,7 @@
|
|||||||
<view style="color: gray;">{{a_info?.reading_num}}</view>
|
<view style="color: gray;">{{a_info?.reading_num}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ab-item">
|
<view class="ab-item">
|
||||||
<uni-icons color="#26758d" @tap="starFunc(0)" v-if="a_info?.is_favorite" type="star-filled" size="30"></uni-icons>
|
<uni-icons color="#26758d" @tap="starFunc(0)" v-if="a_info?.isStar" type="star-filled" size="30"></uni-icons>
|
||||||
<uni-icons color="gray" @tap="starFunc(1)" v-else type="star" size="30"></uni-icons>
|
<uni-icons color="gray" @tap="starFunc(1)" v-else type="star" size="30"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function toDetail(item) {
|
function toDetail(item) {
|
||||||
// let info = encodeURIComponent(JSON.stringify(item))
|
let info = encodeURIComponent(JSON.stringify(item))
|
||||||
// console.log(info)
|
// console.log(info)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"./detail?id="+item.ID
|
url:"./detail?id="+item.ID
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 MiB |
@@ -25,7 +25,6 @@ export const useStore = defineStore('main2', {
|
|||||||
remark_text:'',
|
remark_text:'',
|
||||||
address:'',
|
address:'',
|
||||||
operation_info:null, // 手术信息
|
operation_info:null, // 手术信息
|
||||||
bgList:[], // 测试结果背景图
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions:{
|
actions:{
|
||||||
@@ -159,16 +158,6 @@ export const useStore = defineStore('main2', {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getBgList(){
|
|
||||||
const res = await api.getBgList({page:1,pageSize:100})
|
|
||||||
// console.log(res)
|
|
||||||
if(res.code == 0) {
|
|
||||||
if(res.data && res.data.list && res.data.list.length>0 ) {
|
|
||||||
this.bgList = res.data.list
|
|
||||||
// console.log(this.bgList)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
afterFailLogin(duration){
|
afterFailLogin(duration){
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.removeStorageSync('userInfo');
|
uni.removeStorageSync('userInfo');
|
||||||
|
Reference in New Issue
Block a user