diff --git a/src/components/PlayerEdit.vue b/src/components/PlayerEdit.vue
index 211d302..3e3c816 100644
--- a/src/components/PlayerEdit.vue
+++ b/src/components/PlayerEdit.vue
@@ -6,7 +6,7 @@
选择服务器
-
+
@@ -15,53 +15,44 @@
- 测试
-
-
-
+
+
+ 测试
选择的网站是: {{ serverselected }} puid: {{ puid }}
@@ -76,25 +67,42 @@ export default {
data() {
return {
servers: [{
- value: 'http://localhost:9002/api/gm/action',
- label: '本机'
+ value: '本机',
}, {
- value: 'http://172.10.10.18:9002/api/gm/action',
- label: '内网测试服'
+ value: '内网测试服',
}, {
- value: 'http://152.136.44.171:40002/api/gm/action',
- label: '审核服'
+ value: '审核服',
}],
- serverselected: '',
+ serversDict: {
+ '本机': 'http://localhost:9002/api/gm/action',
+ '内网测试服': 'http://172.10.10.18:9002/api/gm/action',
+ '审核服': 'http://152.136.44.171:40002/api/gm/action',
+ },
+ serverselected: '本机',
input1: '',
puid: '',
+
+ formAddMoney: {
+ tp: '',
+ count: 0,
+ }
}
},
methods: {
+ onGmPost: function (data) {
+ data.Uid = this.puid
+ axios.post(this.serversDict[this.serverselected], data)
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ },
ontest: function (event) {
axios.post(this.serverselected, {
- Action: '服务器操作',
- Args: ["服务器信息"]
+ Action: '服务器操作',
+ Args: ["服务器信息"]
})
.then(function (response) {
console.log(response);
@@ -103,6 +111,12 @@ export default {
console.log(error);
});
},
+ onAddMoney() {
+ this.onGmPost({
+ Action: '玩家数据修改',
+ Args: ["货币添加",this.formAddMoney.tp,this.formAddMoney.count]
+ })
+ },
}
}
--
libgit2 0.21.0