diff --git a/settings.html b/settings.html
index fdd3d27..eb39ba2 100644
--- a/settings.html
+++ b/settings.html
@@ -130,8 +130,8 @@
},
getConfig() {
let vm = this;
-
- axios.get('/wp-content/plugins/wp-china-yes/api.php?get_config')
+ let root_url = window.location.href.split('wp-admin')[0];
+ axios.get(root_url + 'wp-content/plugins/wp-china-yes/api.php?get_config')
.then(function (response) {
vm.mirrors_form = response.data.data;
})
@@ -175,8 +175,9 @@
data.append('custom_download_server', vm.mirrors_form.custom_download_server);
data.append('api_server', vm.mirrors_form.api_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) {
vm.$message({
message: '保存成功',
@@ -221,4 +222,4 @@
padding-top: 0;
}
-