diff --git a/package.json b/package.json index 0421739..f65cb7c 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "moment": "^2.29.1", "uni-read-pages": "^1.0.5", "uni-simple-router": "^2.0.7", - "uview-ui": "^2.0.19", - "vuex": "^3.6.2" + "uview-ui": "^2.0.27" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/pages/im/components/sentText.vue b/pages/im/components/sentText.vue index 723ae3e..efa4034 100644 --- a/pages/im/components/sentText.vue +++ b/pages/im/components/sentText.vue @@ -2,7 +2,6 @@ - @@ -19,10 +18,6 @@ targetId: { type: String, default: '' - }, - inputTxt: { - type: String, - default: '' } }, computed: { @@ -33,7 +28,7 @@ return this.$store.getters.sender } }, - created() { + mounted() { RongIMLib.getTextMessageDraft(this.conversationType, this.targetId, ({ draft }) => { @@ -46,25 +41,20 @@ }, data() { return { - focusState: false, + focusState: false, + inputTxt: '' } }, methods: { - // 发送文本消息 sent() { - if (!this.disabled) { - RongIMLib.clearTextMessageDraft(this.conversationType, this.targetId) - 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 = '' }) } }, - demo() { - console.log(this.focusState) - - this.focusState = !this.focusState - }, focus() { this.$emit('focus') }, diff --git a/pages/im/components/showMessage.vue b/pages/im/components/showMessage.vue deleted file mode 100644 index 48d48ea..0000000 --- a/pages/im/components/showMessage.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/pages/im/components/showText.vue b/pages/im/components/showText.vue index ffa4d01..c8bba49 100644 --- a/pages/im/components/showText.vue +++ b/pages/im/components/showText.vue @@ -1,13 +1,21 @@