mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-08 06:56:08 +08:00
add root_url
This commit is contained in:
parent
d526dd8f46
commit
31fe83c1ba
1 changed files with 6 additions and 5 deletions
|
@ -130,8 +130,8 @@
|
||||||
},
|
},
|
||||||
getConfig() {
|
getConfig() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
|
let root_url = window.location.href.split('wp-admin')[0];
|
||||||
axios.get('/wp-content/plugins/wp-china-yes/api.php?get_config')
|
axios.get(root_url + 'wp-content/plugins/wp-china-yes/api.php?get_config')
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
vm.mirrors_form = response.data.data;
|
vm.mirrors_form = response.data.data;
|
||||||
})
|
})
|
||||||
|
@ -175,8 +175,9 @@
|
||||||
data.append('custom_download_server', vm.mirrors_form.custom_download_server);
|
data.append('custom_download_server', vm.mirrors_form.custom_download_server);
|
||||||
data.append('api_server', vm.mirrors_form.api_server);
|
data.append('api_server', vm.mirrors_form.api_server);
|
||||||
data.append('download_server', vm.mirrors_form.download_server);
|
data.append('download_server', vm.mirrors_form.download_server);
|
||||||
|
|
||||||
axios.post('/wp-content/plugins/wp-china-yes/api.php', data)
|
let root_url = window.location.href.split('wp-admin')[0];
|
||||||
|
axios.post(root_url + 'wp-content/plugins/wp-china-yes/api.php', data)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
vm.$message({
|
vm.$message({
|
||||||
message: '保存成功',
|
message: '保存成功',
|
||||||
|
@ -221,4 +222,4 @@
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue