mixins优化
This commit is contained in:
@@ -34,8 +34,12 @@
|
||||
<script>
|
||||
import im from '@/utils/im/index.js'
|
||||
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
callActions: [{
|
||||
@@ -64,15 +68,11 @@
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
sender() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
singleCall(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type + '&isCall=true'
|
||||
url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type +
|
||||
'&isCall=true'
|
||||
})
|
||||
},
|
||||
onPopupsItem(type) {
|
||||
@@ -144,6 +144,7 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
|
||||
.item {
|
||||
width: 150rpx;
|
||||
margin: 15rpx;
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
<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
|
||||
],
|
||||
props: {
|
||||
conversationType: {
|
||||
type: Number,
|
||||
@@ -23,9 +27,6 @@
|
||||
computed: {
|
||||
disabled() {
|
||||
return this.inputTxt.length === 0
|
||||
},
|
||||
sender() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -14,8 +14,12 @@
|
||||
<script>
|
||||
import im from '@/utils/im/index.js'
|
||||
import permision from '@/utils/permission.js'
|
||||
import imBase from '../mixins/imBase.js'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
imBase
|
||||
],
|
||||
props: {
|
||||
conversationType: {
|
||||
type: Number,
|
||||
@@ -35,11 +39,6 @@
|
||||
recorderManager: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
sender() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.recorderManager = uni.getRecorderManager()
|
||||
},
|
||||
@@ -110,6 +109,7 @@
|
||||
width: 500rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
.button {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
@@ -129,6 +129,7 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.icon {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import utils from '@/utils/index.js'
|
||||
|
||||
const imBase = {
|
||||
onLoad() {
|
||||
console.log('IM BASE MININX');
|
||||
},
|
||||
export default {
|
||||
onLoad() {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
contact() {
|
||||
@@ -17,8 +13,9 @@ const imBase = {
|
||||
},
|
||||
avatarSize() {
|
||||
return utils.rpx2px(84)
|
||||
},
|
||||
sender() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default imBase
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 监听群解散的消息,直接跳转到会话列表页面
|
||||
const onGroupDismiss = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentTargetId: ''
|
||||
@@ -32,5 +32,3 @@ const onGroupDismiss = {
|
||||
uni.$off('onGroupRemoveYou_' + this.currentTargetId)
|
||||
}
|
||||
}
|
||||
|
||||
export default onGroupDismiss
|
||||
|
||||
Reference in New Issue
Block a user