showZhengshu.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="mobile-login-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="handleBack" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">录取通知书</text>
  6. </view>
  7. <view class="gsl-sj-listBox custom-certBox">
  8. <image @click="optenImg(data,index)" :src="base64">></image>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import CryptoJS from 'crypto-js';
  14. import {
  15. toast
  16. } from "@/utils/common";
  17. import {
  18. onLoad
  19. } from "@dcloudio/uni-app";
  20. import {
  21. getAppConfig,
  22. login,
  23. queryCert
  24. } from '@/api/login.js'
  25. import cacheManager from '@/utils/cacheManager.js'
  26. import JSEncrypt from 'jsencrypt';
  27. import {
  28. ref
  29. } from 'vue';
  30. const base64 = ref('')
  31. onLoad(() => {
  32. base64.value = 'data:image/jpeg;base64,'+cacheManager.get('qrCode').base64
  33. console.log('base64.value',base64.value);
  34. })
  35. function optenImg(){
  36. uni.previewImage({
  37. urls: [base64.value], // 直接传入Base64字符串
  38. current: 0,
  39. indicator: "number" // 显示页码指示器
  40. });
  41. }
  42. function handleBack() {
  43. uni.redirectTo({
  44. url: '/pages/login'
  45. });
  46. }
  47. </script>