Ver código fonte

对接重启

kkkkk 5 anos atrás
pai
commit
80d133f2cf
1 arquivos alterados com 12 adições e 7 exclusões
  1. 12 7
      src/components/control.vue

+ 12 - 7
src/components/control.vue

@@ -232,12 +232,18 @@ export default {
 				type: 'warning'
 				type: 'warning'
 			})
 			})
 				.then(() => {
 				.then(() => {
-					that.deleteSession(tabledata[index].id);
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
+					let that = this;
+					this.$axios({
+						method: 'get',
+						url: this.$global.genApiUrl('/restartServer')
+					}).then(function(res) {
+						that.getAllSession();
+						if(res.data.code==0){
+							that.$message({
+								type: 'success',
+								message: '操作完成'
+							});
+						}
 					});
 					});
 				});
 				});
 		},
 		},
@@ -261,7 +267,6 @@ export default {
 			console.log(JSON.stringify(tabledata[index]));
 			console.log(JSON.stringify(tabledata[index]));
 		},
 		},
 		deleteSession: function(id) {
 		deleteSession: function(id) {
-			console.log('删除链接:' + this.$global.genApiUrl('/kick_session') + '&id=' + id);
 			let that = this;
 			let that = this;
 			this.$axios({
 			this.$axios({
 				method: 'get',
 				method: 'get',