问题更改

master
lion 1 year ago
parent 3023b2ec0b
commit 5cd4fde2da

@ -54,7 +54,9 @@ let apiApp = {
// 就医服务
serveHospital:'/api/mobile/serve-hospital/hospital',
serveHospitalDetail:'/api/mobile/serve-hospital/hospital-detail',
serveHospitalForm:'/api/mobile/serve-hospital/forms'
serveHospitalForm:'/api/mobile/serve-hospital/forms',
serveHospitalOrder:'/api/mobile/user/serve-hospital-form',
serveHospitalOrderDetail:'/api/mobile/user/serve-hospital-form-detail',
}
@ -117,6 +119,8 @@ const install = (Vue, vm) => {
const serveHospital = (params = {}) => vm.$u.get(apiApp.serveHospital, params)
const serveHospitalDetail = (params = {}) => vm.$u.get(apiApp.serveHospitalDetail, params)
const serveHospitalForm = (params = {}) => vm.$u.get(apiApp.serveHospitalForm, params)
const serveHospitalOrder = (params = {}) => vm.$u.get(apiApp.serveHospitalOrder, params)
const serveHospitalOrderDetail = (params = {}) => vm.$u.get(apiApp.serveHospitalOrderDetail, params)
// end
vm.$u.api = {
@ -144,7 +148,7 @@ const install = (Vue, vm) => {
// 购物车
cartList, cartSave, cartShow, cartDestroy,
//就医服务
serveHospital,serveHospitalDetail,serveHospitalForm
serveHospital,serveHospitalDetail,serveHospitalForm,serveHospitalOrder,serveHospitalOrderDetail
};
}

@ -154,11 +154,17 @@
}],
isShowType: false,
list_type: [{
label: '专家咨询',
value: '专家咨询'
label: '挂号',
value: '挂号'
}, {
label: '普通咨询',
value: '普通咨询'
label: '陪诊',
value: '陪诊'
},{
label: '照护',
value: '照护'
}, {
label: '预约专家',
value: '预约专家'
}],
};
@ -215,8 +221,8 @@
icon:'none',
success() {
setTimeout(function() {
uni.switchTab({
url: '/pages/index/index'
uni.redirectTo({
url:'/package_sub/pages/ServeOrder/ServeOrder'
})
}, 1500)
}

@ -0,0 +1,170 @@
<template>
<view class="page">
<scroll-view v-if="list.length>0" scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom">
<view>
<view class="order" v-for="i in list" :key="i.id">
<view class="title">
<view class="title__name">
<text>咨询时间 </text>
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
</view>
<view class="info" @click.stop.native="$u.route({
url: '/package_sub/pages/ServeOrderDetail/ServeOrderDetail',
params: {
id: i.id,
}
})">
<view class="info__item info__flex100">
<text>咨询医院</text>
<text>{{ i.serve_hospital?i.serve_hospital.name:"" }}</text>
</view>
<view class="info__item info__flex100">
<text>咨询科室</text>
<text>{{ i.serve_hospital_department ? i.serve_hospital_department.name : '' }}</text>
</view>
<view class="info__item">
<text>咨询人</text>
<text>{{ i.name ? i.name : '' }}</text>
</view>
<view class="info__item">
<text>咨询类型</text>
<text>{{ i.type ? i.type : '' }}</text>
</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
<view v-else style="height: 100%;" class="d-flex ai-center jc-center">
<u-empty mode="list"></u-empty>
</view>
</view>
</template>
<script>
export default {
data() {
return {
loadStatus: 'loadmore',
list: [],
last_page: 0,
select: {
page: 1,
page_size: 20,
},
};
},
computed: {},
methods: {
reachBottom() {
if (this.select.page > this.last_page) {
this.loadStatus = 'nomore'
return
}
this.loadStatus = 'loading'
this.select.page++
this.getOrder()
},
async getOrder() {
try {
const res = await this.$u.api.serveHospitalOrder(this.select);
this.last_page = res.last_page
this.loadStatus = this.select.page >= this.last_page ? 'nomore' : 'loadmore'
this.list.push(...res.data)
} catch (err) {
console.error(err);
this.loadStatus = 'loadmore'
}
},
},
onLoad(option) {
this.getOrder()
},
}
</script>
<style lang="scss">
.page {
padding-top: 24rpx;
height: 100vh;
padding-bottom: calc(20rpx);
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
background-color: #f5efee;
}
::v-deep .u-load-more-wrap {
background-color: #f5efee !important;
.u-line-1 {
background-color: #f5efee !important;
}
}
.order {
border-radius: 10rpx;
filter: drop-shadow(0 0 10rpx rgba(211, 211, 214, 0.3));
background-color: #ffffff;
margin: 0 25rpx 24rpx;
.title {
display: flex;
align-items: center;
padding: 32rpx 39rpx 32rpx 45rpx;
position: relative;
&__name {
font-size: 24rpx;
color: #333333;
font-weight: bold;
}
&__status {
font-size: 24rpx;
color: #c20d12;
font-weight: 500;
margin-left: auto;
}
&::after {
content: "";
height: 2rpx;
background: #999999;
opacity: 0.302;
position: absolute;
bottom: 0;
left: 39rpx;
right: 39rpx;
}
}
.info {
display: flex;
flex-wrap: wrap;
padding: 32rpx 45rpx 16rpx 45rpx;
&__item {
flex-basis: 50%;
color: #333;
font-size: 24rpx;
font-weight: 500;
display: flex;
margin-bottom: 16rpx;
&>text {
display: block;
}
&>text:nth-child(1) {
color: #999;
padding-right: 20rpx;
flex: 0;
word-break: keep-all;
}
&>text:nth-child(2) {}
}
&__flex100{
flex-basis: 100%;
}
}
}
</style>

