PlayerEdit.vue
3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
<div class="container-fluid mt-1">
<div class="card">
<div class="row">
<div class="col-1">选择服务器</div>
<div class="col-2">
<el-select v-model="serverselected" placeholder="选择服务器">
<el-option v-for="item in servers" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div class="col-1">玩家唯一ID</div>
<div class="col-2">
<el-input v-model="puid" placeholder="玩家唯一ID"></el-input>
</div>
</div>
<el-button round type="primary" class="btn-block" v-on:click="ontest">测试</el-button>
</div>
</div>
<!-- <div class="container-fluid mt-1">
<div class="container-fluid mt-1">
<div class="row bg-white">
<div class="col-2 p-3 bg-primary text-white">选择服务器</div>
<div class="col-3 p-3 bg-primary text-white">
<select v-model="serveradd" name="server">
<option value="http://localhost:9002/api/gm/action">本机</option>
<option value="http://localhost:9002/api/gm/action">内网测试服</option>
<option value="http://localhost:9002/api/gm/action">审核服</option>
</select>
</div>
<div class="col-2 p-3 bg-info text-white">玩家唯一ID</div>
<div class="col-3 p-3 bg-info text-white">
<input v-model="puid" placeholder="玩家唯一ID......">
</div>
</div>
</div>
<div class="container-fluid mt-1">
<div class="row">
<div class="col-3 card">
<div class="card-body">
<div class="d-grid">
<button type="button" class="btn btn-primary btn-block mt-1">货币添加</button>
</div>
<div class="d-grid">
<button type="button" class="btn btn-primary btn-block mt-1">货币添加</button>
</div>
<div class="d-grid">
<button type="button" class="btn btn-primary btn-block mt-1">货币添加</button>
</div>
</div>
</div>
<div class="col-3 p-3 bg-primary text-white">选择服务器</div>
<div class="col-3 p-3 bg-dark text-white"></div>
<div class="col-3 p-3 bg-dark text-white"></div>
</div>
</div>
</div> -->
<div id="output">
选择的网站是: {{ serverselected }} puid: {{ puid }}
</div>
</template>
<script>
import axios from 'axios';
export default {
name: 'HelloWorld',
props: {
msg: String
},
data() {
return {
servers: [{
value: 'http://localhost:9002/api/gm/action',
label: '本机'
}, {
value: 'http://172.10.10.18:9002/api/gm/action',
label: '内网测试服'
}, {
value: 'http://152.136.44.171:40002/api/gm/action',
label: '审核服'
}],
serverselected: '',
input1: '',
puid: '',
}
},
methods: {
ontest: function (event) {
axios.post(this.serverselected, {
Action: '服务器操作',
Args: ["服务器信息"]
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
},
}
}
</script>