This commit is contained in:
liuyuan
2025-05-21 16:31:37 +08:00
parent 23cb7534ac
commit 060344610a
683 changed files with 70083 additions and 0 deletions

View File

@@ -0,0 +1,129 @@
<template>
<view style="width: 100%; height: 100%;">
<view v-if="axiosStatus!=''">
<scroll-view @scrolltolower="lower" scroll-y="true" class="scroll-Y" v-if="dataList&&dataList.length > 0"
style="height: 100%">
<view @click="gotoDetail(item, index)" class="scroll-view-item list_item"
v-for="(item, index) in dataList" :key="indexKey ? item[indexKey] : item.id"
:index="indexKey ? item[indexKey] : index">
<view :class="['titleItem', '']" :style="`width:${isNoIcon ? '100%' : 'calc(100% - 30rpx)'}`">
<slot name="leftSlot" :row="item" :item="item" :index="index"> </slot>
<template v-if="isCondition">
<slot name="labelSlot" :row="item" :rowIndex="index"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<slot name="rightSlot" :row="item" :rowIndex="index"></slot>
</view>
<image v-if="!isNoIcon" src="@/static/icon/icon_right.png" class="rightArrow" style=""></image>
</view>
</scroll-view>
<u-empty v-else-if="noDataIcon && isLoadingHide" :mode="noDataIcon"
:icon="`http://cdn.uviewui.com/uview/empty/${noDataIcon}.png`">
</u-empty>
<u-divider style="width: 100%;" v-else-if="!isOrderList" text="暂无数据"></u-divider>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
props: [
"indexKey",
"dataList",
"label",
"isCondition",
"isNoIcon",
"pagination",
"noDataIcon",
"isLoadingHide",
"axiosStatus",
"isOrderList"
],
data() {
return {
status: '',
};
},
onLoad() {},
onShow() {
this.status = '';
},
computed: {
...mapState(["userInfo"]),
},
methods: {
lower() {
this.$emit("lower");
},
gotoDetail(data, index) {
this.$emit("hancleClick", data, index);
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {},
};
</script>
<style lang="scss" scoped>
.list_item {
width: 100%;
padding: 20rpx 20rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
}
.list_item :last-child(1) {
border-bottom: none;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f5f5f5 !important;
}
.rightArrow {
width: 40rpx;
height: 40rpx;
}
.scroll-Y {
height: 100%;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
}
.titleItem {
width: calc(100% - 30rpx);
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.list_item:last-child {
border-bottom: none !important;
}
</style>

55
pages/doctors/index.vue Normal file
View File

@@ -0,0 +1,55 @@
<template>
<view class="content">
<z-nav-bar title="名医精彩"></z-nav-bar>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
list: [],
}
},
onLoad() {
uni.hideTabBar();
},
onShow() {
uni.removeStorageSync('homeParams');
},
methods: {
//获取数据
getData() {
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/ragFlowApi/getChatAssistants',
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
uni.hideLoading();
if (res.list&&res.list.length>0) {
}
});
}
},
}
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
.content{
height: 100%;
overflow: auto;
background-color: #fff;
}
</style>

806
pages/home/index.vue Normal file
View File

