mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-26 00:21:54 +08:00
feat: add domain and external ip configuration items (#18)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getHttpConfig, updateHttpConfig} from "@/api/settings"
|
||||
import {getPlatformConfig, updatePlatformConfig} from "@/api/settings"
|
||||
import SettingForm from "@/components/SettingForm";
|
||||
|
||||
export default {
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getConfig() {
|
||||
getHttpConfig().then(res => {
|
||||
getPlatformConfig().then(res => {
|
||||
this.form = res.data
|
||||
}).catch(e => {
|
||||
this.$notification.error({
|
||||
@@ -55,10 +55,10 @@ export default {
|
||||
updateConfig() {
|
||||
this.spinning = true
|
||||
let targetConfig = JSON.stringify(this.form)
|
||||
updateHttpConfig(this.form).then(
|
||||
updatePlatformConfig(this.form).then(
|
||||
() => {
|
||||
setTimeout(() => {
|
||||
getHttpConfig().then((res) => {
|
||||
getPlatformConfig().then((res) => {
|
||||
this.spinning = false
|
||||
let nowConfig = JSON.stringify(res.data)
|
||||
if (nowConfig !== targetConfig) {
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
:active-tab-key="tabKey"
|
||||
@tabChange="key => this.tabKey = key"
|
||||
style="width: 100%;">
|
||||
<http v-if="tabKey==='HTTP'"></http>
|
||||
<dns v-else-if="tabKey==='DNS'"></dns>
|
||||
<rmi v-else-if="tabKey==='RMI'"></rmi>
|
||||
<mysql v-else-if="tabKey==='MYSQL'"></mysql>
|
||||
<ftp v-else-if="tabKey==='FTP'"></ftp>
|
||||
<notice v-else-if="tabKey==='NOTICE'"></notice>
|
||||
<rules v-else-if="tabKey==='RULES'"></rules>
|
||||
<http ref="settings" v-if="tabKey==='HTTP'"></http>
|
||||
<dns ref="settings" v-else-if="tabKey==='DNS'"></dns>
|
||||
<rmi ref="settings" v-else-if="tabKey==='RMI'"></rmi>
|
||||
<mysql ref="settings" v-else-if="tabKey==='MYSQL'"></mysql>
|
||||
<ftp ref="settings" v-else-if="tabKey==='FTP'"></ftp>
|
||||
<notice ref="settings" v-else-if="tabKey==='NOTICE'"></notice>
|
||||
<rules ref="settings" v-else-if="tabKey==='RULES'"></rules>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,7 +42,11 @@ export default {
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {},
|
||||
methods: {
|
||||
fetch() {
|
||||
this.$refs.settings.getConfig();
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Http,
|
||||
Dns,
|
||||
|
||||
Reference in New Issue
Block a user