使拉取可用仓库源列表的操作在获取当前配置成功后进行

This commit is contained in:
sunxiyuan 2020-03-20 08:02:20 +08:00
parent 882959ba69
commit c740a64bb1

View file

@ -153,6 +153,17 @@
axios.post(root_url + 'wp-admin/admin-ajax.php', data) axios.post(root_url + 'wp-admin/admin-ajax.php', data)
.then(function (response) { .then(function (response) {
vm.mirrors_form = response.data.data; vm.mirrors_form = response.data.data;
axios.get('https://wp-china-yes.ibadboy.net')
.then(function (response) {
vm.external_api = response.data;
vm.changeServer();
})
.catch(function (error) {
vm.$message({
message: error,
type: 'error'
});
});
}) })
.catch(function (error) { .catch(function (error) {
vm.$message({ vm.$message({
@ -160,18 +171,6 @@
type: 'error' type: 'error'
}); });
}); });
axios.get('https://wp-china-yes.ibadboy.net')
.then(function (response) {
vm.external_api = response.data;
vm.changeServer();
})
.catch(function (error) {
vm.$message({
message: error,
type: 'error'
});
});
}, },
submitMirrorsForm() { submitMirrorsForm() {
let vm = this; let vm = this;