mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Fixed cronSyncArtifact failed issue
This commit is contained in:
@@ -108,31 +108,31 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async refresh() {
|
||||
await axios.post(`/utils/refresh`, {url: this.sub});
|
||||
await this.fetch();
|
||||
},
|
||||
|
||||
async fetch() {
|
||||
await axios.get(this.raw ? `${this.url}?raw=true` : this.url).then(resp => {
|
||||
let {data} = resp;
|
||||
// eslint-disable-next-line no-debugger
|
||||
this.proxies = data;
|
||||
}).catch(err => {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", err);
|
||||
});
|
||||
try {
|
||||
this.$store.commit("SET_LOADING", true);
|
||||
await axios.get(this.raw ? `${this.url}?raw=true` : this.url).then(resp => {
|
||||
let {data} = resp;
|
||||
// eslint-disable-next-line no-debugger
|
||||
this.proxies = data;
|
||||
}).catch(err => {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", err);
|
||||
});
|
||||
|
||||
await axios.get(this.raw ? `${this.url}?target=URI&raw=true` : `${this.url}?target=URI`).then(resp => {
|
||||
const {data} = resp;
|
||||
this.uris = data.split("\n");
|
||||
});
|
||||
await axios.get(this.raw ? `${this.url}?target=URI&raw=true` : `${this.url}?target=URI`).then(resp => {
|
||||
const {data} = resp;
|
||||
this.uris = data.split("\n");
|
||||
});
|
||||
|
||||
// fix http offset
|
||||
this.proxies.forEach((p, idx) => {
|
||||
if (p.type === 'http') {
|
||||
this.uris.splice(idx, 0, null);
|
||||
}
|
||||
})
|
||||
// fix http offset
|
||||
this.proxies.forEach((p, idx) => {
|
||||
if (p.type === 'http') {
|
||||
this.uris.splice(idx, 0, null);
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
this.$store.commit("SET_LOADING", false);
|
||||
}
|
||||
},
|
||||
|
||||
async showInfo(idx) {
|
||||
|
||||
Reference in New Issue
Block a user