节点预览可以预览原始订阅的节点了

This commit is contained in:
Peng-YM
2021-01-04 00:03:43 +08:00
parent 37370cccda
commit 8da264608a
5 changed files with 106 additions and 54 deletions

View File

@@ -89,7 +89,7 @@ const flags = new Map([["AC", "🇦🇨"], ["AF", "🇦🇫"], ["AI", "🇦🇮"
export default {
name: "ProxyList",
props: ['url', 'sub'],
props: ['url', 'sub', 'raw'],
components: {VueQRCodeComponent},
data: function () {
return {
@@ -114,7 +114,7 @@ export default {
},
async fetch() {
await axios.get(this.url).then(resp => {
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;
@@ -122,7 +122,7 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", err);
});
await axios.get(`${this.url}?target=URI`).then(resp => {
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");
});