fix:修复vue页面不展示uv,pv统计

This commit is contained in:
fanxb 2022-03-01 23:46:19 +08:00
parent e857db4356
commit 55edc431ac
2 changed files with 12 additions and 12 deletions

View File

@ -17,6 +17,18 @@
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script>
let host = process.env.VUE_APP_QIEZI_HOST;
console.log("qieziHost:" + host);
if (host && host.trim().length > 0) {
window.qieziStatisticHost = host;
}
let key = process.env.VUE_APP_QIEZI_KEY;
console.log("qieziKey:" + key);
if (key && key.trim().length > 0) {
window.qieziStatisticKey = key;
}
</script>
<script src="qiezijs/1.0/qiezi_statistic.js" type="text/javascript"></script> <script src="qiezijs/1.0/qiezi_statistic.js" type="text/javascript"></script>
</body> </body>
</html> </html>

View File

@ -10,18 +10,6 @@
<script setup> <script setup>
import { onMounted } from "@vue/runtime-core"; import { onMounted } from "@vue/runtime-core";
onMounted(async () => {
let host = process.env.VUE_APP_QIEZI_HOST;
console.log("qieziHost:" + host);
if (host && host.trim().length > 0) {
window.qieziStatisticHost = host;
}
let key = process.env.VUE_APP_QIEZI_KEY;
console.log("qieziKey:" + key);
if (key && key.trim().length > 0) {
window.qieziStatisticKey = key;
}
});
</script> </script>
<style lang="less"> <style lang="less">