h大健康群公告列表页面重构,详情页处理接口及样式兼容,群消息页面的群公告显示重构,群聊邀请审核扫码模式处理接口及样式;
This commit is contained in:
@@ -1,35 +1,63 @@
|
||||
<template>
|
||||
<view class="create">
|
||||
<view class="create-title">公告内容</view>
|
||||
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
|
||||
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
|
||||
<block v-if="type !== 'cheack'">
|
||||
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
|
||||
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
|
||||
</block>
|
||||
<block v-if="type === 'cheack'">
|
||||
<view class="content-a"> {{content}} </view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createGroupAnnouncement
|
||||
createGroupAnnouncement,
|
||||
getGroupAnnouncement
|
||||
} from '@/apis/interfaces/im.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
targetId: '',
|
||||
content: ''
|
||||
content: '',
|
||||
aId: '',
|
||||
type: '' // check ' 查看详情'
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.targetId = e.targetId
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return this.content.length == 0 || this.content.length > 200
|
||||
}
|
||||
if (e.type) {
|
||||
this.type = e.type
|
||||
console.log(this.type)
|
||||
|
||||
}
|
||||
if (e.aId) {
|
||||
this.aId = e.aId
|
||||
getGroupAnnouncement(this.targetId, this.aId).then(res => {
|
||||
console.log(res.content)
|
||||
this.content = res.content
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none',
|
||||
mask: true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return this.content.length == 0 || this.content.length > 200
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCreate() {
|
||||
createGroupAnnouncement(this.targetId, this.content).then(res => {
|
||||
uni.$emit('groupAnnouncementCreated')
|
||||
createGroupAnnouncement(this.targetId, this.content).then(res => {
|
||||
uni.$emit('groupAnnouncementCreated')
|
||||
uni.showToast({
|
||||
title: '发布成功',
|
||||
success: () => {
|
||||
@@ -52,15 +80,16 @@
|
||||
<style lang="scss" scoped>
|
||||
.create {
|
||||
padding: $padding;
|
||||
.create-title{
|
||||
|
||||
.create-title {
|
||||
font-size: $title-size + 4;
|
||||
padding: $padding - 10 0 $padding - 10 $padding - 10 ;
|
||||
padding: $padding - 10 0 $padding - 10 $padding - 10;
|
||||
color: $text-color;
|
||||
font-weight: 800;
|
||||
position: relative;
|
||||
|
||||
&::before{
|
||||
content:"";
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 10rpx;
|
||||
height: 34rpx;
|
||||
@@ -69,6 +98,13 @@
|
||||
top: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-a {
|
||||
color: $text-color;
|
||||
font-size: $title-size;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.u-button {
|
||||
margin-top: $padding;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user