@ -0,0 +1,165 @@
<template>
<view class="page">
<view class="cotainer">
<view class="hospital">
<view class="title">咨询科室{{ info.serve_hospital?info.serve_hospital.name:'' }} - {{info.serve_hospital_department?info.serve_hospital_department.name:''}}</view>
<view class="hospital-title">患者信息</view>
<view class="hospital-form">
<view class="form-card form-card-1">
<u-form ref="uForm" :label-width="178">
<u-form-item label="姓名" prop="name">
<view slot="right">
{{info.name?info.name:''}}
</view>
</u-form-item>
<u-form-item label="性别" prop="sex">
<view slot="right">
{{info.sex?info.sex:''}}
</view>
</u-form-item>
<u-form-item label="出生年月" prop="birthday">
<view slot="right">
{{info.birthday?info.birthday:''}}
</view>
</u-form-item>
<u-form-item label="所在城市" prop="city">
<view slot="right">
{{info.city?info.city:''}}
</view>
</u-form-item>
<u-form-item label="患者关系" prop="relationship">
<view slot="right">
{{info.relationship?info.relationship:''}}
</view>
</u-form-item>
<u-form-item label="手机号码" prop="mobile">
<view slot="right">
{{info.mobile?info.mobile:''}}
</view>
</u-form-item>
<u-form-item label="咨询类别" prop="type">
<view slot="right">
{{info.type?info.type:''}}
</view>
</u-form-item>
<view class="form-card-2">
<u-form-item label="咨询信息" prop="content" label-position="top" :border-bottom="false">
<u-input border :custom-style="{ 'letter-spacing': '2rpx' }" border-color="#dad9d9"
placeholder=" " disabled v-model="info.content"
type="textarea"></u-input>
</u-form-item>
</view>
</u-form>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {},
id:''
};
},
mounted() {
},
onLoad(options) {
this.id = options.id ? options.id : ''
this.getDetail()
},
methods: {
async getDetail() {
const res = await this.$u.api.serveHospitalOrderDetail({
id: this.id
})
this.info = res
},
},
computed: {
}
}
</script>
<style lang="scss">
.page {
position: relative;
background-color: #f5efee;
height: 100vh;
padding-bottom: 80rpx;
}
.cotainer {
padding-top: 80rpx;
padding-bottom: 80rpx;
background-color: #f5efee;
}
.hospital {
background-color: #fff;
border-radius: 10rpx;
filter: drop-shadow(2.192rpx 4.494rpx 5rpx rgba(33, 32, 32, 0.15));
margin: 25rpx;
margin-top: 0;
padding-bottom: 60rpx;
margin-bottom: 50rpx;
.title {
font-size: 28rpx;
color: #222222;
padding: 40rpx;
border-bottom: 1rpx solid rgba(33, 32, 32, 0.15);
}
&-title {
font-size: 28rpx;
padding: 40rpx;
color: #000;
padding-bottom: 20rpx;
}
&-form {
.form-card {
padding: 0 60rpx;
}
}
.sexs {
display: flex;
align-items: center;
&-item {
width: 130rpx;
height: 48rpx;
line-height: 48rpx;
color: #000000;
font-size: 24rpx;
text-align: center;
border-radius: 48rpx;
background-color: #e4e9f0;
margin-left: 10rpx
}
&-active {
color: #fff;
background: linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%);
}
}
::v-deep .form-card .u-input__input {
text-align: right;
}
::v-deep .form-card-2 .u-input__input {
text-align: left;
}
}
</style>

