mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-08 06:56:08 +08:00
将root_url抽出到全局变量中
This commit is contained in:
parent
8fe755c5cd
commit
cef30740dc
1 changed files with 2 additions and 2 deletions
|
@ -106,6 +106,8 @@
|
|||
<script src="https://static.ibadboy.net/element/static/js/index.js"></script>
|
||||
<script src="https://static.ibadboy.net/element/static/js/axios.min.js"></script>
|
||||
<script>
|
||||
const root_url = window.location.href.split('wp-content')[0];
|
||||
|
||||
function getCookie(name) {
|
||||
let arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||||
arr = document.cookie.match(reg);
|
||||
|
@ -144,7 +146,6 @@
|
|||
},
|
||||
getConfig() {
|
||||
let vm = this;
|
||||
let root_url = window.location.href.split('wp-content')[0];
|
||||
let data = new FormData();
|
||||
data.append('_ajax_nonce', this.token.get_config);
|
||||
data.append('action', 'wpcy_get_config');
|
||||
|
@ -196,7 +197,6 @@
|
|||
data.append('api_server', vm.mirrors_form.api_server);
|
||||
data.append('download_server', vm.mirrors_form.download_server);
|
||||
|
||||
let root_url = window.location.href.split('wp-content')[0];
|
||||
axios.post(root_url + 'wp-admin/admin-ajax.php', data)
|
||||
.then(function (response) {
|
||||
vm.$message({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue