|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div class="qrcode" :class="{ heping: g_isLandscape }">
|
|
|
- <div class="downloadQrcon">
|
|
|
+ <!-- <div class="downloadQrcon">
|
|
|
<qrcodetl :id="'qrpg_' + rand" :data="{ id: rand }" />
|
|
|
<qrcodetl v-if="currentZhanqu" :id="'qrpgc_' + currentZhanqu.panoId" :data="currentZhanqu" />
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<div class="qrcodecon">
|
|
|
<h3>分享</h3>
|
|
@@ -15,7 +15,8 @@
|
|
|
<div class="ul">
|
|
|
<div class="li">
|
|
|
<div class="liimg">
|
|
|
- <img class="real" v-if="tmpcImg" :src="tmpcImg" alt="" />
|
|
|
+ <!-- <img class="real" v-if="tmpcImg" :src="tmpcImg" alt="" /> -->
|
|
|
+ <img class="real" :src="require(`@/assets/images/project/qrcode/${currentZhanqu.panoId}_production.png`)" alt="" />
|
|
|
<img class="qrc" :src="require(`@/assets/images/project/qrcode/${currentZhanqu.panoId}.jpg`)" alt="" />
|
|
|
</div>
|
|
|
<p v-html="currentZhanqu.name"></p>
|
|
@@ -23,7 +24,8 @@
|
|
|
|
|
|
<div class="li">
|
|
|
<div class="liimg">
|
|
|
- <img class="real" v-if="tmpcImg" :src="tmpImg" alt="" />
|
|
|
+ <!-- <img class="real" v-if="tmpcImg" :src="tmpImg" alt="" /> -->
|
|
|
+ <img class="real" :src="require(`@/assets/images/project/qrcode/zhanqu_all_production.png`)" alt="" />
|
|
|
<img class="qrc" :src="require(`@/assets/images/project/qrcode/zhanqu_all.jpg`)" alt="" />
|
|
|
</div>
|
|
|
<template>
|
|
@@ -36,8 +38,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import domtoimage from "dom-to-image";
|
|
|
-import qrcodetl from "@/components/qrcodetl/index.vue";
|
|
|
+// import domtoimage from "dom-to-image";
|
|
|
+// import qrcodetl from "@/components/qrcodetl/index.vue";
|
|
|
import { Booth } from "@/data/booth.js";
|
|
|
|
|
|
let all_booth = [];
|
|
@@ -45,58 +47,6 @@ Booth.forEach((item) => {
|
|
|
all_booth = all_booth.concat(item.company);
|
|
|
});
|
|
|
|
|
|
-function uuid(len, radix) {
|
|
|
-
|
|
|
- var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
|
|
|
-
|
|
|
- var uuid = [], i;
|
|
|
-
|
|
|
- radix = radix || chars.length;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if (len) {
|
|
|
-
|
|
|
- // Compact form
|
|
|
-
|
|
|
- for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix];
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- // rfc4122, version 4 form
|
|
|
-
|
|
|
- var r;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // rfc4122 requires these characters
|
|
|
-
|
|
|
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
|
|
|
-
|
|
|
- uuid[14] = '4';
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // Fill in random data. At i==19 set the high bits of clock sequence as
|
|
|
-
|
|
|
- // per rfc4122, sec. 4.1.5
|
|
|
-
|
|
|
- for (i = 0; i < 36; i++) {
|
|
|
-
|
|
|
- if (!uuid[i]) {
|
|
|
-
|
|
|
- r = 0 | Math.random()*16;
|
|
|
-
|
|
|
- uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- return uuid.join('');
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
export default {
|
|
|
props: ["currentZhanqu",'currentPano'],
|
|
@@ -105,11 +55,10 @@ export default {
|
|
|
isShowUl: false,
|
|
|
tmpPano: this.currentPano,
|
|
|
tmpImg: "",
|
|
|
- rand: uuid(6),
|
|
|
tmpcImg: "",
|
|
|
};
|
|
|
},
|
|
|
- components: { qrcodetl },
|
|
|
+ // components: { qrcodetl },
|
|
|
|
|
|
watch: {
|
|
|
// tmpPano(newVal) {
|
|
@@ -121,32 +70,32 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.download(this.rand, "qrpg_", "tmpImg");
|
|
|
- this.download(this.currentZhanqu.panoId, "qrpgc_", "tmpcImg");
|
|
|
- }, 400);
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.download(this.rand, "qrpg_", "tmpImg");
|
|
|
+ // this.download(this.currentZhanqu.panoId, "qrpgc_", "tmpcImg");
|
|
|
+ // }, 400);
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
download(id = null, type = "", imgstr = "") {
|
|
|
- if (!id) {
|
|
|
- return;
|
|
|
- }
|
|
|
- let node = document.getElementById(type + id);
|
|
|
+ // if (!id) {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // let node = document.getElementById(type + id);
|
|
|
|
|
|
- console.log(node,'nodenodenode');
|
|
|
- this.$showLoading()
|
|
|
+ // console.log(node,'nodenodenode');
|
|
|
+ // this.$showLoading()
|
|
|
|
|
|
- domtoimage
|
|
|
- .toPng(node)
|
|
|
- .then((dataUrl) => {
|
|
|
- this[imgstr] = dataUrl;
|
|
|
- this.$hideLoading()
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- this.$hideLoading()
|
|
|
- console.error("oops, something went wrong!", error);
|
|
|
- });
|
|
|
+ // domtoimage
|
|
|
+ // .toPng(node)
|
|
|
+ // .then((dataUrl) => {
|
|
|
+ // this[imgstr] = dataUrl;
|
|
|
+ // this.$hideLoading()
|
|
|
+ // })
|
|
|
+ // .catch((error) => {
|
|
|
+ // this.$hideLoading()
|
|
|
+ // console.error("oops, something went wrong!", error);
|
|
|
+ // });
|
|
|
},
|
|
|
},
|
|
|
};
|