qwerqwerw
Posted twodog
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了qwerqwerw相关的知识,希望对你有一定的参考价值。
checkPassword(password) {
// 检查密码 获取加密表单数据
if (password === "") {
this.$notify.warning({
title: "密码错误!",
message: "密码不能为空!!!",
offset: 100
});
} else {
let uuid = this.$route.params["uuid"],
url =
this.$http.defaults.url +
"map/userid/map/getshare/" +
uuid +
"/code",
prams = encodeURI("data=" + JSON.stringify({ code: password }));
this.loading = true;
this.$http
.post(url, prams)
.then(res => {
this.loading = false;
if (res && res.data.result) {
this.showMap(res);
} else {
this.$message.error(res.data.message || "验证错误");
this.sharePassword = "";
}
})
.catch(err => {
this.$message.error("密码错误");
});
}
},
initData() {
let uuid = this.$route.params["uuid"], // 030bd7d9-8cbe-4777-aba8-5deff9a33247
url = this.$http.defaults.url + "map/userid/map/getshare/" + uuid;
this.$http
.get(url)
.then(res => {
this.loading = false;
if (res.data.result) {
this.showMap(res);
} else {
if (res.data.message === "分享加密,需要密码") {
// 加密
this.isPassword = true;
this.ready = false;
} else {
// uuid 错误
this.$alert("未找到指定分享的内容!", "加载失败", {
confirmButtonText: "再去试试",
callback: action => {
this.$router.replace({ name: "main" });
}
});
}
}
})
.catch(err => {
this.$alert("未找到分享的内容!", "加载失败", {
confirmButtonText: "再去试试",
callback: action => {
this.$router.replace({ name: "main" });
}
});
});
},
showMap(res) {
this.mapData = res.data.data;
this.mapData.option = JSON.parse(res.data.data.option);
this.__extendMapInfo(this.mapData);
// this.__setMapInfoOption(this.mapData);
this.ready = true;
this.isPassword = false;
this.loading = false;
this.hideLoading();
},
hideLoading() {
this.shareLoading = false;
}
/*
代码高亮开始,使用了一个叫Monokai Sublime的黑色主题皮肤,直接拿过来还不行,有一些样式冲突,还要自己稍微改一些地方
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
*/
pre {
/*控制代码不换行*/
white-space: pre;
word-wrap: normal;
}
.cnblogs-markdown .hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #23241f !important;
color: #FFF;
white-space: pre;
word-break: normal;
}
.hljs,
.hljs-tag,
.hljs-subst {
color: #f8f8f2;
}
.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
color: #ae81ff;
}
.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
color: #a6e22e;
}
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
color: #f92672;
}
.hljs-symbol,
.hljs-attribute {
color: #66d9ef;
}
.hljs-params,
.hljs-class .hljs-title {
color: #f8f8f2;
}
.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
color: #e6db74;
}
.hljs-comment,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}
/*黑色主题皮肤结束*/
以上是关于qwerqwerw的主要内容,如果未能解决你的问题,请参考以下文章