From ea9083ef4714c4e64f7f99aa47533933156a12f8 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期三, 05 一月 2022 14:21:32 +0800
Subject: [PATCH] recent change
---
src/pages/desktop/index/components/Desktop.vue | 24 +++++++++++++++++-------
src/pages/desktop/index/App.vue | 7 +++++--
src/pages/desktop/index/components/Tools.vue | 2 --
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue
index 922813d..9c790dd 100644
--- a/src/pages/desktop/index/App.vue
+++ b/src/pages/desktop/index/App.vue
@@ -1,7 +1,7 @@
<template>
<div id="app" @contextmenu.prevent>
- <tools @jumpToDock="onJumpToDock"></tools>
- <desktop ref="desktop"></desktop>
+ <tools ref="tools" @jumpToDock="onJumpToDock"></tools>
+ <desktop @quit="quit" ref="desktop"></desktop>
<tools-entry @changeBackground="onChangeBg" ref="dock_model"></tools-entry>
<notice-tip ref="notice_tip_model"></notice-tip>
<notification-center></notification-center>
@@ -89,6 +89,9 @@
});
},
methods: {
+ quit(){
+ this.$refs.tools.toLogout()
+ },
onJumpToDock(name){
this.$refs.dock_model.onJumpToDock(name)
},
diff --git a/src/pages/desktop/index/components/Desktop.vue b/src/pages/desktop/index/components/Desktop.vue
index 7e4e343..ca04a88 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
diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue
index 04fc852..6ef8db8 100644
--- a/src/pages/desktop/index/components/Tools.vue
+++ b/src/pages/desktop/index/components/Tools.vue
@@ -350,8 +350,6 @@
});
this.askSysUpdate();
this.askAppUpdate();
-
-
},
methods: {
askAppUpdate() {
--
Gitblit v1.8.0