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

View File

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

View File

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

View File

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