<template>
	<view v-if="show" class="content">
		<view class="qrimg">
			<tki-qrcode ref="qrcode" :val="code.val" :size="code.size" :icon="code.icon" :iconSize="code.iconsize"
				:onval="code.onval" :loadMake="code.loadMake" :showLoading="code.showLoading"
				:loadingText="code.loadingText" />
		</view>
		<view class="title">
			长按识别二维码跳转评价客服
		</view>
	</view>
</template>

<script>
	import {
		_API_GetVRLink
	} from '@/apis/user.js';
	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
	export default {
		data() {
			return {
				show: false,
				code: {
					val: '',
					size: 400,
					icon: '',
					iconsize: 25,
					onval: true,
					loadMake: '',
					showLoading: true,
					loadingText: '二维码生成中...'
				},
				title: 'Hello'
			}
		},
		onLoad() {
			this.GetVRLinkM()
		},
		methods: {
			// 获取链接
			GetVRLinkM() {
				_API_GetVRLink().then(res => {
					if (res.code === 200) {
						this.code.val = res.data.appraise_service_url
						this.show = true
					} else {
						this.$message.error(res.message || '获取失败')
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		padding-top: 200rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.title {
		margin-top: 20rpx;
	}
</style>
