Cicd.vue
707 Bytes
<template>
<button type="button" class="btn btn-info btn-block" @click="onHtRestart($event)">重启海滩测试服</button>
</template>
<script>
import axios from 'axios';
import moment from 'moment';
export default {
name: 'Cicd',
props: {
msg: String
},
data() {
return {
}
},
mounted: function () {
},
methods: {
onHtRestart(event) {
// 发起 GET 请求
axios.get('http://172.10.10.18:5001/cicd/ht/bat/?name=ht_restart')
.then(response => {
// 请求成功处理
console.log(response.data);
})
.catch(error => {
// 请求失败处理
console.error(error);
});
},
}
}
</script>