diff --git a/pagesB/mysigning/mysigning.vue b/pagesB/mysigning/mysigning.vue index 5e70271..109623d 100644 --- a/pagesB/mysigning/mysigning.vue +++ b/pagesB/mysigning/mysigning.vue @@ -123,6 +123,9 @@ import { detail, } from '@/api/pages/homepage/homepage.js' + import { + mapMutations + } from "vuex"; export default { data() { return { @@ -160,6 +163,7 @@ }; }, methods: { + ...mapMutations(['scoket']), //解约 rescindapplysaveinfo() { rescindapplysave(this.list).then(res => { @@ -245,7 +249,12 @@ this.formdata.cardNo = uni.getStorageSync('userinfo').cardNo this.formdata.phone = uni.getStorageSync('userinfo').phone this.detailinfo(); - } + }, + onShow() { + if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) { + this.scoket(); + } + }, } diff --git a/pagesC/seekadvicefrom/seekadvicefrom.vue b/pagesC/seekadvicefrom/seekadvicefrom.vue index d98b9eb..d84af1f 100644 --- a/pagesC/seekadvicefrom/seekadvicefrom.vue +++ b/pagesC/seekadvicefrom/seekadvicefrom.vue @@ -83,6 +83,7 @@ + @@ -434,12 +435,13 @@ chooseImage(sourceType) { var that = this if (this.$store.state.socketOpen == false) { - this.$refs.uToast.show({ - title: '聊天连接异常,正在重连', - type: 'warning', - }) + // this.$refs.uToast.show({ + // title: '聊天连接异常,正在重连', + // type: 'warning', + // }) this.scoket() - return + this.messagescoket() + // return } uni.chooseImage({ sourceType, @@ -508,12 +510,13 @@ const that = this var content = JSON.parse(JSON.stringify(that.formData.content)) if (this.$store.state.socketOpen == false) { - this.$refs.uToast.show({ - title: '聊天连接异常,正在重连', - type: 'warning', - }) + // this.$refs.uToast.show({ + // title: '聊天连接异常,正在重连', + // type: 'warning', + // }) this.scoket(); - return + this.messagescoket() + // return } let obj = { consultationId: that.currentItem.id,