修复Trojan一处解析错误

This commit is contained in:
Peng-YM
2020-12-31 14:30:01 +08:00
parent 76cd097a23
commit b092d3fd6a
6 changed files with 28 additions and 6 deletions

View File

@@ -269,12 +269,15 @@ export default {
},
async sync(name) {
this.$store.commit("SET_LOADING", true);
try {
await axios.get(`/artifact/${name}?action=sync`);
await this.$store.dispatch("FETCH_ARTIFACTS");
this.$store.commit("SET_SUCCESS_MESSAGE", `同步配置成功!`);
} catch (err) {
this.$store.commit("SET_ERROR_MESSAGE", `同步配置失败!${err}`);
} finally {
this.$store.commit("SET_LOADING", false);
}
},

View File

@@ -412,7 +412,8 @@ export default {
if (this.options.name && this.selected) {
if (this.$route.params.name === 'UNTITLED') {
this.$store.dispatch("NEW_COLLECTION", this.config).then(() => {
showInfo(`成功创建组合订阅:${this.name}`)
showInfo(`成功创建组合订阅:${this.name}`);
this.$router.back();
}).catch(() => {
showError(`发生错误,无法创建组合订阅!`)
});
@@ -442,6 +443,7 @@ export default {
} else {
this.$store.dispatch("NEW_SUBSCRIPTION", this.config).then(() => {
showInfo(`成功创建订阅:${this.options.name}`);
this.$router.back();
}).catch(() => {
showError(`发生错误,无法创建订阅!`);
});