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