<template>
   <div>
		<div style="font-size: 14px;"><span class="text-red">*</span>扫描下面二维码进行手机绑定，方便进行实时消息推送！<br>如未关注公众号，请及时关注！</div>
	    <div class="padding-sm margin-sm radius bg-white" style="display: inline-block;">
			<qrcode-vue :value="qrCode" :size="200"></qrcode-vue>
		</div>
   </div>
</template>

<script setup>
// import QrcodeVue from 'qrcode.vue'
// import { getPushTok } from "@/api/caps/allReq";
const { proxy } = getCurrentInstance();
const qrCode = ref('');
import AES from "@/utils/crypto";
var key = `msgWx-${proxy.parseTime(new Date(), "{y}-{m}-{d}")}`;
getPushTok({
	"username": AES.encrypt("wx315d64695b6780e8", key),
	"password": AES.encrypt("vMxHXMAnhtPlvMhSVBNQvvj7AP0EoEwH6iOlom03rgk=", key)
}).then((response) => {
	console.log(response)
	qrCode.value = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx315d64695b6780e8&redirect_uri=https://www.enstation.com/hasMessage/hasCode.html?id=wx315d64695b6780e8-yz-"+response.token+"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
})
</script>