@@ -0,0 +1,806 @@
<template>
<view class="content">
<view class="home_top">
<view class="home_top_icon">
<image src='../../static/icon/icon_bars.png' class="home_top_left" @click="openDrawer"></image>
<image src='../../static/icon/icon_dialog.png' class="home_top_right" @click="showMode"></image>
</view>
<text>智慧医疗</text>
</view>
<view class="home_wrap" v-if="!showMessages">
<view class="home_logo">
<image src='../../static/logo.png'></image>
<text class="logo_main">我是太湖云医的智慧医疗<br/>很高兴见到您</text>
<text class="logo_con">我是您的诊断小助手您可以把情况发给我我会结合太湖学堂知识数据库为您进行分析解答</text>
</view>
<view class="home_form">
<template>
<view class="form_item">
<text>西医诊断</text>
<input type="text" v-model="formData.diagnosis" placeholder="请输入西医诊断" placeholder-class="custom-placeholder" />
</view>
<view class="form_item">
<text>详细病情</text>
<textarea v-model="formData.illness" maxlength="-1"
auto-height
placeholder="请输入详细病情"
placeholder-class="custom-placeholder" />
</view>
<view class="form_item">
<text>主要症状</text>
<textarea auto-height v-model="formData.symptoms" maxlength="-1"
placeholder="请输入主要症状" placeholder-class="custom-placeholder" />
</view>
<view class="form_item form_item_genetic">
<text>基因检测阳性</text>
<input type="text" v-model="formData.genetic" placeholder="选填" placeholder-class="custom-placeholder" />
</view>
<view class="form_item">
<text>患者姓名</text>
<input type="text" v-model="formData.name" placeholder="如果您是医生,建议填写" placeholder-class="custom-placeholder" />
</view>
</template>
</view>
</view>
<view class="submit_form" v-if="!showMessages">
<view class="assistants_list">
<view v-for="(item,index) in chatAssistants" :key="index"
@click="clickAssistants(item,index)"
class="assistants_item"
:class="activeIndex==index?'active':''"
>
<image class="assistants_img_1" :src="item.icon_1" mode="widthFix" ></image>
<image class="assistants_img_2" :src="item.icon_2" mode="widthFix" ></image>
<text>{{item.name}}</text>
</view>
</view>
<button class="submit_btn" @click="submit">
<image src='../../static/icon/icon_submit.png'></image>
</button>
</view>
<view class="message_wrap" :style="{ top: 82 + 'px' }" v-if="showMessages">
<text class="message_title" v-if="tishi">好的结合您的情况下面是分析结果</text>
<!-- 显示聊天记录 -->
<view class="message-container-block" ref="messageContainerBlock">
<view class="message-container" v-for="(item, index) in messages" :key="index"
:class="{'message-left': item.type === 'answer', 'message-right': item.type === 'question'}">
<text v-html="item.content"></text>
</view>
<view class="loading-spinner" v-if="loading"></view>
</view>
<view class="submit_form submit_form_2">
<view class="assistants_list">
<textarea auto-height v-model="question_send" placeholder="给智慧医疗发送消息" placeholder-class="custom-placeholder" />
</view>
<button class="submit_btn" @click="sendAgain">
<image src='../../static/icon/icon_submit.png' v-if="!pauseStatus"></image>
<image src='../../static/icon/icon_submit_pause.png' v-if="pauseStatus"></image>
</button>
</view>
</view>
<!-- 左侧弹窗 -->
<uni-drawer ref="drawer" mode="left" :width="230">
<view class="drawer-content">
<scroll-view scroll-y="true" class="list_content" v-if="record_list.length>0">
<view v-for="(item, index) in record_list" :key="index" class="list_item"
:class="activeRecord == index?'active_item':''"
@click="clickRecord(item, index)">
<text class="text_item">{{ item.chatName }}</text>
</view>
</scroll-view>
<view class="null_text" v-else>{{ null_text }}</view>
</view>
</uni-drawer>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
import { mapState, mapMutations } from "vuex";
export default {
data() {
return {
containerHeight: null,
formData: {
diagnosis: '',
illness: '',
symptoms: '',
genetic: '',
name: '',
},
chatId: null, //选择助手的id
chatName: '',
chatAssistants: [],
activeIndex: null,
sessionId: null, //对话id
eventSource: null,
showMessages: false,
loading: false,
question: '', //传递的问题
messages: [],
previousAnswer: null, //存储上一条回答内容
question_send: '',
pauseStatus: false, //暂停操作
record_list: [], //对话列表
null_text: '',
activeRecord: null,
tishi: false, //提示语
}
},
computed: {
...mapState(["userInfo"]),
},
mounted() {
},
onLoad() {
uni.hideTabBar();
uni.removeStorageSync('homeParams');
//获取设备信息
const systemInfo = uni.getSystemInfoSync();
this.containerHeight = systemInfo.windowHeight; //获取设备的窗口高度
this.getChatAssistants();
},
onShow(){
this.showMessages = false;
this.activeRecord = null;
this.getRecordsData();
//我的-会话记录跳转来的
let data = uni.getStorageSync('homeParams').data;
let index = uni.getStorageSync('homeParams').index;
if(data){
this.clickRecord(data, index);
}
},
methods: {
//获取病症种类数据
getChatAssistants() {
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/ragFlowApi/getChatAssistants',
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if (res.list&&res.list.length>0) {
uni.hideLoading();
res.list = res.list.filter(item => {
return !item.name.includes('心理助手') && !item.name.includes('太湖云翳');
});
res.list.forEach(item => {
if (item.name === "呼吸专科") {
item.icon_1 = '../../static/icon/iocn_zs_2.png';
item.icon_2 = '../../static/icon/iocn_zs_2_a.png';
} else if (item.name === "妇科专科") {
item.icon_1 = '../../static/icon/iocn_zs_5.png';
item.icon_2 = '../../static/icon/iocn_zs_5_a.png';
} else if (item.name === "风湿免疫专科") {
item.icon_1 = '../../static/icon/iocn_zs_3.png';
item.icon_2 = '../../static/icon/iocn_zs_3_a.png';
} else if (item.name === "消化专科") {
item.icon_1 = '../../static/icon/iocn_zs_1.png';
item.icon_2 = '../../static/icon/iocn_zs_1_a.png';
} else if (item.name === "肿瘤专科") {
item.icon_1 = '../../static/icon/iocn_zs_4.png';
item.icon_2 = '../../static/icon/iocn_zs_4_a.png';
} else if (item.name === "全科医生") {
item.icon_1 = '../../static/icon/iocn_zs_6.png';
item.icon_2 = '../../static/icon/iocn_zs_6_a.png';
}
});
this.chatAssistants = res.list;
}
})
.catch(e=>{
uni.setStorageSync("guidePages", 2);
});
},
//获取对话记录数据
getRecordsData() {
this.$http.request({
url: 'common/ragFlowApi/getChats',
method: "POST",
data: {
chatId: '',
sessionId: '',
page: 1,
pageSize: 300
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if(res.code==0){
if(res.list&&res.list.length>0){
this.record_list = res.list;
}else{
this.null_text = '暂无数据';
}
}
})
.catch(e=>{
uni.setStorageSync("guidePages", 2);
uni.redirectTo({
url: "/pages/user/login",
});
});
},
//点击每个记录
clickRecord(item,index){
//重新定义id
this.chatId = item.chatAssistantId;
this.sessionId = item.chatId;
this.activeRecord = index;
this.messages = [];
this.showMessages = true;
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/ragFlowApi/getChats',
method: "POST",
data: {
chatId: item.chatAssistantId,
sessionId: item.chatId,
page: 1,
pageSize: 300
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if(res.code==0){
uni.hideLoading();
if(res.list&&res.list.length>0){
this.messages = res.list.map(item => {
let content = item.content.replace(/##\d+$$/g, '');
content = content.replace(/<\/?think>/g, '');
content = content.replace(/\*\*(.*?)\*\*/g, '<b class="bold-text">$1</b>');
content = content.replace(/\*(.*?)\*/g, '<span class="red-text">$1</span>');
content = content.replace(/\n\n/g, '\n');
content = content.replace(/\n/g, '<br>');
content = content.replace(/^#{3,4}.*(\r?\n)?/gm, '');
return {
...item,
type: item.type === 1 ? 'answer' : 'question',
content: content
};
});
}
this.tishi = false; //提示语不用展示
this.$refs.drawer.close();
}
});
},
//
//选中科目类别
clickAssistants(item, index){
this.activeIndex = index;
this.chatId = item.id;
this.chatName = item.name;
},
//提交
submit(){
if(!this.formData.diagnosis){
this.$commonJS.showToast("请输入西医诊断");
return
}
if(!this.formData.illness){
this.$commonJS.showToast("请输入详细病情");
return
}
if(!this.formData.symptoms){
this.$commonJS.showToast("请输入主要症状");
return
}
if(!this.chatId){
this.$commonJS.showToast("请选择助手分类");
return
}
let question = '';
if(this.formData.name){
question += '患者'+this.formData.name+'';
}
if(this.formData.diagnosis){
question += '诊断:'+this.formData.diagnosis+'';
}
question += '病情为:'+this.formData.illness+''+this.formData.symptoms+',请根据这位患者的情况出一个中医治疗方案';
this.question = question;
//创建对话 获取sessionId
this.createChat();
},
//创建新对话
createChat(){
let data = {
chatId: this.chatId,
name: this.question.slice(0, 30)
}
this.$http.request({
url: 'common/ragFlowApi/createChat',
method: "POST",
data: data,
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if (res.code==0) {
this.sessionId = res.id;
//获取回答
this.sendQuestion();
}
});
},
//交谈请求,获取回答
sendQuestion(){
//清空消息记录
this.messages = [];
this.showMessages = true;
this.pauseStatus = true;
this.loading = true;
//展示提示语
this.tishi = true;
const params = {
chatId: this.chatId,
chatName: this.chatName,
question: this.question,
sessionId: this.sessionId,
sessionName: this.question.slice(0, 30),
patientName: this.formData.name
};
//调用后端 SSE 接口,发送问题并接收实时回答
this.startSSE(params);
},
//开始监听 SSE 数据
startSSE(params){
// 拼接查询字符串
const query = new URLSearchParams({
...params,
token: uni.getStorageSync('token')
}).toString();
// 创建 SSE 连接
this.eventSource = new EventSource(this.$baseUrl+`common/ragFlowApi/chatToAssistantStream?${query}`);
// 监听服务器发送的消息
this.eventSource.onmessage = (event) => {
try {
const message = JSON.parse(event.data);
if (message.data === true) {
console.log("回答已结束");
this.pauseStatus = false;
this.eventSource.close();
this.loading = false;
return;
}
const answer = message.data.answer.replace(/##\d+$$/g, '');
let newAnswer = ''; //初始化 newAnswer 变量
if(this.previousAnswer === null){
console.log("第一次进来")
//如果没有包含上一条的内容,则直接显示当前 answer
newAnswer = answer;
this.messages.push({ content: newAnswer, type: 'answer' });
this.previousAnswer = newAnswer;
}else{
//只显示新增的部分
newAnswer = answer.replace(this.previousAnswer, '');
newAnswer = newAnswer.replace(/\*\*(.*?)\*\*/g, '<b class="bold-text">$1</b>');
newAnswer = newAnswer.replace(/\*(.*?)\*/g, '<span class="red-text">$1</span>');
newAnswer = newAnswer.replace(/\n\n/g, '\n');
newAnswer = newAnswer.replace(/\n/g, '<br>');
newAnswer = newAnswer.replace(/####([\s\S]*?)$/gm, '<h4>$1</h4>')
.replace(/###([\s\S]*?)$/gm, '<h3>$1</h3>');
this.messages.push({ content: newAnswer, type: 'answer' });
this.previousAnswer = answer;
}
} catch (error) {
this.$commonJS.showToast("处理消息时发生错误");
}
};
//监听 SSE 连接关闭
this.eventSource.onclose = () => {
console.log("SSE 连接已关闭");
this.loading = false;
};
//监听 SSE 错误
this.eventSource.onerror = (error) => {
console.error("SSE 连接发生错误", error);
this.loading = false;
};
//获取最近的会话记录数据
this.getRecordsData();
},
//回答界面的提交
sendAgain(){
console.log('这是再一次提问')
if(!this.question_send){
this.$commonJS.showToast("请输入发送内容");
return
}
const params = {
chatId: this.chatId,
chatName: this.chatName,
question: this.question_send,
sessionId: this.sessionId,
sessionName: this.question_send.slice(0, 15),
patientName: this.formData.name
};
this.messages.push({
content: `${this.question_send}`,
type: 'question',
});
this.loading = true;
this.question_send = '';
this.pauseStatus = true;
this.previousAnswer = null;
//调用后端 SSE 接口,发送问题并接收实时回答
this.startSSE(params);
},
//点击左侧弹窗
openDrawer() {
this.$refs.drawer.open();
},
//点击新会话
showMode(){
this.showMessages = false;
this.messages = [];
this.formData = {
diagnosis: '',
illness: '',
symptoms: '',
genetic: '',
name: ''
}
this.chatId = null;
this.activeIndex = null;
this.activeRecord = null;
if(this.eventSource){
this.eventSource.close();
}
this.previousAnswer = null;
this.pauseStatus = false;
}
},
beforeDestroy() {
}
}
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
.content{
background: linear-gradient(to bottom, #d8e6ff 20%, #ffffff 100%);
}
.home_top{
width: 100%;
background: #fff;
position: fixed;
top: 0;
left: 0;
padding: 90rpx 50rpx 30rpx;
text-align: center;
box-sizing: border-box;
z-index: 999;
.home_top_icon{
position: absolute;
left: 50rpx;
top: 90rpx;
display: flex;
align-items: center;
.home_top_left,.home_top_right{
width: 40rpx;
height: 40rpx;
}
.home_top_right{
margin-left: 40rpx;
}
}
text{
font-size: 43rpx;
font-weight: bold;
color: $themeColor;
}
}
.home_wrap{
margin: 170rpx 50rpx 0;
.home_logo{
padding-top: 40rpx;
image{
display: block;
width: 130rpx;
height: 130rpx;
margin: 0 auto;
}
.logo_main{
text-align: center;
display: block;
padding-top: 30rpx;
font-size: 35rpx;
color: $themeColor;
line-height: 46rpx;
}
.logo_con{
display: block;
width: 490rpx;
margin: 30rpx auto;
font-size: 28rpx;
color: #303030;
line-height: 40rpx;
text-indent: 2em;
}
}
}
.home_form{
margin-top: 60rpx;
.form_item{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
text{
line-height: 65rpx;
font-size: 30rpx;
color: #fff;
background: $themeBgColor;
text-align: center;
border-radius: 20rpx;
padding: 0 25rpx;
}
textarea,input{
display: inline-block;
width:calc(100% - 255rpx);
height: 70rpx;
line-height: 36rpx;
padding: 17rpx 30rpx;
font-size: 28rpx;
color: #303030;
border-radius: 50rpx;
border: 1rpx solid #777778;
box-sizing: border-box;
resize: none;
max-height: 200rpx;
overflow-y: scroll;
}
}
}
.custom-placeholder{
font-size: 25rpx;
color: #8b8c90 !important;
}
.submit_form{
width: 100%;
height: 90px;
background: #fff;
position: fixed;
left: 0;
bottom: 120rpx;
padding: 0 50rpx;
z-index: 999;
}
.submit_form_2{
height: 145rpx;
padding: 30rpx;
.assistants_list{
textarea,input{
width: calc(100% - 65px);
font-size: 26rpx;
line-height: 34rpx;
border-radius: 50rpx;
padding: 22rpx 30rpx;
color: #303030;
background: #f3f4f6;
max-height: 72rpx;
overflow: hidden;
}
}
.submit_btn{
top: 42rpx;
}
}
.assistants_list{
display: flex;
align-items: center;
flex-wrap: wrap;;
.assistants_item{
display: flex;
align-items: center;
width: 217rpx;
margin-top: 30rpx;
image{
width: 38rpx;
height: 38rpx;
}
text{
padding-left: 10rpx;
display: inline-block;
font-size: 28rpx;
color: #606061;
}
.assistants_img_1{
display: block;
}
.assistants_img_2{
display: none;
}
}
}
.submit_btn{
position: absolute;
right: 50rpx;
top: 90rpx;
image{
width: 55rpx;
height: 55rpx;
}
}
.active{
text{
color: $themeBgColor;
}
.assistants_img_1{
display: none !important;
}
.assistants_img_2{
display: block !important;
}
}
.message_wrap{
position: relative;
width: 100%;
background: #fff;
z-index: 99;
padding: 0 50rpx;
overflow: scroll;
}
.message_title{
text-align: center;
font-size: 34rpx;
color: #333;
line-height: 50rpx;
display: block;
font-weight: bold;
padding: 10rpx 0;
}
.message-container-block{
padding-top: 10rpx;
padding-bottom: 150px;
font-size: 30rpx;
}
.message-container {
display: inline;
}
.message-item {
}
/* 自定义的loading效果 */
.loading-spinner {
margin-top: 10rpx;
border: 2px solid #f3f3f3; /* 灰色背景 */
border-top: 2px solid #3498db; /* 蓝色顶部 */
border-radius: 50%;
width: 16px;
height: 16px;
animation: spin 1s linear infinite; /* 旋转动画 */
}
/* 旋转动画 */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.bold-text {
display: block;
font-weight: bold;
font-size: 28rpx; /* 增大字号 */
}
h3{
font-size: 36rpx;
font-weight: bold;
}
h3{
font-size: 32rpx;
}
.red-text {
color: red;
font-size: 28rpx; /* 增大字号 */
}
.message-right{
display: block;
text-align: right;
margin: 30rpx 0;
text{
display: inline-block;
padding: 20rpx;
line-height: 34rpx;
background-color: rgba(81, 136, 229, 0.2);
border-radius: 15rpx;
color: #333;
font-size: 28rpx;
text-align: left;
}
}
.drawer-content {
height: 100vh;
display: flex;
flex-direction: column;
}
.list_content{
padding: 30rpx 20rpx;
overflow-y: auto;
}
.list_item{
padding: 20rpx 10rpx;
}
.text_item{
display: block;
width: 100%;
font-size: 30rpx;
line-height: 40rpx;
padding: 0 10rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.null_text{
display: block;
text-align: center;
font-size: 30rpx;
color: #999;
padding-top: 150rpx;
}
.active_item{
background: #d8e6ff;
border-radius: 15rpx;
text{
color: #5188e5;
}
}
</style>

76
pages/my/aboutUs.vue Normal file
View File

@@ -0,0 +1,76 @@
<template>
<view class="commonPage">
<z-nav-bar title="关于我们"></z-nav-bar>
<view class="APPinfo">
<image src="@/static/logo_zi.png" mode="" style="height: 230rpx; width: 240rpx; margin: 0 auto;"></image><br/>
<p v-if="versionCode">版本信息{{versionName}},{{versionCode}}</p>
</view>
<view class="telInfo">
<view class="nav_list flexbox">
<text>客服热线</text>
<view class="view1" @click="makeTel">
<uni-icons type="phone" size="20" color="#5188e5"></uni-icons>
<text>022-24142321</text>
</view>
</view>
</view>
<view class="prof">
太湖云医是一款以吴雄志老师独有的一以贯之的中医学针灸学与心学学术体系把精准医学思想引入传统医学将中西医有机整合医学与心理学有机整合同时将心理学与东方心学及国学的有机融合为患者及医生提供现代医学中医学与心理学的治疗预防及康复指导意见的一款app
</view>
<view style="text-align: right; padding-right: 20rpx; padding-top: 30rpx;">
<uni-link href="https://soulspace.taihumed.com/privacy.html" text="隐私政策"></uni-link>
</view>
</view>
</template>
<script>
export default {
data() {
return {
playData:{},
versionCode:null,
versionName:null
}
},
onLoad() {
this.getAppInfo()
},
methods: {
// 获取版本信息
getAppInfo(){
let that = this
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
that.versionCode = inf.version
that.versionName = inf.name
});
},
makeTel(){
uni.showModal({
title: '提示',
content: '微信号yilujiankangkefu'
})
}
}
}
</script>
<style scoped lang="scss">
@import '@/static/mixin.scss';
.commonPage{
background: #fff;
padding: 0 20rpx;
}
.prof{ color: #666; font-size: 28rpx; line-height: 42rpx; padding: 30rpx 10rpx;}
.telInfo{background-color:#fff;
.nav_list{padding: 30rpx 0; border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5; justify-content: space-between; color: #666;
.view1{ display: flex; align-items: center;}
}
}
.APPinfo{background-color:#fff; padding: 40rpx 0; text-align: center;
p{font-size: 28rpx;}
}
.flexbox{display: flex; justify-content: center;}
</style>

764
pages/my/index.vue Normal file
View File

@@ -0,0 +1,764 @@
<template>
<view class="commonPage commonPageBox">
<view class="bg_top">
<u-icon @click="goSetting" class="setIcon" labelColor="#5188e5" labelPos="bottom" label="设置" name="setting"
:style="`top:${(20 + statusBarHeight) * 2}rpx`" color="#5188e5" size="22"></u-icon>
</view>
<view class="mine_box" :style="`top:${(80 + statusBarHeight) * 2}rpx`">
<view class="per_mes">
<view class="per_mes_user">
<view style="display: flex; align-items: center; flex-direction: column">
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar&&userMes.avatar!=''"
class="per_mes_img color_shandow"></image>
<image src="../../static/image.png" v-if="userMes.avatar == null||userMes.avatar == ''"
class="per_mes_img color_shandow"></image>
</view>
</view>
<view class="userInfoBox">
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
<view class="phone" v-if="userMes.tel">手机号({{ userMes.tel }})</view>
</view>
<br clear="both" />
</view>
<view class="list_box">
<view class="xiugai boxShadow box_fillet">
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
<template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success"
style="line-height: 40rpx">{{ slotProps.row.content }}</text>
</template>
</common-list>
</view>
</view>
</view>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
import {
mapState,
mapMutations
} from "vuex";
export default {
data() {
return {
userMes: {},
pageList: [
{
name: "会话记录",
url: "/pages/my/recordsList",
type: "pageJump",
},
{
name: "个人资料",
url: "/pages/my/persData",
type: "pageJump",
},
{
name: "关于我们",
url: "/pages/my/aboutUs",
type: "pageJump",
},
{
name: "问题反馈/申诉",
url: "/pages/user/workOrder",
type: "pageJump"
}
]
};
},
//第一次加载
onLoad(e) {
uni.hideTabBar();
},
computed: {
...mapState(["userInfo"]),
},
//页面显示
onShow() {
uni.removeStorageSync('homeParams');
this.getData();
},
//方法
methods: {
...mapMutations(["setUserInfo"]),
//跳转设置
goSetting() {
this.onPageJump("/pages/my/set");
},
//获取个人信息
goUserInfo() {
this.onPageJump("/pages/my/persData");
},
//点击切换
handleClickTab(v) {
switch (v.type) {
case "pageJump":
this.onPageJump(v.url);
break;
case "switchTab":
this.switchTab(v.url);
break;
}
},
//获取个人信息
getData() {
if (this.userInfo.id != undefined) {
this.$http.post("common/user/getUserInfo").then((res) => {
this.userMes = res.result;
});
}
},
onPageJump(url) {
uni.navigateTo({
url: url,
});
},
switchTab(url) {
uni.switchTab({
url: url,
});
},
},
};
</script>
<style lang="scss" scoped>
@import "@/static/mixin.scss";
.commonPage{
background-image: linear-gradient(to bottom, #d8e6ff 20%, #ffffff 100%);
}
.per_mes {
padding: 0 30rpx;
margin-bottom: 20rpx;
position: relative;
align-items: center;
display: flex;
align-items: center;
.per_mes_img {
width: 120rpx;
height: 120rpx;
border-radius: 90rpx;
margin: 0 0 0 0;
float: left;
}
.userInfoBox{
padding-left: 20rpx;
}
view {
.name {
width: 100%;
font-size: 30rpx;
line-height: 40rpx;
color: #333;
}
.phone {
font-size: 26rpx;
line-height: 42rpx;
color: #666;
}
.per_user_img {
display: inline-block;
width: 40upx;
height: 40upx;
margin-left: 10rpx;
vertical-align: super;
}
}
}
.now_vip {
background-color: #fff;
margin: 0 0 30upx 0;
padding: 0 30upx;
height: 120upx;
background-image: linear-gradient(90deg, #feeed6 0%, #f5ce99 100%);
image {
width: 46rpx;
height: 50rpx;
display: inline-block;
vertical-align: text-bottom;
margin: 0 10rpx 0 0;
}
text {
font-size: 30upx;
line-height: 120upx;
color: #977749;
font-weight: bold;
}
.kt_btn {
font-size: 26upx;
display: block;
float: right;
border-radius: 50rpx;
color: #fffbf6;
padding: 12rpx 26rpx;
margin: 33rpx 0 0 0;
background-image: linear-gradient(90deg, #dfa964 0%, #7f5218 100%);
}
}
.chong_zhi {
box-shadow: none;
padding: 0 30upx;
height: auto;
.zhanghu {
width: 100%;
margin-bottom: 10rpx;
font-size: 44rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: space-between;
color: $themeColor;
font-weight: 700;
}
.noVip {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
.zhanghu {
font-size: 42rpx;
width: auto;
display: inline-block;
margin-bottom: 0rpx;
text-align: center;
display: flex;
align-items: center;
}
}
.chong_list {
display: flex;
align-items: center;
font-size: 30rpx;
justify-content: space-between;
.left {
display: flex;
align-items: center;
}
.chong_list_item {
width: auto;
height: 100rpx;
margin-right: 60rpx;
text-align: center;
display: inline-block;
color: #294a97;
.text {
font-size: 30rpx;
display: block;
font-weight: 700;
color: #294a97 !important;
}
}
.chong_btn {
font-size: 26rpx;
border-radius: 50rpx;
color: #fffbf6;
padding: 8rpx 32rpx;
background: $themeBgColor;
}
}
}
.xiugai {
border-radius: 10rpx !important;
margin: 0 30rpx;
background: rgba(255, 255, 255, 0.65);
.nav_list {
background-color: #b7e0e2;
padding: 15rpx 0 15rpx 10rpx;
display: flex;
align-items: center;
font-size: 22rpx;
position: relative;
font-weight: bold;
border-bottom: 1px solid #e5e5e5;
&:active {
background-color: #f5f5f5;
}
text {
color: #333;
margin-left: 10rpx;
}
&::after {
content: "";
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
width: 30rpx;
height: 30rpx;
background-image: url("@/static/icon/icon_right.png");
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
}
.nav_list:nth-last-child(1) {
border-bottom: 0;
}
}
.box_fillet {
border-radius: 40rpx;
overflow: hidden;
}
.chongzhi_box {
position: relative;
width: calc(100%);
height: 100%;
float: left;
padding: 20rpx 30rpx;
background: rgba(255, 255, 255, 0.65);
border-radius: 10rpx;
box-shadow: 0px 0px 5px 1px rgba(0, 82, 79, 0.1);
}
.bg_top {
padding: 0 30rpx;
height: 30vh;
position: relative;
.setIcon {
position: absolute;
right: 30rpx;
}
}
.mine_box {
width: 100%;
position: absolute;
left: 0;
padding: 0 0rpx;
}
.list_box {
padding: 40rpx 0;
}
.pay_item_img {
display: flex;
color: #333;
align-items: center;
padding: 0;
box-sizing: border-box;
font-weight: bold;
margin: 0 auto;
margin-bottom: 10rpx;
}
.popup_box {
padding-bottom: 20rpx;
width: 88vw;
overflow: hidden;
position: relative;
height: auto;
.title {
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
font-weight: normal;
font-size: 46rpx;
color: $themeColor;
padding: 20rpx;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
.content {
font-size: 26rpx;
letter-spacing: 0.15rpx;
padding: 20rpx;
color: #3f3f3f;
.top {
margin: 30rpx 0;
}
.center {
line-height: 40rpx;
}
.bottom {
width: 100%;
margin-top: 60rpx;
font-size: 24rpx;
line-height: 26rpx;
color: #b0b0b0;
}
}
.button_box {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
.u-button {
margin-left: 40rpx;
}
.u-button:nth-child(1) {
margin-left: 0;
}
}
}
.modal_vip{
margin-top: 50rpx;
padding: 20rpx 20rpx 0;
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
}
.cate_box {
width: 100%;
height: auto;
display: flex;
justify-content: center;
box-shadow: 0rpx 0rpx 6rpx 0rpx #f9f6ea;
border-radius: 7rpx;
display: flex;
align-items: center;
justify-content: space-around;
padding: 5rpx 0rpx 20rpx;
box-sizing: border-box;
.cate_item_box {
min-width: 110rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.cate_item_border {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.cate_item_name {
margin-top: 6rpx;
font-weight: normal;
font-size: 28rpx;
color: #000000;
// line-height: 46rpx;
text-align: center;
// color: #fff;
}
}
}
.order_box {
.title {
padding: 20rpx 20rpx 10rpx;
font-size: 30rpx;
font-weight: bold;
}
}
.viptime {
font-size: 24rpx;
margin-top: 4rpx;
border-radius: 50rpx;
color: rgb(211, 59, 27) !important;
line-height: 20rpx;
}
.current_identity {
top: 0;
line-height: 32rpx;
position: absolute;
padding: 2rpx 10rpx;
border: 4rpx solid #fff;
border-bottom-right-radius: 20rpx;
border-top-left-radius: 20rpx;
font-size: 20rpx;
font-weight: bold;
}
.hasVipBox {
padding-top: 45rpx;
padding-bottom: 0rpx;
box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);
border-radius: 20rpx;
.vip_name {
font-size: 60rpx;
}
.vip_info {
display: flex;
align-items: center;
font-size: 24rpx;
padding: 0 30rpx;
}
.viptime {
text-align: left;
padding: 0 30rpx;
font-size: 24rpx;
color: #333 !important;
font-weight: 500;
margin-bottom: 20rpx;
}
}
.vbg {
font-size: 300px;
font-weight: 800;
position: absolute;
color: #3e9d78bd !important;
right: -40rpx;
top: -10px;
}
.xufei {
position: absolute;
height: 46rpx;
right: 20rpx;
color: rgba(244, 43, 51, 0.85) !important;
font-size: 24rpx;
border-radius: 50rpx;
line-height: 46rpx;
padding: 0rpx 20rpx;
background: rgba(255, 255, 255, 1);
}
.hasVipSuper {
border: 2rpx solid #fff1ca;
background-image: linear-gradient(90deg, #fff0dc 0%, #f8e483 100%);
.current_identity {
background-color: #fdefb5;
color: #c47029;
}
.PM_font {
color: #f4a04c;
}
}
.hasVipZmZm {
box-shadow: 0px 0px 5px 1px RGBA(235, 247, 243, 0.45);
background-image: linear-gradient(90deg, #aff7d6 0%, #edf5f1 100%);
.viptime {
color: #486a65;
}
.vip_name {
letter-spacing: 1px;
}
.current_identity {
background-color: #a9ddc4;
color: #20575c;
}
.PM_font {
color: #3e9d78;
}
.viptime {
color: #9acbce;
}
.hasVip .quanyi {
border-color: #b7f6ed;
color: #ffd598;
}
.xufei {
background-image: linear-gradient(90deg, #f6dc95 0%, #ffc45e 100%);
color: #3d2700 !important;
}
.vip_info_bottom {
color: #486a65;
}
}
.hasVipWumen {
background-image: linear-gradient(90deg, #c4e8fe 0%, #60bcff 100%);
box-shadow: 0px 0px 5px 1px RGBA(235, 247, 243, 0.45);
.viptime {
color: #486a65;
}
.vip_name {
letter-spacing: 1px;
}
.current_identity {
background-color: #e8f9ff;
color: #243a61;
}
.PM_font {
color: #127dff;
}
.viptime {
color: #1d3a65;
}
.hasVip .quanyi {
border-color: #e3f7fe;
color: #ffd598;
}
.xufei {
background-image: linear-gradient(90deg, #f6dc95 0%, #ffc45e 100%);
color: #3d2700 !important;
}
.vip_info_bottom {
color: #3583C3;
}
.vbg {
color: #d1effc !important;
}
}
.hasVip {
position: relative;
display: block !important;
.zhanghu {
display: block;
}
.quanyi {
border-top: 1rpx solid #f2d494;
width: 100% !important;
width: 100% !important;
}
}
.vip_image {
width: 55rpx;
height: 55rpx;
margin-right: 10rpx;
}
.user_vip_box{
width: 125rpx;
position: absolute;
margin-top: - 37rpx;
z-index: 99;
}
.user_vip_item{
display: flex;
align-items: center;
justify-content: center;
}
.user_vip_item {
border-radius: 20rpx;
background: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%);
color: #fff;
font-size: 20rpx;
line-height: 40rpx;
height: 40rpx;
font-weight: bold;
margin-bottom: 5rpx;
}
.user_vip_item image{
width: 49rpx;
height: 16rpx;
}
.vip_type{
margin-top: 10rpx;
display: flex;
align-items: center;
}
.vip_type_item{
display: flex;
align-items: center;
justify-content: center;
padding: 0 10rpx;
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
border-radius: 20rpx;
font-size: 20rpx;
line-height: 40rpx;
height: 40rpx;
font-weight: bold;
color: #fff;
margin-right: 10rpx;
}
.vip_type_item:last-child{
margin-right: 0;
}
.vip_type_item image{
width: 34rpx;
height: 24rpx;
}
.vip_infor{
}
.vip_infor_item{
display: block;
color: #fff;
font-size: 26rpx;
line-height: 36rpx;
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
font-weight: normal;
}
.vip_infor_item text{
color: #fff;
}
.vip_btn{
}
.vip_btn button{
background: none;
border: 2rpx solid #294a97;
border-radius: 40rpx;
font-size: 24rpx;
width: 82rpx;
line-height: 42rpx;
color: #294a97;
font-weight: bold;
}
.vip_null{
color: #fff;
font-size: 26rpx;
line-height: 34rpx;
}
.expired{
opacity: 0.55;
}
</style>

1048
pages/my/persData.vue Normal file

File diff suppressed because it is too large Load Diff

113
pages/my/recordsList.vue Normal file
View File

@@ -0,0 +1,113 @@
<template>
<view class="content">
<z-nav-bar title="会话记录" bgColor="#5188e5" fontColor="#fff"></z-nav-bar>
<view class="list_wrap">
<view class="list_content" v-if="list&&list.length>0">
<view v-for="(item, index) in list" :key="index" class="list_item" @click="clickRecord(item, index)">
<text>{{item.chatName}}</text>
</view>
</view>
<text class="null_text" v-else>{{null_text}}</text>
</view>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
list: [],
null_text: ''
};
},
//第一次加载
onLoad(e) {
},
//页面显示
onShow() {
this.getData();
},
//方法
methods: {
//获取数据
getData() {
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/ragFlowApi/getChats',
method: "POST",
data: {
chatId: '',
sessionId: '',
page: 1,
pageSize: 300
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if(res.code==0){
uni.hideLoading();
if(res.list&&res.list.length>0){
this.list = res.list;
}else{
this.null_text = '暂无数据';
}
}
});
},
//点击会话跳转到首页记录
clickRecord(item, index){
uni.setStorageSync('homeParams', { data: item, index: index });
uni.switchTab({
url: '/pages/home/index'
});
},
onPageJump(url) {
uni.navigateTo({
url: url,
});
}
},
};
</script>
<style lang="scss" scoped>
@import "@/static/mixin.scss";
.list_wrap{
padding-bottom: 20rpx;
}
.list_content{
margin: 20rpx 30rpx;
border-radius: 10rpx;
background-color: #fff;
padding: 20rpx 30rpx;
box-shadow: 0px 0px 10px 0px #a7bbe4;
text{
display: block;
width: 100%;
font-size: 30rpx;
line-height: 50rpx;
padding: 20rpx 0;
border-bottom: 1rpx solid #e5dcdc;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list_item:last-child text{
border-bottom: none;
}
}
.null_text{
display: block;
text-align: center;
font-size: 30rpx;
color: #999;
padding-top: 150rpx;
}
</style>

360
pages/my/set.vue Normal file
View File

@@ -0,0 +1,360 @@
<template>
<view class="commonPageBox">
<z-nav-bar title="设置"></z-nav-bar>
<view class="contentBox commonPageContentBox">
<view class="set_box">
<list
:dataList="dataList"
@hancleClick="handleClickRightContent"
label="title"
>
<template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success">{{slotProps.row.content}}</text>
</template>
</list>
</view>
<view class="button_box" v-if="!visitorStatus">
<u-button
shape="square"
type=""
class="common_red_button button"
size="medium"
@click="handleClickButton(1)"
>注销账号</u-button
>
<u-button
shape="square"
type=""
class="common_grey_button button"
size="medium"
@click="handleClickButton(2)"
>退出登录</u-button
>
</view>
</view>
<u-modal
:show="signShow"
:content="signContent"
:showCancelButton="true"
@cancel="signShow = false"
@confirm="signOut"
>
</u-modal>
<u-popup key="1" v-if="showCodeImg" :show="showCodeImg" :round="10" @close="closePup">
<view class="box6">
<text style="color: #999; margin-bottom: 20rpx;">点击图片后长按图片保存到手机或使用微信扫描二维码添加客服企业微信</text>
<image src="/static/qiyeWx.jpg" mode="widthFix" style="width: 100px; height: 100px; margin: 0 auto;"></image>
</view>
</u-popup>
</view>
</template>
<script>
// #ifdef APP-PLUS
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
// #endif
import list from "@/pages/component/commonComponents/list";
import $http from "@/config/requestConfig.js";
import { mapState, mapMutations } from "vuex";
export default {
components: {
list,
},
data() {
return {
signShow: false,
signContent: "是否要退出登录?",
playData: {},
options: {},
searchValue: "",
showCodeImg:false,
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: "提示",
limitContent: "",
scrollViewHeight: 0,
dataList: [
{
title: "客服热线",
content: "022-24142321",
type: "tel",
},
{
title: "客服邮箱",
content: "appyilujiankang@sina.com",
type: "email",
},
{
title: "企业微信",
content: "",
type: "wxNumber",
},
{
title: "版本检测",
content: "",
type: "checkVersion",
}
],
otherList: [
{
title: "关于我们",
url: "/pages/mine/aboutUs/index",
type: "pageJump",
}
],
visitorStatus: null, //游客身份访问set
};
},
onLoad(options) {
if(options&&options.name){
this.visitorStatus = true;
}
},
computed: {
...mapState(["userInfo"]),
},
methods: {
...mapMutations(["setUserInfo"]),
closePup(){
this.showCodeImg = false
},
//退出
signOut() {
this.signShow = false;
this.setUserInfo({ token: null });
uni.removeStorageSync('countryData');
uni.redirectTo({
url: "/pages/user/login",
});
},
//注销账户
logout() {
let that = this;
uni.showModal({
title: "提示",
content: "确定要注销当前账户吗?",
success: function (res) {
if (res.confirm) {
uni.showModal({
title: "提示",
showCancel: false,
content: `注销申请已提交成功,请联系客服进行后续操作022-24142321`,
success: function (res1) {
if (res1.confirm) {
that.signOut();
}
},
});
} else if (res.cancel) {
// 取消操作
}
},
});
},
//选择
handleClickButton(type) {
switch (type) {
case 1:
this.logout();
break;
case 2:
this.signShow = true;
break;
}
},
//list操作
handleClickRightContent(row) {
switch (row.type) {
case "tel":
this.$commonJS.handleMakingPhoneCalls(row.content);
break;
case "email":
this.$commonJS.handleCopy(row.content, row.title);
break;
case "wxNumber":
this.showCodeImg = true
break;
case "checkVersion":
this.getNewVersion()
break;
case "pageJump":
uni.navigateTo({
url: row.url,
});
break;
}
},
// 版本检测
async getNewVersion(){
// #ifdef APP-PLUS
var info = await updata();
console.log('info',JSON.stringify(info))
if(info.result.code == 0){
uni.showToast({
title:info.result.message,
icon:'none'
})
}
// #endif
},
}
};
</script>
<style lang="scss" scoped>
@import "@/static/common.scss";
.box6 {
padding: 20rpx;
text-align: center;
.title {
font-size: 28rpx;
margin: 10px 0;
}
.list {
padding: 0 10px;
padding-bottom: 20rpx;
.item {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
padding-top:20rpx ;
padding-bottom:20rpx ;
line-height:40rpx;
border-radius: 50rpx;
border: 1px solid #eee;
}
.item.active {
color: $themeColor;
border: 1px solid $themeColor;
}
}
.tbn {
justify-content: center;
}
.buybtn { padding: 0 20rpx;
background-color: #00d8df;
margin: 0;
margin-right: 20rpx;
text {
color: #fff;
}
}
.saveBtnss {
align-items: center;
justify-content: center;
height: 80rpx;
overflow: hidden;
border-radius: 50rpx;
text {
padding-left: 10rpx;
font-size: 28rpx;
}
}
.gouwuche {
border: 1px solid #666;
padding-right: 20rpx;
}
}
.searchList {
.item {
font-size: 28rpx;
padding: 20rpx;
border-bottom: 1px solid #dadbde;
}
}
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.scroll-Y {
height: 100%;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
}
.titleList {
height: 100%;
}
.titleList2 {
height: calc(100% - 170rpx);
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.fdButtonBox {
color: #b0b0b0;
float: right;
padding: 4rpx 14rpx;
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
display: inline-block;
border-radius: 10rpx;
box-sizing: border-box;
}
.commonPageBox {
background-color: #f5f5f5;
}
/deep/.set_box {
background-color: #fff;
height: auto;
padding: 20rpx;
padding-bottom: 0;
padding-top: 0;
}
/deep/.titleItem {
line-height: 45rpx;
}
.button_box {
width: 100%;
position: fixed;
bottom: 40rpx;
padding: 20rpx 80rpx;
.button {
margin-top: 40rpx;
}
}
/deep/.rightArrow {
margin-top: 6rpx !important;
}
</style>

195
pages/talents/detail.vue Normal file
View File

@@ -0,0 +1,195 @@
<template>
<view class="content">
<z-nav-bar title="医生主页" bgColor="#5188e5" fontColor="#fff"></z-nav-bar>
<view class="taihu_wrap" v-if="status">
<view class="taihu_infor">
<image :src="taihuTalent.icon" class="infor_image" mode="aspectFit"></image>
<view class="infor_right">
<view class="infor_top">
<text class="infor_name">{{taihuTalent.name}}</text>
<text class="infor_title">{{taihuTalent.title}}</text>
</view>
<view class="infor_con">
<text v-for="item in label" :key="item">{{item}}</text>
</view>
</view>
</view>
<view class="taihu_common">
<text>介绍</text>
{{taihuTalent.introduce}}
</view>
<view class="taihu_common">
<text>业务专长</text>
{{taihuTalent.specialty}}
</view>
<view class="taihu_common">
<text>出诊信息</text>
{{taihuTalent.clinic}}
</view>
<view class="taihu_common">
<text>预约信息</text>
<span style="white-space: pre-line;">{{taihuTalent.reservation.replace('电话预约:', '电话预约:\n')}}</span>
</view>
<view class="taihu_common">
<text>太湖证书</text>
<view class="certificate-list" v-if="certificates.length>0">
<view class="list_block" v-for="(item,index) in displayedCertificates" :key="index" @click="showImg(item.certificateUrl)">
{{item.title}}
</view>
<view v-if="shouldShowToggle" class="toggle-btn" @click="toggleShow">
{{ showAll ? '收起' : '查看更多' }}
</view>
</view>
<view class="certificate-list" v-else>暂无</view>
</view>
</view>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
id: null,
taihuTalent: {},
label: [], //标签
certificates: [], //证书
status: false,
showAll: false, //是否显示全部
defaultShowCount: 5 //默认显示条数
}
},
computed: {
displayedCertificates() {
if (this.showAll) {
return this.certificates
} else {
return this.certificates.slice(0, this.defaultShowCount)
}
},
shouldShowToggle() {
return this.certificates.length > this.defaultShowCount
}
},
onLoad(e) {
this.id = e.id;
this.getData();
},
methods: {
//获取数据
getData() {
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/taihuTalent/taihuTalentInfo',
method: "POST",
data: {
id: this.id
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if (res.code==0) {
uni.hideLoading();
this.status = true;
this.taihuTalent = res.taihuTalent;
this.label = res.label;
this.certificates = res.certificates;
}
});
},
//点击展示全部
toggleShow() {
this.showAll = !this.showAll
},
//展示图片
showImg(data){
let url = '';
if(data){
url = data.split(',')[0];
uni.previewImage({
urls: [url],
current: 0
});
}else{
this.$commonJS.showToast("暂无证书图片");
}
}
},
}
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
.content{
height: 100%;
overflow: auto;
background-color: #fff;
}
.taihu_wrap{
padding: 30rpx 30rpx 50rpx;
}
.taihu_infor{
display: flex;
align-items: center;
padding-bottom: 10rpx;
}
.infor_image{
display: block;
width: 180rpx;
height: 220rpx;
}
.infor_right{
width: calc(100% - 220rpx);
margin-left: 40rpx;
}
.infor_top{
display: flex;
align-items: center;
line-height: 40rpx;
}
.infor_name{
font-size: 38rpx;
color: #333;
font-weight: bold;
}
.infor_title{
font-size: 34rpx;
color: #999;
padding-left: 20rpx;
}
.infor_con{
padding-top: 20rpx;
text{
display: block;
font-size: 30rpx;
line-height: 34rpx;
padding: 8rpx 0;
color: $themeColor;
}
}
.taihu_common{
margin-top: 30rpx;
font-size: 30rpx;
line-height: 46rpx;
text{
font-size: 38rpx;
padding-right: 15rpx;
font-weight: bold;
color: $themeColor;
}
}
.list_block{
padding-top: 5rpx;
}
.toggle-btn{
color: $themeColor;
}
</style>

124
pages/talents/index.vue Normal file
View File

@@ -0,0 +1,124 @@
<template>
<view class="content">
<z-nav-bar title="太湖英才" bgColor="#5188e5" fontColor="#fff"></z-nav-bar>
<view class="talents_list">
<view class="talents_item" v-for="(item,index) in list" :key="index" @click="goToDetail(item.id)">
<image :src="item.icon" class="item_image" mode="aspectFit"></image>
<view class="item_right">
<view class="item_top">
<text class="item_name">{{item.name}}</text>
<text class="item_title">{{item.title}}</text>
</view>
<text class="item_con">{{item.introduce}}</text>
</view>
</view>
</view>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
name: '',
region: '',
list: []
}
},
onLoad() {
uni.hideTabBar();
this.getData();
},
onShow() {
uni.removeStorageSync('homeParams');
},
methods: {
//获取数据
getData() {
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'common/taihuTalent/getTaihuTalents',
method: "POST",
data: {
name: this.name,
region: this.region
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
uni.hideLoading();
if (res.list&&res.list.length>0) {
this.list = res.list;
}
});
},
//详情
goToDetail(id){
uni.navigateTo({
url: '/pages/talents/detail?id='+id,
});
},
},
}
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
.content{
height: 100%;
overflow: auto;
background-color: #fff;
}
.talents_list{
margin: 20rpx 30rpx;
}
.talents_item{
border: 1rpx solid $themeColor;
border-radius: 15rpx;
margin-bottom: 20rpx;
padding: 25rpx;
display: flex;
align-items: center;
}
.item_image{
display: block;
width: 160rpx;
height: 200rpx;
}
.item_right{
width: calc(100% - 200rpx);
margin-left: 30rpx;
}
.item_top{
display: flex;
align-items: center;
line-height: 40rpx;
}
.item_name{
font-size: 34rpx;
color: #333;
font-weight: bold;
}
.item_title{
font-size: 32rpx;
color: #999;
padding-left: 20rpx;
}
.item_con{
font-size: 30rpx;
color: #666;
margin-top: 10rpx;
line-height: 40rpx;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

873
pages/user/forget.vue Normal file
View File

@@ -0,0 +1,873 @@
<template>
<view class="page commonPage">
<view class="logo_bg">
<z-nav-bar title="" bgColor="none" fontColor="#fff"></z-nav-bar>
<view class="title PM_font">忘记密码</view>
</view>
<!-- 验证码登录 -->
<view class="register_page">
<input type="password" style="width: 0; height: 0; min-height: 0" />
<input
type="text"
autocomplete="off"
style="width: 0; height: 0; min-height: 0"
/>
<view class="flexbox" style="margin-top: 50rpx">
<view
class="input_tit emaPho"
style="margin-top: 0; margin-right: 20rpx"
>
<view
@click="handleChangeIsPassWordPhone"
:class="{ active: isPassWordPhone }"
>手机号</view
>
<span>/</span>
<view
@click="handleChangeIsPassWordPhone"
:class="{ active: !isPassWordPhone }"
>邮箱</view
>
</view>
</view>
<!-- 带区号手机号 -->
<view
class="flexbox"
v-if="isPassWordPhone"
style="margin: 36rpx 0; justify-content: space-between"
>
<view class="quhao">
<uni-data-select
class="myselect"
placeholder="请选择区号"
v-model="resetForm.quCode"
:localdata="quCodeList"
style="height: 30rpx !important"
@change="quChange"
></uni-data-select>
</view>
<view
class="triangle borderBottom phoneNumberInput"
:clasfs="[type == 1000 ? 'left_triangle' : 'right_triangle']"
>
<u--input
class="form_input_box"
type="number"
v-model="resetForm.phone"
placeholder="请输入您的手机号"
placeholder-class="grey"
/>
</view>
</view>
<view class="input_box" v-else>
<u--input
class="form_input_box"
v-model="resetForm.phone"
placeholder="请输入您的邮箱"
placeholder-class="grey"
/>
</view>
<view class="input_tit">验证码</view>
<view class="input_box">
<u--input
type="number"
class="form_input_box"
v-model="resetForm.code"
placeholder="请输入验证码"
placeholder-class="grey"
maxlength="6"
/>
<button class="sendCode" @click="getCode" size="mini">
{{ codeText }}
</button>
</view>
<view class="input_tit">密码</view>
<view class="input_box">
<u--input
class="form_input_box"
type="password"
maxlength="8"
v-model="resetForm.password"
placeholder="请输入密码"
@input="inputMethod(resetForm.password)"
/>
</view>
<view class="input_tit">确认密码</view>
<view class="input_box">
<u--input
type="password"
class="form_input_box"
maxlength="8"
v-model="resetForm.confirmPassword"
placeholder="请确认密码"
/>
</view>
<view class="btn_box">
<button @click="onSubmit"> </button>
</view>
</view>
</view>
</template>
<script>
// 密码验证的正则
//1、密码为八位及以上并且字母数字特殊字符三项都包括
var strongRegex = new RegExp(
"^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$",
"g"
);
//2、密码为八位及以上并且字母、数字、特殊字符三项中有两项强度是中等
var mediumRegex = new RegExp(
"^(?=.{8,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[a-z])(?=.*\\W))|((?=.*[0-9])(?=.*\\W))|((?=.*[A-Z])(?=.*\\W))).*$",
"g"
);
var enoughRegex = new RegExp("(?=.{8,}).*", "g");
var clear;
export default {
data() {
return {
quCodeList: [], // 国家区域码
isPassWordPhone: true,
resetForm: {},
playData: {},
type: '',
codeText: "获取验证码",
//验证码已发
readonly: false,
passwordOk: false,
note: "",
str2: "",
urlList: {
sendcode: "common/user/sms/sendcode", //密码登录
sendEmailcode: "common/user/getMailCaptcha", //密码登录
setPassword: "common/user/setPasswordByCode", //重置密码
},
};
},
//第一次加载
onLoad(e) {
this.getCountyCode();
},
//页面显示
onShow() {},
//方法
methods: {
// 获取国家区域编码
getCountyCode() {
this.$http
.request({
url: "book/baseArea/getAllBaseArea",
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0 && res.baseAreas.length > 0) {
this.quCodeList = res.baseAreas.map((item) => {
let obj = {
text: item.title + " (+" + item.code + ")",
value: item.code,
};
return obj;
});
this.resetForm.quCode = this.quCodeList[0].value;
this.$forceUpdate();
} else {
this.quCodeList = [];
}
})
.catch((e) => {
console.log(e, "e");
});
},
handleChangeIsPassWordPhone() {
this.resetForm = {};
this.note = null;
this.isPassWordPhone = !this.isPassWordPhone;
this.resetForm.quCode = this.quCodeList[0].value;
this.OpenClear();
},
// 密码验证
inputMethod(value) {
this.passwordOk = false;
if (strongRegex.test(value)) {
this.str2 = "<span style='color:#18bc37'>密码强度很不错哦!</span>";
this.note = "";
this.passwordOk = true;
} else if (mediumRegex.test(value)) {
this.note =
"请至少使用大小写字母、数字、符号两种类型组合的密码长度为8位。";
this.str2 = "<span style='color:#2979ff'>密码强度中等!</span>";
this.passwordOk = true;
} else if (enoughRegex.test(value)) {
this.note =
"请至少使用大小写字母、数字、符号两种类型组合的密码长度为8位。";
} else {
this.passwordOk = false;
this.note =
"请至少使用大小写字母、数字、符号两种类型组合的密码长度为8位。";
this.str2 = "";
}
},
//获取验证码
async getCode() {
var data = {};
if (this.readonly) {
this.$commonJS.showToast("验证码已发送");
return;
}
if (this.isPassWordPhone) {
data.phone = this.resetForm.phone;
if (!this.resetForm.phone) {
this.$commonJS.showToast("请输入手机号");
return;
}
if (!this.$base.phoneRegular.test(this.resetForm.phone)) {
this.$commonJS.showToast("手机号格式不正确");
return;
}
} else {
data.email = this.resetForm.phone;
if (!this.resetForm.phone) {
this.$commonJS.showToast("请输入邮箱");
return;
}
if (!this.$base.mailRegular.test(this.resetForm.phone)) {
this.$commonJS.showToast("邮箱格式不正确");
return;
}
}
await this.$http
.post(
this.isPassWordPhone
? this.urlList.sendcode
: this.urlList.sendEmailcode,
data
)
.then((res) => {
this.getCodeState();
});
},
//验证码按钮文字状态
getCodeState() {
const _this = this;
this.readonly = true;
this.codeText = "60S后重新获取";
var s = 60;
clear = setInterval(() => {
s--;
_this.codeText = s + "S后重新获取";
if (s <= 0) {
clearInterval(clear);
_this.codeText = "获取验证码";
_this.readonly = false;
}
}, 1000);
},
// 清除验证码
OpenClear() {
clearInterval(clear);
this.codeText = "获取验证码";
this.readonly = false;
},
onSubmit() {
var data = {};
if (this.isPassWordPhone) {
data.phone = this.resetForm.phone;
if (!this.resetForm.phone) {
this.$commonJS.showToast("请输入手机号");
return;
}
if (this.resetForm.quCode == null || this.resetForm.quCode == 86) {
if (!this.$base.phoneRegular.test(this.resetForm.phone)) {
this.$commonJS.showToast("手机号格式不正确");
return;
}
}
} else {
data.email = this.resetForm.phone;
if (!this.resetForm.phone) {
this.$commonJS.showToast("请输入邮箱");
return;
}
if (!this.$base.mailRegular.test(this.resetForm.phone)) {
this.$commonJS.showToast("邮箱格式不正确");
return;
}
}
if (!this.resetForm.code) {
this.$commonJS.showToast("请输入验证码");
return;
}
if (!this.resetForm.password) {
this.$commonJS.showToast("请输入密码");
return;
}
if (!this.resetForm.confirmPassword) {
this.$commonJS.showToast("请输入确认密码");
return;
}
if (this.resetForm.confirmPassword != this.resetForm.password) {
this.$commonJS.showToast("两次密码不一致");
return;
}
if (!this.$base.passwordRegular.test(this.resetForm.password)) {
this.$commonJS.showToast("请输入不少于6位且包含数字和字母的密码");
return;
}
if (!this.passwordOk) {
this.$commonJS.showToast(this.note);
return;
}
this.$http
.post(this.urlList.setPassword, {
phone: this.resetForm.phone,
code: this.resetForm.code,
password: this.resetForm.password,
})
.then((res) => {
if (res.code == 0) {
this.$commonJS.showToast("密码修改成功!");
setTimeout(() => {
uni.navigateBack();
}, 1000);
}
});
},
},
//页面隐藏
onHide() {},
//页面卸载
onUnload() {},
//页面下来刷新
onPullDownRefresh() {},
//页面上拉触底
onReachBottom() {}
};
</script>
<style lang="scss" scoped>
@import "@/static/mixin.scss";
.page {
.title {
padding: 60rpx 0 80rpx 0;
font-size: 80rpx;
color: #fff;
}
.input_box {
display: flex;
justify-content: space-between;
height: 100rpx;
padding-top: 0rpx;
border-bottom: 1rpx solid #eeeeee;
align-items: center;
text {
font-size: 30rpx;
width: 180rpx;
}
input {
flex: 1;
height: 70rpx;
line-height: 70rpx;
font-size: 30rpx;
}
button {
height: 78rpx;
line-height: 78rpx;
font-size: 30rpx;
color: $themeColor;
&:active {
background-color: transparent;
}
}
}
.btn_box {
width: calc(100% - 100rpx);
left: 50rpx;
position: absolute;
bottom: 8vh;
button {
font-size: 32rpx;
background: $themeBgColor;
color: #fff;
height: 80rpx;
line-height: 80rpx;
border-radius: 50rpx;
}
}
.protocol {
font-size: 24rpx;
color: #999999;
text-align: center;
margin-top: 20rpx;
text {
color: $themeColor;
}
}
}
.commonPage {
padding: 0;
background: #fff;
}
.forget_box {
padding: 0 40rpx;
background: #fff;
padding-bottom: 40rpx;
}
.logo_bg {
background-image: url("@/static/login_bg.png");
padding: 0 40rpx;
background-repeat: no-repeat;
background-size: 100% 100%;
height: 25vh;
position: relative;
text {
font-size: 45upx;
line-height: 65rpx;
position: absolute;
bottom: 110rpx;
left: 60rpx;
color: #fff;
letter-spacing: 6rpx;
}
.icon_hua_1 {
position: absolute;
bottom: 60rpx;
left: 245rpx;
width: 150rpx;
height: 150rpx;
opacity: 0.08;
}
.icon_hua_2 {
position: absolute;
bottom: 10rpx;
right: 30rpx;
width: 250rpx;
height: 250rpx;
opacity: 0.15;
}
}
.phoneNumberInput {
width: calc(100% - 160rpx);
height: 67rpx;
input {
font-size: 28rpx;
margin: 20rpx 0;
}
}
.borderBottom {
border-bottom: 1px solid #efeef4;
}
.flexbox {
display: flex;
}
.quhao {
height: 50rpx;
width: 290rpx;
margin: 12rpx 15rpx 0 0;
}
.myselect {
width: 240rpx;
height: 50rpx !important;
/deep/.uni-select {
font-size: 24rpx;
}
/deep/.uni-select__selector-item {
font-size: 24rpx;
}
}
.highlight {
color: $themeColor;
}
.tanchu {
padding: 40rpx 30rpx 40rpx 30rpx;
position: relative;
}
.logo_bg {
background-image: url("@/static/login_bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
height: 25vh;
position: relative;
text {
font-size: 45upx;
line-height: 65rpx;
position: absolute;
bottom: 110rpx;
left: 60rpx;
color: #fff;
letter-spacing: 6rpx;
}
.icon_hua_1 {
position: absolute;
bottom: 60rpx;
left: 245rpx;
width: 150rpx;
height: 150rpx;
opacity: 0.08;
}
.icon_hua_2 {
position: absolute;
bottom: 10rpx;
right: 30rpx;
width: 250rpx;
height: 250rpx;
opacity: 0.15;
}
}
.register_page {
padding: calc(var(--status-bar-height)) 50rpx 40rpx;
background-color: #fff;
min-height: 75vh;
.login_method {
justify-content: space-between;
padding: 0 96rpx;
text-align: center;
.title {
margin: 0 auto;
font-size: 40rpx;
letter-spacing: 3rpx;
color: #666;
&.active {
position: relative;
color: $themeColor;
padding-bottom: 35rpx;
font-weight: bold;
}
&.active::after {
bottom: 0;
left: 50%;
transform: translateX(-50%) translateY(-50%);
position: absolute;
content: "";
width: 150rpx;
height: 6rpx;
background-color: $themeColor;
}
}
}
.left_triangle {
&::before {
left: 140rpx;
}
&::after {
left: 140rpx;
}
}
.right_triangle {
&::before {
left: 470rpx;
}
&::after {
left: 470rpx;
}
}
.input_tit {
margin-top: 40rpx;
font-size: 34rpx;
font-weight: bold;
color: $themeColor;
}
.emaPho {
}
.emaPho > view {
display: inline-block;
padding: 10rpx 0;
color: #888;
}
.emaPho > view.active {
color: $themeColor;
padding: 10rpx 10rpx;
border-bottom: 2px solid $themeColor;
font-weight: bold;
}
.emaPho > span {
display: inline-block;
margin: 0 30rpx;
color: #ccc;
}
.input_box {
display: flex;
align-items: center;
border-radius: 8rpx;
border-bottom: solid 2rpx #efeef4;
image {
width: 36rpx;
height: 24rpx;
}
input {
flex: 1;
font-size: 28rpx;
color: #333;
height: 70rpx;
}
.input_item {
font-size: 28rpx;
border: 0px;
flex: 1;
height: 70rpx;
width: 100%;
outline: none;
}
button {
height: 60rpx;
background-color: #f8f9fb;
font-size: 28rpx;
padding: 0 14rpx;
color: $themeColor;
line-height: 60rpx;
margin-left: 20rpx;
}
.grey {
color: #999999;
}
}
.password_register {
margin-top: 40rpx;
display: flex;
justify-content: space-between;
text {
font-size: 28rpx;
color: #333333;
}
}
.protocol_box {
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
font-size: 28rpx;
color: #333333;
.select {
width: 36rpx;
height: 36rpx;
background-image: url("@/static/icon/ic_gender_unselected.png");
background-position: center center;
background-repeat: no-repeat;
background-size: 100% auto;
margin-right: 15rpx;
&.active {
background-image: url("@/static/icon/ic_agreed.png");
}
}
> text {
color: $themeColor;
}
}
}
.station {
height: 230rpx;
}
.third_party_login_box {
position: fixed;
bottom: 60rpx;
width: 100%;
left: 0;
padding: 0 30rpx;
.third_party_title {
display: flex;
align-items: center;
&:before,
&:after {
content: "";
flex: 1;
height: 2rpx;
background-color: #f5f5f5;
}
text {
font-size: 24rpx;
color: #999999;
flex-shrink: 0;
padding: 0 20rpx;
}
}
.third_party_content {
margin-top: 60rpx;
display: flex;
justify-content: center;
align-items: center;
image {
width: 80upx;
height: 80upx;
margin: 0 20rpx;
}
}
}
.popup_box {
width: 600upx;
border-radius: 10rpx;
.popup_title {
display: flex;
justify-content: center;
height: 88upx;
line-height: 88upx;
view {
align-items: center;
font-size: 30upx;
display: flex;
image {
width: 50upx;
height: 50upx;
margin: 0 20rpx 0 0;
}
}
}
.popup_content {
padding: 30rpx 40rpx;
}
.popup_footer {
display: flex;
justify-content: center;
view {
width: 45%;
flex-shrink: 0;
text-align: center;
font-size: 28upx;
color: #999;
line-height: 70upx;
margin: 0 0 30rpx 0;
}
view:last-child {
background-color: $themeColor;
color: #fff;
border-radius: 50rpx;
}
}
}
.dp_title {
font-size: 36rpx;
margin-bottom: 50rpx;
color: #555;
text-align: center;
font-weight: bold;
}
.dp_content {
max-height: 1000rpx;
overflow-y: scroll;
font-size: 28rpx;
color: #555;
line-height: 45rpx;
.dp_con1 {
font-weight: bold;
font-size: 32rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
}
.qie_huan {
font-size: 26rpx;
margin: 20rpx 0 0 0;
text-align: center;
}
.comTy {
font-size: 28rpx;
line-height: 46rpx;
text-align: left;
}
.youKeL {
display: flex;
justify-content: center;
margin: 30rpx 0 0 0;
font-size: 26rpx;
color: $themeColor;
view {
font-weight: bold;
border: 1px solid $themeColor;
border-radius: 10rpx;
padding: 5rpx 15rpx;
}
}
</style>

1112
pages/user/login.vue Normal file

File diff suppressed because it is too large Load Diff

376
pages/user/workOrder.vue Normal file
View File

@@ -0,0 +1,376 @@
<template>
<view class="page">
<z-nav-bar title="问题反馈/申诉"></z-nav-bar>
<uni-forms :modelValue="form" :rules="rules" ref="form" style="margin-top: 10rpx;">
<view class="input_box">
<uni-forms-item label="" name="type" label-width="0">
<view class="">
<text class="input_tit"><i>*</i>问题类型</text>
</view>
<view class="in" style="flex: 1; border: none;">
<uni-data-select style="width: 100%;" v-model="form.type"
:localdata="typeLIst"></uni-data-select>
</view>
</uni-forms-item>
</view>
<view class="input_box">
<uni-forms-item label="" name="account" label-width="0">
<text class="input_tit"><i>*</i>太湖云医账号:</text>
<view class="in">
<input placeholder-style="font-size:26rpx" type="text" v-model="form.account"
placeholder="请输入手机号/邮箱" />
</view>
</uni-forms-item>
</view>
<view class="input_box" v-if="form.type == 3">
<uni-forms-item label="" name="relation" label-width="0">
<text class="input_tit"><i>*</i>订单编号:</text>
<view class="in">
<input type="number" @input="relationInput" placeholder-style="font-size:26rpx"
v-model="form.relation" placeholder="请输入订单编号" />
</view>
<text v-show="relationError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">请填写订单编号</text>
<text v-show="relationErrorPattern"
style="font-size: 24rpx; color: red; margin-top: 10rpx;">订单编号格式错误</text>
</uni-forms-item>
</view>
<view class="input_box">
<uni-forms-item label="" name="content" label-width="0">
<text class="input_tit"><i>*</i>问题描述:</text>
<view class="in">
<view class="uni-textarea">
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="200"
placeholder="请输入您要反馈的问题" />
</view>
</view>
</uni-forms-item>
</view>
<view class="input_box">
<uni-forms-item label="" name="contactInformation" label-width="0">
<text class="input_tit"><i>*</i>联系电话:</text>
{{reversedMessage}}
<view class="in">
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
</view>
<text v-show="telError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">手机号格式错误</text>
</uni-forms-item>
</view>
<view class="input_box">
<text class="input_tit">问题截图:</text>
<view class="in" style="border: none;" @click="checkPermision">
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
width="40" height="40" :previewFullImage="true">
</u-upload>
<text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text>
</view>
</view>
</uni-forms>
<view class="btn_box"><button @click="onSubmit"> </button></view>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import permission from "@/js_sdk/wa-permission/permission.js"
import {
mapState,
mapMutations
} from 'vuex';
export default {
data() {
return {
fileList1: [],
playData: {},
//手机号账号
form: {
account: '', // 账号
content: '', // 描述
image: '', //图片
contactInformation: '', // 联系电话
relation: '', // 订单号
type: null, // 反馈类型
},
telError: false,
relationError: false,
relationErrorPattern: false,
rules: {
account: {
rules: [{
required: true,
errorMessage: '请输入账号',
}
]
},
content: {
rules: [{
required: true,
errorMessage: '请输入问题描述',
}
]
},
contactInformation: {
rules: [{
required: true,
errorMessage: '请输入联系电话',
}
]
},
type: {
rules: [{
required: true,
errorMessage: '请选择反馈类型',
}
]
}
},
pageType: '',
typeLIst: [
{
value: "1",
text: "登录相关问题"
},
{
value: "2",
text: "账号相关问题"
},
{
value: "3",
text: "问答相关问题"
},
{
value: "5",
text: "病历相关问题"
},
{
value: "6",
text: "充值相关问题"
},
{
value: "7",
text: "网络暴力举报"
},
{
value: "8",
text: "其他"
},
],
};
},
//第一次加载
onLoad(e) {
this.pageType = e.name
switch (this.pageType) {
case "login":
this.form.type = '1'
break;
case "order":
this.form.type = '3'
break;
}
},
//页面显示
onShow() {
},
computed: {
...mapState(['userInfo']),
reversedMessage: function() {
this.form.account = this.userInfo.tel
}
},
//方法
methods: {
relationInput(e) {
this.relationError = false
this.relationErrorPattern = false
},
telInput(e) {
this.telError = false
},
async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
},
async addPic(e) {
let that = this;
for (var i = 0; i < e.file.length; i++) {
uni.uploadFile({
url: this.$baseUrl + "/oss/fileoss",
filePath: e.file[i].url,
name: "file",
formData: {},
success: (res) => {
that.fileList1.push({
url: JSON.parse(res.data).url,
});
},
fail: (error) => {
},
});
}
},
deletePic(event) {
this.fileList1.splice(event.index, 1)
},
onSubmit() {
this.$refs.form.validate().then(res => {
if (this.form.type == 3) {
if (this.form.relation == '') {
this.relationError = true
return
} else {
if (!this.$base.orderRegular.test(this.form.relation)) {
this.relationErrorPattern = true
return
}
}
}
if (this.fileList1.length > 0) {
let _list = this.fileList1
_list = _list.map(item => item.url)
this.form.image = _list.join(',')
}
if (!this.$base.phoneRegular.test(this.form.contactInformation)) {
this.telError = true
uni.showToast({
title: '手机格式不正确',
icon: 'none'
});
return;
}
$http.request({
url: "common/sysFeedback/addSysFeedback",
method: "POST",
data: {
...this.form
},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
uni.showModal({
title: "提示",
content: "提交成功!",
showCancel: false,
success: (res) => {
this.fileList1 = []
uni.switchTab({
url: '/pages/my/index'
});
}
});
}).catch(e => {
uni.showToast({
title: '提交失败',
icon: 'error'
})
});
}).catch(err => {
uni.showToast({
title: '页面有未填写的内容哦',
icon: 'none'
})
})
}
}
};
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
::v-deep .uni-forms-item {
margin-bottom: 26rpx !important;
}
.input_tit {
font-weight: bold;
}
.page {
background-color: #ffffff;
padding: 0 20rpx;
min-height: 100vh;
.title {
padding: 30rpx 0 40rpx 0;
font-size: 40rpx;
color: #333333;
}
.input_box {
display: block;
padding-top: 10rpx;
align-items: center;
i {
font-size: 24rpx;
color: red;
padding-right: 10rpx;
}
.in {
border: 1rpx solid #eeeeee;
border-radius: 8rpx;
padding: 8rpx;
margin-top: 10rpx;
}
text {
font-size: 30rpx;
width: 180rpx;
}
input {
flex: 1;
height: 50rpx;
font-size: 30rpx;
}
button {
height: 78rpx;
line-height: 78rpx;
font-size: 30rpx;
color: $themeColor;
&:active {
background-color: transparent;
}
}
}
.btn_box {
margin-top: 70rpx;
padding-bottom: 20rpx;
button {
font-size: 30rpx;
background: linear-gradient(90deg, #005eae 0%, #5188e5 80%);
color: #fff;
line-height: 85rpx;
border-radius: 50rpx;
}
}
.protocol {
font-size: 24rpx;
color: #999999;
text-align: center;
margin-top: 20rpx;
text {
color: $themeColor;
}
}
}
</style>

48
pages/wumen/index.vue Normal file
View File

@@ -0,0 +1,48 @@
<template>
<view class="content">
<z-nav-bar title="吴门医述"></z-nav-bar>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
list: [],
}
},
onLoad() {
uni.hideTabBar();
},
methods: {
//获取数据
getData() {
this.$http.request({
url: 'common/ragFlowApi/getChatAssistants',
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if (res.list&&res.list.length>0) {
}
});
}
},
}
</script>
<style lang="scss" scoped>
@import '@/static/mixin.scss';
.content{
height: 100%;
overflow: auto;
background-color: #fff;
}
</style>