组件合并,群公告指向修复
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<script>
|
||||
import im from '@/utils/im/index.js'
|
||||
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
import imBase from '../../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
@@ -8,11 +8,11 @@
|
||||
<script>
|
||||
import im from '@/utils/im/index.js'
|
||||
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
import imBase from '../../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
],
|
||||
props: {
|
||||
conversationType: {
|
||||
@@ -42,17 +42,17 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
focusState: false,
|
||||
focusState: false,
|
||||
inputTxt: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sent() {
|
||||
if (!this.disabled) {
|
||||
im.sentText(this.conversationType, this.targetId, this.inputTxt, this.sender, () => {
|
||||
if (!this.disabled) {
|
||||
im.sentText(this.conversationType, this.targetId, this.inputTxt, this.sender, () => {
|
||||
RongIMLib.clearTextMessageDraft(this.conversationType, this.targetId)
|
||||
this.$emit('success')
|
||||
this.inputTxt = ''
|
||||
this.inputTxt = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -14,8 +14,8 @@
|
||||
<script>
|
||||
import im from '@/utils/im/index.js'
|
||||
import permision from '@/utils/permission.js'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
import imBase from '../../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
@@ -16,9 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sentText from './sentText'
|
||||
import sentVoice from './sentVoice'
|
||||
import sentPopups from './sentPopups'
|
||||
import sentText from './sent/sentText'
|
||||
import sentVoice from './sent/sentVoice'
|
||||
import sentPopups from './sent/sentPopups'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="msg--text">
|
||||
<message-state :message="message" :isGroup="isGroup" :isRemote="isRemote" />
|
||||
|
||||
|
||||
<view class="">
|
||||
<view class="name" v-if="isGroup && isRemote">{{ contact(message.senderUserId).name }}</view>
|
||||
<view :class="['text', isRemote ? 'left': 'right']">{{ content }}</view>
|
||||
@@ -11,11 +11,13 @@
|
||||
|
||||
<script>
|
||||
import messageState from './messageState'
|
||||
import imBase from '../../mixins/imBase.js'
|
||||
|
||||
import imBase from '../../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
name: 'showText',
|
||||
mixins:[imBase],
|
||||
name: 'showText',
|
||||
mixins: [
|
||||
imBase,
|
||||
],
|
||||
props: {
|
||||
message: {
|
||||
type: Object,
|
||||
@@ -49,14 +51,13 @@
|
||||
|
||||
.name {
|
||||
font-size: 24rpx;
|
||||
color: $text-gray-m;
|
||||
margin-bottom: 10rpx;
|
||||
color: $text-gray-m;
|
||||
}
|
||||
|
||||
.text {
|
||||
box-sizing: border-box;
|
||||
max-width: 502rpx;
|
||||
padding:10rpx 24rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
line-height: 46rpx;
|
||||
font-size: 32rpx;
|
||||
color: $text-color;
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
}
|
||||
},
|
||||
// 跳转群公告
|
||||
toAnnounce(targetId) {
|
||||
toAnnounce(targetId) {
|
||||
if (targetId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId
|
||||
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.message.targetId + '&aId=' + targetId
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<view class="create">
|
||||
<view class="create-title">公告内容</view>
|
||||
<block v-if="type !== 'check'">
|
||||
<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 === 'check'">
|
||||
<view class="content-a"> {{content}} </view>
|
||||
<view class="content"> {{content}} </view>
|
||||
</block>
|
||||
|
||||
<block v-else>
|
||||
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
|
||||
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
@@ -30,15 +32,18 @@
|
||||
type: '' // check ' 查看详情'
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
onLoad(e) {
|
||||
console.log('E', e);
|
||||
this.targetId = e.targetId
|
||||
if (e.type) {
|
||||
this.type = e.type
|
||||
}
|
||||
if (e.aId) {
|
||||
this.aId = e.aId
|
||||
uni.setNavigationBarTitle({
|
||||
title: '群公告'
|
||||
})
|
||||
getGroupAnnouncement(this.targetId, this.aId).then(res => {
|
||||
console.log(res.content)
|
||||
this.content = res.content
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -99,7 +104,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.content-a {
|
||||
.content {
|
||||
color: $text-color;
|
||||
font-size: $title-size;
|
||||
line-height: 1.7;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
onNavigationBarButtonTap() {
|
||||
if (this.isAdmin) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId
|
||||
url: '/pages/im/group/announceCreate?targetId=' + this.targetId
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import utils from '@/utils/index.js'
|
||||
|
||||
export default {
|
||||
onLoad() {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
contact() {
|
||||
return function(targetId) {
|
||||
|
||||
Reference in New Issue
Block a user