|
@@ -1,6 +1,55 @@
|
|
|
<template>
|
|
|
<view class="main">
|
|
|
- 群组
|
|
|
+ <view class="one">
|
|
|
+ <view class="one_1">群组成员({{total||0}})</view>
|
|
|
+ <view class="one_2">
|
|
|
+ <view class="list" v-for="(item, index) in personList" :key="index" @tap="toChat(item)">
|
|
|
+ <view class="url">
|
|
|
+ <image class="image"
|
|
|
+ :src="item.icon&&item.icon.length>0?item.icon[0].url:config.user_url[0].url" mode="">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="name textOne">{{item.name||'暂无姓名'}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="one_3">
|
|
|
+ <view class="more" @tap="toMore">查看更多群成员 <text class="iconfont icon-dayuhao"></text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="two">
|
|
|
+ <view class="two_1">医生信息</view>
|
|
|
+ <view class="two_2">
|
|
|
+ <image class="image"
|
|
|
+ :src="doctorInfo.icon&&doctorInfo.icon.length>0?doctorInfo.icon[0].url:config.user_url[0].url"
|
|
|
+ mode="">
|
|
|
+ </image>
|
|
|
+ <view class="name textOver">姓名:{{doctorInfo.name||'暂无'}}</view>
|
|
|
+ <view class="other">
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>手机号:</text>{{doctorInfo.mobile||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>医院名称:</text>{{doctorInfo.hos_name||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>科室名称:</text>{{doctorInfo.dept_name||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>职称:</text>{{doctorInfo.post||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>职务:</text>{{doctorInfo.title||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view class="other_1 textOne">
|
|
|
+ <text>简介:</text>{{doctorInfo.content||'暂无'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="thr">
|
|
|
+ <view class="thr_1">群简介</view>
|
|
|
+ <view class="thr_2">{{info.content||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -8,7 +57,15 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- id: ''
|
|
|
+ id: '',
|
|
|
+ config: {},
|
|
|
+ info: {},
|
|
|
+ // 群成员
|
|
|
+ personList: [],
|
|
|
+ doctorInfo: {},
|
|
|
+ total: 0,
|
|
|
+ skip: 0,
|
|
|
+ limit: 20,
|
|
|
}
|
|
|
},
|
|
|
onLoad: async function(e) {
|
|
@@ -17,12 +74,62 @@
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: e && e.title || '群组'
|
|
|
});
|
|
|
- },
|
|
|
- onShow: async function(e) {
|
|
|
- const that = this;
|
|
|
+ await that.searchConfig();
|
|
|
+ await that.search();
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ searchConfig() {
|
|
|
+ const that = this;
|
|
|
+ try {
|
|
|
+ const res = uni.getStorageSync('config');
|
|
|
+ if (res) that.$set(that, `config`, res);
|
|
|
+ } catch (e) {
|
|
|
+ uni.showToast({
|
|
|
+ title: err.errmsg,
|
|
|
+ icon: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async search() {
|
|
|
+ const that = this;
|
|
|
+ if (that.id) {
|
|
|
+ const res = await that.$api(`/group/${that.id}`, 'GET', {})
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ that.$set(that, `info`, res.data)
|
|
|
+ that.$set(that, `total`, res.data.patients.length)
|
|
|
+ that.$set(that, `doctorInfo`, res.data.doctor)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 群成员
|
|
|
+ let info = {
|
|
|
+ skip: that.skip,
|
|
|
+ limit: that.limit,
|
|
|
+ groupId: that.id
|
|
|
+ }
|
|
|
+ const arr = await that.$api(`/group/getPaitentList`, 'GET', {
|
|
|
+ ...info
|
|
|
+ })
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ that.$set(that, `personList`, arr.data)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 聊天
|
|
|
+ toChat(item) {
|
|
|
+ console.log(item);
|
|
|
+ },
|
|
|
+ // 查看更多成员
|
|
|
+ toMore() {
|
|
|
+ console.log('查看更多成员');
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -30,5 +137,103 @@
|
|
|
<style lang="scss" scoped>
|
|
|
.main {
|
|
|
padding: 2vw;
|
|
|
+ background-color: var(--f9Color);
|
|
|
+
|
|
|
+ .one {
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .one_1 {
|
|
|
+ text-align: center;
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .one_2 {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ width: 15vw;
|
|
|
+ margin: 2vw;
|
|
|
+
|
|
|
+ .image {
|
|
|
+ width: 15vw;
|
|
|
+ height: 15vw;
|
|
|
+ border-radius: 2vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ margin: 1vw 0 0 0;
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .one_3 {
|
|
|
+ .more {
|
|
|
+ text-align: center;
|
|
|
+ padding: 4vw;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--f69Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .two {
|
|
|
+ padding: 2vw;
|
|
|
+ margin: 2vw 0;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .two_1 {
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .two_2 {
|
|
|
+ padding: 2vw 0;
|
|
|
+
|
|
|
+ .image {
|
|
|
+ width: 20vw;
|
|
|
+ height: 20vw;
|
|
|
+ border-radius: 2vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .other {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--f69Color);
|
|
|
+
|
|
|
+ .other_1 {
|
|
|
+ margin: 1vw 0 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .thr {
|
|
|
+ padding: 2vw;
|
|
|
+ margin: 2vw 0;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .thr_1 {
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .thr_2 {
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--f69Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|