3.5提交代码

This commit is contained in:
zoujiandong 2026-03-05 09:57:10 +08:00
parent ae9a961a42
commit 799471090f
50 changed files with 5901 additions and 1879 deletions

View File

@ -689,7 +689,28 @@ const api = {
receiveWelfare(data){ receiveWelfare(data){
return request('/expertAPI/receiveWelfare', data, 'post', false); return request('/expertAPI/receiveWelfare', data, 'post', false);
}, },
getKePuCollection(data){
return request('/expertAPI/getKePuCollection', data, 'post', false);
},
getRead(data){
return request('/expertAPI/read', data, 'post', false);
},
getOutRead(data){
return request('/expertAPI/outread', data, 'post', false);
},
getAgree(data){
return request('/expertAPI/agree', data, 'post', false);
},
getDisagree(data){
return request('/expertAPI/disagree', data, 'post', false);
},
getCollect(data){
return request('/expertAPI/collection', data, 'post', false);
},
getGanDanFileOrder(data){
return request('/expertPay/getGanDanFileOrder', data, 'post', false);
}
//https://dev-app.igandan.com/app/expertPay/getGanDanFileOrder
} }

View File

@ -2,8 +2,8 @@
"name" : "肝胆相照专家版", "name" : "肝胆相照专家版",
"appid" : "__UNI__89F511F", "appid" : "__UNI__89F511F",
"description" : "", "description" : "",
"versionName" : "4.2.2", "versionName" : "4.2.4",
"versionCode" : 422, "versionCode" : 424,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
/* 5+App */ /* 5+App */

3083
pages.json

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ const countDown=()=>{
} }
timer.value=setInterval(()=>{ timer.value=setInterval(()=>{
count.value++; count.value++;
if(count.value>=3){ if(count.value>=5){
clearInterval(timer.value); clearInterval(timer.value);
plus.runtime.quit(); plus.runtime.quit();
} }

View File

@ -108,8 +108,9 @@
<!-- 空状态 --> <!-- 空状态 -->
<view class="empty-state" v-if="articleList.length === 0 && !loading"> <view class="empty-state" v-if="articleList.length === 0 && !loading">
<uni-icons type="article" size="80" color="#cccccc"></uni-icons> <empty :emptyDesc="'暂无患教信息'"></empty>
<text class="empty-text">暂无文章</text> <!-- <uni-icons type="article" size="80" color="#cccccc"></uni-icons>
<text class="empty-text">暂无文章</text> -->
</view> </view>
</scroll-view> </scroll-view>
@ -155,7 +156,7 @@
currentPage.value = 1; currentPage.value = 1;
hasMore.value = true; hasMore.value = true;
articleList.value = []; articleList.value = [];
polularScienceArticleListByKeywordsNew(true); polularScienceArticleListByKeywordsNew(false);
}; };
const loadGuideTags = async () => { const loadGuideTags = async () => {
try { try {
@ -203,9 +204,9 @@
// //
hasMore.value = newData.length >= pageSize.value; hasMore.value = newData.length >= pageSize.value;
if (!isRefresh) { // if (!isRefresh) {
currentPage.value++; // currentPage.value++;
} // }
console.log('文章数据加载成功:', articleList.value); console.log('文章数据加载成功:', articleList.value);
} }
@ -287,7 +288,7 @@
// //
if (article.path) { if (article.path) {
uni.navigateTo({ uni.navigateTo({
url: `/pages_app/webview/webview?url=${encodeURIComponent(docUrl+article.path)}&title=患教详情` url: `/pages_app/webview/webviewClass?url=${encodeURIComponent(docUrl+article.path+'?fromtype=doctor')}&title=患教详情&uuid=${article.uuid}&sharetitle=${article.title}&summary=${article.summary}&type=huanjiao&imgPath=${encodeURIComponent(article.image)}`
}); });
} }
}; };
@ -313,6 +314,7 @@
// //
const onLoadMore = async () => { const onLoadMore = async () => {
if (!hasMore.value || loading.value) return; if (!hasMore.value || loading.value) return;
currentPage.value++
await polularScienceArticleListByKeywordsNew(false); await polularScienceArticleListByKeywordsNew(false);
}; };
@ -377,11 +379,11 @@
hasMore.value = true; hasMore.value = true;
articleList.value = []; articleList.value = [];
showFilter.value = false; showFilter.value = false;
polularScienceArticleListByKeywordsNew(true); polularScienceArticleListByKeywordsNew(false);
}; };
onShow(() => { onShow(() => {
polularScienceArticleListByKeywordsNew(true); polularScienceArticleListByKeywordsNew(false);
loadGuideTags(); loadGuideTags();
}); });
</script> </script>
@ -501,10 +503,10 @@ $padding-small: 20rpx;
// //
.article-list { .article-list {
position: fixed; position: fixed;
height:calc(100vh - var(--status-bar-height) - 44px - 188rpx); // height:calc(100vh - var(--status-bar-height) - 44px - 207rpx);
top: calc(var(--status-bar-height) + 44px + 188rpx); top: calc(var(--status-bar-height) + 44px + 188rpx);
padding-bottom: 130rpx; bottom: 128rpx;
.article-item { .article-item {
background-color: $white; background-color: $white;
margin-bottom: $padding-small; margin-bottom: $padding-small;
@ -572,6 +574,9 @@ $padding-small: 20rpx;
font-size: 24rpx; font-size: 24rpx;
color: $gray-medium; color: $gray-medium;
text{
white-space: nowrap;
}
} }
} }
} }

View File

