no message

This commit is contained in:
kuaifan 2022-06-10 11:23:37 +08:00
parent eaabc5852c
commit dd25561338
4 changed files with 32 additions and 9 deletions

View File

@ -99,7 +99,15 @@ export default {
},
methods: {
isNotServer() {
let apiHome = $A.getDomain(window.systemInfo.apiUrl)
return this.isSoftware && (apiHome == "" || apiHome == "public")
},
checkVersion() {
if (this.isNotServer()) {
return;
}
axios.get($A.apiUrl('../version')).then(({status, data}) => {
if (status === 200) {
this.apiVersion = data.version || ''

View File

@ -9,6 +9,7 @@
<slot/>
<p>{{$L('昵称')}}: {{user.nickname}}</p>
<p>{{$L('职位/职称')}}: {{user.profession || '-'}}</p>
<p v-if="user.disable_at"><strong>{{$L('离职时间')}}: {{user.disable_at}}</strong></p>
<div v-if="userId != userid && showIconMenu" class="avatar-icons">
<Icon type="ios-chatbubbles" @click="openDialog"/>
</div>

View File

@ -206,15 +206,17 @@ export default {
},
mounted() {
if (this.$router.mode === "hash") {
if ($A.stringLength(window.location.pathname) > 2) {
window.location.href = `${window.location.origin}/#${window.location.pathname}${window.location.search}`
return
}
} else if (this.$router.mode === "history") {
if ($A.strExists(window.location.href, "/#/")) {
window.location.href = window.location.href.replace("/#/", "/")
return
if (/^https*:/i.test(window.location.protocol)) {
if (this.$router.mode === "hash") {
if ($A.stringLength(window.location.pathname) > 2) {
window.location.href = `${window.location.origin}/#${window.location.pathname}${window.location.search}`
return
}
} else if (this.$router.mode === "history") {
if ($A.strExists(window.location.href, "/#/")) {
window.location.href = window.location.href.replace("/#/", "/")
return
}
}
}
this.getNeedStartHome();

View File

@ -73,6 +73,7 @@
<DynamicScroller
ref="scroller"
class="dialog-scroller scrollbar-overlay"
:style="{opacity: scrollerShow ? 1 : 0}"
:disabled="touchBackInProgress"
:items="allMsgs"
:min-item-size="58"
@ -328,6 +329,7 @@ export default {
dialogDrag: false,
groupInfoShow: false,
scrollerShow: true,
navStyle: {},
@ -498,6 +500,9 @@ export default {
allMsgList(newList, oldList) {
const {scrollE} = this.scrollInfo();
if (oldList.length === 0) {
this.scrollerShow = false;
}
this.allMsgs = newList;
//
if (scrollE > 10 && oldList.length > 0) {
@ -507,6 +512,13 @@ export default {
} else {
requestAnimationFrame(this.onToBottom)
}
//
this.allMsgTimer && clearTimeout(this.allMsgTimer);
if (!this.scrollerShow) {
this.allMsgTimer = setTimeout(_=>{
this.scrollerShow = true;
},100)
}
},
windowScrollY(val) {