This commit is contained in:
2024-03-19 10:19:11 +08:00
parent 401572a446
commit b054214766
2 changed files with 23 additions and 11 deletions

View File

@ -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();
}
},
}
</script>

View File

@ -83,6 +83,7 @@
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
@ -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,