样式
This commit is contained in:
@@ -16,48 +16,66 @@
|
||||
</div>
|
||||
</template>
|
||||
<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 {
|
||||
name: "headerBar",
|
||||
name: 'headerBar',
|
||||
data () {
|
||||
return {
|
||||
qrVisible: false,
|
||||
qrCode: null
|
||||
};
|
||||
}
|
||||
},
|
||||
props: {},
|
||||
created() {},
|
||||
created () {
|
||||
this.confire_finger()
|
||||
},
|
||||
methods: {
|
||||
// 验证web指纹
|
||||
confire_finger () {
|
||||
let finger_code = finger.get()
|
||||
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'
|
||||
}
|
||||
})
|
||||
},
|
||||
open () {
|
||||
console.log(open);
|
||||
var url = "http://yk.hncore.net/store";
|
||||
this.makeqrcode(url);
|
||||
console.log(open)
|
||||
var url = 'http://yk.hncore.net/store'
|
||||
this.makeqrcode(url)
|
||||
},
|
||||
logout () {
|
||||
localStorage.clear();
|
||||
this.$router.replace('/login');
|
||||
localStorage.clear()
|
||||
this.$router.replace('/login')
|
||||
},
|
||||
showQr () {
|
||||
this.qrVisible = true;
|
||||
this.qrVisible = true
|
||||
},
|
||||
makeqrcode (url) {
|
||||
var that = this;
|
||||
this.qrCode&&this.qrCode.clear();
|
||||
var qr = document.getElementById("qrcode");
|
||||
qr.innerHTML = "";
|
||||
var that = this
|
||||
this.qrCode && this.qrCode.clear()
|
||||
var qr = document.getElementById('qrcode')
|
||||
qr.innerHTML = ''
|
||||
this.qrCode = new QRCode(qr, {
|
||||
text: url,
|
||||
width: 150,
|
||||
height: 150,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff",
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.base_topBarbox {
|
||||
|
||||
Reference in New Issue
Block a user