heyujie
2022-01-05 ea9083ef4714c4e64f7f99aa47533933156a12f8
recent change
3个文件已修改
33 ■■■■■ 已修改文件
src/pages/desktop/index/App.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/Desktop.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/Tools.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)
    },
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="激活SmartAI"
      :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
src/pages/desktop/index/components/Tools.vue
@@ -350,8 +350,6 @@
    });
    this.askSysUpdate();
    this.askAppUpdate();
  },
  methods: {
    askAppUpdate() {