mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-06 17:37:06 +00:00
客户端点击版本号查看服务器地址
This commit is contained in:
parent
c3588b4ac3
commit
c0f7d042c6
@ -26,7 +26,7 @@
|
||||
<AutoTip disabled>{{$L('版本')}}: {{version}}</AutoTip>
|
||||
<Badge :text="clientNewVersion"/>
|
||||
</li>
|
||||
<li v-else class="version divided">
|
||||
<li v-else class="version divided" @click="onVersion">
|
||||
<AutoTip>{{$L('版本')}}: {{version}}</AutoTip>
|
||||
</li>
|
||||
</ul>
|
||||
@ -44,6 +44,7 @@
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import {Store} from "le5le-store";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -185,6 +186,20 @@ export default {
|
||||
"divided": !!divided
|
||||
};
|
||||
},
|
||||
|
||||
onVersion() {
|
||||
if (!this.$Electron) {
|
||||
return
|
||||
}
|
||||
axios.get($A.apiUrl('system/version')).then(({status, data}) => {
|
||||
if (status === 200) {
|
||||
let content = `${this.$L('服务器')}: ${$A.getDomain($A.apiUrl('../'))}`
|
||||
content += `<br/>${this.$L('服务器版本')}: v${data.version}`
|
||||
content += `<br/>${this.$L('客户端版本')}: v${this.version}`
|
||||
$A.modalInfo({content})
|
||||
}
|
||||
}).catch(_ => { })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user