|
|
@@ -8,14 +8,20 @@
|
|
|
</div>
|
|
|
<div class="form-data">
|
|
|
<div class="code">
|
|
|
- <ayQrcode
|
|
|
- ref="qrcode"
|
|
|
- :modal="modal_qr"
|
|
|
- :url="url"
|
|
|
- @hideQrcode="hideQrcode"
|
|
|
- :height="160"
|
|
|
- :width="160"
|
|
|
+ <img
|
|
|
+ :src="url"
|
|
|
+ style="width: 100%; height: 500rpx"
|
|
|
+ v-if="url.length > 0"
|
|
|
+ alt=""
|
|
|
/>
|
|
|
+ <!-- <ayQrcode-->
|
|
|
+ <!-- ref="qrcode"-->
|
|
|
+ <!-- :modal="modal_qr"-->
|
|
|
+ <!-- :url="url"-->
|
|
|
+ <!-- @hideQrcode="hideQrcode"-->
|
|
|
+ <!-- :height="160"-->
|
|
|
+ <!-- :width="160"-->
|
|
|
+ <!-- />-->
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
<div class="item-label">对应码头</div>
|
|
|
@@ -89,7 +95,11 @@
|
|
|
<script>
|
|
|
// /wx/dock/getReservationVoById
|
|
|
|
|
|
-import { getReservationVoById, cancelReservation } from "@/js_sdk/sjTools.js";
|
|
|
+import {
|
|
|
+ getReservationVoById,
|
|
|
+ cancelReservation,
|
|
|
+ getQrCode2,
|
|
|
+} from "@/js_sdk/sjTools.js";
|
|
|
import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue";
|
|
|
|
|
|
export default {
|
|
|
@@ -98,6 +108,8 @@ export default {
|
|
|
url: "",
|
|
|
modal_qr: false,
|
|
|
info: {},
|
|
|
+ id: null,
|
|
|
+ setIntervalTime: null,
|
|
|
};
|
|
|
},
|
|
|
components: { ayQrcode },
|
|
|
@@ -109,17 +121,32 @@ export default {
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
console.log(e);
|
|
|
-
|
|
|
+ this.id = e.id;
|
|
|
this.getReservationVoById(e.id);
|
|
|
+ this.setIntervalTime = setInterval(() => {
|
|
|
+ this.getReservationVoById(this.id);
|
|
|
+ }, 5000);
|
|
|
+ },
|
|
|
+ onUnload() {
|
|
|
+ if (this.setIntervalTime) {
|
|
|
+ clearInterval(this.setIntervalTime);
|
|
|
+ this.setIntervalTime = null;
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
async getReservationVoById(id) {
|
|
|
let { data } = await getReservationVoById({ id });
|
|
|
console.log(data);
|
|
|
+ // let qrCode = await getQrCode2({id:data.id})
|
|
|
+ // console.log(qrCode)
|
|
|
this.info = data;
|
|
|
- this.url = data.id;
|
|
|
+ console.log(
|
|
|
+ this.$constant.BASE_URI + "/wx/dock/getQrCode2?id=" + data.id
|
|
|
+ );
|
|
|
+ this.url = this.$constant.BASE_URI + "/wx/dock/getQrCode2?id=" + data.id;
|
|
|
this.showQrcode();
|
|
|
},
|
|
|
+
|
|
|
wxShare(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
@@ -132,7 +159,7 @@ export default {
|
|
|
// uni.showLoading()
|
|
|
setTimeout(function () {
|
|
|
// uni.hideLoading()
|
|
|
- _this.$refs.qrcode.crtQrCode();
|
|
|
+ // _this.$refs.qrcode.crtQrCode();
|
|
|
}, 50);
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
@@ -223,4 +250,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|