Compare commits

..

No commits in common. "3341b24c3bcb7e4ee84437289b4dd06abe64104a" and "3963587535f9de516228a4300f10a67728234485" have entirely different histories.

13 changed files with 330 additions and 413 deletions

View File

@ -1,5 +1,5 @@
MP_API_BASE_URL=https://patient.youcan365.com MP_API_BASE_URL=https://patient.youcan365.com
MP_CACHE_PREFIX=development MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx6ee11733526b4f04 MP_WX_APP_ID=wx93af55767423938e
MP_TIM_SDK_APP_ID=1600123876 MP_TIM_SDK_APP_ID=1600123876
MP_CORP_ID=wwe3fb2faa52cf9dfb MP_CORP_ID=wwe3fb2faa52cf9dfb

View File

@ -1,5 +1,5 @@
MP_API_BASE_URL=http://localhost:8080 MP_API_BASE_URL=http://localhost:8080
MP_CACHE_PREFIX=development MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx6ee11733526b4f04 MP_WX_APP_ID=wx93af55767423938e
MP_TIM_SDK_APP_ID=1600123876 MP_TIM_SDK_APP_ID=1600123876
MP_CORP_ID=wwe3fb2faa52cf9dfb MP_CORP_ID=wwe3fb2faa52cf9dfb

View File

@ -1,28 +1,28 @@
{ {
"name" : "ykt-team-wxapp", "name": "ykt-team-wxapp",
"appid" : "__UNI__3EBDA15", "appid": "__UNI__3EBDA15",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : {}, "modules": {},
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -41,32 +41,32 @@
] ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios": {},
/* SDK */ /* SDK */
"sdkConfigs" : {} "sdkConfigs": {}
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx6ee11733526b4f04", "appid": "wx93af55767423938e",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true "usingComponents": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "3" "vueVersion": "3"
} }

View File

