mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
支持配置Gist同步
This commit is contained in:
@@ -125,10 +125,12 @@ export default {
|
||||
async fetch() {
|
||||
await axios.get(this.url).then(resp => {
|
||||
let {data} = resp;
|
||||
if (data instanceof String && data.indexOf("\n") !== -1)
|
||||
if ((typeof data === 'string' || data instanceof String) && data.indexOf("\n") !== -1){
|
||||
this.proxies = data.split("\n").map(p => JSON.parse(p));
|
||||
else
|
||||
}
|
||||
else {
|
||||
this.proxies = [data];
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user