样式
This commit is contained in:
@@ -16,48 +16,66 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import QRCode from "qrcodejs2";
|
|
||||||
var that = null;
|
import QRCode from 'qrcodejs2'
|
||||||
|
import Fingerprint from './../../../../static/js/fingerprint.js'
|
||||||
|
|
||||||
|
let finger = new Fingerprint()
|
||||||
|
|
||||||
|
var that = null
|
||||||
export default {
|
export default {
|
||||||
name: "headerBar",
|
name: 'headerBar',
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
qrVisible: false,
|
qrVisible: false,
|
||||||
qrCode: null
|
qrCode: null
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
created() {},
|
created () {
|
||||||
|
this.confire_finger()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
// 验证web指纹
|
||||||
console.log(open);
|
confire_finger () {
|
||||||
var url = "http://yk.hncore.net/store";
|
let finger_code = finger.get()
|
||||||
this.makeqrcode(url);
|
this.$api.post(this.$api.phpURL + 'api/Verify/index', {code: finger_code}).then(res => {
|
||||||
|
if (res.msg == 'false') {
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
|
alert('访问错误!错误码:' + finger_code)
|
||||||
|
window.location.href = 'http://www.juip.com'
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
logout(){
|
open () {
|
||||||
localStorage.clear();
|
console.log(open)
|
||||||
this.$router.replace('/login');
|
var url = 'http://yk.hncore.net/store'
|
||||||
|
this.makeqrcode(url)
|
||||||
},
|
},
|
||||||
showQr() {
|
logout () {
|
||||||
this.qrVisible = true;
|
localStorage.clear()
|
||||||
|
this.$router.replace('/login')
|
||||||
},
|
},
|
||||||
makeqrcode(url) {
|
showQr () {
|
||||||
var that = this;
|
this.qrVisible = true
|
||||||
this.qrCode&&this.qrCode.clear();
|
},
|
||||||
var qr = document.getElementById("qrcode");
|
makeqrcode (url) {
|
||||||
qr.innerHTML = "";
|
var that = this
|
||||||
|
this.qrCode && this.qrCode.clear()
|
||||||
|
var qr = document.getElementById('qrcode')
|
||||||
|
qr.innerHTML = ''
|
||||||
this.qrCode = new QRCode(qr, {
|
this.qrCode = new QRCode(qr, {
|
||||||
text: url,
|
text: url,
|
||||||
width: 150,
|
width: 150,
|
||||||
height: 150,
|
height: 150,
|
||||||
colorDark: "#000000",
|
colorDark: '#000000',
|
||||||
colorLight: "#ffffff",
|
colorLight: '#ffffff',
|
||||||
correctLevel: QRCode.CorrectLevel.H
|
correctLevel: QRCode.CorrectLevel.H
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {}
|
computed: {}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.base_topBarbox {
|
.base_topBarbox {
|
||||||
|
|||||||
Reference in New Issue
Block a user