| | |
| | | ></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" |
| | |
| | | |
| | | <el-dialog |
| | | title="激活SmartAI" |
| | | :visible.sync="dialogVisible" |
| | | :visible.sync="activeDialog" |
| | | width="750px" |
| | | :show-close="false" |
| | | :close-on-click-modal="false" |
| | |
| | | </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> |
| | |
| | | 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() { |
| | |
| | | } |
| | | 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); |
| | | } |
| | |
| | | window.parent.postMessage({ msg: `toVindicate?menu=系统信息` }, "*"); |
| | | }, |
| | | gotoActive() { |
| | | this.dialogVisible = true; |
| | | this.activeDialog = true; |
| | | }, |
| | | uploadKey(params) { |
| | | debugger |