@ -1,182 +1,184 @@
{ {
"pages": [{ "pages": [
"path": "pages/home/home", {
"style": { "path": "pages/home/home",
"navigationBarTitleText": "首页", "style": {
"navigationStyle": "custom" "navigationBarTitleText": "首页",
} "navigationStyle": "custom"
}, }
{ },
"path": "pages/article/article-list", {
"style": { "path": "pages/article/article-list",
"navigationBarTitleText": "我的宣教" "style": {
} "navigationBarTitleText": "我的宣教"
}, }
{ },
"path": "pages/article/article-cate-list", {
"style": { "path": "pages/article/article-cate-list",
"navigationBarTitleText": "健康宣教" "style": {
} "navigationBarTitleText": "健康宣教"
}, }
{ },
"path": "pages/survey/survey-list", {
"style": { "path": "pages/survey/survey-list",
"navigationBarTitleText": "我的问卷" "style": {
} "navigationBarTitleText": "我的问卷"
}, }
{ },
"path": "pages/message/message", {
"style": { "path": "pages/message/message",
"navigationBarTitleText": "消息" "style": {
} "navigationBarTitleText": "消息"
}, }
{ },
"path": "pages/message/index", {
"style": { "path": "pages/message/index",
"navigationBarTitleText": "聊天", "style": {
"enablePullDownRefresh": false "navigationBarTitleText": "聊天",
} "enablePullDownRefresh": false
}, }
{ },
"path": "pages/login/login", {
"style": { "path": "pages/login/login",
"navigationBarTitleText": "健康柚", "style": {
"navigationStyle": "custom" "navigationBarTitleText": "柚健康",
} "navigationStyle": "custom"
}, }
{ },
"path": "pages/login/redirect-page", {
"style": { "path": "pages/login/redirect-page",
"navigationBarTitleText": "健康柚" "style": {
} "navigationBarTitleText": "柚健康"
}, }
{ },
"path": "pages/archive/archive-manage", {
"style": { "path": "pages/archive/archive-manage",
"navigationBarTitleText": "档案管理" "style": {
} "navigationBarTitleText": "档案管理"
}, }
{ },
"path": "pages/archive/edit-archive", {
"style": { "path": "pages/archive/edit-archive",
"navigationBarTitleText": "新增档案" "style": {
} "navigationBarTitleText": "新增档案"
}, }
{ },
"path": "pages/archive/archive-result", {
"style": { "path": "pages/archive/archive-result",
"navigationBarTitleText": "团队服务" "style": {
} "navigationBarTitleText": "团队服务"
}, }
{ },
"path": "pages/health/list", {
"style": { "path": "pages/health/list",
"navigationBarTitleText": "健康信息" "style": {
} "navigationBarTitleText": "健康信息"
}, }
{ },
"path": "pages/health/record", {
"style": { "path": "pages/health/record",
"navigationBarTitleText": "健康信息" "style": {
} "navigationBarTitleText": "健康信息"
}, }
{ },
"path": "pages/library/diagnosis-list", {
"style": { "path": "pages/library/diagnosis-list",
"navigationBarTitleText": "选择诊断" "style": {
} "navigationBarTitleText": "选择诊断"
}, }
{ },
"path": "pages/team/team-detail", {
"style": { "path": "pages/team/team-detail",
"navigationBarTitleText": "团队介绍" "style": {
} "navigationBarTitleText": "团队介绍"
}, }
{ },
"path": "pages/team/homepage", {
"style": { "path": "pages/team/homepage",
"navigationBarTitleText": "个人主页" "style": {
} "navigationBarTitleText": "个人主页"
}, }
{ },
"path": "pages/team/friend", {
"style": { "path": "pages/team/friend",
"navigationBarTitleText": "添加好友" "style": {
} "navigationBarTitleText": "添加好友"
}, }
{ },
"path": "pages/web-view/web-view", {
"style": { "path": "pages/web-view/web-view",
"navigationBarTitleText": "" "style": {
} "navigationBarTitleText": ""
}, }
{ },
"path": "pages/mine/mine", {
"style": { "path": "pages/mine/mine",
"navigationBarTitleText": "我的" "style": {
} "navigationBarTitleText": "我的"
}, }
{ },
"path": "pages/mine/contact", {
"style": { "path": "pages/mine/contact",
"navigationBarTitleText": "联系客服" "style": {
} "navigationBarTitleText": "联系客服"
}, }
{ },
"path": "pages/common/privacy", {
"style": { "path": "pages/common/privacy",
"navigationBarTitleText": "隐私政策" "style": {
} "navigationBarTitleText": "隐私政策"
}, }
{ },
"path": "pages/common/agreement", {
"style": { "path": "pages/common/agreement",
"navigationBarTitleText": "用户协议" "style": {
} "navigationBarTitleText": "用户协议"
}, }
{ },
"path": "pages/article/article-detail", {
"style": { "path": "pages/article/article-detail",
"navigationBarTitleText": "宣教文章" "style": {
} "navigationBarTitleText": "宣教文章"
}, }
{ },
"path": "pages/article/send-article", {
"style": { "path": "pages/article/send-article",
"navigationBarTitleText": "选择宣教文章" "style": {
} "navigationBarTitleText": "选择宣教文章"
} }
], }
"globalStyle": { ],
"navigationBarTextStyle": "white", "globalStyle": {
"navigationBarTitleText": "uni-app", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#065bd6", "navigationBarTitleText": "uni-app",
"backgroundColor": "#065bd6" "navigationBarBackgroundColor": "#065bd6",
}, "backgroundColor": "#065bd6"
"tabBar": { },
"color": "#666666", "tabBar": {
"selectedColor": "#007aff", "color": "#666666",
"backgroundColor": "#ffffff", "selectedColor": "#007aff",
"borderStyle": "white", "backgroundColor": "#ffffff",
"list": [{ "borderStyle": "white",
"pagePath": "pages/home/home", "list": [
"iconPath": "static/tabbar/home.png", {
"selectedIconPath": "static/tabbar/home_selected.png", "pagePath": "pages/home/home",
"text": "消息" "iconPath": "static/tabbar/home.png",
}, "selectedIconPath": "static/tabbar/home_selected.png",
{ "text": "消息"
"pagePath": "pages/message/message", },
"iconPath": "static/tabbar/consult.png", {
"selectedIconPath": "static/tabbar/consult_selected.png", "pagePath": "pages/message/message",
"text": "咨询" "iconPath": "static/tabbar/consult.png",
}, "selectedIconPath": "static/tabbar/consult_selected.png",
{ "text": "咨询"
"pagePath": "pages/mine/mine", },
"iconPath": "static/tabbar/mine.png", {
"selectedIconPath": "static/tabbar/mine_selected.png", "pagePath": "pages/mine/mine",
"text": "我的" "iconPath": "static/tabbar/mine.png",
} "selectedIconPath": "static/tabbar/mine_selected.png",
] "text": "我的"
}, }
"uniIdRouter": {} ]
} },
"uniIdRouter": {}
}

