1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view class="mobile-login-page">
- <view class="icon-title-navBar-box">
-
- <text class="nav-bar-title">录取通知书</text>
- </view>
- <view>
- <input class="uni-input" v-model="name" focus placeholder="请输入姓名" />
- <input class="uni-input" v-model="idcard" type="idcard" placeholder="请输入身份证号" />
- </view>
- <view @click="zhengshuSearch">
- 搜索
- </view>
- </view>
- </template>
- <script setup>
- import CryptoJS from 'crypto-js';
- import {
- toast
- } from "@/utils/common";
- import {
- onLoad
- } from "@dcloudio/uni-app";
- import {
- getAppConfig,
- login,
- queryCert
- } from '@/api/login.js'
- import cacheManager from '@/utils/cacheManager.js'
- import JSEncrypt from 'jsencrypt';
- import {
- ref
- } from 'vue';
- const name = ref('')
- const idcard = ref('')
- onLoad(() => {
- })
- function zhengshuSearch() {
- if (!name.value) {
- toast('请输入姓名')
- return false;
- }
- if (!idcard.value) {
- toast('请输入身份证号')
- return false;
- }
- let req = {
- name: name.value,
- idcard: idcard.value
- };
- queryCert(req).then(res => {
- console.log(res);
- if (res.code == 0) {
- if (cacheManager.get('qrCode')) {
- cacheManager.remove('qrCode')
- }
- cacheManager.set('qrCode', JSON.stringify({
- base64: res.data
- }));
- uni.redirectTo({
- url: '/pages/showZhengshu'
- });
-
- } else {
- Toast('无对应证书信息!');
- return false
- }
- })
- }
- </script>
|