更新
This commit is contained in:
@@ -1,153 +1,500 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class='guide-box'>
|
||||
<!-- <button @click="setCallingBell">setCallingBell</button> -->
|
||||
<!-- <button @click="enableMuteMode">enableMuteMode</button> -->
|
||||
<view class="single-box" v-for="(item, index) in entryInfos" :key="index" :id="index" @click='handleEntry'>
|
||||
<image class="icon" mode="aspectFit" :src="item.icon" role="img"></image>
|
||||
<view class="single-content">
|
||||
<view class="label">{{ item.title }}</view>
|
||||
<view class="desc">{{ item.desc }}</view>
|
||||
|
||||
|
||||
<!-- 问诊服务 -->
|
||||
|
||||
|
||||
<!-- 特色专科医师 -->
|
||||
<view class="doctors-section">
|
||||
<view class="section-header">
|
||||
<view class="section-title-wrapper">
|
||||
|
||||
<view class="section-title">特色专科医师</view>
|
||||
</view>
|
||||
<view class="more-link" @click="navigateToAllDoctors">更多</view>
|
||||
</view>
|
||||
|
||||
<view class="doctors-grid">
|
||||
<view
|
||||
v-for="doctor in doctors"
|
||||
:key="doctor.id"
|
||||
class="doctor-card"
|
||||
@click="selectDoctor(doctor)"
|
||||
>
|
||||
<view class="doctor-avatar-wrapper">
|
||||
<image :src="doctor.avatar" class="doctor-avatar" mode="aspectFill"></image>
|
||||
<view class="avatar-frame"></view>
|
||||
</view>
|
||||
<view class="doctor-name">{{ doctor.name }}</view>
|
||||
<view class="doctor-title">{{ doctor.title }}</view>
|
||||
<view class="doctor-dept">{{ doctor.department || '内科' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// import { TUICallKitAPI } from "../../TUICallKit/src/index";
|
||||
// import { ref } from "vue";
|
||||
const template = '1v1';
|
||||
const entryInfos = [
|
||||
{
|
||||
icon: 'https://web.sdk.qcloud.com/component/miniApp/resources/audio-card.png',
|
||||
title: '语音通话',
|
||||
desc: '丢包率70%仍可正常语音通话',
|
||||
navigateTo: '../calling/call?type=1',
|
||||
},
|
||||
{
|
||||
icon: 'https://web.sdk.qcloud.com/component/miniApp/resources/video-card.png',
|
||||
title: '视频通话',
|
||||
desc: '丢包率50%仍可正常视频通话',
|
||||
navigateTo: '../calling/call?type=2',
|
||||
},
|
||||
{
|
||||
icon: 'https://web.sdk.qcloud.com/component/miniApp/resources/audio-card.png',
|
||||
title: '多人语音通话',
|
||||
desc: '丢包率70%仍可正常语音通话',
|
||||
navigateTo: '../calling/groupCall?type=1',
|
||||
},
|
||||
{
|
||||
icon: 'https://web.sdk.qcloud.com/component/miniApp/resources/video-card.png',
|
||||
title: '多人视频通话',
|
||||
desc: '丢包率50%仍可正常视频通话',
|
||||
navigateTo: '../calling/groupCall?type=2',
|
||||
},
|
||||
];
|
||||
// --------铃声相关接口测试-----------------
|
||||
// let isMute = ref(false);
|
||||
// const enableMuteMode = async () => {
|
||||
// isMute.value = !isMute.value;
|
||||
// await TUICallKitAPI.enableMuteMode(isMute.value);
|
||||
// }
|
||||
// const setCallingBell = async () => {
|
||||
// await TUICallKitAPI.setCallingBell('mp2.mp3');
|
||||
// }
|
||||
const handleEntry = (e) => {
|
||||
const url = entryInfos[e.currentTarget.id].navigateTo;
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const doctors = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
const selectDoctor = (doctor) => {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
url: `/pages/order/index?doctorId=${doctor.id}&doctorName=${doctor.name}`
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToExperts = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/experts/index'
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToConsultation = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/consultation/index'
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToQuickConsult = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/quick-consult/index'
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToAllDoctors = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/doctors/index'
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToHome = () => {
|
||||
// 已在首页
|
||||
}
|
||||
|
||||
const navigateToMessages = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/messages/index'
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToProfile = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/index'
|
||||
})
|
||||
}
|
||||
|
||||
const fetchDoctors = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const response = await proxy.apiUrl({
|
||||
url: '/api/doctor/lists',
|
||||
method: 'GET',
|
||||
data: {
|
||||
page_no: 1,
|
||||
page_size: 10
|
||||
}
|
||||
})
|
||||
|
||||
if (response && response.code === 1) {
|
||||
const data = response.data
|
||||
const doctorList = data.lists || []
|
||||
doctors.value = doctorList
|
||||
} else {
|
||||
console.warn('获取医生列表失败:', response?.msg)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('请求异常:', error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchDoctors()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
/* background-image: url(https://mc.qcloudimg.com/static/img/7da57e0050d308e2e1b1e31afbc42929/bg.png); */
|
||||
background: #F4F5F9;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
background: #f5f3f0;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.container .title {
|
||||
// 古典卷轴横幅
|
||||
.scroll-banner {
|
||||
margin: 24rpx 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
letter-spacing: 0;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
font-weight: 600;
|
||||
background: #FFFFFF;
|
||||
margin-top: 3.8vh;
|
||||
padding: 1.2vh 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
.scroll-rod {
|
||||
width: 32rpx;
|
||||
height: 160rpx;
|
||||
background: linear-gradient(180deg, #8B7355 0%, #6B5644 50%, #8B7355 100%);
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.2);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 16rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: radial-gradient(circle, #D4AF37 0%, #B8941E 100%);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 16rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: radial-gradient(circle, #D4AF37 0%, #B8941E 100%);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.guide-box {
|
||||
width: 100vw;
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
.scroll-rod-left {
|
||||
margin-right: -8rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.scroll-rod-right {
|
||||
margin-left: -8rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
flex: 1;
|
||||
background: linear-gradient(135deg, #F5E6D3 0%, #E8D7C3 100%);
|
||||
border: 3rpx solid #8B7355;
|
||||
border-radius: 12rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: inset 0 2rpx 8rpx rgba(139, 115, 85, 0.2);
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 12rpx;
|
||||
left: 12rpx;
|
||||
right: 12rpx;
|
||||
bottom: 12rpx;
|
||||
border: 1rpx solid rgba(139, 115, 85, 0.3);
|
||||
border-radius: 8rpx;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.scroll-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scroll-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #3E2723;
|
||||
margin-bottom: 8rpx;
|
||||
font-family: 'STKaiti', 'KaiTi', serif;
|
||||
}
|
||||
|
||||
.scroll-subtitle {
|
||||
font-size: 24rpx;
|
||||
color: #5D4037;
|
||||
font-family: 'STKaiti', 'KaiTi', serif;
|
||||
}
|
||||
|
||||
.scroll-image {
|
||||
width: 200rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #8B7355;
|
||||
}
|
||||
|
||||
// 问诊服务
|
||||
.services-section {
|
||||
padding: 32rpx 16rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #3E2723;
|
||||
margin-bottom: 24rpx;
|
||||
font-family: 'STKaiti', 'KaiTi', serif;
|
||||
position: relative;
|
||||
padding-left: 16rpx;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: linear-gradient(180deg, #D4AF37 0%, #B8941E 100%);
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
border-radius: 20rpx;
|
||||
padding: 24rpx 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 320rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.card-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: 0.15;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.bg-decoration {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.single-box {
|
||||
.service-expert {
|
||||
background: linear-gradient(135deg, #FFF8DC 0%, #F5E6D3 100%);
|
||||
border: 2rpx solid #E8D7C3;
|
||||
}
|
||||
|
||||
.service-health {
|
||||
background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
|
||||
border: 2rpx solid #A5D6A7;
|
||||
}
|
||||
|
||||
.service-quick {
|
||||
background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%);
|
||||
border: 2rpx solid #80CBC4;
|
||||
}
|
||||
|
||||
.service-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #3E2723;
|
||||
margin-bottom: 12rpx;
|
||||
font-family: 'STKaiti', 'KaiTi', serif;
|
||||
}
|
||||
|
||||
.service-desc {
|
||||
font-size: 22rpx;
|
||||
color: #5D4037;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 16rpx;
|
||||
flex: 1;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
font-size: 56rpx;
|
||||
text-align: center;
|
||||
margin: 16rpx 0;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.service-btn {
|
||||
color: #fff;
|
||||
padding: 16rpx 24rpx;
|
||||
border-radius: 32rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.btn-orange {
|
||||
background: linear-gradient(135deg, #D2691E 0%, #CD853F 100%);
|
||||
}
|
||||
|
||||
.btn-green {
|
||||
background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
|
||||
}
|
||||
|
||||
.btn-purple {
|
||||
background: linear-gradient(135deg, #4A148C 0%, #6A1B9A 100%);
|
||||
}
|
||||
|
||||
// 特色专科医师
|
||||
.doctors-section {
|
||||
padding: 32rpx 16rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.section-title-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
width: 180px;
|
||||
height: 144px;
|
||||
.title-icon {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.single-content {
|
||||
padding: 36px 30px 36px 20px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
letter-spacing: 0;
|
||||
.more-link {
|
||||
font-size: 24rpx;
|
||||
color: #D4AF37;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.desc {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
letter-spacing: 0;
|
||||
font-weight: 500;
|
||||
.doctors-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
bottom: 36rpx;
|
||||
.doctor-card {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 160rpx;
|
||||
height: 44rpx;
|
||||
.doctor-avatar-wrapper {
|
||||
position: relative;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
.doctor-avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
border: 3rpx solid #E8E8E8;
|
||||
}
|
||||
|
||||
.avatar-frame {
|
||||
position: absolute;
|
||||
top: -4rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
border: 2rpx solid rgba(212, 175, 55, 0.3);
|
||||
border-radius: 50%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.doctor-name {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #3E2723;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.doctor-title {
|
||||
font-size: 22rpx;
|
||||
color: #757575;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.doctor-dept {
|
||||
font-size: 20rpx;
|
||||
color: #9E9E9E;
|
||||
}
|
||||
|
||||
// 底部导航
|
||||
.bottom-nav {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
border-top: 1rpx solid #E8E8E8;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 16rpx 0 24rpx 0;
|
||||
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
flex: 1;
|
||||
|
||||
&.active {
|
||||
.nav-icon {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.nav-text {
|
||||
color: #D4AF37;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
font-size: 36rpx;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-text {
|
||||
font-size: 22rpx;
|
||||
color: #757575;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 订单卡片 -->
|
||||
<div class="order-card">
|
||||
<!-- <div class="order-card">
|
||||
<div class="card-header">
|
||||
<text class="title">我的订单</text>
|
||||
<div class="more" @click="navigateTo('/pages/order/list')">
|
||||
@@ -51,7 +51,7 @@
|
||||
<text class="order-name">{{ item.name }}</text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 快捷功能区 -->
|
||||
<!-- <div class="quick-actions">
|
||||
|
||||
Reference in New Issue
Block a user