From 584587a9d9932762aad2d27027be348c810926d0 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期四, 06 一月 2022 10:09:34 +0800 Subject: [PATCH] 冲突解决 --- src/pages/desktop/index/components/Desktop.vue | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/pages/desktop/index/components/Desktop.vue b/src/pages/desktop/index/components/Desktop.vue index 5e42597..e9e9615 100644 --- a/src/pages/desktop/index/components/Desktop.vue +++ b/src/pages/desktop/index/components/Desktop.vue @@ -11,8 +11,11 @@ ></safari> <div class="warn-tag" v-if="showFreeVersion"> - <span class="text" + <span v-if="!snExpire" class="text" >璇曠敤鐗堝皻鏈縺娲伙紝浠呮敮鎸侀儴鍒嗗姛鑳戒娇鐢紝濡傞渶浣跨敤鍏ㄩ儴鍔熻兘锛岃灏藉揩婵�娲荤郴缁熴��</span + > + <span v-else class="text" + >SmartAIOS 璇曠敤鏈熷凡鍒版湡锛岃鎮ㄥ敖蹇縺娲荤郴缁�</span > <span class="go-to" @click="gotoActive">鍓嶅線婵�娲�</span> <span class="icon iconfont" @click="showFreeVersion = false" @@ -22,7 +25,7 @@ <el-dialog title="婵�娲籗martAI" - :visible.sync="dialogVisible" + :visible.sync="activeDialog" width="750px" :show-close="false" :close-on-click-modal="false" @@ -70,7 +73,8 @@ </div> <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">缁х画璇曠敤</el-button> + <el-button v-if="!snExpire" @click="activeDialog = false">缁х画璇曠敤</el-button> + <el-button v-else @click="quit">閫�鍑虹櫥褰�</el-button> <el-button type="primary" @click="activateVersion">婵�娲�</el-button> </span> </el-dialog> @@ -95,19 +99,24 @@ data() { return { showFreeVersion: false, - dialogVisible: false, + activeDialog: false, version: "SmartAI璇曠敤鐗�", versionState: "灏氭湭婵�娲�", secrectKey: "", + snExpire: false }; }, mounted() { this.validateSn(); }, methods: { + quit(){ + this.$emit("quit") + }, validateSn() { getSN().then((res) => { - this.showFreeVersion = res.data.sn == ""; + this.snExpire = res.data.expire; + this.showFreeVersion = res.data.sn == "" || res.data.expire; }); }, activateVersion() { @@ -117,11 +126,12 @@ } activateVersion({ code: this.secrectKey.trim() }) .then((res) => { + debugger if (res.code == 200) { this.$notify.success("婵�娲绘垚鍔�"); this.validateSn(); this.goToSysInfo(); - this.dialogVisible = false; + this.activeDialog = false; } else { this.$notify.error(res.msg); } @@ -134,7 +144,7 @@ window.parent.postMessage({ msg: `toVindicate?menu=绯荤粺淇℃伅` }, "*"); }, gotoActive() { - this.dialogVisible = true; + this.activeDialog = true; }, uploadKey(params) { debugger; -- Gitblit v1.8.0