@ -1,13 +1,15 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 头部导航 --> <!-- 头部导航 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="病情记录" title="病情记录"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -17,6 +19,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
@ -301,7 +304,10 @@ onMounted(() => {
/* 主要内容区域 */ /* 主要内容区域 */
.main-content { .main-content {
height: calc(100vh - 180rpx); top: calc(var(--status-bar-height) + 44px);
width: 100%;
position: fixed;
bottom:0;
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -6,15 +6,13 @@
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
<view class="main-content"> <view class="main-content">
<!-- 疾病诊断部分 --> <!-- 疾病诊断部分 -->
<view class="section"> <view class="header">
<view class="section-header"> <view class="section">
<view class="red-bar"></view>
<text class="section-title">疾病诊断</text>
</view>
<view class="section-content"> <view class="section-content">
<text class="diagnosis-text">疾病诊断: {{ pageData.diseaseName }}</text> <text class="diagnosis-text">疾病诊断: {{ pageData.diseaseName }}</text>
</view> </view>
</view> </view>
</view>
<!-- 化验报告部分 --> <!-- 化验报告部分 -->
<view class="section"> <view class="section">
@ -153,7 +151,7 @@ onMounted(() => {
}) })
</script> </script>
<style scoped> <style scoped lang="scss">
.container { .container {
background-color: #ffffff; background-color: #ffffff;
min-height: 100vh; min-height: 100vh;
@ -205,13 +203,7 @@ onMounted(() => {
} }
/* 头部导航样式 */ /* 头部导航样式 */
.header {
display: flex;
align-items: center;
padding: 20rpx 30rpx;
background-color: #ffffff;
border-bottom: 1rpx solid #f0f0f0;
}
.back-btn { .back-btn {
width: 60rpx; width: 60rpx;
@ -237,7 +229,8 @@ onMounted(() => {
/* 主要内容区域 */ /* 主要内容区域 */
.main-content { .main-content {
padding: 0 30rpx; margin-top: calc(var(--status-bar-height) + 44px);
} }
.section { .section {
@ -247,6 +240,7 @@ onMounted(() => {
.section-header { .section-header {
margin-top: 20rpx; margin-top: 20rpx;
position: relative; position: relative;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
@ -277,7 +271,21 @@ onMounted(() => {
color: #333333; color: #333333;
line-height: 1.5; line-height: 1.5;
} }
.header{
background: #8B2316;
color: #fff;
margin-bottom: 20rpx;
.section{
padding:20rpx;
margin-bottom: 10rpx;
}
.section-content{
padding-left:0rpx;
}
.diagnosis-text{
color: #fff;
}
}
.no-report-text { .no-report-text {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;

View File

@ -3,7 +3,7 @@
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<navBar title="意见反馈"></navBar> <navBar :title="'意见反馈'"></navBar>
<!-- 反馈输入区域 --> <!-- 反馈输入区域 -->
<view class="feedback-input-container"> <view class="feedback-input-container">
@ -126,6 +126,7 @@
/* 反馈输入区域 */ /* 反馈输入区域 */
.feedback-input-container { .feedback-input-container {
margin-top: calc(var(--status-bar-height) + 44px);
padding: 30rpx; padding: 30rpx;
flex: 1; flex: 1;
} }

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="visit-note-page"> <view class="visit-note-page">
<uni-nav-bar <navBar :title="'随访详情'" />
<!-- <uni-nav-bar
left-icon="left" left-icon="left"
title="随访详情" title="随访详情"
@clickLeft="goBack" @clickLeft="goBack"
@ -11,7 +12,7 @@
backgroundColor="#eee" backgroundColor="#eee"
> >
</uni-nav-bar> </uni-nav-bar> -->
<!-- 患者行 --> <!-- 患者行 -->
<view class="row" @click="noop"> <view class="row" @click="noop">
@ -41,6 +42,7 @@
import { onLoad,onShow } from '@dcloudio/uni-app' import { onLoad,onShow } from '@dcloudio/uni-app'
import api from '@/api/api.js' import api from '@/api/api.js'
const patientName = ref('') const patientName = ref('')
import navBar from '@/components/navBar/navBar.vue'
const note = ref('请近日来医院复诊、复查') const note = ref('请近日来医院复诊、复查')
const datetime = ref('') const datetime = ref('')
const followUpUuid = ref('') const followUpUuid = ref('')

View File

@ -1,12 +1,14 @@
<template> <template>
<view class="group-edit-page"> <view class="group-edit-page">
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
:title="groupUuid ? '编辑分组' : '新建分组'" :title="groupUuid ? '编辑分组' : '新建分组'"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -15,7 +17,9 @@
</template> </template>
</uni-nav-bar> </uni-nav-bar>
<!-- 分组名称 --> </view>
<view class="contentbox">
<!-- 分组名称 -->
<view class="section-header">分组名称</view> <view class="section-header">分组名称</view>
<view class="name-row"> <view class="name-row">
<input class="name-input" v-model.trim="groupName" placeholder="请输入分组名称" maxlength="20" /> <input class="name-input" v-model.trim="groupName" placeholder="请输入分组名称" maxlength="20" />
@ -46,6 +50,7 @@
</view> </view>
</view>
<!-- 底部删除按钮 --> <!-- 底部删除按钮 -->
@ -194,6 +199,9 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.contentbox{
margin-top: calc(var(--status-bar-height) + 44px);
}
.group-edit-page{ .group-edit-page{
min-height: 100vh; min-height: 100vh;
background: #f5f5f5; background: #f5f5f5;

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="group-manage-page"> <view class="group-manage-page">
<uni-nav-bar <view class="nabox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="分组管理" title="分组管理"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -14,6 +14,7 @@
<view class="save-text" @click="saveGroups">保存</view> <view class="save-text" @click="saveGroups">保存</view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 已选中的分组 --> <!-- 已选中的分组 -->
<view class="selected-section"> <view class="selected-section">
@ -166,6 +167,7 @@ const saveGroups = () => {
color: #333; color: #333;
} }
.selected-section { .selected-section {
margin-top: calc(var(--status-bar-height) + 44px);
min-height: 300rpx; min-height: 300rpx;
padding: 30rpx; padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;

View File

@ -1,20 +1,22 @@
<template> <template>
<view class="bank-card-page"> <view class="bank-card-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="常用银行卡" title="常用银行卡"
@clickLeft="goBack()" @clickLeft="goBack"
right-text="添加" right-text="添加"
@clickRight="addBankCard" @clickRight="addBankCard"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
> >
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 银行卡列表 --> <!-- 银行卡列表 -->
<view class="card-list"> <view class="card-list">
<view class="card-item" v-for="(card, index) in bankCards" :key="card.uuid"> <view class="card-item" v-for="(card, index) in bankCards" :key="card.uuid">
@ -42,18 +44,35 @@ import navTo from '@/utils/navTo';
import api from '@/api/api'; import api from '@/api/api';
import empty from "@/components/empty/empty.vue" import empty from "@/components/empty/empty.vue"
const bankCards = ref([]); const bankCards = ref([]);
import { onLoad,onBackPress } from '@dcloudio/uni-app';
const from = ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
uni.navigateBack();
return true;
}
});
// //
const getBankCardList = () => { const getBankCardList = () => {
api.bankCardList({}).then(res => { api.bankCardList({}).then(res => {
if (res.code === 200 && res.data.bankList) {
bankCards.value = res.data.bankList; if (res.code === 200 && res.data) {
bankCards.value = res.data;
} }
}); });
}; };
const goBack = () => { const goBack = () => {
uni.navigateBack(); if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}; };
const addBankCard = () => { const addBankCard = () => {
@ -98,6 +117,7 @@ onMounted(() => {
/* 银行卡列表样式 */ /* 银行卡列表样式 */
.card-list { .card-list {
margin-top: calc(var(--status-bar-height) + 44px);
padding: 30rpx; padding: 30rpx;
.card-item { .card-item {

View File

@ -1,17 +1,20 @@
<template> <template>
<view class="idcard-auth-page"> <view class="idcard-auth-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
:title="currentStep === 1 ? '身份验证' : '添加银行卡'" :title="currentStep === 1 ? '身份验证' : '添加银行卡'"
@clickLeft="goBack()" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
> >
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="content-area"> <view class="content-area">
<!-- 进度指示器 --> <!-- 进度指示器 -->
@ -90,10 +93,11 @@
v-model="formData.cardNumber" v-model="formData.cardNumber"
placeholder-style="color: #cccccc" placeholder-style="color: #cccccc"
/> />
<view class="info-icon">
</view>
<view class="info-icon" @click="showInfo('card')">
<text class="icon-text">!</text> <text class="icon-text">!</text>
</view> </view>
</view>
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="form-label">手机号</text> <text class="form-label">手机号</text>
@ -104,9 +108,10 @@
v-model="formData.mobile" v-model="formData.mobile"
placeholder-style="color: #cccccc" placeholder-style="color: #cccccc"
/> />
<view class="info-icon">
</view>
<view class="info-icon" @click="showInfo('phone')">
<text class="icon-text">!</text> <text class="icon-text">!</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -145,6 +150,18 @@
</view> </view>
</view> </view>
</view> </view>
<unidialog
:visible="cardVisible"
:showCancel="false"
:title="cardTitle"
:content="cardContent"
:showConfirm="true"
:confirmText="'知道了'"
@close="cardVisible=false"
@confirm="cardVisible=false"
>
</unidialog>
</template> </template>
<script setup> <script setup>
@ -153,7 +170,10 @@ import stepImg from "@/static/add_card_no.png"
import stepActiveImg from "@/static/add_card_yes.png" import stepActiveImg from "@/static/add_card_yes.png"
import navTo from '@/utils/navTo'; import navTo from '@/utils/navTo';
import api from '@/api/api'; import api from '@/api/api';
import unidialog from '@/components/dialog/dialog.vue';
const cardContent = ref('暂支持以下银行:农业银行、建设银行、光大银行、平安银行、兴业银行、中信银行、邮政储蓄银行、民生银行、中国银行、工商银行、交通银行、浦发银行、广发银行、华夏银行、招商银行、北京银行、上海银行。');
const cardTitle = ref('银行卡说明');
const cardVisible = ref(true);
const formData = ref({ const formData = ref({
name: '', name: '',
idNumber: '', idNumber: '',
@ -163,7 +183,16 @@ const formData = ref({
const isLoading = ref(false); const isLoading = ref(false);
const currentStep = ref(1); // 12 const currentStep = ref(1); // 12
const showInfo = (type) => {
if (type === 'card') {
cardTitle.value = '银行卡说明';
cardContent.value = '暂支持以下银行:农业银行、建设银行、光大银行、平安银行、兴业银行、中信银行、邮政储蓄银行、民生银行、中国银行、工商银行、交通银行、浦发银行、广发银行、华夏银行、招商银行、北京银行、上海银行。';
} else if (type === 'phone') {
cardTitle.value = '手机号说明';
cardContent.value = '银行预留的手机号码是办理银行卡时所填写的手机号码。没有预留,手机号码已经忘记或者已经停用,请联系银行客服更新处理';
}
cardVisible.value = true;
};
// //
const showSmsDialog = ref(false); const showSmsDialog = ref(false);
const smsCode = ref(''); const smsCode = ref('');
@ -337,7 +366,7 @@ const onCancelSms = () => {
} }
.content-area { .content-area {
padding-top: 160rpx; margin-top: calc(var(--status-bar-height) + 44px);
padding: 0rpx 0rpx 0; padding: 0rpx 0rpx 0;
} }
@ -487,7 +516,25 @@ const onCancelSms = () => {
border-color: #8B2316; border-color: #8B2316;
} }
} }
.info-icon {
flex:1;
position: absolute;
right: 20rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid #8B2316;
.icon-text {
font-size: 20rpx;
color: #8B2316;
font-weight: bold;
}
}
.input-container { .input-container {
display: flex; display: flex;
align-items: center; align-items: center;
@ -509,24 +556,7 @@ const onCancelSms = () => {
} }
} }
.info-icon {
flex:1;
position: absolute;
right: 20rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
.icon-text {
font-size: 20rpx;
color: #cccccc;
font-weight: bold;
}
}
} }
} }
} }

View File

@ -14,7 +14,7 @@
<template v-slot:right> <template v-slot:right>
<view class="nav-right" > <view class="nav-right" >
<view class="collect-img" @click="clearMsg" > <view class="collect-img" @click="clearMsg" >
<image class="img-icon" :src="clearImg" mode="aspectFill" /> <image class="img-icon" :src="clearImg" />
</view> </view>
</view> </view>
</template> </template>
@ -83,10 +83,13 @@
<!-- 其他模块 - 卡片样式 --> <!-- 其他模块 - 卡片样式 -->
<view v-else> <view v-else>
<view class="card" v-for="(msg, idx) in msgList" :key="msg.id" @click="goMsgDetail(msg)"> <view class="card-cell" v-for="(msg, idx) in msgList" :key="msg.id" @click="goMsgDetail(msg)">
<view class="card-title" :class="{'active':msg.is_read==0}">{{ msg.title }}</view>
<view class="card-content">{{ msg.content }}</view>
<view class="card-time">{{ msg.create_date }}</view> <view class="card-time">{{ msg.create_date }}</view>
<view class="card" >
<view class="card-title" :class="{'active':msg.is_read==0}">{{ msg.title }}</view>
<view class="card-content">{{ msg.content }}</view>
</view>
</view> </view>
</view> </view>
@ -189,8 +192,9 @@
if (res.confirm) { if (res.confirm) {
api.appMesageRead().then(res => { api.appMesageRead().then(res => {
console.log(res); console.log(res);
getUnReadList();
}); });
getUnReadList();
} }
} }
}); });
@ -202,27 +206,53 @@
}; };
//readMsg(msg.id); //readMsg(msg.id);
if(msg.extra.module==4){ if(msg.extra.module==4){
uni.sendNativeEvent('goCourseDetail', { if(msg.extra.type==17 || msg.extra.type==40){
uni.showToast({
title: '暂停中',
icon: 'none'
});
}else{
uni.sendNativeEvent('goCourseDetail', {
msg: { msg: {
id:msg.extra.id id:msg.extra.id
} }
}); });
}
}else if(msg.extra.module==2){
if(msg.extra.type==19){
let url=`/pages_app/myCourseware/myCourseware?from=msg`
navTo({
url: url
})
}
}else{ }else{
let url=""; let url="";
if(msg.extra.module==1 && msg.extra.type==36){ if(msg.extra.module==1 && msg.extra.type==36){
url=`/pages_app/myPoint/myPoint?from=msg` url=`/pages_app/myPoint/myPoint?from=msg`
}else if(msg.extra.module==1 && msg.extra.type==31){ navTo({
url=`/pages_app/myPoint/myPoint?from=msg`
}else if(msg.extra.module==1 && msg.extra.type==35){
uni.setStorageSync('lookWelfare', 'useWelfare');
url=`/pages_app/myWelfare/myWelfare?from=msg`
}else if(msg.extra.module==3 && msg.extra.type==12){
url=`/pages_app/myPatient/myPatient`
}
navTo({
url: url url: url
}) })
}else if(msg.extra.module==1 && msg.extra.type==31){
url=`/pages_app/myPoint/myPoint?from=msg`
navTo({
url: url
})
}else if(msg.extra.module==1 && msg.extra.type==35){
//uni.setStorageSync('lookWelfare', 'useWelfare');
url=`/pages_app/myWelfareCard/myWelfareCard?from=msg`
navTo({
url: url
})
}else if(msg.extra.module==3 && msg.extra.type==12){
url=`/pages_app/myPatient/myPatient?from=msg`
navTo({
url: url
})
}
} }
} }
// //
@ -378,9 +408,13 @@
.nav-right{ .nav-right{
display: flex; display: flex;
align-items: center; align-items: center;
.collect-img{ .collect-img {
width: 34rpx; width: 50rpx;
height: 34rpx; height: 50rpx;
.img-icon{
width: 50rpx;
height: 50rpx;
}
} }
} }
.msg-page { .msg-page {
@ -445,7 +479,7 @@
.msg-list { .msg-list {
position: fixed; position: fixed;
// //
top: 360rpx; // top: calc(var(--status-bar-height) + 44px + 230rpx);
padding: 20rpx 24rpx 40rpx; padding: 20rpx 24rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
bottom: 0rpx; bottom: 0rpx;
@ -486,6 +520,20 @@
} }
} }
.card-cell{
display: flex;
flex-direction: column;
margin-bottom: 30rpx;
box-sizing: border-box;
}
.card-time {
width:100%;
margin:10rpx 0;
font-size: 30rpx;
color: #666;
text-align: center;
}
.card { .card {
background: #fff; background: #fff;
border-radius: 16rpx; border-radius: 16rpx;
@ -510,11 +558,7 @@
margin-bottom: 14rpx; margin-bottom: 14rpx;
} }
.card-time {
font-size: 24rpx;
color: $muted;
text-align: right;
}
} }
// //

View File

@ -1,16 +1,19 @@
<template> <template>
<view class="bill-details-page"> <view class="bill-details-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="账单明细" title="账单明细"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
></uni-nav-bar> ></uni-nav-bar>
</view>
<!-- 表格头部 --> <!-- 表格头部 -->
<view class="table-header"> <view class="table-header">
@ -72,9 +75,16 @@ const total = ref(0)
const isFirstPage = ref(true) const isFirstPage = ref(true)
const isLastPage = ref(false) const isLastPage = ref(false)
const stopRefresh = () => {
refreshing.value = false
}
// //
const getOrderList = async (isRefresh = false) => { const getOrderList = async (isRefresh = false) => {
if (loading.value) return if (loading.value) {
if (isRefresh) stopRefresh()
return
}
loading.value = true loading.value = true
@ -93,7 +103,8 @@ const getOrderList = async (isRefresh = false) => {
} }
// //
const processedList = list.map(item => ({ const safeList = Array.isArray(list) ? list : []
const processedList = safeList.map(item => ({
id: item.trade_no, id: item.trade_no,
typeName: item.type_name, typeName: item.type_name,
userName: item.user_name, userName: item.user_name,
@ -117,12 +128,16 @@ const getOrderList = async (isRefresh = false) => {
}) })
} finally { } finally {
loading.value = false loading.value = false
refreshing.value = false stopRefresh()
} }
} }
// //
const onRefresh = () => { const onRefresh = () => {
if (loading.value) {
stopRefresh()
return
}
refreshing.value = true refreshing.value = true
page.value = 1 page.value = 1
isLastPage.value = false isLastPage.value = false
@ -182,10 +197,13 @@ onMounted(() => {
// //
.table-header { .table-header {
background-color: #e0e0e0; background-color: #fff;
position: fixed;
display: flex; display: flex;
width: 100%;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
margin-top: 170rpx; /* 为固定导航栏留出空间 */ box-sizing: border-box;
top:calc(var(--status-bar-height) + 44px); /* 为固定导航栏留出空间 */
border-bottom: 1rpx solid #ccc; border-bottom: 1rpx solid #ccc;
.header-cell { .header-cell {
@ -224,11 +242,16 @@ onMounted(() => {
// //
.transaction-list { .transaction-list {
background-color: #f5f5f5; top:calc(var(--status-bar-height) + 44px + 130rpx);
position: fixed;
left: 0;
right: 0;
bottom: 0rpx;
background-color: #fff;
} }
.transaction-item { .transaction-item {
background-color: #f8f8f8;
display: flex; display: flex;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
border-bottom: 1rpx solid #e5e5e5; border-bottom: 1rpx solid #e5e5e5;

View File

@ -1,16 +1,17 @@
<template> <template>
<view class="my-account-page"> <view class="my-account-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="我的账户" title="我的账户"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
></uni-nav-bar> ></uni-nav-bar>
</view>
<!-- 账户余额区域 --> <!-- 账户余额区域 -->
<view class="account-summary"> <view class="account-summary">
@ -21,7 +22,7 @@
<text class="balance-amount">{{ (accountBalance/100).toFixed(2) }}</text> <text class="balance-amount">{{ (accountBalance/100).toFixed(2) }}</text>
<!-- 账户信息详情 --> <!-- 账户信息详情 -->
<view class="account-details"> <!-- <view class="account-details">
<view class="detail-item"> <view class="detail-item">
<text class="detail-label">单次提现限额</text> <text class="detail-label">单次提现限额</text>
<text class="detail-value">{{ (withdrawalBalanceMaxOnce/100).toFixed(2) }}</text> <text class="detail-value">{{ (withdrawalBalanceMaxOnce/100).toFixed(2) }}</text>
@ -34,7 +35,7 @@
<text class="detail-label">最低提现金额</text> <text class="detail-label">最低提现金额</text>
<text class="detail-value">{{ (lessWithdrawalBalance/100).toFixed(2) }}</text> <text class="detail-value">{{ (lessWithdrawalBalance/100).toFixed(2) }}</text>
</view> </view>
</view> </view> -->
</view> </view>
<!-- 操作选项 --> <!-- 操作选项 -->
@ -47,7 +48,7 @@
<text class="action-title">提现</text> <text class="action-title">提现</text>
<text class="action-subtitle">提现金额不得少于{{ (lessWithdrawalBalance/100).toFixed(2) }}</text> <text class="action-subtitle">提现金额不得少于{{ (lessWithdrawalBalance/100).toFixed(2) }}</text>
</view> </view>
<text class="action-arrow">></text> <uni-icons type="right" size="25" color="#999"></uni-icons>
</view> </view>
<view class="action-item" @click="handleBillDetails"> <view class="action-item" @click="handleBillDetails">
@ -57,7 +58,7 @@
<view class="action-content"> <view class="action-content">
<text class="action-title">账单明细</text> <text class="action-title">账单明细</text>
</view> </view>
<text class="action-arrow">></text> <uni-icons type="right" size="25" color="#999"></uni-icons>
</view> </view>
</view> </view>
@ -70,6 +71,19 @@
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import api from '@/api/api.js' import api from '@/api/api.js'
import docUrl from '@/utils/docUrl' import docUrl from '@/utils/docUrl'
import { onLoad,onBackPress } from '@dcloudio/uni-app';
const from = ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
// //
const accountBalance = ref(0) const accountBalance = ref(0)
const withdrawalBalanceMaxOnce = ref(0) const withdrawalBalanceMaxOnce = ref(0)
@ -86,13 +100,17 @@ onMounted(() => {
// //
const goBack = () => { const goBack = () => {
uni.navigateBack() if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
} }
const handleWithdrawal = () => { const handleWithdrawal = () => {
if(accountBalance.value < lessWithdrawalBalance.value){ if(accountBalance.value < lessWithdrawalBalance.value){
uni.showToast({ uni.showToast({
title: `提现金额不得少于${(lessWithdrawalBalance/100).toFixed(2)}`, title: `提现金额不得少于${(lessWithdrawalBalance.value/100).toFixed(2)}`,
icon: 'none' icon: 'none'
}) })
return return
@ -150,9 +168,10 @@ const getMyAccount = async () => {
// //
.account-summary { .account-summary {
margin-top: calc(var(--status-bar-height) + 44px);
background: linear-gradient(135deg, #8B2316, #A0522D); background: linear-gradient(135deg, #8B2316, #A0522D);
margin: 30rpx; // margin: 30rpx;
border-radius: 20rpx; // border-radius: 20rpx;
padding: 60rpx 40rpx; padding: 60rpx 40rpx;
text-align: center; text-align: center;
box-shadow: 0 8rpx 24rpx rgba(139, 35, 22, 0.3); box-shadow: 0 8rpx 24rpx rgba(139, 35, 22, 0.3);
@ -164,7 +183,7 @@ const getMyAccount = async () => {
.profile-avatar { .profile-avatar {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
border-radius: 60rpx; border-radius: 20rpx;
border: 4rpx solid rgba(255, 255, 255, 0.3); border: 4rpx solid rgba(255, 255, 255, 0.3);
object-fit: cover; object-fit: cover;
} }
@ -223,10 +242,10 @@ const getMyAccount = async () => {
// //
.action-items { .action-items {
background-color: #ffffff; background-color: #ffffff;
margin: 0 30rpx; margin-top: 30rpx;
border-radius: 20rpx; // border-radius: 20rpx;
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08); // box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
.action-item { .action-item {
display: flex; display: flex;

View File

@ -1,16 +1,17 @@
<template> <template>
<view class="withdrawal-page"> <view class="withdrawal-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="提现" title="提现"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
></uni-nav-bar> ></uni-nav-bar>
</view>
<!-- 主内容区域 --> <!-- 主内容区域 -->
<view class="main-content"> <view class="main-content">
@ -48,12 +49,12 @@
<text class="amount-title">提现金额</text> <text class="amount-title">提现金额</text>
<view class="amount-display"> <view class="amount-display">
<text class="currency-symbol">¥</text> <text class="currency-symbol">¥</text>
<text class="amount-value">{{ withdrawalAmount }}</text> <text class="amount-value">{{ withdrawalAmount}}</text>
</view> </view>
<view class="amount-details"> <view class="amount-details">
<text class="tax-info">扣除个人所得税<text class="highlight-red">{{ (incomeTax / 100).toFixed(2) }}</text></text> <text class="tax-info">扣除个人所得税<text class="highlight-red">{{ incomeTax}}</text></text>
<text class="fee-info">扣除提现手续费<text class="highlight-red">{{ (withdrawalBalanceFee / 100).toFixed(2) }}</text></text> <!-- <text class="fee-info">扣除提现手续费<text class="highlight-red">{{ (withdrawalBalanceFee / 100).toFixed(2) }}</text></text> -->
<text class="actual-amount">此次提现实际到账<text class="highlight-red">{{ actualAmount }}</text></text> <text class="actual-amount">此次提现实际到账<text class="highlight-red">{{ actualAmount}}</text></text>
</view> </view>
</view> </view>
</view> </view>
@ -132,10 +133,11 @@ onMounted(() => {
// //
const calculateAmounts = () => { const calculateAmounts = () => {
// = - - // = - -
const totalDeduction = incomeTax.value + withdrawalBalanceFee.value // const totalDeduction = incomeTax.value + withdrawalBalanceFee.value
const amount = accountBalance.value - totalDeduction // const amount = accountBalance.value - totalDeduction
withdrawalAmount.value = accountBalance.value > 0 ? (accountBalance.value/100).toFixed(2) : '0.00' // withdrawalAmount.value = accountBalance.value > 0 ? (accountBalance.value/100).toFixed(2) : '0.00'
actualAmount.value = amount > 0 ? (amount/100).toFixed(2) : '0.00' // actualAmount.value = amount > 0 ? (amount/100).toFixed(2) : '0.00'
} }
// //
@ -173,7 +175,7 @@ const getMyAccount = async () => {
withdrawalBalanceFee.value = res.data.withdrawalBalanceFee withdrawalBalanceFee.value = res.data.withdrawalBalanceFee
lessWithdrawalBalance.value = res.data.lessWithdrawalBalance lessWithdrawalBalance.value = res.data.lessWithdrawalBalance
// //
calculateAmounts() //calculateAmounts()
// //
getIncomeTax(accountBalance.value) getIncomeTax(accountBalance.value)
} }
@ -187,10 +189,13 @@ const getIncomeTax = async (amount) => {
try { try {
const res = await api.getIncomeTax({amount: amount}) const res = await api.getIncomeTax({amount: amount})
console.log('个人所得税:', res) console.log('个人所得税:', res)
if (res && res.code === 200 && res.data) { if (res.code ==200) {
incomeTax.value = res.data.incomeTax || 0 incomeTax.value = (res.data.tax/100).toFixed(2) || 0
withdrawalAmount.value = (amount/100).toFixed(2) || 0
actualAmount.value = (res.data.actual_amount/100).toFixed(2) || 0
// //
calculateAmounts() //calculateAmounts()
} }
} catch (error) { } catch (error) {
console.error('获取个人所得税失败:', error) console.error('获取个人所得税失败:', error)
@ -405,7 +410,7 @@ const onCancelSms = () => {
// //
.main-content { .main-content {
padding: 0 30rpx;
} }
// //
@ -433,7 +438,7 @@ const onCancelSms = () => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 30rpx 0; padding: 30rpx;
.section-title { .section-title {
font-size: 32rpx; font-size: 32rpx;
@ -456,7 +461,8 @@ const onCancelSms = () => {
.bank-card-info { .bank-card-info {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 30rpx 0; padding: 30rpx;
background-color: #ffffff;
.bank-logo { .bank-logo {
width: 60rpx; width: 60rpx;
@ -520,8 +526,8 @@ const onCancelSms = () => {
// //
.amount-section { .amount-section {
padding: 40rpx 0; padding: 40rpx 30rpx;
background-color: #ffffff;
.amount-title { .amount-title {
display: block; display: block;
font-size: 32rpx; font-size: 32rpx;
@ -556,7 +562,7 @@ const onCancelSms = () => {
margin-bottom: 12rpx; margin-bottom: 12rpx;
.highlight-red { .highlight-red {
color: #8B2316; color: red;
} }
} }
} }

View File

@ -0,0 +1,210 @@
<template>
<view class="detail-page">
<navBar title="订单详情" />
<view class="order-card">
<view class="order-top">
<text class="download-no">下载课件号: {{ detail.downloadNo || "--" }}</text>
<text class="pay-status">{{ detail.statusText || "--" }}</text>
</view>
<view class="section-divider"></view>
<view class="course-title">{{ detail.title || "--" }}</view>
<view class="info-list">
<view class="info-row">
<text class="info-label">课件作者</text>
<text class="info-value">{{ detail.author || "--" }}</text>
</view>
<view class="info-row">
<text class="info-label">金额</text>
<text class="info-value amount">{{ detail.amountText || "--" }}</text>
</view>
<view class="info-row">
<text class="info-label">创建时间</text>
<text class="info-value">{{ detail.createTime || "--" }}</text>
</view>
<view class="info-row">
<text class="info-label">支付方式</text>
<text class="info-value">{{ detail.payType || "--" }}</text>
</view>
<view class="info-row">
<text class="info-label">支付时间</text>
<text class="info-value">{{ detail.payTime || "--" }}</text>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import api from "@/api/api.js";
const coursewareId = ref("");
const detail = ref({
downloadNo: "",
statusText: "",
title: "",
author: "",
amountText: "",
createTime: "",
payType: "",
payTime: "",
});
const formatDateTime = (value) => {
if (!value) return "";
if (typeof value === "string" && value.includes("-")) return value;
const timeNum = Number(value);
if (!timeNum) return "";
const ms = timeNum < 10000000000 ? timeNum * 1000 : timeNum;
const d = new Date(ms);
const y = d.getFullYear();
const m = String(d.getMonth() + 1).padStart(2, "0");
const day = String(d.getDate()).padStart(2, "0");
const h = String(d.getHours()).padStart(2, "0");
const min = String(d.getMinutes()).padStart(2, "0");
const s = String(d.getSeconds()).padStart(2, "0");
return `${y}-${m}-${day} ${h}:${min}:${s}`;
};
const formatAmount = (value) => {
if (value === undefined || value === null || value === "") return "";
const num = Number(value);
if (Number.isNaN(num)) return "";
const amount = num > 1000 ? num / 100 : num;
return `${amount.toFixed(2)}`;
};
const formatStatus = (raw) => {
if (raw === undefined || raw === null) return "";
const text = String(raw).toLowerCase();
if (text === "paid" || text === "success" || text === "1" || text === "2") return "已支付";
if (text === "unpaid" || text === "0" || text === "created") return "未支付";
return String(raw);
};
const formatPayType = (raw) => {
if (raw === undefined || raw === null || raw === "") return "免费";
const text = String(raw).toLowerCase();
if (text === "0" || text === "free") return "免费";
if (text === "1" || text.includes("wx") || text.includes("wechat")) return "微信";
if (text === "2" || text.includes("ali")) return "支付宝";
if (text === "3" || text.includes("balance")) return "余额";
return String(raw);
};
const fetchCoursewareDetail = async () => {
if (!coursewareId.value) return;
try {
const res = await api.getGanDanFileOrder({
order_id: coursewareId.value,
});
if (res.code !== 200 || !res.data) return;
const data = res.data;
detail.value = {
downloadNo: data.order_id || data.download_no || data.gandanfile_order_id || data.id || "",
statusText: formatStatus(data.order_status || data.status || data.pay_status || ""),
title: data.title || data.name || data.file_name || "",
author: data.provider_name || data.author || data.nickname || "",
amountText: formatAmount(data.pay_amount || data.total_fee || data.amount || data.price || 0),
createTime: formatDateTime(data.create_date || data.create_time || data.order_time || ""),
payType: formatPayType(data.pay_type_name || data.pay_type || data.payment_method || ""),
payTime: formatDateTime(data.pay_date || data.pay_time || ""),
};
} catch (error) {
uni.showToast({
title: "获取详情失败",
icon: "none",
});
}
};
onLoad((options) => {
coursewareId.value = options.id;
fetchCoursewareDetail();
});
</script>
<style lang="scss" scoped>
.detail-page {
min-height: 100vh;
background: #f5f5f5;
}
.order-card {
background: #fff;
margin-top: calc(var(--status-bar-height) + 44px);
}
.order-top {
min-height: 88rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.download-no {
font-size: 32rpx;
color: #333;
}
.pay-status {
font-size: 32rpx;
color: #8b2316;
}
.section-divider {
height: 16rpx;
background: #f5f5f5;
}
.course-title {
padding: 20rpx 30rpx;
color: #8b2316;
font-size: 32rpx;
line-height: 1.5;
word-break: break-all;
border-bottom: 2rpx solid #ccc;
}
.info-list {
padding: 24rpx 30rpx;
}
.info-row {
min-height: 56rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-label {
font-size: 18rpx;
color: #333;
}
.info-value {
max-width: 68%;
font-size: 28rpx;
color: #666;
text-align: right;
word-break: break-all;
}
.amount {
color:red;
}
</style>

View File

@ -1,18 +1,7 @@
<template> <template>
<navBar title="我的课件" />
<view class="my-courseware-page"> <view class="my-courseware-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
title="我的课件"
@cviewckLeft="goBack"
fixed
color="#8B2316"
height="180rpx"
:border="false"
backgroundColor="#eeeeee"
>
</uni-nav-bar>
<!-- 标签页导航 --> <!-- 标签页导航 -->
<view class="tab-nav"> <view class="tab-nav">
@ -37,11 +26,11 @@
<view class="summary-bar"> <view class="summary-bar">
<view class="summary-item"> <view class="summary-item">
<up-image :src="downLoadImg" width="36rpx" height="36rpx" ></up-image> <up-image :src="downLoadImg" width="36rpx" height="36rpx" ></up-image>
<text class="summary-text">{{ activeTab === 'download' ? '下载账户' : '分享账户' }}: {{ downloadCount }}</text> <text class="summary-text">{{ totalAmount}}</text>
</view> </view>
<view class="summary-item"> <view class="summary-item">
<up-image :src="moneyImg" width="36rpx" height="36rpx" ></up-image> <up-image :src="moneyImg" width="36rpx" height="36rpx" ></up-image>
<text class="summary-text">{{ activeTab === 'download' ? '文件数量' : '分享文件' }}: {{ totalAmount }}</text> <text class="summary-text">{{ downloadCount }}</text>
</view> </view>
</view> </view>
@ -74,7 +63,7 @@
<text class="label">时间:</text> <text class="label">时间:</text>
<text class="value">{{ item.time }}</text> <text class="value">{{ item.time }}</text>
</view> </view>
<view class="courseware-status"> <view class="courseware-status" v-if="activeTab === 'download'">
<text class="label">状态:</text> <text class="label">状态:</text>
<text class="value status-paid">{{ item.status }}</text> <text class="value status-paid">{{ item.status }}</text>
</view> </view>
@ -97,6 +86,8 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import api from '@/api/api'; import api from '@/api/api';
import navTo from '@/utils/navTo.js';
import { onLoad } from '@dcloudio/uni-app';
import downLoadImg from "@/static/course_download.png" import downLoadImg from "@/static/course_download.png"
import moneyImg from "@/static/course_yuan.png" import moneyImg from "@/static/course_yuan.png"
const activeTab = ref('download'); const activeTab = ref('download');
@ -105,8 +96,8 @@ const loading = ref(false);
const noMore = ref(false); const noMore = ref(false);
const page = ref(1); const page = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
const downloadCount = ref(4); const downloadCount = ref(0);
const totalAmount = ref('20.00'); const totalAmount = ref(0);
const coursewareList = ref([]); const coursewareList = ref([]);
@ -118,6 +109,12 @@ const goBack = () => {
uni.navigateBack(); uni.navigateBack();
}; };
onLoad((options) => {
if(options.from){
//from.value = options.from;
switchTab('share')
}
})
const switchTab = (tab) => { const switchTab = (tab) => {
activeTab.value = tab; activeTab.value = tab;
// //
@ -132,36 +129,9 @@ const onItemClick = (item) => {
console.log('点击课件:', item); console.log('点击课件:', item);
if (activeTab.value === 'download') { if (activeTab.value === 'download') {
// navTo({
if (item.download_path) { url: `/pages_app/myCourseware/coursewareDetail?id=${item.order_id}`
uni.downloadFile({ })
url: item.download_path,
success: (res) => {
if (res.statusCode === 200) {
uni.openDocument({
filePath: res.tempFilePath,
success: () => {
console.log('打开文档成功');
},
fail: (err) => {
console.error('打开文档失败:', err);
uni.showToast({ title: '无法打开此文件', icon: 'none' });
}
});
}
},
fail: (err) => {
console.error('下载失败:', err);
uni.showToast({ title: '下载失败', icon: 'none' });
}
});
} else {
uni.showToast({ title: `点击了下载课件: ${item.name}`, icon: 'none' });
}
} else {
//
uni.showToast({ title: `点击了分享课件: ${item.name}`, icon: 'none' });
//
} }
}; };
@ -175,7 +145,7 @@ const onRefresh = () => {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
const data = res.data.list; const data = res.data.list;
// //
downloadCount.value = res.data.downloadTotalAccount || 0; downloadCount.value = (res.data.downloadTotalAccount/100).toFixed(2) || 0;
totalAmount.value = res.data.downloadFileCount || 0; totalAmount.value = res.data.downloadFileCount || 0;
// //
@ -203,7 +173,7 @@ const onRefresh = () => {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
const data = res.data.list; const data = res.data.list;
// - 使 // - 使
downloadCount.value = res.data.shareTotalAccount || 0; downloadCount.value = (res.data.shareTotalAccount/100).toFixed(2) || 0;
totalAmount.value = res.data.shareloadFileCount || 0; totalAmount.value = res.data.shareloadFileCount || 0;
// //
@ -305,7 +275,7 @@ const onLoadMore = () => {
background: #ffffff; background: #ffffff;
border-bottom: 2rpx solid #f0f0f0; border-bottom: 2rpx solid #f0f0f0;
position: fixed; position: fixed;
top: 180rpx; top: calc(var(--status-bar-height) + 44px);
left: 0; left: 0;
right: 0; right: 0;
z-index: 10; z-index: 10;
@ -332,20 +302,21 @@ const onLoadMore = () => {
.summary-bar { .summary-bar {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
background: #8B2316; background: #8B2316;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
position: fixed; position: fixed;
top: 260rpx; // top: calc(var(--status-bar-height) + 44px + 124rpx); //
left: 0; left: 0;
right: 0; right: 0;
z-index: 10; z-index: 10;
.summary-item { .summary-item {
flex:1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
.summary-text { .summary-text {
color: #ffffff; color: #ffffff;
font-size: 28rpx; font-size: 28rpx;
@ -355,7 +326,7 @@ const onLoadMore = () => {
} }
.courseware-list { .courseware-list {
height: calc(100vh - 180rpx - 116rpx - 80rpx); // height: calc(100vh - 180rpx - 116rpx - 80rpx);
position: fixed; position: fixed;
top: 336rpx; // top: 336rpx; //
bottom: 0; bottom: 0;

View File

@ -2,16 +2,19 @@
<view class="flower-page"> <view class="flower-page">
<!-- 顶部统计栏与截图一致两项 --> <!-- 顶部统计栏与截图一致两项 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="我的鲜花" title="我的鲜花"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
/> />
</view>
<view class="stats-bar"> <view class="stats-bar">
<view class="stat"> <view class="stat">
@ -60,10 +63,10 @@
<view v-if="noMore && records.length > 0" class="no-more"> <view v-if="noMore && records.length > 0" class="no-more">
<text>没有更多数据了</text> <text>没有更多数据了</text>
</view> </view>
<view class="debug-actions"> <!-- <view class="debug-actions">
<!-- <button @click="testLoadMore" size="mini" type="primary">测试加载更多</button> <button @click="testLoadMore" size="mini" type="primary">测试加载更多</button>
<text class="debug-info">当前页: {{ page }}, 加载中: {{ loading }}, 无更多: {{ noMore }}</text> --> <text class="debug-info">当前页: {{ page }}, 加载中: {{ loading }}, 无更多: {{ noMore }}</text>
</view> </view> -->
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@ -74,6 +77,19 @@ import flowerImg from "@/static/flowers.png"
import moneyImg from "@/static/mind_totle_money.png" import moneyImg from "@/static/mind_totle_money.png"
import emptyImg from "@/static/icon_empty.png" import emptyImg from "@/static/icon_empty.png"
import api from '@/api/api.js'; import api from '@/api/api.js';
import { onBackPress,onLoad } from '@dcloudio/uni-app';
const from=ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
// //
const stat = ref({ totalCount: 0, totalAmount: 0.0 }); const stat = ref({ totalCount: 0, totalAmount: 0.0 });
@ -91,11 +107,11 @@ const scrollTop = ref(0);
const goBack = () => { const goBack = () => {
uni.navigateBack({ if(!from.value){
fail() { plus.runtime.quit();
uni.redirectTo({ url: '/pages/index/index' }); }else{
} uni.navigateBack();
}); }
}; };
const getFlowerList = () => { const getFlowerList = () => {
@ -225,7 +241,7 @@ $card: #ffffff;
.stats-bar { .stats-bar {
display: flex; display: flex;
margin-top: calc(var(--status-bar-height) + 44px);
align-items: center; align-items: center;
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
background: #fff; background: #fff;

View File

@ -1,20 +1,6 @@
<template> <template>
<navBar :title="from == 'msg' ? '新的患者' : '我的患者'" />
<view class="new-patient-page"> <view class="new-patient-page">
<uni-nav-bar
left-icon="left"
title="我的患者"
@clickLeft="goBack"
fixed
color="#8B2316"
height="180rpx"
:border="false"
backgroundColor="#eeeeee"
/>
<!-- 提醒区域 --> <!-- 提醒区域 -->
<view class="reminder-section"> <view class="reminder-section">
<view class="reminder-icon"> <view class="reminder-icon">
@ -65,6 +51,7 @@
</view> </view>
</view> </view>
</view> </view>
<empty v-if="applyList.length == 0 && historyList.length == 0" :emptyDesc="'暂无新随访申请患者'" />
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="bottom-button"> <view class="bottom-button">
@ -75,11 +62,25 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { onLoad,onShow} from '@dcloudio/uni-app'; import { onLoad,onShow,onBackPress} from '@dcloudio/uni-app';
import goImg from "@/static/go_big.png" import goImg from "@/static/go_big.png"
import api from '@/api/api.js' import api from '@/api/api.js'
import docUrl from "@/utils/docUrl" import docUrl from "@/utils/docUrl"
import navTo from "@/utils/navTo.js" import navTo from "@/utils/navTo.js"
import empty from "@/components/empty/empty.vue"
import navBar from "@/components/navBar/navBar.vue"
const from=ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
// //
const pendingRequest = ref({ const pendingRequest = ref({
name: '陈新华', name: '陈新华',
@ -91,7 +92,11 @@ const historyList = ref([]);
// //
const goBack = () => { const goBack = () => {
uni.navigateBack(); if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}; };
const rejectRequest = () => { const rejectRequest = () => {
@ -316,6 +321,7 @@ const addPatient = () => {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
padding: 30rpx; padding: 30rpx;
margin-top: calc(var(--status-bar-height) + 44px);
background-color: #ffffff; background-color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;

View File

@ -1,13 +1,13 @@
<template> <template>
<view class="content"> <view class="content">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="患者详情" title="患者详情"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
> >
@ -17,6 +17,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 头部信息卡片 --> <!-- 头部信息卡片 -->
<view class="card header-card"> <view class="card header-card">
@ -157,11 +158,21 @@
const editDesc = ()=> uni.showToast({ title:'编辑描述', icon:'none' }) const editDesc = ()=> uni.showToast({ title:'编辑描述', icon:'none' })
const sendMessage = async()=>{ const sendMessage = async()=>{
let userId=uni.getStorageSync('userInfo').uuid.toLowerCase(); let userId=uni.getStorageSync('userInfo').uuid.toLowerCase();
let conversationId=userId+'|1|'+patientInfo.value.uuid.toLowerCase(); // let conversationId=userId+'|1|'+patientInfo.value.uuid.toLowerCase();
await uni.$UIKitStore.uiStore.selectConversation(conversationId) // await uni.$UIKitStore.uiStore.selectConversation(conversationId)
navTo({ // navTo({
url:'/pages_chat/chat/index' // url:'/pages_chat/chat/index'
}) // })
uni.sendNativeEvent('goSendMsg', {
msg: {
patientuuid: patientInfo.value.uuid,
nickname:nickname.value,
realName:patientInfo.value.realName,
photo:patientInfo.value.photo,
}
},ret => {
console.log(ret);
})
}; };
const nickname = ref(''); const nickname = ref('');
const group = ref({}); const group = ref({});
@ -255,7 +266,9 @@
.nav-right { padding-right: 20rpx; } .nav-right { padding-right: 20rpx; }
.card { background:#ffffff; padding: 20rpx; padding-top: 0;} .card { background:#ffffff; padding: 20rpx; padding-top: 0;}
.header-card { display:flex; padding-top: 20rpx;} .header-card {
margin-top: calc(var(--status-bar-height) + 44px);
display:flex; padding-top: 20rpx;}
.avatar { width: 140rpx; height: 140rpx; border-radius: 12rpx; margin-right: 20rpx; } .avatar { width: 140rpx; height: 140rpx; border-radius: 12rpx; margin-right: 20rpx; }
.base-info { flex:1; } .base-info { flex:1; }
.name-row { display:flex; align-items:center; margin-bottom: 10rpx; } .name-row { display:flex; align-items:center; margin-bottom: 10rpx; }

View File

@ -2,13 +2,15 @@
<view class="patient-group-page"> <view class="patient-group-page">
<!-- 头部 --> <!-- 头部 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="患者分组" title="患者分组"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eeeeee" backgroundColor="#eeeeee"
> >
@ -16,6 +18,7 @@
<view class="save-text" @click="addGroup">新建</view> <view class="save-text" @click="addGroup">新建</view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 筛选排序栏 --> <!-- 筛选排序栏 -->
<view class="filter-sort-bar"> <view class="filter-sort-bar">
<view class="sort-section" @click="toggleGroupSort"> <view class="sort-section" @click="toggleGroupSort">
@ -62,9 +65,9 @@
<view v-if="showInnerSort" class="popup-mask" @click="closeInnerSort"></view> <view v-if="showInnerSort" class="popup-mask" @click="closeInnerSort"></view>
<!-- 患者列表 --> <!-- 患者列表 -->
<scroll-view class="patient-list-section" scroll-y="true" :style="{ height: scrollViewHeight }"> <scroll-view class="patient-list-section" scroll-y="true" >
<!-- 分组循环渲染 --> <!-- 分组循环渲染 -->
<view class="groupcell" v-for="(group, gi) in groups" :key="group.uuid || gi"> <view class="groupcell" v-for="(group, gi) in groups" :key="group.uuid || gi" style="flex-direction: row;">
<view class="section-title" @click="toggleGroup(gi)"> <view class="section-title" @click="toggleGroup(gi)">
<view class="left"> <view class="left">
<view class="imgbox" :class="{ 'active':openGroups[gi] }"> <view class="imgbox" :class="{ 'active':openGroups[gi] }">
@ -79,15 +82,16 @@
</view> </view>
</view> </view>
<view class="patient-list" v-if="openGroups[gi]"> <view class="patient-list" v-if="openGroups[gi]">
<view class="patient-item" v-for="(patient, index) in (group.patientList || [])" :key="patient.uuid || index"> <view class="patient-item" v-for="(patient, index) in getVisiblePatients(group, gi)" :key="patient.uuid || index" @click="goPatientDetail(patient.uuid)">
<view class="patient-avatar"> <view class="patient-avatar">
<up-image :src="docUrl + patient.photo" width="80rpx" height="80rpx" mode="aspectFill"></up-image> <up-image :src="patient._photoUrl" width="80rpx" height="80rpx" mode="aspectFill"></up-image>
</view> </view>
<view class="patient-info"> <view class="patient-info">
<view class="patient-name">{{ patient.realName || patient.nickname || '-' }}</view> <view class="patient-name">{{ patient._displayName }}</view>
<view class="follow-up-time">随访于{{ formatYMD(patient.join_date) }}</view> <view class="follow-up-time">随访于{{ patient._formattedJoinDate }}</view>
</view> </view>
</view> </view>
<view v-if="isGroupRendering(group, gi)" class="rendering-tip">加载中...</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -96,7 +100,7 @@
<script setup> <script setup>
import { ref, computed, onMounted } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { onShow } from "@dcloudio/uni-app"; import { onShow,onBackPress,onLoad } from "@dcloudio/uni-app";
import upImg from "@/static/triangle_green_theme.png" import upImg from "@/static/triangle_green_theme.png"
import downImg from "@/static/triangle_normal.png" import downImg from "@/static/triangle_normal.png"
import groupRightImg from "@/static/groupright_big.png" import groupRightImg from "@/static/groupright_big.png"
@ -107,10 +111,36 @@ import dayjs from 'dayjs'
import navTo from '@/utils/navTo.js' import navTo from '@/utils/navTo.js'
const list_sort = ref(0); const list_sort = ref(0);
const group_sort = ref(0); const group_sort = ref(0);
const from = ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onShow(() => {
uni.showLoading({
title: '加载中...',
mask: true
});
fetchGroupList();
});
const goPatientDetail = (uuid) => {
navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}`
})
}
onBackPress(() => {
if(!from.value){
uni.navigateBack();
return true;
}
});
// //
const groups = ref([]); const groups = ref([]);
const openGroups = ref({}); const openGroups = ref({});
const groupRenderCount = ref({});
const INITIAL_RENDER_COUNT = 20;
const BATCH_RENDER_COUNT = 20;
const formatYMD = (val) => { const formatYMD = (val) => {
if (!val) return ''; if (!val) return '';
@ -122,9 +152,6 @@ const formatYMD = (val) => {
const groupSortTitle = computed(() => group_sort.value === 0 ? '按首字母' : '分组人数'); const groupSortTitle = computed(() => group_sort.value === 0 ? '按首字母' : '分组人数');
const innerSortTitle = computed(() => list_sort.value === 0 ? '按首字母' : '随访时间'); const innerSortTitle = computed(() => list_sort.value === 0 ? '按首字母' : '随访时间');
onShow(() => {
fetchGroupList();
});
const fetchGroupList = async () => { const fetchGroupList = async () => {
const res = await api.groupList({ const res = await api.groupList({
@ -134,15 +161,74 @@ const fetchGroupList = async () => {
group_sort:group_sort.value group_sort:group_sort.value
}); });
if(res.code === 200){ if(res.code === 200){
groups.value = Array.isArray(res.data) ? res.data : []; groups.value = Array.isArray(res.data) ? preprocessGroups(res.data) : [];
// //
openGroups.value = {}; openGroups.value = {};
groupRenderCount.value = {};
groups.value.forEach((_, idx) => openGroups.value[idx] = false); groups.value.forEach((_, idx) => openGroups.value[idx] = false);
uni.hideLoading();
} }
}; };
const toggleGroup = (idx) => { const toggleGroup = (idx) => {
openGroups.value[idx] = !openGroups.value[idx]; openGroups.value[idx] = !openGroups.value[idx];
if (openGroups.value[idx]) {
startProgressiveRender(idx);
}
};
const preprocessGroups = (rawGroups) => {
return rawGroups.map((group) => {
const list = Array.isArray(group.patientList) ? group.patientList : [];
list.forEach((patient) => {
patient._formattedJoinDate = formatYMD(patient.join_date);
patient._displayName = patient.realName || patient.nickname || '-';
patient._photoUrl = `${docUrl}${patient.photo || ''}`;
});
return {
...group,
patientList: list
};
});
};
const startProgressiveRender = (idx) => {
const group = groups.value[idx];
if (!group) return;
const total = (group.patientList || []).length;
if (!total) {
groupRenderCount.value[idx] = 0;
return;
}
groupRenderCount.value[idx] = Math.min(INITIAL_RENDER_COUNT, total);
if (total <= INITIAL_RENDER_COUNT) return;
const loadNextBatch = () => {
if (!openGroups.value[idx]) return;
const current = groupRenderCount.value[idx] || 0;
if (current >= total) return;
groupRenderCount.value[idx] = Math.min(current + BATCH_RENDER_COUNT, total);
if (groupRenderCount.value[idx] < total) {
setTimeout(loadNextBatch, 16);
}
};
setTimeout(loadNextBatch, 16);
};
const getVisiblePatients = (group, idx) => {
const list = group?.patientList || [];
const renderCount = groupRenderCount.value[idx] || 0;
if (renderCount >= list.length) return list;
return list.slice(0, renderCount);
};
const isGroupRendering = (group, idx) => {
const total = (group?.patientList || []).length;
const rendered = groupRenderCount.value[idx] || 0;
return total > 0 && rendered < total;
}; };
const editGroup = (group) => { const editGroup = (group) => {
@ -201,7 +287,11 @@ const chooseInnerSort = (type) => {
// //
const goBack = () => { const goBack = () => {
uni.navigateBack(); if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}; };
const createNew = () => { const createNew = () => {
@ -218,6 +308,9 @@ const createNew = () => {
.patient-group-page { .patient-group-page {
min-height: 100vh; min-height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
.groupcell{
flex-direction: row!important;
}
} }
/* 弹窗样式 */ /* 弹窗样式 */
@ -388,7 +481,7 @@ const createNew = () => {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #ffff; background-color: #ffff;
position: fixed; position: fixed;
top: 180rpx; top: calc(var(--status-bar-height) + 44px);
left: 0; left: 0;
right: 0; right: 0;
z-index: 9; z-index: 9;
@ -525,5 +618,12 @@ const createNew = () => {
} }
} }
} }
.rendering-tip {
padding: 16rpx 30rpx 24rpx;
font-size: 24rpx;
color: #999;
text-align: center;
}
} }
</style> </style>

View File

@ -1,7 +1,34 @@
<template> <template>
<view class="content"> <view class="content">
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
:title="title"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
<template #right>
<view class="nav-right" v-if="activeTab === 'message'">
<uni-icons type="search" size="24" color="#8B2316" @click="searchPatients"></uni-icons>
<uni-icons type="staff" size="24" color="#8B2316" @click="managePatients" style="margin-left: 30rpx;"></uni-icons>
</view>
<view class="nav-right" v-else-if="activeTab === 'list'">
<uni-icons type="search" size="24" color="#8B2316" @click="searchPatients"></uni-icons>
<uni-icons type="plusempty" size="24" color="#8B2316" @click="goCode" style="margin-left: 30rpx;" ></uni-icons>
</view>
<view class="nav-right" v-else-if="activeTab === 'plan'" @click="showAddMenu">
<view class="save-btn">添加</view>
</view>
</template>
</uni-nav-bar>
</view>
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <!-- <uni-nav-bar
left-icon="left" left-icon="left"
:title="title" :title="title"
@clickLeft="goBack" @clickLeft="goBack"
@ -25,7 +52,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar> -->
<!-- 消息列表区域 --> <!-- 消息列表区域 -->
<scroll-view <scroll-view
@ -36,7 +63,7 @@
:refresher-triggered="isRefreshing" :refresher-triggered="isRefreshing"
@refresherrefresh="onRefresh" @refresherrefresh="onRefresh"
> >
<ConversationList /> <!-- <ConversationList /> -->
<!-- 消息项 --> <!-- 消息项 -->
<!-- <view class="message-item" v-for="(item, index) in messageList" :key="item.id || index" @click="openMessage(item)"> <!-- <view class="message-item" v-for="(item, index) in messageList" :key="item.id || index" @click="openMessage(item)">
<view class="message-avatar"> <view class="message-avatar">
@ -69,8 +96,15 @@
<!-- 患者列表区域 --> <!-- 患者列表区域 -->
<view class="patient-list" v-if="activeTab === 'list'"> <view class="patient-list" v-if="activeTab === 'list'">
<!-- 特殊操作项 -->
<view class="special-actions">
<view class="listbox">
<!-- 使用 up-index-list 索引组件数据动态渲染 -->
<up-index-list :index-list="indexList" v-if="loadFinish" >
<!-- 特殊操作项 -->
<template #header>
<view class="special-actions" >
<view class="action-item" @click="addNewPatient"> <view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient"> <view class="action-icon new-patient">
<uni-icons type="person" size="24" color="#ffffff"></uni-icons> <uni-icons type="person" size="24" color="#ffffff"></uni-icons>
@ -93,24 +127,20 @@
<uni-icons type="right" size="20" color="#999"></uni-icons> <uni-icons type="right" size="20" color="#999"></uni-icons>
</view> </view>
</view> </view>
</template>
<view class="listbox"> <template v-for="group in patientGroups" :key="group.letter" >
<!-- 使用 up-index-list 索引组件数据动态渲染 -->
<up-index-list :index-list="indexList" custom-nav-height="180rpx" v-if="patientList.length > 0">
<template v-for="group in patientGroups" :key="group.letter">
<up-index-item > <up-index-item >
<up-index-anchor :text="group.letter" /> <up-index-anchor :text="group.letter" />
<view class="group-section"> <view class="group-section">
<view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" > <view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" >
<template v-if="item.placeholder"> <template v-if="item.placeholder">
<view class="patient-avatar-placeholder"> <view class="patient-avatar-placeholder">
<uni-icons type="person" size="32" color="#ffffff"></uni-icons> <uni-icons type="person" size="32" color="#ffffff" @click="goPatientDetail(item.uuid)"></uni-icons>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<image class="patient-avatar" :src="docUrl+item.photo" mode="aspectFill"></image> <image class="patient-avatar" :src="docUrl+item.photo" mode="aspectFill" @click="goPatientDetail(item.uuid)"></image>
</template> </template>
<view class="patient-info" @click="goPatientDetail(item.uuid)"> <view class="patient-info" @click="goPatientDetail(item.uuid)">
<text class="patient-name">{{ item.realName }}</text> <text class="patient-name">{{ item.realName }}</text>
@ -127,7 +157,7 @@
</up-index-item> </up-index-item>
</template> </template>
</up-index-list> </up-index-list>
<empty v-else></empty> <empty v-if="patientList.length === 0"></empty>
</view> </view>
</view> </view>
<view class="plan" v-if="activeTab === 'plan'"> <view class="plan" v-if="activeTab === 'plan'">
@ -207,6 +237,7 @@
</view> </view>
<view class="tab-item" :class="{active: activeTab === 'list'}" @click="switchTab('list')"> <view class="tab-item" :class="{active: activeTab === 'list'}" @click="switchTab('list')">
<text class="tab-text">患者列表</text> <text class="tab-text">患者列表</text>
<view class="tab-dot" v-if="hasNewPatient"><uni-badge class="uni-badge-left-margin" :text="applyList.length" :offset="[-3, -3]" size="small" /></view>
</view> </view>
<view class="tab-item" :class="{active: activeTab === 'plan'}" @click="switchTab('plan')"> <view class="tab-item" :class="{active: activeTab === 'plan'}" @click="switchTab('plan')">
<text class="tab-text">随访计划</text> <text class="tab-text">随访计划</text>
@ -218,17 +249,30 @@
<script setup> <script setup>
import { ref, getCurrentInstance, computed } from 'vue'; import { ref, getCurrentInstance, computed } from 'vue';
import { onShow,onLoad} from "@dcloudio/uni-app"; import { onShow,onLoad,onBackPress} from "@dcloudio/uni-app";
import dayImg from "@/static/visit_data11.png" import dayImg from "@/static/visit_data11.png"
import planImg from "@/static/visitplan.png" import planImg from "@/static/visitplan.png"
import api from '@/api/api.js'; import api from '@/api/api.js';
import navTo from '@/utils/navTo.js'; import navTo from '@/utils/navTo.js';
import docUrl from '@/utils/docUrl.js'; import docUrl from '@/utils/docUrl.js';
const patientList = ref([]); const patientList = ref([]);
const navHeight = ref(40);
onBackPress(() => {
plus.runtime.quit();
return true;
});
const getNavHeight = () => {
const systemInfo = uni.getSystemInfoSync();
console.log(2223);
console.log(systemInfo);
navHeight.value = systemInfo.statusBarHeight + 44;
console.log(navHeight.value);
}
import pinyin from 'pinyin'; import pinyin from 'pinyin';
import dayjs from 'dayjs' import dayjs from 'dayjs'
import lineImg from "@/static/item_visitplan_fg.png" import lineImg from "@/static/item_visitplan_fg.png"
import ConversationList from './conversation-list/index.vue' const loadFinish = ref(false);
//import ConversationList from './conversation-list/index.vue'
const title = ref('患者消息'); const title = ref('患者消息');
const goPatientDetail = (uuid) => { const goPatientDetail = (uuid) => {
navTo({ navTo({
@ -323,10 +367,11 @@
} }
// patientList // patientList
const buildGroupsFromPatients = () => { const buildGroupsFromPatients = () => {
const map = new Map(); const map = new Map();
patientList.value.forEach((p) => { patientList.value.forEach((p) => {
const name = p.realName; const name = p.realName;
const first = getFirstLetter(name).toUpperCase(); const first = name?getFirstLetter(name).toUpperCase():'#';
const letter = /^[A-Z]$/.test(first) ? first : '#'; const letter = /^[A-Z]$/.test(first) ? first : '#';
if (!map.has(letter)) map.set(letter, []); if (!map.has(letter)) map.set(letter, []);
map.get(letter).push(p); map.get(letter).push(p);
@ -334,11 +379,22 @@
const letters = Array.from(map.keys()).sort((a,b) => a.localeCompare(b)); const letters = Array.from(map.keys()).sort((a,b) => a.localeCompare(b));
patientGroups.value = letters.map(l => ({ letter: l, items: map.get(l) })); patientGroups.value = letters.map(l => ({ letter: l, items: map.get(l) }));
rebuildIndexList(); rebuildIndexList();
if(patientList.value.length > 4000){
loadFinish.value = true;
setTimeout(() => {
uni.hideLoading();
}, 10000);
}else{
uni.hideLoading();
loadFinish.value = true;
}
}; };
// //
const applyList = ref([]); const applyList = ref([]);
const hasNewPatient = computed(() => applyList.value.length > 0);
// //
const isRefreshing = ref(false); const isRefreshing = ref(false);
@ -412,13 +468,6 @@
}); });
} }
}; };
const goBack = () => {
uni.reLaunch({
url: "/pages/index/index?from=push"
})
};
const patientListByGBK = async () => { const patientListByGBK = async () => {
const res = await api.patientListByGBK(); const res = await api.patientListByGBK();
@ -536,10 +585,20 @@
switch(tab) { switch(tab) {
case 'message': case 'message':
// - // -
getApplyList(); uni.sendNativeEvent('goPatientMsg', {
title.value = '患者消息'; msg: 'goPatientMsg'
},ret => {
console.log(ret);
})
// getApplyList();
// title.value = '';
break; break;
case 'list': case 'list':
uni.showLoading({
title: '加载中...',
mask: true
});
patientListByGBK();
title.value = '患者列表'; title.value = '患者列表';
// //
break; break;
@ -556,14 +615,14 @@
// //
const addNewPatient = () => { const addNewPatient = () => {
navTo({ navTo({
url: '/pages_app/myPatient/myPatient' url: '/pages_app/myPatient/myPatient?from=patientMsg'
}) })
}; };
// //
const managePatientGroups = () => { const managePatientGroups = () => {
navTo({ navTo({
url: '/pages_app/patientGroup/patientGroup' url: '/pages_app/patientGroup/patientGroup?from=patientMsg'
}) })
}; };
@ -582,7 +641,9 @@
url: '/pages_app/visit/visit?from=patientMsg' url: '/pages_app/visit/visit?from=patientMsg'
}); });
}; };
const goBack = () => {
plus.runtime.quit();
}
// //
const addSchedule = () => { const addSchedule = () => {
showAddMenuFlag.value = false; showAddMenuFlag.value = false;
@ -605,6 +666,7 @@
// //
onLoad((options) => { onLoad((options) => {
getNavHeight();
if(options.from == 'push'){ if(options.from == 'push'){
fromType.value='push'; fromType.value='push';
} }
@ -612,7 +674,15 @@
loadMessageList(); loadMessageList();
computeListHeight(); computeListHeight();
getApplyList(); getApplyList();
patientListByGBK();
if(options.type=='list'){
activeTab.value='list';
switchTab('list')
}
if(options.type=='plan'){
activeTab.value='plan';
switchTab('plan')
}
}); });
onShow(() => { onShow(() => {
@ -789,6 +859,13 @@
transition: color 0.3s; transition: color 0.3s;
} }
.tab-dot {
position: absolute;
top: 18rpx;
right: 28rpx;
}
&.active { &.active {
.tab-text { .tab-text {
color: #8B2316; color: #8B2316;
@ -809,18 +886,21 @@
// //
.patient-list { .patient-list {
// position: fixed;
width: 100%;
height:calc(100vh - 265rpx); margin-top:calc(var(--status-bar-height) + 44px);
height:calc(100vh - var(--status-bar-height) - 44px - 103rpx);
overflow-y: scroll; overflow-y: scroll;
display: flex; display: flex;
flex-direction:column; flex-direction:column;
background-color: #ffffff; background-color: #ffffff;
margin-top: 20rpx;
padding-bottom: 500rpx; bottom: 103rpx;
position: relative;
.listbox{ .listbox{
flex:1; flex:1;
padding-bottom: 100rpx;
} }
.groups-scroll { .groups-scroll {
display: none; display: none;
@ -1058,7 +1138,7 @@
/* 随访计划样式 */ /* 随访计划样式 */
.plan{ .plan{
position: fixed; position: fixed;
top: 180rpx; top:calc(var(--status-bar-height) + 44px);
left: 0; left: 0;
right: 0; right: 0;
bottom:110rpx; bottom:110rpx;

View File

@ -1,16 +1,20 @@
<template> <template>
<view class="remark-page"> <view class="remark-page">
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="设置备注和分组" title="设置备注和分组"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
/> />
<view class="form-block"> </view>
<view class="contentbox">
<view class="form-block">
<view class="label">备注</view> <view class="label">备注</view>
<input class="input" v-model.trim="remark" :placeholder="groupInfo.nickname || '给患者添加备注名'" placeholder-class="ph" maxlength="20"/> <input class="input" v-model.trim="remark" :placeholder="groupInfo.nickname || '给患者添加备注名'" placeholder-class="ph" maxlength="20"/>
</view> </view>
@ -25,6 +29,7 @@
<view class="label">描述</view> <view class="label">描述</view>
<textarea class="textarea" v-model.trim="note" :placeholder="groupInfo.note || '补充患者关键信息,方便随访患者'" placeholder-class="ph" auto-height maxlength="140"/> <textarea class="textarea" v-model.trim="note" :placeholder="groupInfo.note || '补充患者关键信息,方便随访患者'" placeholder-class="ph" auto-height maxlength="140"/>
</view> </view>
</view>
<view class="bottom-bar"> <view class="bottom-bar">
<button class="save-btn" @click="updateNicknameNote">保存</button> <button class="save-btn" @click="updateNicknameNote">保存</button>
@ -98,8 +103,11 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.contentbox{
margin-top: calc(var(--status-bar-height) + 44px);
}
.remark-page{ .remark-page{
min-height: 100vh; height: 100vh;
background: #f7f7f7; background: #f7f7f7;
padding-bottom: 140rpx; padding-bottom: 140rpx;
} }

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="setting-page"> <view class="setting-page">
<uni-nav-bar <navBar :title="'常用设置'"></navBar>
<!-- <uni-nav-bar
left-icon="left" left-icon="left"
title="常用设置" title="常用设置"
@clickLeft="goBack" @clickLeft="goBack"
@ -11,7 +12,7 @@
backgroundColor="#eee" backgroundColor="#eee"
> >
</uni-nav-bar> </uni-nav-bar> -->
<view class="list-block"> <view class="list-block">
<view class="cell" @click="goRemark"> <view class="cell" @click="goRemark">
@ -65,6 +66,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import navTo from '@/utils/navTo.js' import navTo from '@/utils/navTo.js'
import { onLoad, onShow } from '@dcloudio/uni-app' import { onLoad, onShow } from '@dcloudio/uni-app'
import navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api.js' import api from '@/api/api.js'
import unidialog from '@/components/dialog/dialog.vue' import unidialog from '@/components/dialog/dialog.vue'
const patientUuid = ref('') const patientUuid = ref('')
@ -137,7 +139,11 @@
background:#f7f7f7; background:#f7f7f7;
} }
.list-block{ .list-block{
margin-top: 20rpx; position: fixed;
top: calc(var(--status-bar-height) + 44px);
left: 0;
right: 0;
bottom: 0;
background: #fff; background: #fff;
.cell{ .cell{
display: flex; display: flex;

View File

@ -113,10 +113,21 @@
</view> </view>
<unidialog <unidialog
:visible="pptVisible" :visible="pptVisible"
:content="pptContent" :showCancel="false"
:showConfirm="true"
:confirmText="'知道了'"
@close="pptVisible=false" @close="pptVisible=false"
@confirm="pptConfirm" @confirm="pptConfirm"
></unidialog> >
<template v-slot:content>
<view class="ppt-content">
<image :src="contactImg" width="80rpx" height="80rpx" class="contact-img" @longpress.stop.prevent="saveContactImgToAlbum"></image>
<view class="ppt-content-title">
<text style="color:#666">APP下载课件为pdf格式扫码联系平台文献助手获取原版PPT</text>
</view>
</view>
</template>
</unidialog>
</template> </template>
<script setup> <script setup>
@ -132,6 +143,7 @@
import downLoadImg from "@/static/wdxz.png" import downLoadImg from "@/static/wdxz.png"
import pptImg from "@/static/pdf.png" import pptImg from "@/static/pdf.png"
import wordImg from "@/static/word.png" import wordImg from "@/static/word.png"
import contactImg from "@/static/contact.png"
import api from '@/api/api.js'; import api from '@/api/api.js';
import navTo from '@/utils/navTo.js'; import navTo from '@/utils/navTo.js';
const isFilterActive=ref(false) const isFilterActive=ref(false)
@ -148,8 +160,51 @@
const pageSize = ref(10); const pageSize = ref(10);
const pptConfirm=()=>{ const pptConfirm=()=>{
pptVisible.value=false; pptVisible.value=false;
feedBack(); //feedBack();
} }
const saveContactImgToAlbum = () => {
uni.getImageInfo({
src: contactImg,
success: (imgRes) => {
uni.saveImageToPhotosAlbum({
filePath: imgRes.path,
success: () => {
uni.showToast({
title: '图片已保存到相册',
icon: 'none'
});
},
fail: (err) => {
const errMsg = (err && err.errMsg) || '';
if (errMsg.includes('auth deny') || errMsg.includes('authorize no response') || errMsg.includes('denied')) {
uni.showModal({
title: '提示',
content: '请先在系统设置中允许访问相册',
showCancel: true,
confirmText: '去设置',
success: (res) => {
if (res.confirm) {
uni.openSetting();
}
}
});
return;
}
uni.showToast({
title: '保存失败,请稍后重试',
icon: 'none'
});
}
});
},
fail: () => {
uni.showToast({
title: '图片读取失败',
icon: 'none'
});
}
});
}
// //
const coursewareList = ref([]); const coursewareList = ref([]);
@ -512,6 +567,12 @@
$submit-btn-color: #20b2aa; $submit-btn-color: #20b2aa;
$theme-color: #8B2316; $theme-color: #8B2316;
$white: #fff; $white: #fff;
.contact-img{
width: 280rpx;
height: 280rpx;
margin: 0 auto;
display: block;
}
// //
@mixin flex-center { @mixin flex-center {
display: flex; display: flex;

View File

@ -109,6 +109,24 @@
@close="freeClose" @close="freeClose"
@confirm="freeConfirm" @confirm="freeConfirm"
></unidialog> ></unidialog>
<!-- 下载课件弹窗 App 端使用组件App 端使用原生弹窗 -->
<!-- #ifndef APP-PLUS -->
<unidialog
:visible="pptVisible"
@close="closePptDownloadTip"
@confirm="closePptDownloadTip"
>
<template v-slot:content>
<view class="ppt-content">
<image :src="contactImg" width="80rpx" height="80rpx" class="contact-img"></image>
<view class="ppt-content-title">
<text>APP下载课件为pdf格式扫码联系平台文献助手获取原版PPT</text>
</view>
</view>
</template>
</unidialog>
<!-- #endif -->
</template> </template>
<script setup> <script setup>
@ -125,6 +143,7 @@ import friendImg from "@/static/share_wxc.png";
import logoImg from "@/static/weiboShare.png"; import logoImg from "@/static/weiboShare.png";
import downloadStore from "@/store/downloadStorePpt.js"; import downloadStore from "@/store/downloadStorePpt.js";
import unidialog from "@/components/dialog/dialog.vue"; import unidialog from "@/components/dialog/dialog.vue";
import contactImg from "@/static/contact.png"
import downloadImg from "@/static/ppt_dw.png"; import downloadImg from "@/static/ppt_dw.png";
const freeVisible = ref(false); const freeVisible = ref(false);
const freeContent = ref(''); const freeContent = ref('');
@ -136,10 +155,321 @@ import isAndroid from "@/utils/platform.js";
const isFirstDownload = ref(false); const isFirstDownload = ref(false);
const path=ref(''); const path=ref('');
const from=ref(''); const from=ref('');
const pptVisible = ref(false);
const nativeDownloadMaskView = ref(null);
const nativeDownloadPopupView = ref(null);
const nativeDownloadPopupShowing = ref(false);
const nativeDownloadPopupInfo = ref({
screenW: 0,
screenH: 0,
dialogW: 0,
dialogH: 0,
dialogLeft: 0,
dialogTop: 0,
imageTop: 0,
imageLeft: 0,
imageSize: 0,
buttonTop: 0,
buttonH: 0
});
let downloadLongPressTimer = null;
let downloadLongPressTriggered = false;
const showPptDownloadTip = () => {
// #ifdef APP-PLUS
showNativeDownloadPopup();
// #endif
// #ifndef APP-PLUS
pptVisible.value = true;
// #endif
};
const closePptDownloadTip = () => {
// #ifdef APP-PLUS
closeNativeDownloadPopup();
// #endif
// #ifndef APP-PLUS
pptVisible.value = false;
// #endif
};
const freeConfirm = () => { const freeConfirm = () => {
freeVisible.value = false; freeVisible.value = false;
downloadGanDanFile(); downloadGanDanFile();
}; };
const clearDownloadLongPressTimer = () => {
if (downloadLongPressTimer) {
clearTimeout(downloadLongPressTimer);
downloadLongPressTimer = null;
}
};
const getDownloadRelativePoint = (e, info) => {
let x = 0;
let y = 0;
if (e.clientX !== undefined && e.clientY !== undefined) {
x = e.clientX;
y = e.clientY;
} else if (e.pageX !== undefined && e.pageY !== undefined) {
x = e.pageX;
y = e.pageY;
} else if (e.touches && e.touches.length > 0) {
x = e.touches[0].clientX || e.touches[0].pageX || 0;
y = e.touches[0].clientY || e.touches[0].pageY || 0;
} else if (e.changedTouches && e.changedTouches.length > 0) {
x = e.changedTouches[0].clientX || e.changedTouches[0].pageX || 0;
y = e.changedTouches[0].clientY || e.changedTouches[0].pageY || 0;
}
if (!x || !y) return null;
let relativeX = x;
let relativeY = y;
// /
if (!(x >= 0 && x <= info.dialogW && y >= 0 && y <= info.dialogH)) {
relativeX = x - info.dialogLeft;
relativeY = y - info.dialogTop;
}
if (relativeX < 0 || relativeX > info.dialogW || relativeY < 0 || relativeY > info.dialogH) {
return null;
}
return { relativeX, relativeY };
};
const isPointInDownloadImageArea = (point, info) => {
if (!point) return false;
const { relativeX, relativeY } = point;
return relativeX >= info.imageLeft &&
relativeX <= info.imageLeft + info.imageSize &&
relativeY >= info.imageTop &&
relativeY <= info.imageTop + info.imageSize;
};
const saveNativePopupImageToAlbum = () => {
// #ifdef APP-PLUS
try {
const localPath = plus.io.convertLocalFileSystemURL('_www/static/contact.png') || '_www/static/contact.png';
uni.saveImageToPhotosAlbum({
filePath: localPath,
success: () => {
uni.showToast({
title: '图片已保存到相册',
icon: 'none'
});
},
fail: (err) => {
const errMsg = (err && err.errMsg) || '';
if (errMsg.includes('auth deny') || errMsg.includes('authorize no response') || errMsg.includes('denied')) {
uni.showModal({
title: '提示',
content: '请先在系统设置中允许访问相册',
showCancel: true,
confirmText: '去设置',
success: (res) => {
if (res.confirm) {
uni.openSetting();
}
}
});
return;
}
uni.showToast({
title: '保存失败,请稍后重试',
icon: 'none'
});
}
});
} catch (e) {
uni.showToast({
title: '保存失败,请稍后重试',
icon: 'none'
});
}
// #endif
};
function createNativeDownloadPopup() {
// #ifdef APP-PLUS
if (nativeDownloadMaskView.value || nativeDownloadPopupView.value) return;
const screenW = plus.screen.resolutionWidth;
const screenH = plus.screen.resolutionHeight;
const dialogW = uni.upx2px(620);
const dialogH = uni.upx2px(660);
const dialogLeft = Math.round((screenW - dialogW) / 2);
const dialogTop = Math.round((screenH - dialogH) / 2);
const buttonH = uni.upx2px(96);
const buttonTop = dialogH - buttonH;
const titleTop = uni.upx2px(46);
const imageSize = uni.upx2px(280);
const imageTop = titleTop + uni.upx2px(72);
const imageLeft = Math.round((dialogW - imageSize) / 2);
const textTop = imageTop + imageSize + uni.upx2px(36);
nativeDownloadPopupInfo.value = {
screenW,
screenH,
dialogW,
dialogH,
dialogLeft,
dialogTop,
imageTop,
imageLeft,
imageSize,
buttonTop,
buttonH
};
nativeDownloadMaskView.value = new plus.nativeObj.View('native-download-mask', {
left: '0px',
top: '0px',
width: screenW + 'px',
height: screenH + 'px',
zindex: 99996,
touchable: true,
interceptTouchEvent: true
}, [
{ tag: 'rect', id: 'mask', position: { left: '0px', top: '0px', width: screenW + 'px', height: screenH + 'px' }, color: 'rgba(0,0,0,0.5)' }
]);
nativeDownloadPopupView.value = new plus.nativeObj.View('native-download-panel', {
left: dialogLeft + 'px',
top: dialogTop + 'px',
width: dialogW + 'px',
height: dialogH + 'px',
zindex: 99997,
touchable: true,
interceptTouchEvent: true
}, []);
nativeDownloadPopupView.value.drawRect({
color: '#FFFFFF',
radius: uni.upx2px(24)
}, {
left: '0px',
top: '0px',
width: dialogW + 'px',
height: dialogH + 'px'
});
nativeDownloadPopupView.value.drawText('温馨提示', {
left: '0px',
top: titleTop + 'px',
width: dialogW + 'px',
height: uni.upx2px(56) + 'px'
}, {
size: uni.upx2px(34) + 'px',
color: '#8B2316',
align: 'center',
verticalAlign: 'middle',
weight: '500'
});
try {
nativeDownloadPopupView.value.drawBitmap('_www/static/contact.png', {}, {
left: imageLeft + 'px',
top: imageTop + 'px',
width: imageSize + 'px',
height: imageSize + 'px'
});
} catch (e) {}
nativeDownloadPopupView.value.drawText('APP下载课件为pdf格式扫码联系', {
left: uni.upx2px(60) + 'px',
top: textTop + 'px',
width: (dialogW - uni.upx2px(120)) + 'px',
height: uni.upx2px(44) + 'px'
}, {
size: uni.upx2px(28) + 'px',
color: '#666666',
align: 'center',
verticalAlign: 'middle'
});
nativeDownloadPopupView.value.drawText('平台文献助手获取原版PPT。', {
left: uni.upx2px(60) + 'px',
top: (textTop + uni.upx2px(48)) + 'px',
width: (dialogW - uni.upx2px(120)) + 'px',
height: uni.upx2px(44) + 'px'
}, {
size: uni.upx2px(28) + 'px',
color: '#666666',
align: 'center',
verticalAlign: 'middle'
});
nativeDownloadPopupView.value.drawRect({ color: '#F0F0F0' }, {
left: '0px',
top: (buttonTop - 1) + 'px',
width: dialogW + 'px',
height: '1px'
});
nativeDownloadPopupView.value.drawText('知道了', {
left: '0px',
top: buttonTop + 'px',
width: dialogW + 'px',
height: buttonH + 'px'
}, {
size: uni.upx2px(32) + 'px',
color: '#000',
align: 'center',
verticalAlign: 'middle',
weight: '500'
});
const handleDownloadMaskClick = () => {
clearDownloadLongPressTimer();
closeNativeDownloadPopup();
};
const handleDownloadPanelTouchStart = (e) => {
const info = nativeDownloadPopupInfo.value;
const point = getDownloadRelativePoint(e, info);
clearDownloadLongPressTimer();
downloadLongPressTriggered = false;
if (!isPointInDownloadImageArea(point, info)) return;
downloadLongPressTimer = setTimeout(() => {
downloadLongPressTriggered = true;
saveNativePopupImageToAlbum();
}, 600);
};
const handleDownloadPanelTouchEnd = () => {
clearDownloadLongPressTimer();
};
const handleDownloadPanelClick = (e) => {
const info = nativeDownloadPopupInfo.value;
const point = getDownloadRelativePoint(e, info);
if (!point) return;
if (downloadLongPressTriggered) {
downloadLongPressTriggered = false;
return;
}
const { relativeY } = point;
if (relativeY >= info.buttonTop) {
closeNativeDownloadPopup();
}
};
nativeDownloadMaskView.value.addEventListener('click', handleDownloadMaskClick, false);
nativeDownloadMaskView.value.addEventListener('touchstart', handleDownloadMaskClick, false);
nativeDownloadPopupView.value.addEventListener('click', handleDownloadPanelClick, false);
nativeDownloadPopupView.value.addEventListener('touchstart', handleDownloadPanelTouchStart, false);
nativeDownloadPopupView.value.addEventListener('touchend', handleDownloadPanelTouchEnd, false);
nativeDownloadPopupView.value.addEventListener('touchcancel', handleDownloadPanelTouchEnd, false);
// #endif
}
function showNativeDownloadPopup() {
// #ifdef APP-PLUS
if (nativeDownloadPopupShowing.value) return;
if (!nativeDownloadMaskView.value || !nativeDownloadPopupView.value) {
createNativeDownloadPopup();
}
nativeDownloadMaskView.value && nativeDownloadMaskView.value.show();
nativeDownloadPopupView.value && nativeDownloadPopupView.value.show();
nativeDownloadPopupShowing.value = true;
// #endif
}
function closeNativeDownloadPopup() {
// #ifdef APP-PLUS
if (!nativeDownloadPopupShowing.value) return;
nativeDownloadMaskView.value && nativeDownloadMaskView.value.hide();
nativeDownloadPopupView.value && nativeDownloadPopupView.value.hide();
nativeDownloadPopupShowing.value = false;
// #endif
}
// //
const removeTask = (index) => { const removeTask = (index) => {
@ -239,7 +569,9 @@ onLoad((options) => {
path.value =decodeURIComponent(options.src); path.value =decodeURIComponent(options.src);
from.value = options.from; from.value = options.from;
checkUser(options); checkUser(options);
//showNativeDownloadPopup();
//ganDanFileDetials(); //ganDanFileDetials();
}); });
onUnload(() => { onUnload(() => {
uni.$off('paySuccess'); uni.$off('paySuccess');
@ -269,6 +601,7 @@ onShow(() => {
downLoadStatus.value = 'completed'; downLoadStatus.value = 'completed';
}else if(downloadTasks.value[i].status == 'downloading') { }else if(downloadTasks.value[i].status == 'downloading') {
downLoadStatus.value = 'loading'; downLoadStatus.value = 'loading';
//showPptDownloadTip();
}else if(downloadTasks.value[i].status == 'paused') { }else if(downloadTasks.value[i].status == 'paused') {
downLoadStatus.value = 'paused'; downLoadStatus.value = 'paused';
}else if(downloadTasks.value[i].status == 'failed') { }else if(downloadTasks.value[i].status == 'failed') {
@ -742,10 +1075,12 @@ const createGanDanFileOrder=()=>{
}) })
}; };
const downLoadByType=()=>{ const downLoadByType=()=>{
if(orderInfo.value.price==0){ if(orderInfo.value.price==0){
downloadGanDanFile('free'); downloadGanDanFile('free');
}else if(orderInfo.value.price>0){ }else if(orderInfo.value.price>0){
if(orderInfo.value.welfareNum>0){ if(orderInfo.value.welfareNum>0){
//freeVisible.value = true; //freeVisible.value = true;
freeContent.value = '您还有'+orderInfo.value.welfareNum+'次免费下载机会,希望本次下载免费吗?'; freeContent.value = '您还有'+orderInfo.value.welfareNum+'次免费下载机会,希望本次下载免费吗?';
uni.showModal({ uni.showModal({
@ -790,6 +1125,7 @@ const downLoadByType=()=>{
} }
} }
const downloadGanDanFile = (type) => { const downloadGanDanFile = (type) => {
showPptDownloadTip();
let order_id=''; let order_id='';
if(type=='free'){ if(type=='free'){
order_id='FREE'; order_id='FREE';
@ -1020,6 +1356,7 @@ const startDownload = (index) => {
if (!taskItem) return; if (!taskItem) return;
hasDownload.value = true; hasDownload.value = true;
downLoadStatus.value = 'loading'; downLoadStatus.value = 'loading';
//showPptDownloadTip();
const task = uni.downloadFile({ const task = uni.downloadFile({
url: taskItem.url, url: taskItem.url,
success: (res1) => { success: (res1) => {
@ -1243,11 +1580,14 @@ const shareToMoments = () => {
// / // /
onHide(() => { onHide(() => {
// #ifdef APP-PLUS // #ifdef APP-PLUS
clearDownloadLongPressTimer();
closeNativePopup(); closeNativePopup();
closeNativeDownloadPopup();
// #endif // #endif
}); });
onUnload(() => { onUnload(() => {
// #ifdef APP-PLUS // #ifdef APP-PLUS
clearDownloadLongPressTimer();
try{ try{
nativeMaskView.value && nativeMaskView.value.close && nativeMaskView.value.close(); nativeMaskView.value && nativeMaskView.value.close && nativeMaskView.value.close();
nativePopupView.value && nativePopupView.value.close && nativePopupView.value.close(); nativePopupView.value && nativePopupView.value.close && nativePopupView.value.close();
@ -1255,6 +1595,13 @@ onUnload(() => {
nativeMaskView.value = null; nativeMaskView.value = null;
nativePopupView.value = null; nativePopupView.value = null;
popupShowing.value = false; popupShowing.value = false;
try{
nativeDownloadMaskView.value && nativeDownloadMaskView.value.close && nativeDownloadMaskView.value.close();
nativeDownloadPopupView.value && nativeDownloadPopupView.value.close && nativeDownloadPopupView.value.close();
}catch(e){}
nativeDownloadMaskView.value = null;
nativeDownloadPopupView.value = null;
nativeDownloadPopupShowing.value = false;
// #endif // #endif
}); });
</script> </script>
@ -1289,7 +1636,12 @@ onUnload(() => {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.contact-img{
width: 280rpx;
height: 280rpx;
margin: 0 auto;
display: block;
}
.download-bar { .download-bar {
position: fixed; position: fixed;
top:calc(var(--status-bar-height) + 44px); top:calc(var(--status-bar-height) + 44px);

View File

@ -1,13 +1,15 @@
<template> <template>
<view class="content"> <view class="content">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="添加日程" title="添加日程"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -17,6 +19,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
<view class="main-content"> <view class="main-content">
@ -296,8 +299,13 @@
/* 主要内容区域 */ /* 主要内容区域 */
.main-content { .main-content {
position: fixed;
top: calc(var(--status-bar-height) + 44px);
left: 0;
right: 0;
bottom: 0;
margin-top: 20rpx; // margin-top: 20rpx;
} }
/* 表单区域样式 */ /* 表单区域样式 */

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="select-page"> <view class="select-page">
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="选择患者" title="选择患者"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -16,6 +16,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-bar"> <view class="search-bar">
@ -51,22 +52,32 @@
const selectedIds = ref([]) const selectedIds = ref([])
const patientList = ref([]) const patientList = ref([])
const selectedDetail = ref([]) const selectedDetail = ref([])
const availablePatientList = ref([])
// //
const availablePatientList = computed(() => { // const availablePatientList = computed(() => {
return patientList.value // return patientList.value
}) // })
const patientListByGBK = async () => { const patientListByGBK = async () => {
const res = await api.patientListByGBK(); const res = await api.patientListByGBK();
if(res.code == 1){ if(res.code == 1){
patientList.value = res.data; patientList.value = res.data;
availablePatientList.value = res.data;
if(res.data.length > 1000){
setTimeout(() => {
uni.hideLoading();
}, 5000);
}else{
uni.hideLoading();
}
} }
}; };
onLoad((options) => { onLoad((options) => {
uni.showLoading({
title: '加载中...',
mask: true
})
if(options.from == 'chatMsg'){ if(options.from == 'chatMsg'){
from.value = 'chatMsg'; from.value = 'chatMsg';
} }
@ -79,9 +90,11 @@
uni.removeStorageSync('preSelectedIds') uni.removeStorageSync('preSelectedIds')
} }
} catch (e) {} } catch (e) {}
patientListByGBK();
}) })
onShow(() => { onShow(() => {
patientListByGBK();
// IDselectedDetail // IDselectedDetail
updateSelectedDetail(); updateSelectedDetail();
}); });
@ -112,7 +125,12 @@
} }
const onSearch = () => { const onSearch = () => {
patientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1) if(keyword.value.replace(/\s/g, "")){
availablePatientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
}else{
availablePatientList.value = patientList.value
}
} }
const goBack = () => uni.navigateBack() const goBack = () => uni.navigateBack()
const confirmSelect = () => { const confirmSelect = () => {
@ -143,14 +161,17 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.select-page{ .select-page{
min-height: 100vh; background:#fefefe; min-height: 100vh; background:#fefefe;overflow: hidden;
} }
.confirm-text{ color:#fff; font-size: 28rpx;white-space: nowrap; } .confirm-text{ color:#fff; font-size: 28rpx;white-space: nowrap; }
.confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; } .confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; }
.confirm-btn.active{ background:#8B2316; } .confirm-btn.active{ background:#8B2316; }
.search-bar{ .search-bar{
border: 2rpx solid #eee; border: 2rpx solid #eee;
margin: 20rpx 30rpx; display:flex; align-items:center; gap: 16rpx; margin: 0rpx 30rpx; display:flex;
margin-top: calc(var(--status-bar-height) + 64px);
align-items:center; gap: 16rpx;
.input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; } .input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; }
.search-input{ font-size: 28rpx; color:#333; } .search-input{ font-size: 28rpx; color:#333; }
.ph{ color:#bfbfbf; } .ph{ color:#bfbfbf; }

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="select-page"> <view class="select-page">
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="选择患者" title="选择患者"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -16,6 +16,7 @@
</view> </view>
</template> --> </template> -->
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-bar"> <view class="search-bar">
@ -50,22 +51,32 @@
const selectedIds = ref([]) const selectedIds = ref([])
const patientList = ref([]) const patientList = ref([])
const selectedDetail = ref([]) const selectedDetail = ref([])
const availablePatientList = ref([])
// //
const availablePatientList = computed(() => { // const availablePatientList = computed(() => {
return patientList.value // return patientList.value
}) // })
const patientListByGBK = async () => { const patientListByGBK = async () => {
const res = await api.patientListByGBK(); const res = await api.patientListByGBK();
if(res.code == 1){ if(res.code == 1){
patientList.value = res.data; patientList.value = res.data;
availablePatientList.value = res.data;
if(res.data.length > 1000){
setTimeout(() => {
uni.hideLoading();
}, 5000);
}else{
uni.hideLoading();
}
} }
}; };
onLoad(() => { onLoad(() => {
uni.showLoading({
title: '加载中...',
mask: true
})
// ID // ID
try { try {
const preSelected = uni.getStorageSync('preSelectedIds') const preSelected = uni.getStorageSync('preSelectedIds')
@ -75,9 +86,10 @@
uni.removeStorageSync('preSelectedIds') uni.removeStorageSync('preSelectedIds')
} }
} catch (e) {} } catch (e) {}
patientListByGBK();
}) })
onShow(() => { onShow(() => {
patientListByGBK();
// IDselectedDetail // IDselectedDetail
updateSelectedDetail(); updateSelectedDetail();
}); });
@ -115,7 +127,12 @@
} }
const onSearch = () => { const onSearch = () => {
patientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1) if(keyword.value.replace(/\s/g, "")){
availablePatientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
}else{
availablePatientList.value = patientList.value
}
//patientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
} }
const goBack = () => uni.navigateBack() const goBack = () => uni.navigateBack()
const confirmSelect = (id) => { const confirmSelect = (id) => {
@ -135,14 +152,16 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.select-page{ .select-page{
min-height: 100vh; background:#fefefe; min-height: 100vh; background:#fefefe;overflow: hidden;
} }
.confirm-text{ color:#fff; font-size: 28rpx;white-space: nowrap; } .confirm-text{ color:#fff; font-size: 28rpx;white-space: nowrap; }
.confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; } .confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; }
.confirm-btn.active{ background:#8B2316; } .confirm-btn.active{ background:#8B2316; }
.search-bar{ .search-bar{
border: 2rpx solid #eee; border: 2rpx solid #eee;
margin: 20rpx 30rpx; display:flex; align-items:center; gap: 16rpx; margin: 20rpx 30rpx;
margin-top: calc(var(--status-bar-height) + 64px);
display:flex; align-items:center; gap: 16rpx;
.input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; } .input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; }
.search-input{ font-size: 28rpx; color:#333; } .search-input{ font-size: 28rpx; color:#333; }
.ph{ color:#bfbfbf; } .ph{ color:#bfbfbf; }

View File

@ -3,7 +3,7 @@
<view class="status_bar"></view> <view class="status_bar"></view>
<uni-nav-bar <uni-nav-bar
left-icon="left" left-icon="left"
title="肝胆视频" title="肝胆视频1"
@clickLeft="goBack" @clickLeft="goBack"
color="#8B2316" color="#8B2316"
:border="false" :border="false"

View File

@ -1,13 +1,15 @@
<template> <template>
<view class="content"> <view class="content">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="添加随访计划" title="添加随访计划"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -17,6 +19,8 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- -->
<!-- 患者选择 --> <!-- 患者选择 -->
<view class="form-section" @click="selectPatient"> <view class="form-section" @click="selectPatient">
@ -140,8 +144,9 @@
show.value=false; show.value=false;
} }
const goVisitNote=(idx,note)=>{ const goVisitNote=(idx,note)=>{
let name=patientName.value?encodeURIComponent(patientName.value):'';
navTo({ navTo({
url: '/pages_app/visitNote/visitNote?idx='+idx+'&note='+encodeURIComponent(note)+'&patient_name='+encodeURIComponent(patientName.value), url: '/pages_app/visitNote/visitNote?idx='+idx+'&note='+encodeURIComponent(note)+'&patient_name='+encodeURIComponent(name),
events: { events: {
onVisitNoteSubmit: ({ note, idx }) => { onVisitNoteSubmit: ({ note, idx }) => {
console.log('onVisitNoteSubmit', note, idx) console.log('onVisitNoteSubmit', note, idx)
@ -216,7 +221,7 @@
if (!isNaN(parsed.getTime())) baseDate = parsed; if (!isNaN(parsed.getTime())) baseDate = parsed;
} }
const nextDate = addMonths(baseDate, 3); const nextDate = addMonths(baseDate, 3);
visits.value.push({ id, date: formatDate(nextDate) }); visits.value.push({ id, date: formatDate(nextDate),note:defaultContent });
// //
nextTick(()=>{ scrollIntoViewId.value = `visit-${id}`; }); nextTick(()=>{ scrollIntoViewId.value = `visit-${id}`; });
}; };
@ -317,7 +322,8 @@
.submit-text { font-size: 32rpx; color: #8B2316; font-weight: 500; } .submit-text { font-size: 32rpx; color: #8B2316; font-weight: 500; }
.form-section { .form-section {
margin-top: 20rpx; margin-top: calc(var(--status-bar-height) + 44px);
// margin-top: 20rpx;
display: flex; align-items: center; justify-content: space-between; display: flex; align-items: center; justify-content: space-between;
padding: 30rpx; background: #ffffff; border-bottom: 1rpx solid #f0f0f0; padding: 30rpx; background: #ffffff; border-bottom: 1rpx solid #f0f0f0;
.section-label { width: 160rpx; flex-shrink: 0; } .section-label { width: 160rpx; flex-shrink: 0; }

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="visit-note-page"> <view class="visit-note-page">
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="添加随访计划" title="添加随访计划"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -16,11 +16,13 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 患者行 --> <view class="contentbox">
<!-- 患者行 -->
<view class="row" @click="noop"> <view class="row" @click="noop">
<text class="row-label">患者</text> <text class="row-label">患者</text>
<text class="row-value">{{ patientName }}</text> <text class="row-value">{{ patientName?patientName:'' }}</text>
</view> </view>
<!-- 标题栏 --> <!-- 标题栏 -->
@ -30,6 +32,7 @@
<view class="note-box"> <view class="note-box">
<textarea class="note-textarea" v-model.trim="note" placeholder="请填写随访内容" auto-height :maxlength="200" /> <textarea class="note-textarea" v-model.trim="note" placeholder="请填写随访内容" auto-height :maxlength="200" />
</view> </view>
</view>
</view> </view>
</template> </template>
@ -41,7 +44,9 @@
const note = ref('请近日来医院复诊、复查') const note = ref('请近日来医院复诊、复查')
const idx = ref(0) const idx = ref(0)
onLoad((options) => { onLoad((options) => {
patientName.value =decodeURIComponent( options?.patient_name ) console.log(options.patient_name==undefined)
patientName.value =options.patient_name ?decodeURIComponent(options.patient_name):'';
console.log(patientName.value)
if (options?.note) note.value = decodeURIComponent(options.note) if (options?.note) note.value = decodeURIComponent(options.note)
if (options?.idx) idx.value = options.idx if (options?.idx) idx.value = options.idx
@ -62,6 +67,9 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.contentbox{
margin-top: calc(var(--status-bar-height) + 44px);
}
.visit-note-page{ .visit-note-page{
min-height: 100vh; background:#f5f5f5; min-height: 100vh; background:#f5f5f5;
} }
@ -78,7 +86,7 @@
.note-box{ background:#fff; padding: 20rpx 24rpx; } .note-box{ background:#fff; padding: 20rpx 24rpx; }
.note-textarea{ .note-textarea{
width: 100%; min-height: 260rpx; background:#e5e5e5; border-radius: 0; padding: 20rpx; font-size: 32rpx; color:#111; box-sizing: border-box;width: 100%; min-height: 260rpx; background:#e5e5e5; border-radius: 0; padding: 20rpx; font-size: 32rpx; color:#111;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -100,13 +100,21 @@ const addNew = () => {
} }
.list-container { .list-container {
padding: 24rpx; top: calc(var(--status-bar-height) + 54px);
width: 100%;
bottom: 120rpx;
left: 0rpc;
right: 0rpx;
overflow-y: scroll;
position: fixed;
} }
.card { .card {
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
margin: 0 30rpx 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04); box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
} }

File diff suppressed because it is too large Load Diff

View File

@ -361,8 +361,8 @@ const patientListByGBK = async () => {
}; };
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
conversationType: V2NIMConst.V2NIMConversationType conversationType?: V2NIMConst.V2NIMConversationType
to: string to?: string
isGroupSend?: boolean isGroupSend?: boolean
replyMsgsMap?: { replyMsgsMap?: {
[key: string]: V2NIMMessageForUI [key: string]: V2NIMMessageForUI
@ -371,12 +371,25 @@ const props = withDefaults(
{} {}
) )
const emits = defineEmits(['send']) const emits = defineEmits(['send'])
/** 会话ID */ /** 会话ID群发场景可不传 to / conversationType */
const conversationId = const getConversationId = () => {
props.conversationType === if (!props.to || props.conversationType === undefined) return ''
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P return props.conversationType ===
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P
? uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(props.to) ? uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(props.to)
: uni.$UIKitNIM.V2NIMConversationIdUtil.teamConversationId(props.to) : uni.$UIKitNIM.V2NIMConversationIdUtil.teamConversationId(props.to)
}
const ensureConversationId = () => {
const cid = getConversationId()
if (!cid) {
uni.showToast({
title: '会话信息缺失',
icon: 'none',
})
return ''
}
return cid
}
/** 输入框内容 */ /** 输入框内容 */
const inputText = ref('') const inputText = ref('')
@ -643,7 +656,7 @@ const handleSendTextMsg = (type:string) => {
const ext = onAtMembersExtHandler() const ext = onAtMembersExtHandler()
let mallText='纽娃复合营养素固体饮料主要成分是:蜂花粉、乳清蛋白粉、灰树花粉、低聚木糖、蚕蛹氨基酸、麦芽粉、薏苡仁粉、烟酸、磷脂,以及其他调味品、辅助原料。科学配比制成,含有丰富的蛋白质、氨基酸、维生素、微量元素及其他营养元素,点击链接了解详情。' let mallText='纽娃复合营养素固体饮料主要成分是:蜂花粉、乳清蛋白粉、灰树花粉、低聚木糖、蚕蛹氨基酸、麦芽粉、薏苡仁粉、烟酸、磷脂,以及其他调味品、辅助原料。科学配比制成,含有丰富的蛋白质、氨基酸、维生素、微量元素及其他营养元素,点击链接了解详情。'
let text = type==='mall'?mallText:replaceEmoji(inputText.value) let text = type==='mall'?mallText:replaceEmoji(inputText.value)
const textMsg = uni.$UIKitNIM.V2NIMMessageCreator.createTextMessage(text) //const textMsg = uni.$UIKitNIM.V2NIMMessageCreator.createTextMessage(text)
//let serverExtension={"gdxz_nickName":"","gdxz_sessionType":"general"}; //let serverExtension={"gdxz_nickName":"","gdxz_sessionType":"general"};
if(props.isGroupSend){ if(props.isGroupSend){
emits('send',{ emits('send',{
@ -655,7 +668,8 @@ const handleSendTextMsg = (type:string) => {
replyMsg.value = undefined replyMsg.value = undefined
selectedAtMembers.value = []; selectedAtMembers.value = [];
}else{ }else{
const conversationId = ensureConversationId()
if (!conversationId) return
uni.$UIKitStore.msgStore uni.$UIKitStore.msgStore
.sendMessageActive({ .sendMessageActive({
msg: textMsg as unknown as V2NIMMessage, msg: textMsg as unknown as V2NIMMessage,
@ -696,6 +710,8 @@ const handleSendFileMsg = () => {
// @ts-ignore // @ts-ignore
const fileName = res?.tempFiles?.[0]?.name const fileName = res?.tempFiles?.[0]?.name
if (filePath && fileName) { if (filePath && fileName) {
const conversationId = ensureConversationId()
if (!conversationId) return
const fileMsg = uni.$UIKitNIM.V2NIMMessageCreator.createFileMessage( const fileMsg = uni.$UIKitNIM.V2NIMMessageCreator.createFileMessage(
filePath, filePath,
fileName fileName
@ -797,9 +813,9 @@ const handleSendImageMsg = () => {
count: 1, count: 1,
sizeType: ['compressed'], sizeType: ['compressed'],
success: (res) => { success: (res) => {
const imgMsg = uni.$UIKitNIM.V2NIMMessageCreator.createImageMessage( // const imgMsg = uni.$UIKitNIM.V2NIMMessageCreator.createImageMessage(
res.tempFilePaths[0] // res.tempFilePaths[0]
) // )
if(props.isGroupSend){ if(props.isGroupSend){
const fileManager = uni.getFileSystemManager(); const fileManager = uni.getFileSystemManager();
fileManager.readFile({ fileManager.readFile({
@ -816,6 +832,8 @@ const handleSendImageMsg = () => {
} }
}) })
}else{ }else{
const conversationId = ensureConversationId()
if (!conversationId) return
uni.$UIKitStore.msgStore uni.$UIKitStore.msgStore
.sendMessageActive({ .sendMessageActive({
msg: imgMsg as unknown as V2NIMMessage, msg: imgMsg as unknown as V2NIMMessage,
@ -888,13 +906,15 @@ const senCustomMsg = (type:string) => {
text="[视频科普]"; text="[视频科普]";
rawStr=`{\"gdxz_content\":${content},\"gdxz_ext_data\":\"[视频科普]\",\"gdxz_id\":${id},\"gdxz_img\":\"http://doc.igandan.org/app/book/pdf/2019/20190613152617.png\",\"gdxz_title\":${title},\"gdxz_type\":\"[视频科普]\",\"gdxz_url\":${path}}` rawStr=`{\"gdxz_content\":${content},\"gdxz_ext_data\":\"[视频科普]\",\"gdxz_id\":${id},\"gdxz_img\":\"http://doc.igandan.org/app/book/pdf/2019/20190613152617.png\",\"gdxz_title\":${title},\"gdxz_type\":\"[视频科普]\",\"gdxz_url\":${path}}`
} }
const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(text,rawStr) //const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(text,rawStr)
if(props.isGroupSend){ if(props.isGroupSend){
emits('send',{ emits('send',{
content:msg_content, content:msg_content,
msg_type:msg_type, msg_type:msg_type,
}) })
}else{ }else{
const conversationId = ensureConversationId()
if (!conversationId) return
uni.$UIKitStore.msgStore uni.$UIKitStore.msgStore
.sendMessageActive({ .sendMessageActive({
msg: customMsg as unknown as V2NIMMessage, msg: customMsg as unknown as V2NIMMessage,
@ -959,6 +979,8 @@ const handleSendVideoMsg = (type: string, event: any) => {
compressed: true, compressed: true,
maxDuration: 60, maxDuration: 60,
success: (res) => { success: (res) => {
const conversationId = ensureConversationId()
if (!conversationId) return
const videoMsg = uni.$UIKitNIM.V2NIMMessageCreator.createVideoMessage( const videoMsg = uni.$UIKitNIM.V2NIMMessageCreator.createVideoMessage(
res.tempFilePath res.tempFilePath
) )
@ -990,6 +1012,8 @@ const handleSendVideoMsg = (type: string, event: any) => {
/** 发送语音消息 */ /** 发送语音消息 */
const handleSendAudioMsg = (filePath: string, duration: number) => { const handleSendAudioMsg = (filePath: string, duration: number) => {
const conversationId = ensureConversationId()
if (!conversationId) return
const audioMsg = const audioMsg =
uni.$UIKitNIM.V2NIMMessageCreator.createAudioMessage(filePath) uni.$UIKitNIM.V2NIMMessageCreator.createAudioMessage(filePath)

View File

@ -147,7 +147,7 @@ onLoad((options) => {
<style lang="scss" scoped> <style lang="scss" scoped>
.edit-address-page { min-height: 100vh; background: #fff; } .edit-address-page { min-height: 100vh; background: #fff; }
.form-container { padding: 24rpx; } .form-container { padding: 24rpx;margin-top: calc(var(--status-bar-height) + 44px); }
.form-item { display: flex; align-items: center; justify-content: space-between; padding: 24rpx 0; } .form-item { display: flex; align-items: center; justify-content: space-between; padding: 24rpx 0; }
.form-item.column { flex-direction: column; align-items: flex-start; } .form-item.column { flex-direction: column; align-items: flex-start; }

View File

@ -1,7 +1,22 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 顶部导航 --> <!-- 顶部导航 -->
<navBar title="群发消息" /> <!-- <navBar title="群发消息" /> -->
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="群发消息"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
</uni-nav-bar>
</view>
<!-- 下拉刷新和上拉加载容器 --> <!-- 下拉刷新和上拉加载容器 -->
<scroll-view <scroll-view
@ -32,6 +47,9 @@
<view class="line phone" v-if="item.msg_type==1"> <view class="line phone" v-if="item.msg_type==1">
{{ item.msg_content }} {{ item.msg_content }}
</view> </view>
<view class="line phone imgwrap" v-if="item.msg_type==2">
<image :src="getMsgImageUrl(item)" class="imgbox" mode="aspectFill" @click="previewMsgImage(item)"></image>
</view>
<view class="line phone" v-if="item.msg_type==3" @click="onDetail(item)"> <view class="line phone" v-if="item.msg_type==3" @click="onDetail(item)">
<view class="custom"> <view class="custom">
<view class="title">{{JSON.parse(item.msg_content).summary }}</view> <view class="title">{{JSON.parse(item.msg_content).summary }}</view>
@ -131,7 +149,7 @@
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import navBar from '@/components/navBar/navBar.vue' import navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api.js' import api from '@/api/api.js'
import { onShow } from '@dcloudio/uni-app' import { onShow,onBackPress,onLoad } from '@dcloudio/uni-app'
import docUrl from '@/utils/docUrl.js' import docUrl from '@/utils/docUrl.js'
import navTo from '@/utils/navTo.js' import navTo from '@/utils/navTo.js'
const currentTime = ref('') const currentTime = ref('')
@ -145,7 +163,25 @@ const refreshing=ref(false);
const loading=ref(false); const loading=ref(false);
const hasMore=ref(true); const hasMore=ref(true);
const pad = (n) => (n < 10 ? `0${n}` : `${n}`) const pad = (n) => (n < 10 ? `0${n}` : `${n}`)
const from = ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const goBack = () => {
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
// //
const formatTime = (dateStr) => { const formatTime = (dateStr) => {
if (!dateStr) return '' if (!dateStr) return ''
@ -231,6 +267,25 @@ const onDetail = (item) => {
url: `/pages_app/webview/webview?url=${encodeURIComponent(path)}`, url: `/pages_app/webview/webview?url=${encodeURIComponent(path)}`,
}) })
} }
const getMsgImageUrl = (item) => {
const content = item?.msg_content || '';
if (!content) return '';
if (content.startsWith('http://') || content.startsWith('https://') || content.startsWith('data:image')) {
return content;
}
return docUrl + content;
}
const previewMsgImage = (item) => {
const imageUrl = getMsgImageUrl(item);
if (!imageUrl) {
uni.showToast({ title: '图片地址无效', icon: 'none' });
return;
}
uni.previewImage({
current: imageUrl,
urls: [imageUrl]
});
}
// //
const onLoadMore = async () => { const onLoadMore = async () => {
if(!hasMore.value || loading.value) return; if(!hasMore.value || loading.value) return;
@ -506,4 +561,14 @@ $red: #D32F2F;
font-weight: 600; font-weight: 600;
} }
} }
.imgbox{
width: 200rpx;
height:200rpx;
}
.imgwrap{
width:100%;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>

View File

@ -1,13 +1,15 @@
<template> <template>
<view class="page" @touchstart="handleTapContent"> <view class="page" @touchstart="handleTapContent">
<!-- 顶部导航 --> <!-- 顶部导航 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="群发消息" title="群发消息"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -17,6 +19,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 警告提示区域 --> <!-- 警告提示区域 -->
<view class="warning-section"> <view class="warning-section">
@ -224,6 +227,7 @@ $red: #d32f2f;
background: #fff8e1; background: #fff8e1;
border-left: 6rpx solid #ff9800; border-left: 6rpx solid #ff9800;
margin: 20rpx 30rpx; margin: 20rpx 30rpx;
margin-top: calc(var(--status-bar-height) + 64px);
border-radius: 8rpx; border-radius: 8rpx;
.warning-icon { .warning-icon {

View File

@ -179,6 +179,7 @@ const submitInfo = () => {
/* 主内容区域 */ /* 主内容区域 */
.content-area { .content-area {
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
margin-top: calc(var(--status-bar-height) + 44px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }

View File

@ -342,6 +342,7 @@ const confirmPublish = () => {
/* 主内容区域 */ /* 主内容区域 */
.content-area { .content-area {
margin-top: calc(var(--status-bar-height) + 44px);
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
} }

View File

@ -1,13 +1,15 @@
<template> <template>
<view class="outpatient-page"> <view class="outpatient-page">
<!-- 导航栏 --> <!-- 导航栏 -->
<uni-nav-bar <view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left" left-icon="left"
title="出/停诊公告" title="出/停诊公告"
@clickLeft="goBack" @clickLeft="goBack"
fixed
color="#8B2316" color="#8B2316"
height="180rpx"
:border="false" :border="false"
backgroundColor="#eee" backgroundColor="#eee"
> >
@ -18,6 +20,7 @@
</view> </view>
</template> </template>
</uni-nav-bar> </uni-nav-bar>
</view>
<!-- 标签页 --> <!-- 标签页 -->
<view class="tab-container"> <view class="tab-container">
@ -136,10 +139,11 @@
<script setup> <script setup>
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import api from '@/api/api' import api from '@/api/api'
import {onShow,onUnload,onLoad} from '@dcloudio/uni-app' import {onShow,onUnload,onLoad,onBackPress} from '@dcloudio/uni-app'
import navTo from '@/utils/navTo' import navTo from '@/utils/navTo'
const page=ref(1); const page=ref(1);
// //
const from = ref('');
const currentTab = ref('suspension') const currentTab = ref('suspension')
const remarks = ref('') const remarks = ref('')
@ -147,6 +151,17 @@ const note = ref('')
const outpatientSchedules = ref([]) const outpatientSchedules = ref([])
const outPatientList = ref([]); const outPatientList = ref([]);
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
const getListOutPatient = async () => { const getListOutPatient = async () => {
const res = await api.listOutPatient({ const res = await api.listOutPatient({
page:page.value, page:page.value,
@ -225,14 +240,11 @@ const getTypeText = (type) => {
} }
// //
const goBack = () => { const goBack = () => {
uni.navigateBack({ if(!from.value){
delta: 1, plus.runtime.quit();
fail() { }else{
uni.redirectTo({ uni.navigateBack();
url: '/pages/index/index' }
})
}
})
} }
const share = () => { const share = () => {
@ -248,9 +260,7 @@ const addNew = () => {
icon: 'none' icon: 'none'
}) })
} }
onLoad((options) => {
})
onShow(() => { onShow(() => {
getStopOutPatientList(); getStopOutPatientList();
getListOutPatient(); getListOutPatient();
@ -490,6 +500,7 @@ const deleteSchedule = async (uuid) => {
/* 标签页样式 */ /* 标签页样式 */
.tab-container { .tab-container {
margin-top: calc(var(--status-bar-height) + 44px);
display: flex; display: flex;
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;

View File

@ -110,7 +110,7 @@ const submit = () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.stop-page { min-height: 100vh; background: #fff; } .stop-page { min-height: 100vh; background: #fff; }
.content-area { padding: 30rpx; } .content-area { padding: 30rpx; margin-top: calc(var(--status-bar-height) + 44px);}
.form-section { margin-bottom: 40rpx; } .form-section { margin-bottom: 40rpx; }
.section-head { display: flex; justify-content: space-between; align-items: center; } .section-head { display: flex; justify-content: space-between; align-items: center; }

BIN
static/argee_no.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/argee_sure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/contact.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
static/reading.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -115,14 +115,14 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
}else if (res.data.code == 200 || res.data.code == 1 || res.data.code == "1" || res.data.code == "200" ){ }else if (res.data.code == 200 || res.data.code == 1 || res.data.code == "1" || res.data.code == "200" ){
e(res.data) e(res.data)
}else if (res.data.code == 401 || res.data.code == 403 || res.data.code == }else if (res.data.code == 401 || res.data.code == 403 || res.data.code ==
405 || res.data.code == 406 || res.data.code == 37006) { 405 || res.data.code == 406 || res.data.code == 37006 || res.data.code == 35002) {
uni.hideLoading(); uni.hideLoading();
if(process.env.UNI_PLATFORM == "mp-weixin"){ if(process.env.UNI_PLATFORM == "mp-weixin"){
uni.redirectTo({url:'/pages_app/login/login'}) uni.redirectTo({url:'/pages_app/login/login'})
} }
// else{ else{
// uni.navigateTo({url:'/pages_app/login/login'}) uni.navigateTo({url:'/pages_app/login/login'})
// } }
uni.sendNativeEvent('getNewToken', { uni.sendNativeEvent('getNewToken', {
msg: 'getNewToken' msg: 'getNewToken'
},ret => { },ret => {