@ -68,7 +68,7 @@
'height': '60rpx',
'line-height': '60rpx'
},
last_page:1,
last_page: 1,
select: {
page: 1,
page_size: 5,
@ -103,21 +103,21 @@
async getList() {
const res = await this.$u.api.accompanyProduct({
...this.select,
site_id: this.vuex_site?.id
site_id: this.vuex_site?.id
})
this.last_page = res.last_page
this.loadStatus = this.select.page >= this.last_page ?'nomore':'loadmore'
this.loadStatus = this.select.page >= this.last_page ? 'nomore' : 'loadmore'
this.list.push(...res.data)
console.log(this.select.page,this.last_page)
console.log(this.select.page, this.last_page)
},
reachBottom() {
if (this.select.page > this.last_page) {
this.loadStatus = 'nomore'
return
}
this.loadStatus = 'loading'
this.select.page++
this.getList()
if (this.select.page > this.last_page) {
this.loadStatus = 'nomore'
return
}
this.loadStatus = 'loading'
this.select.page++
this.getList()
},
confirmSite(e) {
this.$u.vuex("vuex_site", e[0])
@ -126,34 +126,33 @@
this.getList()
},
toOrder(item) {
if (!this.token) {
uni.showModal({
title: "提示",
content: "请先登录再下单",
confirmText: "登录",
success: (status) => {
if (status.confirm) {
this.$u.route({
url: '/pages/login/login',
type: 'redirect'
})
} else {
if (!this.token) {
uni.showModal({
title: "提示",
content: "请先登录再下单",
confirmText: "登录",
success: (status) => {
if (status.confirm) {
this.$u.route({
url: '/pages/login/login',
type: 'redirect'
})
} else {
}
},
fail: () => {
},
});
return
}
}
},
fail: () => {},
});
return
}
this.$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
id: item.id,
title: item.name,
site_id: item.site_id,
type: item.type
}
params: {
id: item.id,
title: item.name,
site_id: item.site_id,
type: item.type
}
})
},
toDetail(item) {
@ -162,11 +161,11 @@
})
}
},
computed: {
token() {
return this.vuex_token || uni.getStorageSync('lifeData')?.vuex_token
}
}
computed: {
token() {
return this.vuex_token || uni.getStorageSync('lifeData')?.vuex_token
}
}
}
</script>
@ -281,4 +280,4 @@
}
}
}
</style>
</style>

@ -258,7 +258,7 @@
<view class="top">
<image
class="product-item__img"
:src="item.image ? item.image.url : ''"
:src="item.image ? item.image.url : (detail.image?detail.image.url:'')"
mode="aspectFill"
></image>
<image class="product-item__soldout" v-if="!item.stock_num" src="~@/package_sub/static/Shop/yishouxing.png" mode="aspectFit"></image>

@ -157,6 +157,20 @@
"style": {
"navigationBarTitleText": "提交咨询"
}
},
{
"path": "pages/ServeOrder/ServeOrder",
"style": {
"navigationBarTitleText": "就医服务",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ServeOrderDetail/ServeOrderDetail",
"style": {
"navigationBarTitleText": "就医服务",
"enablePullDownRefresh": true
}
}
]

@ -53,7 +53,7 @@
<image class="tab__icon" mode="aspectFit" src="~@/static/me/shangcheng.png"></image>
<view>商城订单</view>
</view>
<view class="tab"
<!-- <view class="tab"
@click="$u.route({
url: '/package_sub/pages/OrderList/OrderList',
params: {
@ -62,7 +62,16 @@
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/jujia.png"></image>
<view>居家照护订单</view>
</view>
</view> -->
<view class="tab"
@click="$u.route({
url: '/package_sub/pages/ServeOrder/ServeOrder',
params: {
}
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/jujia.png"></image>
<view>就医服务订单</view>
</view>
<view class="tab"
@click="$u.route({
url: '/package_sub/pages/UserAddress/UserAddress'

Loading…
Cancel
Save