From 1e09a7a01a6c1888e1a2a832eb007fb8c2b653a0 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期三, 26 一月 2022 11:06:27 +0800 Subject: [PATCH] Merge branch 'bhomebus' of http://192.168.5.5:10010/r/web/vue-smart-ai into bhomebus --- src/pages/desktop/index/components/Desktop.vue | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/pages/desktop/index/components/Desktop.vue b/src/pages/desktop/index/components/Desktop.vue index 7e4e343..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" @@ -35,8 +38,8 @@ <el-divider></el-divider> <div class="info"> 濡傛灉杩樻病鏈変骇鍝佸瘑閽ワ紝浣犲彲浠ヤ娇鐢ㄦ墜鏈烘壂鐮佹垨鍓嶅線姝ら摼鎺� - <a href="http://os.smartai.com:7004" target="_blank" - >http://os.smartai.com:7004</a + <a href="http://apps.smartai.com" target="_blank" + >http://apps.smartai.com</a > 璐拱銆� </div> @@ -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,10 +144,10 @@ window.parent.postMessage({ msg: `toVindicate?menu=绯荤粺淇℃伅` }, "*"); }, gotoActive() { - this.dialogVisible = true; + this.activeDialog = true; }, uploadKey(params) { - debugger + debugger; let param = new FormData(); param.append("code", params.file); uploadKey(param).then( -- Gitblit v1.8.0