[Bug Fixed] 修复Loon VMess错误

This commit is contained in:
Peng-YM
2020-08-31 00:15:48 +08:00
parent f62959c5d1
commit 21e7523457
3 changed files with 52 additions and 41 deletions

View File

@@ -137,6 +137,8 @@
</template>
<script>
import {showError, showInfo} from "@/utils";
export default {
data: function () {
return {
@@ -179,9 +181,17 @@ export default {
this.$store.dispatch("UPDATE_SUBSCRIPTION", {
name: this.$route.params.name,
sub
}).then(() => {
showInfo(`成功保存订阅:${this.options.name}`)
}).catch(() => {
showError(`发生错误,无法保存订阅!`)
});
} else {
this.$store.dispatch("NEW_SUBSCRIPTION", sub);
this.$store.dispatch("NEW_SUBSCRIPTION", sub).then(() => {
showInfo(`成功创建订阅:${this.options.name}`)
}).catch(() => {
showError(`发生错误,无法创建订阅!`)
});
}
}
},