更新 首页 调整, 切换就诊人,个检类型选择

wenjuan
鹿和sa0ChunLuyu 1 year ago
parent ebf7133e2f
commit 05ca92d353

@ -41,12 +41,12 @@ class HomeController extends Controller
'order' => [[ 'order' => [[
'message' => '', 'message' => '',
'name' => '个人体检预约', 'name' => '个人体检预约',
'jump' => '/pages/main/order/order', 'jump' => '/pages/buy/choose/choose?url=api://CheckUpTypeGetList',
'icon' => '/assets/h5/gejianyuyue.png' 'icon' => '/assets/h5/gejianyuyue.png'
], [ ], [
'message' => '', 'message' => '',
'name' => '单位体检预约', 'name' => '单位体检预约',
'jump' => '/pages/main/combo/combo', 'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/tuanjianyuyue.png' 'icon' => '/assets/h5/tuanjianyuyue.png'
]], ]],
'button' => [[[ 'button' => [[[

@ -33,12 +33,24 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/user/choose/choose",
"style": {
"navigationBarTitleText": "就诊人列表"
}
},
{
"path": "pages/buy/choose/choose",
"style": {
"navigationBarTitleText": "个检预约"
}
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarTitleText": "海南现代妇女儿童医院", "navigationBarTitleText": "海南现代妇女儿童医院",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#259EA3",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"background": "#efeff4" "background": "#efeff4"

@ -0,0 +1,135 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$image,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const $props = defineProps({
url: {
type: String,
default: ''
}
});
const button_list = ref([])
const getButtonList = async (api) => {
const response = await $api(api)
$response(response, () => {
button_list.value = response.data.list
})
}
const checkType = () => {
if ($props.url.includes('api://')) {
let api = $props.url.split('api://')[1]
if (!!api) {
getButtonList(api)
}
}
}
const mountedAction = () => {
checkType()
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
const buttonClick = (info) => {
if (!!info.url) {
uni.navigateTo({
url: info.url
})
} else {
uni.$lu.toast('暂未开放')
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="button_list_wrapper">
<view @click="buttonClick(i)" class="button_item_wrapper" v-for="(i,k) in button_list" :key="k">
<view class="button_icon_wrapper">
<image :src="$image(i.logo)"></image>
</view>
<view class="button_name_wrapper">{{ i.name }}</view>
<view class="button_right_wrapper">
<uni-icons type="right" size="20"></uni-icons>
</view>
</view>
</view>
</view>
</template>
<style scoped>
.button_list_wrapper {
width: 750rpx;
margin: 0 auto;
overflow-y: auto;
}
.button_item_wrapper {
width: 552rpx;
height: 140rpx;
background: #FFFFFF;
box-shadow: 0rpx 1rpx 4rpx 0rpx rgba(0, 164, 172, 0.16);
border-radius: 15rpx;
margin: 50rpx auto 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.button_icon_wrapper {
width: 82rpx;
height: 82rpx;
margin-left: 48rpx;
}
.button_icon_wrapper image {
width: 82rpx;
height: 82rpx;
display: inline-block;
object-fit: contain;
}
.button_name_wrapper {
font-weight: 500;
font-size: 32rpx;
color: #000000;
line-height: 1;
}
.button_right_wrapper {
margin-right: 48rpx;
}
</style>

@ -21,12 +21,9 @@
const $store = useStore() const $store = useStore()
const getUserInfo = async () => { const getUserInfo = async () => {
const openid = uni.getStorageSync('OPENID') const response = await $api('UserInfo')
const response = await $api('UserInfo', { $response(response, () => {
openid: openid $store.user = response.data.info
})
$response(response, () => {
$store.user = response.data.info
}) })
} }
const switch_arr = [ const switch_arr = [
@ -172,6 +169,12 @@
} }
} }
const toChooseUser = () => {
uni.navigateTo({
url: '/pages/user/choose/choose'
})
}
onShow(() => { onShow(() => {
if (!!user_box_ref.value) { if (!!user_box_ref.value) {
getLong() getLong()
@ -206,7 +209,7 @@
</view> </view>
<view class="content_tip_wrapper">{{ $store.config.tip }}</view> <view class="content_tip_wrapper">{{ $store.config.tip }}</view>
</view> </view>
<view v-if="Number($store.user.count) > 1" class="button_wrapper"></view> <view v-if="Number($store.user.count) > 1" @click="toChooseUser()" class="button_wrapper"></view>
</view> </view>
</view> </view>
<view class="order_wrapper"> <view class="order_wrapper">
@ -474,8 +477,8 @@
margin: 15rpx auto 0; margin: 15rpx auto 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
background: #FFFFFF; background: #FFFFFF;
border-radius: 9rpx; border-radius: 9rpx;
} }

@ -0,0 +1,49 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const mountedAction = () => {
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
</template>
<style scoped>
</style>

@ -0,0 +1,172 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$image,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const person_list = ref([])
const getPersonList = async () => {
const response = await $api('GetPersonList')
$response(response, () => {
person_list.value = response.data.list
})
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
getPersonList()
}
}
const choosePersonClick = async (info) => {
const response = await $api('SetDefaultPerson', {
person_id: info.id
})
$response(response, () => {
uni.$lu.toast('切换成功')
uni.navigateBack({
delta: 1
})
})
}
onShow(() => {
if (!!config_ref.value) {
getPersonList()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="person_list_wrapper">
<view class="person_item_wrapper" v-for="(i,k) in person_list" :key="k">
<view class="person_avatar_wrapper">
<image v-if="i.sex === 1" src="@/static/assets/userm.png"></image>
<image v-else src="@/static/assets/userw.png"></image>
</view>
<view class="person_info_wrapper">
<view class="person_text_wrapper">
<view class="person_name_wrapper">{{ i.name }}</view>
<view class="person_sex_wrapper">{{ i.sex === 1 ? '男' : '女' }}</view>
</view>
<view class="person_idnumber_wrapper">{{ i.id_number }}</view>
</view>
<view v-if="!!i.relation" class="person_type_wrapper">{{ i.relation }}</view>
<view class="person_type_wrapper">本人</view>
<view v-if="i.is_default === 2" @click="choosePersonClick(i)" class="person_choose_wrapper"></view>
</view>
</view>
</view>
</template>
<style scoped>
.person_list_wrapper {
width: 750rpx;
margin: 0 auto;
overflow-y: auto;
}
.person_item_wrapper {
width: 690rpx;
height: 166rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04);
border-radius: 15rpx;
position: relative;
display: flex;
align-items: center;
margin: 20rpx auto 0;
}
.person_avatar_wrapper {
width: 105rpx;
height: 105rpx;
margin-left: 47rpx;
}
.person_avatar_wrapper image {
width: 105rpx;
height: 105rpx;
display: inline-block;
object-fit: contain;
}
.person_info_wrapper {
margin-left: 38rpx;
}
.person_text_wrapper {
display: flex;
align-items: end;
}
.person_name_wrapper {
font-weight: 500;
font-size: 32rpx;
color: #0E0E0E;
line-height: 1;
}
.person_sex_wrapper {
font-size: 24rpx;
color: #9E9E9E;
line-height: 1;
margin-left: 10rpx;
}
.person_idnumber_wrapper {
font-size: 26rpx;
color: #0E0E0E;
line-height: 1;
margin-top: 20rpx;
}
.person_type_wrapper {
position: absolute;
width: 100rpx;
height: 46rpx;
background: #C0C0C0;
border-radius: 0rpx 15rpx 0rpx 15rpx;
right: 0;
top: 0;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
line-height: 46rpx;
text-align: center;
}
.person_choose_wrapper {
position: absolute;
right: 10rpx;
bottom: 10rpx;
width: 130rpx;
height: 50rpx;
background: #239EA3;
border-radius: 25rpx;
font-weight: 400;
font-size: 22rpx;
color: #FFFFFF;
line-height: 50rpx;
text-align: center;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Loading…
Cancel
Save