Compare commits
No commits in common. "03aac339d89fab3ec123ffc6b6ff6bcfbf5974f2" and "d7a95ea1b1e4cc7a7b7a0d8c66415b4ce9eec300" have entirely different histories.
03aac339d8
...
d7a95ea1b1
@ -9,12 +9,12 @@
|
|||||||
</common-cell>
|
</common-cell>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { set } from '@/utils/cache';
|
import { set } from '@/utils/cache';
|
||||||
|
|
||||||
import commonCell from '../common-cell.vue';
|
import commonCell from '../common-cell.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['change', 'addRule']);
|
const emits = defineEmits(['change']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
form: {
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -52,18 +52,6 @@ function select() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
if (props.required && props.title) {
|
|
||||||
emits('addRule', {
|
|
||||||
title: props.title,
|
|
||||||
fn: () => {
|
|
||||||
if (value.value.length > 0) return true;
|
|
||||||
return `请选择${props.name || ''}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@import '../cell-style.css';
|
@import '../cell-style.css';
|
||||||
|
|||||||
@ -12,10 +12,10 @@
|
|||||||
@change="change" />
|
@change="change" />
|
||||||
<form-textarea v-else-if="attrs.type === 'textarea'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
<form-textarea v-else-if="attrs.type === 'textarea'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||||
@change="change" />
|
@change="change" />
|
||||||
<form-mult-disease v-else-if="attrs.type === 'selfMultipleDiseases'" v-bind="attrs" :form="form" @change="change"
|
<form-mult-disease v-else-if="attrs.type === 'selfMultipleDiseases'" v-bind="attrs" :form="form"
|
||||||
@addRule="addRule"></form-mult-disease>
|
@change="change"></form-mult-disease>
|
||||||
<form-mult-disease v-else-if="attrs.type === 'diagnosis'" v-bind="attrs" :form="form" @change="change"
|
<form-mult-disease v-else-if="attrs.type === 'diagnosis'" v-bind="attrs" :form="form"
|
||||||
@addRule="addRule"></form-mult-disease>
|
@change="change"></form-mult-disease>
|
||||||
<form-upload v-else-if="attrs.type === 'files'" v-bind="attrs" :form="form" @change="change" />
|
<form-upload v-else-if="attrs.type === 'files'" v-bind="attrs" :form="form" @change="change" />
|
||||||
<form-mult-other v-else-if="attrs.type === 'multiSelectAndOther'" v-bind="attrs" :form="form" @change="change" />
|
<form-mult-other v-else-if="attrs.type === 'multiSelectAndOther'" v-bind="attrs" :form="form" @change="change" />
|
||||||
<!--
|
<!--
|
||||||
@ -52,14 +52,11 @@ defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const attrs = useAttrs();
|
const attrs = useAttrs();
|
||||||
const emits = defineEmits(['change', 'addRule']);
|
const emits = defineEmits(['change']);
|
||||||
|
|
||||||
function change(data) {
|
function change(data) {
|
||||||
emits('change', data)
|
emits('change', data)
|
||||||
}
|
}
|
||||||
function addRule(data) {
|
|
||||||
emits('addRule', data)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- <script>
|
<!-- <script>
|
||||||
|
|||||||
@ -42,6 +42,7 @@ const disabledMap = computed(() => props.disableTitles.reduce((m, i) => {
|
|||||||
return m
|
return m
|
||||||
}, {}))
|
}, {}))
|
||||||
|
|
||||||
|
provide('addRule', addRule);
|
||||||
|
|
||||||
const customRule = ref({});
|
const customRule = ref({});
|
||||||
|
|
||||||
|
|||||||
81
pages.json
81
pages.json
@ -1,181 +1,155 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [{
|
||||||
{
|
|
||||||
"path": "pages/home/home",
|
"path": "pages/home/home",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页",
|
"navigationBarTitleText": "首页",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/article/article-list",
|
"path": "pages/article/article-list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的宣教",
|
"navigationBarTitleText": "我的宣教"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/article/article-cate-list",
|
"path": "pages/article/article-cate-list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康宣教",
|
"navigationBarTitleText": "健康宣教"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/survey/survey-list",
|
"path": "pages/survey/survey-list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的问卷",
|
"navigationBarTitleText": "我的问卷"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/message/message",
|
"path": "pages/message/message",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "消息",
|
"navigationBarTitleText": "消息"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/message/index",
|
"path": "pages/message/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "聊天",
|
"navigationBarTitleText": "聊天",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康柚",
|
"navigationBarTitleText": "健康柚",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/login/redirect-page",
|
"path": "pages/login/redirect-page",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康柚",
|
"navigationBarTitleText": "健康柚"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/login/agreement",
|
"path": "pages/login/agreement",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康柚",
|
"navigationBarTitleText": "健康柚"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/archive/archive-manage",
|
"path": "pages/archive/archive-manage",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "档案管理",
|
"navigationBarTitleText": "档案管理"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/archive/edit-archive",
|
"path": "pages/archive/edit-archive",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新增档案",
|
"navigationBarTitleText": "新增档案"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/archive/archive-result",
|
"path": "pages/archive/archive-result",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "团队服务",
|
"navigationBarTitleText": "团队服务"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/health/list",
|
"path": "pages/health/list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康信息",
|
"navigationBarTitleText": "健康信息"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/health/record",
|
"path": "pages/health/record",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康信息",
|
"navigationBarTitleText": "健康信息"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/library/diagnosis-list",
|
"path": "pages/library/diagnosis-list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择诊断",
|
"navigationBarTitleText": "选择诊断"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/team/team-detail",
|
"path": "pages/team/team-detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "团队介绍",
|
"navigationBarTitleText": "团队介绍"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/team/homepage",
|
"path": "pages/team/homepage",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人主页",
|
"navigationBarTitleText": "个人主页"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/team/friend",
|
"path": "pages/team/friend",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "添加好友",
|
"navigationBarTitleText": "添加好友"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/web-view/web-view",
|
"path": "pages/web-view/web-view",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": ""
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/mine/mine",
|
"path": "pages/mine/mine",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/mine/contact",
|
"path": "pages/mine/contact",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "联系客服",
|
"navigationBarTitleText": "联系客服"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/common/privacy",
|
"path": "pages/common/privacy",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "隐私政策",
|
"navigationBarTitleText": "隐私政策"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/common/agreement",
|
"path": "pages/common/agreement",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "用户协议",
|
"navigationBarTitleText": "用户协议"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/article/article-detail",
|
"path": "pages/article/article-detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "宣教文章",
|
"navigationBarTitleText": "宣教文章"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/article/send-article",
|
"path": "pages/article/send-article",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择宣教文章",
|
"navigationBarTitleText": "选择宣教文章"
|
||||||
"disableScroll": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -190,8 +164,7 @@
|
|||||||
"selectedColor": "#007aff",
|
"selectedColor": "#007aff",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
"list": [
|
"list": [{
|
||||||
{
|
|
||||||
"pagePath": "pages/home/home",
|
"pagePath": "pages/home/home",
|
||||||
"iconPath": "static/tabbar/home.png",
|
"iconPath": "static/tabbar/home.png",
|
||||||
"selectedIconPath": "static/tabbar/home_selected.png",
|
"selectedIconPath": "static/tabbar/home_selected.png",
|
||||||
|
|||||||
@ -152,11 +152,7 @@ async function bindArchive(customerId) {
|
|||||||
const res = await api('bindMiniAppArchive', { id: customerId, corpId: corpId.value, teamId: teamId.value, miniAppId: account.value.openid });
|
const res = await api('bindMiniAppArchive', { id: customerId, corpId: corpId.value, teamId: teamId.value, miniAppId: account.value.openid });
|
||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
await toast('绑定成功');
|
await toast('绑定成功');
|
||||||
set('home-invite-teamId', teamId.value);
|
uni.reLaunch({ url: `/pages/home/home?corpId=${corpId.value}&teamId=${teamId.value}` })
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/home/home'
|
|
||||||
})
|
|
||||||
// uni.reLaunch({ url: `/pages/home/home?corpId=${corpId.value}&teamId=${teamId.value}` })
|
|
||||||
} else {
|
} else {
|
||||||
toast(res?.message || '绑定失败');
|
toast(res?.message || '绑定失败');
|
||||||
}
|
}
|
||||||
@ -199,7 +195,7 @@ async function getBaseForm() {
|
|||||||
formItems.value = Array.isArray(res.data) ? res.data : [];
|
formItems.value = Array.isArray(res.data) ? res.data : [];
|
||||||
const mobileIndex = formItems.value.findIndex(item => item.title === 'mobile');
|
const mobileIndex = formItems.value.findIndex(item => item.title === 'mobile');
|
||||||
if (mobileIndex > -1) {
|
if (mobileIndex > -1) {
|
||||||
formItems.value[mobileIndex].appendText = `(授权手机号)`;
|
formItems.value[mobileIndex].appendText = `(授权手机号不可修改)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -137,11 +137,7 @@ function addArchive() {
|
|||||||
function getTempRows(type, data) {
|
function getTempRows(type, data) {
|
||||||
if (config[type] && tempShowField.value && tempShowField.value[type]) {
|
if (config[type] && tempShowField.value && tempShowField.value[type]) {
|
||||||
const list = [];
|
const list = [];
|
||||||
let titles = config[type];
|
config[type].forEach(i => {
|
||||||
if (data.corp === '其他') {
|
|
||||||
titles = ['corpName', 'diagnosisName', 'files']
|
|
||||||
}
|
|
||||||
titles.forEach(i => {
|
|
||||||
if (tempShowField.value[type][i]) {
|
if (tempShowField.value[type][i]) {
|
||||||
list.push({ title: i, label: tempShowField.value[type][i], value: data[i], key: `${i}_${data._id}` })
|
list.push({ title: i, label: tempShowField.value[type][i], value: data[i], key: `${i}_${data._id}` })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
import useGuard from "@/hooks/useGuard";
|
||||||
// import useGuard from "@/hooks/useGuard";
|
|
||||||
import useAccount from "@/store/account";
|
import useAccount from "@/store/account";
|
||||||
import api from "@/utils/api";
|
import api from "@/utils/api";
|
||||||
import { toast } from "@/utils/widget";
|
import { toast } from "@/utils/widget";
|
||||||
@ -38,13 +37,12 @@ import teamMate from "./team-mate.vue";
|
|||||||
import ycHome from "./yc-home.vue";
|
import ycHome from "./yc-home.vue";
|
||||||
import pageLoading from "./loading.vue";
|
import pageLoading from "./loading.vue";
|
||||||
|
|
||||||
// const { useLoad, useShow } = useGuard();
|
const { useLoad, useShow } = useGuard();
|
||||||
const { account } = storeToRefs(useAccount());
|
const { account } = storeToRefs(useAccount());
|
||||||
const { login } = useAccount();
|
|
||||||
|
|
||||||
const team = ref(null);
|
const team = ref(null);
|
||||||
const teams = ref([]);
|
const teams = ref([]);
|
||||||
const loading = ref(false);
|
const loading = ref(true);
|
||||||
const customers = ref([]);
|
const customers = ref([]);
|
||||||
|
|
||||||
const corpId = computed(() => team.value?.corpId);
|
const corpId = computed(() => team.value?.corpId);
|
||||||
@ -85,24 +83,15 @@ async function getTeams() {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// useLoad((opts) => {
|
useLoad((opts) => {
|
||||||
// if (opts.teamId) {
|
if (opts.teamId) {
|
||||||
// team.value = { teamId: opts.teamId, corpId: opts.corpId };
|
team.value = { teamId: opts.teamId, corpId: opts.corpId };
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
onLoad(() => {
|
|
||||||
if (!account.value) login();
|
|
||||||
})
|
|
||||||
|
|
||||||
onShow(async () => {
|
|
||||||
if (!account.value) await login();
|
|
||||||
if (account.value && account.value.openid) {
|
|
||||||
getTeams();
|
|
||||||
} else {
|
|
||||||
teams.value = [];
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useShow(() => {
|
||||||
|
getTeams();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.home-container {
|
.home-container {
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<image class="logo" src="/static/logo-plain.png"></image>
|
<image class="logo" src="/static/logo-plain.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="w-0 flex-grow">
|
<view class="w-0 flex-grow">
|
||||||
<view class="text-lg font-semibold text-white">健康柚</view>
|
<view class="text-lg font-semibold text-white">柚健康 </view>
|
||||||
<view class="leading-normal text-base text-white truncate">全周期健康管理伙伴</view>
|
<view class="leading-normal text-base text-white truncate">全周期健康管理伙伴</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="menuButtonInfo && menuButtonInfo.width > 0" class="flex-shrink-0"
|
<view v-if="menuButtonInfo && menuButtonInfo.width > 0" class="flex-shrink-0"
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<view v-else class="doctor-card doctor-card-empty">
|
<view v-else class="doctor-card doctor-card-empty">
|
||||||
<view class="doctor-info">
|
<view class="doctor-info">
|
||||||
<image class="logo" src="/static/logo-plain.png" mode="aspectFill" />
|
<image class="logo" src="/static/logo-plain.png" mode="aspectFill" />
|
||||||
<view class="doctor-name">健康柚</view>
|
<view class="doctor-name">柚健康</view>
|
||||||
<view class="login-tip">全周期健康管理伙伴</view>
|
<view class="login-tip">全周期健康管理伙伴</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -5,31 +5,57 @@
|
|||||||
</text>
|
</text>
|
||||||
|
|
||||||
<!-- 图片消息 -->
|
<!-- 图片消息 -->
|
||||||
<image v-else-if="message.type === 'TIMImageElem'" class="message-image" :src="message.payload.imageInfoArray[0].LocalURL ||
|
<image
|
||||||
|
v-else-if="message.type === 'TIMImageElem'"
|
||||||
|
class="message-image"
|
||||||
|
:src="
|
||||||
|
message.payload.imageInfoArray[0].LocalURL ||
|
||||||
message.payload.imageInfoArray[0].url
|
message.payload.imageInfoArray[0].url
|
||||||
" mode="aspectFill" :style="getImageStyle(message.payload.imageInfoArray[0])" @click="
|
"
|
||||||
|
mode="aspectFill"
|
||||||
|
:style="getImageStyle(message.payload.imageInfoArray[0])"
|
||||||
|
@click="
|
||||||
$emit(
|
$emit(
|
||||||
'previewImage',
|
'previewImage',
|
||||||
message.payload.imageInfoArray[0].LocalURL ||
|
message.payload.imageInfoArray[0].LocalURL ||
|
||||||
message.payload.imageInfoArray[0].url
|
message.payload.imageInfoArray[0].url
|
||||||
)
|
)
|
||||||
" />
|
"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 语音消息 -->
|
<!-- 语音消息 -->
|
||||||
<view v-else-if="message.type === 'TIMSoundElem'" class="voice-message" :class="{ 'voice-playing': isPlaying }"
|
<view
|
||||||
:style="getVoiceStyle(message.payload.second)" @click="$emit('playVoice', message)">
|
v-else-if="message.type === 'TIMSoundElem'"
|
||||||
|
class="voice-message"
|
||||||
|
:class="{ 'voice-playing': isPlaying }"
|
||||||
|
:style="getVoiceStyle(message.payload.second)"
|
||||||
|
@click="$emit('playVoice', message)"
|
||||||
|
>
|
||||||
<view class="voice-content">
|
<view class="voice-content">
|
||||||
<view class="voice-icon-wrapper">
|
<view class="voice-icon-wrapper">
|
||||||
<uni-icons type="sound" size="20" :color="message.flow === 'out' ? '#fff' : '#333'"
|
<uni-icons
|
||||||
:class="{ 'icon-animate': isPlaying }" />
|
type="sound"
|
||||||
|
size="20"
|
||||||
|
:color="message.flow === 'out' ? '#fff' : '#333'"
|
||||||
|
:class="{ 'icon-animate': isPlaying }"
|
||||||
|
/>
|
||||||
<!-- 播放中的声波动画 -->
|
<!-- 播放中的声波动画 -->
|
||||||
<view v-if="isPlaying" class="sound-wave">
|
<view v-if="isPlaying" class="sound-wave">
|
||||||
<view class="wave-bar" :style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
<view
|
||||||
style="animation-delay: 0s"></view>
|
class="wave-bar"
|
||||||
<view class="wave-bar" :style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
:style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
||||||
style="animation-delay: 0.2s"></view>
|
style="animation-delay: 0s"
|
||||||
<view class="wave-bar" :style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
></view>
|
||||||
style="animation-delay: 0.4s"></view>
|
<view
|
||||||
|
class="wave-bar"
|
||||||
|
:style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
||||||
|
style="animation-delay: 0.2s"
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
class="wave-bar"
|
||||||
|
:style="{ background: message.flow === 'out' ? '#fff' : '#0877f1' }"
|
||||||
|
style="animation-delay: 0.4s"
|
||||||
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="voice-duration">{{ message.payload.second }}"</text>
|
<text class="voice-duration">{{ message.payload.second }}"</text>
|
||||||
@ -39,24 +65,39 @@
|
|||||||
<!-- 自定义消息卡片 -->
|
<!-- 自定义消息卡片 -->
|
||||||
<template v-else-if="message.type === 'TIMCustomElem'">
|
<template v-else-if="message.type === 'TIMCustomElem'">
|
||||||
<!-- 文章消息 -->
|
<!-- 文章消息 -->
|
||||||
<view v-if="getCustomMessageType(message) === 'article'" class="article-card" @click="handleArticleClick(message)">
|
<view
|
||||||
|
v-if="getCustomMessageType(message) === 'article'"
|
||||||
|
class="article-card"
|
||||||
|
@click="handleArticleClick(message)"
|
||||||
|
>
|
||||||
<view class="article-content">
|
<view class="article-content">
|
||||||
<view class="article-title">{{ getArticleData(message).title }}</view>
|
<view class="article-title">{{ getArticleData(message).title }}</view>
|
||||||
<view class="article-desc">{{ getArticleData(message).desc }}</view>
|
<view class="article-desc">{{ getArticleData(message).desc }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="getArticleData(message).imgUrl" class="article-image" :src="getArticleData(message).imgUrl"
|
<image
|
||||||
mode="aspectFill" />
|
v-if="getArticleData(message).imgUrl"
|
||||||
|
class="article-image"
|
||||||
|
:src="getArticleData(message).imgUrl"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 问卷消息 -->
|
<!-- 问卷消息 -->
|
||||||
<view v-else-if="getCustomMessageType(message) === 'survey'" class="survey-card"
|
<view
|
||||||
@click="handleSurveyClick(message)">
|
v-else-if="getCustomMessageType(message) === 'survey'"
|
||||||
|
class="survey-card"
|
||||||
|
@click="handleSurveyClick(message)"
|
||||||
|
>
|
||||||
<view class="survey-content">
|
<view class="survey-content">
|
||||||
<view class="survey-title">{{ getSurveyData(message).title }}</view>
|
<view class="survey-title">{{ getSurveyData(message).title }}</view>
|
||||||
<view class="survey-desc">{{ getSurveyData(message).desc }}</view>
|
<view class="survey-desc">{{ getSurveyData(message).desc }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="getSurveyData(message).imgUrl" class="survey-image" :src="getSurveyData(message).imgUrl"
|
<image
|
||||||
mode="aspectFill" />
|
v-if="getSurveyData(message).imgUrl"
|
||||||
|
class="survey-image"
|
||||||
|
:src="getSurveyData(message).imgUrl"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 其他自定义消息 -->
|
<!-- 其他自定义消息 -->
|
||||||
@ -81,7 +122,6 @@ import { getParsedCustomMessage } from "@/utils/chat-utils.js";
|
|||||||
// import MessageCard from "./message-card/message-card.vue";
|
// import MessageCard from "./message-card/message-card.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
corpId: String,
|
|
||||||
message: Object,
|
message: Object,
|
||||||
patientInfo: Object,
|
patientInfo: Object,
|
||||||
formatTime: Function,
|
formatTime: Function,
|
||||||
@ -197,7 +237,7 @@ const getArticleData = (message) => {
|
|||||||
const handleArticleClick = (message) => {
|
const handleArticleClick = (message) => {
|
||||||
const { articleId } = getArticleData(message);
|
const { articleId } = getArticleData(message);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/article/article-detail?id=${articleId}&corpId=${props.corpId}`,
|
url: `/pages/article/article-detail?id=${articleId}`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,6 @@
|
|||||||
<view class="message-bubble" :class="getBubbleClass(message)">
|
<view class="message-bubble" :class="getBubbleClass(message)">
|
||||||
<!-- 消息内容 -->
|
<!-- 消息内容 -->
|
||||||
<MessageTypes
|
<MessageTypes
|
||||||
:corpId="corpId"
|
|
||||||
:message="message"
|
:message="message"
|
||||||
:formatTime="formatTime"
|
:formatTime="formatTime"
|
||||||
:playingVoiceId="playingVoiceId"
|
:playingVoiceId="playingVoiceId"
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="message-page">
|
<view class="message-page">
|
||||||
|
|
||||||
|
|
||||||
<!-- 消息列表 -->
|
<!-- 消息列表 -->
|
||||||
<scroll-view
|
<scroll-view
|
||||||
class="message-list"
|
class="message-list"
|
||||||
@ -197,6 +198,7 @@ const initIM = async () => {
|
|||||||
|
|
||||||
// 加载会话列表
|
// 加载会话列表
|
||||||
const loadConversationList = async () => {
|
const loadConversationList = async () => {
|
||||||
|
debugger
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
// loading.value = true;
|
// loading.value = true;
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export default defineStore("accountStore", () => {
|
|||||||
code
|
code
|
||||||
});
|
});
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (res.success && res.data) {
|
if (res.success && res.data && res.data.mobile) {
|
||||||
account.value = res.data;
|
account.value = res.data;
|
||||||
openid.value = res.data.openid;
|
openid.value = res.data.openid;
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@ const urlsConfig = {
|
|||||||
getArticle: 'getArticle',
|
getArticle: 'getArticle',
|
||||||
addArticleSendRecord: 'addArticleSendRecord',
|
addArticleSendRecord: 'addArticleSendRecord',
|
||||||
addArticleReadRecord: 'addArticleReadRecord',
|
addArticleReadRecord: 'addArticleReadRecord',
|
||||||
getMiniAppReceivedArticleList: 'getMiniAppReceivedArticleList',
|
getMiniAppReceivedArticleList: 'getMiniAppReceivedArticleList'
|
||||||
getPageDisease:'getPageDisease'
|
|
||||||
},
|
},
|
||||||
member: {
|
member: {
|
||||||
addCustomer: 'add',
|
addCustomer: 'add',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user