View File

@ -95,7 +95,4 @@ watch(() => props.visible, n => {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
} }
.popup-content-scroll{
max-height: 65vh;
}
</style> </style>

View File

@ -17,20 +17,12 @@
<image class="add-archive-bg" src="/static/home/add-archive-bg.png" mode="aspectFit"></image> <image class="add-archive-bg" src="/static/home/add-archive-bg.png" mode="aspectFit"></image>
</view> </view>
<scroll-view scroll-x="true"> <scroll-view scroll-x="true">
<view class="flex flex-nowrap pb-5"> <view class="flex flex-nowrap pb-5 ">
<view <view v-for="i in customers" :key="i._id" class="customer-card flex-shrink-0 mr-15 relative"
v-for="i in customers" :class="current && i._id === current._id ? 'current-customer' : ''" @click="toggle(i)">
:key="i._id"
class="customer-card flex-shrink-0 mr-15 relative"
:class="current && i._id === current._id ? 'current-customer' : ''"
@click="toggle(i)"
>
<!-- 关系标签 --> <!-- 关系标签 -->
<view <view v-if="i.relationship" class="relationship-tag"
v-if="i.relationship" :class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'">
class="relationship-tag"
:class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'"
>
{{ i.relationship }} {{ i.relationship }}
</view> </view>
<view class="flex flex-col items-center"> <view class="flex flex-col items-center">
@ -40,27 +32,18 @@
</view> </view>
</view> </view>
<!-- 选中状态底部条和三角 --> <!-- 选中状态底部条和三角 -->
<view <view v-if="current && i._id === current._id" class="active-indicator">
v-if="current && i._id === current._id"
class="active-indicator"
>
<view class="active-bar"></view> <view class="active-bar"></view>
<view class="active-triangle"></view> <view class="active-triangle"></view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view <view v-if="canAuth" class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm">
v-if="canAuth"
class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm"
>
<view class="mr-5 w-0 flex-grow text-base text-white"> <view class="mr-5 w-0 flex-grow text-base text-white">
点击右侧授权按钮, 我们将更精准的为您服务 点击右侧授权按钮, 我们将更精准的为您服务
</view> </view>
<view <view class="px-12 py-5 text-base rounded-sm text-dark bg-white" @click="auth()">
class="px-12 py-5 text-base rounded-sm text-dark bg-white"
@click="auth()"
>
授权 授权
</view> </view>
</view> </view>
@ -70,32 +53,18 @@
<view class="info-content"> <view class="info-content">
<view class="flex items-center justify-between mb-8"> <view class="flex items-center justify-between mb-8">
<view class="info-title">个人基本信息</view> <view class="info-title">个人基本信息</view>
<image <image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
class="arrow-icon-small"
src="/static/home/arrow-right-blue.png"
mode="aspectFit"
></image>
</view> </view>
<view v-if="baseInfoError" class="text-sm text-danger" <view v-if="baseInfoError" class="text-sm text-danger">请完善您的个人信息</view>
>请完善您的个人信息</view
>
<view v-else class="info-subtitle">完善个人信息</view> <view v-else class="info-subtitle">完善个人信息</view>
</view> </view>
</view> </view>
<view <view v-if="hasHealthTemp" class="ml-10 info-card-new flex-grow" @click="toHealthList()">
v-if="hasHealthTemp"
class="ml-10 info-card-new flex-grow"
@click="toHealthList()"
>
<view class="info-bg info-bg-health"></view> <view class="info-bg info-bg-health"></view>
<view class="info-content"> <view class="info-content">
<view class="flex items-center justify-between mb-8"> <view class="flex items-center justify-between mb-8">
<view class="info-title">健康信息</view> <view class="info-title">健康信息</view>
<image <image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
class="arrow-icon-small"
src="/static/home/arrow-right-blue.png"
mode="aspectFit"
></image>
</view> </view>
<view class="info-subtitle">上传健康档案</view> <view class="info-subtitle">上传健康档案</view>
</view> </view>
@ -104,28 +73,28 @@
</view> </view>
</template> </template>
<script setup> <script setup>
import { computed, onMounted, ref, watch } from "vue"; import { computed, onMounted, ref, watch } from 'vue';
import { storeToRefs } from "pinia"; import { storeToRefs } from 'pinia'
import useAccount from "@/store/account"; import useAccount from '@/store/account';
import api from "@/utils/api"; import api from '@/utils/api';
import { toast, confirm } from "@/utils/widget"; import { toast, confirm } from '@/utils/widget';
const props = defineProps({ const props = defineProps({
corpId: { corpId: {
type: String, type: String,
default: "", default: ''
}, },
customers: { customers: {
type: Array, type: Array,
default: () => [], default: () => []
}, },
team: { team: {
type: Object, type: Object,
default: () => ({}), default: () => ({})
}, }
}); })
const emit = defineEmits(["update:customers"]); const emit = defineEmits(['update:customers']);
const { account } = storeToRefs(useAccount()); const { account } = storeToRefs(useAccount());
const current = ref(null); const current = ref(null);
@ -133,61 +102,41 @@ const customers = ref([]);
const canAuth = computed(() => { const canAuth = computed(() => {
if (current.value && props.team && props.team.teamId) { if (current.value && props.team && props.team.teamId) {
const teamIds = Array.isArray(current.value.teamId) const teamIds = Array.isArray(current.value.teamId) ? current.value.teamId : [];
? current.value.teamId
: [];
return !teamIds.includes(props.team.teamId); return !teamIds.includes(props.team.teamId);
} }
return false; return false
}); })
const qrcode = computed(() => { const qrcode = computed(() => {
const qrcodes = const qrcodes = props.team && Array.isArray(props.team.qrcodes) ? props.team.qrcodes : [];
props.team && Array.isArray(props.team.qrcodes) ? props.team.qrcodes : []; return qrcodes[0] || ''
return qrcodes[0] || ""; })
});
const hasHealthTemp = computed( const hasHealthTemp = computed(() => qrcode.value && Array.isArray(qrcode.value.healthTempList) && qrcode.value.healthTempList.length > 0)
() => const baseInfo = computed(() => qrcode.value && qrcode.value.teamFileds && Array.isArray(qrcode.value.teamFileds.baseInfo) ? qrcode.value.teamFileds.baseInfo : [])
qrcode.value &&
Array.isArray(qrcode.value.healthTempList) &&
qrcode.value.healthTempList.length > 0
);
const baseInfo = computed(() =>
qrcode.value &&
qrcode.value.teamFileds &&
Array.isArray(qrcode.value.teamFileds.baseInfo)
? qrcode.value.teamFileds.baseInfo
: []
);
const baseInfoError = computed(() => { const baseInfoError = computed(() => {
const requiredTitles = baseInfo.value const requiredTitles = baseInfo.value.filter(i => i.required).map(i => i.title);
.filter((i) => i.required) return current.value && requiredTitles.some(i => !current.value[i]);
.map((i) => i.title); })
return current.value && requiredTitles.some((i) => !current.value[i]);
});
function fillBaseInfo() { function fillBaseInfo() {
if (canAuth.value) { if (canAuth.value) {
toast("请先授权本服务团队"); toast('请先授权本服务团队')
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/archive/edit-archive?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}`, url: `/pages/archive/edit-archive?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}`
}); })
} }
} }
function toHealthList() { function toHealthList() {
if (canAuth.value) { if (canAuth.value) {
toast("请先授权本服务团队"); toast('请先授权本服务团队')
} else { } else {
const name = `${current.value.name} ${ const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : ''}`
current.value.relationship ? `(${current.value.relationship})` : ""
}`;
uni.navigateTo({ uni.navigateTo({
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${ url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId}&id=${current.value._id}&name=${encodeURIComponent(name)}`
props.corpId })
}&id=${current.value._id}&name=${encodeURIComponent(name)}`,
});
} }
} }
@ -196,67 +145,54 @@ function toggle(i) {
} }
function toManagePage() { function toManagePage() {
uni.navigateTo({ uni.navigateTo({ url: `/pages/archive/archive-manage?corpId=${props.corpId}&teamId=${props.team.teamId}` })
url: `/pages/archive/archive-manage?corpId=${props.corpId}&teamId=${props.team.teamId}`,
});
} }
async function auth() { async function auth() {
await confirm(`是否授权${props.team.name}提供服务`); await confirm(`是否授权${props.team.name}提供服务`);
const res = await api("authCustomerToTeam", { const res = await api('authCustomerToTeam', { corpId: props.corpId, teamId: props.team.teamId, id: current.value._id });
corpId: props.corpId,
teamId: props.team.teamId,
id: current.value._id,
});
if (res && res.success) { if (res && res.success) {
await toast("授权成功"); await toast('授权成功');
getCustomers(); getCustomers()
} else { } else {
toast(res?.message || "授权失败"); toast(res?.message || '授权失败');
} }
} }
async function getCustomers() { async function getCustomers() {
const res = await api("getMiniAppCustomers", { const res = await api('getMiniAppCustomers', { miniAppId: account.value.openid, corpId: props.corpId });
miniAppId: account.value.openid,
corpId: props.corpId,
});
if (res && res.success) { if (res && res.success) {
customers.value = res && Array.isArray(res.data) ? res.data : []; customers.value = res && Array.isArray(res.data) ? res.data : [];
const customer = customers.value.find( const customer = customers.value.find(i => current.value && i._id === current.value._id);
(i) => current.value && i._id === current.value._id
);
current.value = customer || customers.value[0] || null; current.value = customer || customers.value[0] || null;
// customers // customers
emit("update:customers", customers.value); emit('update:customers', customers.value);
} else { } else {
toast(res.message || "获取档案失败"); toast(res.message || '获取档案失败');
} }
} }
onMounted(() => { onMounted(() => {
uni.$on("reloadTeamCustomers", getCustomers); uni.$on('reloadTeamCustomers', getCustomers)
}); })
watch(() => props.corpId, n => {
if (n) {
getCustomers()
} else {
customers.value = [];
}
}, { immediate: true });
watch(
() => props.corpId,
(n) => {
if (n) {
getCustomers();
} else {
customers.value = [];
}
},
{ immediate: true }
);
</script> </script>
<style scoped> <style scoped>
.archive-container { .archive-container {
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
margin: 0 30rpx; margin: 0 30rpx;
background: linear-gradient(181deg, #c2dcff 1.01%, #ffffff 43.31%); background: linear-gradient(181deg, #C2DCFF 1.01%, #FFFFFF 43.31%);
border-radius: 16rpx; border-radius: 16rpx;
box-shadow: inset 0 2rpx 0 0 rgba(255, 255, 255, 0.82), box-shadow:
inset 0 2rpx 0 0 rgba(255, 255, 255, 0.82),
0 8rpx 10rpx 0 rgba(60, 169, 145, 0.06); 0 8rpx 10rpx 0 rgba(60, 169, 145, 0.06);
} }
@ -278,18 +214,19 @@ watch(
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: linear-gradient(180deg, #ffffff 0%, #e6effb 100%); background: linear-gradient(180deg, #FFFFFF 0%, #E6EFFB 100%);
border-radius: 12rpx; border-radius: 12rpx;
border: 2rpx solid #aecaf2; border: 2rpx solid #AECAF2;
transition: all 0.2s; transition: all 0.2s;
position: relative; position: relative;
} }
.current-customer { .current-customer {
background: #ffffff; background: #FFFFFF;
border: 2rpx solid #065bd6; border: 2rpx solid #065BD6;
} }
.relationship-tag { .relationship-tag {
position: absolute; position: absolute;
top: -2rpx; top: -2rpx;
@ -304,7 +241,7 @@ watch(
} }
.relationship-tag::after { .relationship-tag::after {
content: ""; content: '';
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -8rpx; bottom: -8rpx;
@ -314,19 +251,19 @@ watch(
} }
.tag-blue { .tag-blue {
background: #065bd6; background: #065BD6;
} }
.tag-blue::after { .tag-blue::after {
border-top: 8rpx solid #003f96; border-top: 8rpx solid #003F96;
} }
.tag-green { .tag-green {
background: #1dbf98; background: #1DBF98;
} }
.tag-green::after { .tag-green::after {
border-top: 8rpx solid #0f8c6d; border-top: 8rpx solid #0F8C6D;
} }
.active-indicator { .active-indicator {
@ -354,7 +291,7 @@ watch(
transform: translateX(-50%) rotate(45deg); transform: translateX(-50%) rotate(45deg);
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
background: #065bd6; background: #065BD6;
margin-top: -8rpx; margin-top: -8rpx;
} }
@ -370,11 +307,12 @@ watch(
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.info-card-new { .info-card-new {
position: relative; position: relative;
padding: 24rpx; padding: 24rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: linear-gradient(115deg, #f4f9ff 14.74%, #dbeaff 66.11%); background: linear-gradient(115deg, #F4F9FF 14.74%, #DBEAFF 66.11%);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06); box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
overflow: hidden; overflow: hidden;
width: 310rpx; width: 310rpx;
@ -401,22 +339,23 @@ watch(
} }
.info-bg-base { .info-bg-base {
background-image: url("/static/home/basic-info-bg.svg"); background-image: url('/static/home/basic-info-bg.svg');
} }
.info-bg-health { .info-bg-health {
background-image: url("/static/home/health-info-bg.svg"); background-image: url('/static/home/health-info-bg.svg');
} }
.info-title { .info-title {
color: #213e80; color: #213E80;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
line-height: 56rpx; line-height: 56rpx;
} }
.info-subtitle { .info-subtitle {
color: #78808f; color: #78808F;
font-size: 24rpx; font-size: 24rpx;
} }

View File

@ -118,7 +118,7 @@ async function getPhoneNumber(e) {
bindTeam(account.value) bindTeam(account.value)
} else if (redirectUrl.value) { } else if (redirectUrl.value) {
await attempToPage(redirectUrl.value); await attempToPage(redirectUrl.value);
} else { } else if (res) {
toHome(); toHome();
} }
} }

View File

@ -382,23 +382,22 @@ $primary-color: #0877F1;
background: #fff; background: #fff;
border-top: 1rpx solid #e0e0e0; border-top: 1rpx solid #e0e0e0;
position: relative; position: relative;
z-index: 200; z-index: 200; // 确保输入区域在评价卡片之上但在弹窗之下
padding-bottom: env(safe-area-inset-bottom); // padding: 32rpx 16rpx 28rpx 16rpx;
} }
.input-toolbar { .input-toolbar {
display: flex; display: flex;
align-items: center; align-items: flex-end;
padding: 16rpx 20rpx; padding: 28rpx 0 28rpx 0;
gap: 12rpx; gap: 12rpx;
padding-left: 20rpx;
padding-right: 20rpx;
} }
.voice-toggle-btn{
.voice-toggle-btn {
width: 56rpx;
height: 56rpx; height: 56rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
padding: 0; padding: 0;
} }
@ -408,7 +407,6 @@ $primary-color: #0877F1;
height: 56rpx; height: 56rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
padding: 0; padding: 0;
} }
@ -420,7 +418,7 @@ $primary-color: #0877F1;
font-weight: 600; font-weight: 600;
border: none; border: none;
border-radius: 40rpx; border-radius: 40rpx;
height: 56rpx; height: 64rpx;
min-width: 112rpx; min-width: 112rpx;
padding: 0 32rpx; padding: 0 32rpx;
box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08); box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08);
@ -443,14 +441,16 @@ $primary-color: #0877F1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-width: 0; min-width: 0;
max-width: calc(100vw - 280rpx);
} }
.text-input, .text-input,
.voice-input-btn { .voice-input-btn {
flex: 1; flex: 1;
padding: 16rpx; padding: 26rpx 46rpx;
background-color: #f3f5fa; background-color: #f3f5fa;
border-radius: 10rpx; border-radius: 20rpx;
margin: 0 16rpx;
font-size: 28rpx; font-size: 28rpx;
min-height: 80rpx; min-height: 80rpx;
max-height: 200rpx; max-height: 200rpx;
@ -459,27 +459,16 @@ $primary-color: #0877F1;
box-sizing: border-box; box-sizing: border-box;
line-height: 1.5; line-height: 1.5;
color: #333; color: #333;
display: flex;
align-items: center;
justify-content: center;
} }
.text-input {
padding: 20rpx;
display: block;
line-height: 1.5;
height: 80rpx;
}
.voice-input-btn { .voice-input-btn {
height: 56rpx; height: 80rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 24rpx; padding: 0 46rpx;
text-align: center; text-align: center;
line-height: 56rpx; line-height: 80rpx;
} }
.more-panel { .more-panel {
@ -1042,7 +1031,6 @@ $primary-color: #0877F1;
.text-input:-ms-input-placeholder, .text-input:-ms-input-placeholder,
.text-input::placeholder { .text-input::placeholder {
line-height: 1.5; line-height: 1.5;
vertical-align: middle;
} }
.voice-input-btn::-webkit-input-placeholder, .voice-input-btn::-webkit-input-placeholder,
@ -1050,7 +1038,7 @@ $primary-color: #0877F1;
.voice-input-btn::-moz-placeholder, .voice-input-btn::-moz-placeholder,
.voice-input-btn:-ms-input-placeholder, .voice-input-btn:-ms-input-placeholder,
.voice-input-btn::placeholder { .voice-input-btn::placeholder {
line-height: 56rpx; line-height: 80rpx;
text-align: center; text-align: center;
} }

View File

@ -8,7 +8,7 @@
<view class="input-area"> <view class="input-area">
<textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..." <textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..."
@confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput" @confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput"
:auto-height="true" :show-confirm-bar="false" :adjust-position="true" :cursor-spacing="40" /> :auto-height="true" :show-confirm-bar="false" :adjust-position="true" />
<input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord" <input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord"
@touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled> @touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled>
</input> </input>
@ -152,9 +152,6 @@ const sendTextMessage = async () => {
await sendMessage("text", inputText.value); await sendMessage("text", inputText.value);
inputText.value = ""; inputText.value = "";
//
uni.hideKeyboard();
}; };
@ -336,7 +333,7 @@ const goToArticleList = () => {
const morePanelButtons = [ const morePanelButtons = [
{ text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker }, { text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker },
// { text: "", icon: "/static/icon/xuanjiaowenzhang.png", action: goToArticleList }, { text: "宣教", icon: "/static/icon/xuanjiaowenzhang.png", action: goToArticleList },
]; ];
function handleInputFocus() { function handleInputFocus() {

View File

@ -9,8 +9,7 @@ import useTeamStore from '@/store/team.js'
export default function useGroupAvatars() { export default function useGroupAvatars() {
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] } const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
const teamStore = useTeamStore() const teamStore = useTeamStore()
const patientDefaultAvatar = '/static/default-patient-avatar.png' const patientDefaultAvatar = '/static/default-avatar.svg'
const teamMemberDefaultAvatar = '/static/default-avatar.svg'
/** /**
* 获取单个群聊的头像列表 * 获取单个群聊的头像列表
@ -37,10 +36,10 @@ export default function useGroupAvatars() {
// 提取头像列表(过滤掉空头像,使用默认头像替代) // 提取头像列表(过滤掉空头像,使用默认头像替代)
const avatarList = Object.values(memberMap) const avatarList = Object.values(memberMap)
.map(member => { .map(member => {
// 如果成员有头像且不为空,使用成员头像;否则使用团队成员默认头像 // 如果成员有头像且不为空,使用成员头像;否则使用默认头像
return (member.avatar && member.avatar.trim() !== '') return (member.avatar && member.avatar.trim() !== '')
? member.avatar ? member.avatar
: teamMemberDefaultAvatar : patientDefaultAvatar
}) })
// 添加患者默认头像 // 添加患者默认头像

View File

@ -1,9 +1,7 @@
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { onShow, onUnload } from '@dcloudio/uni-app' import { onShow, onUnload } from '@dcloudio/uni-app'
import { storeToRefs } from 'pinia'
import api from '@/utils/api.js' import api from '@/utils/api.js'
import useTeamStore from '@/store/team.js' import useTeamStore from '@/store/team.js'
import useAccountStore from '@/store/account.js'
/** /**
* 群聊hook - 管理群聊成员和头像 * 群聊hook - 管理群聊成员和头像
@ -15,7 +13,6 @@ export default function useGroupChat(groupID) {
const teamMemberIds = ref([]) // 存储团队成员的userId列表 const teamMemberIds = ref([]) // 存储团队成员的userId列表
const patientId = ref('') // 存储患者ID const patientId = ref('') // 存储患者ID
const teamStore = useTeamStore() const teamStore = useTeamStore()
const { openid } = storeToRefs(useAccountStore())
// 群聊成员映射 // 群聊成员映射
const chatMember = computed(() => { const chatMember = computed(() => {
@ -48,9 +45,8 @@ export default function useGroupChat(groupID) {
const member = chatMember.value[userId] const member = chatMember.value[userId]
if (!member) { if (!member) {
// 如果找不到成员信息,根据是否为团队成员返回默认头像 // 如果找不到成员信息,根据是否为团队成员返回默认头像
// 患者userId为当前账户openid使用 default-patient-avatar.png // 团队成员和患者都使用 default-avatar.svg
// 其他情况使用 default-avatar.svg return '/static/default-avatar.svg'
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.svg'
} }
// 如果有头像且不为空字符串,返回头像 // 如果有头像且不为空字符串,返回头像
@ -58,9 +54,8 @@ export default function useGroupChat(groupID) {
return member.avatar return member.avatar
} }
// 否则根据是否为团队成员返回默认头像 // 否则使用默认头像
// 患者使用 default-patient-avatar.png团队成员使用 default-avatar.svg return '/static/default-avatar.svg'
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
} }
// 获取群聊信息和成员头像 // 获取群聊信息和成员头像

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

0
static/doctor-avatar.png Normal file
View File