验证码,图片预览
This commit is contained in:
parent
990b508102
commit
e2fe4bb053
@ -6,13 +6,18 @@ import { useUserStore } from '@/stores/userStore.js'
|
||||
import { storeToRefs } from "pinia";
|
||||
const userStore = useUserStore()
|
||||
const { telNum, submitReturnData, iDCardImage, idCardInfo, recentPhoto, artworkFile, selectAddress, detailAddress } = storeToRefs(userStore);
|
||||
import { ref, onBeforeUnmount, onMounted } from "vue";
|
||||
import { ref, onBeforeUnmount, onMounted, watch } from "vue";
|
||||
import { check_by_phone, send_code, check_code } from "@/apis/index.js";
|
||||
const router = useRouter();
|
||||
const isCountingDown = ref(false);
|
||||
const timeLeft = ref(60);
|
||||
const countdownInterval = ref(null);
|
||||
const code = ref('')
|
||||
watch(() => code.value, (newVal) => {
|
||||
if (newVal.length > 6) {
|
||||
code.value = newVal.slice(0, 6)
|
||||
}
|
||||
})
|
||||
const sendCodeApi = async () => {
|
||||
const data = {
|
||||
TelNum: telNum.value
|
||||
@ -65,7 +70,6 @@ const isSignUp = async () => {
|
||||
} else {
|
||||
router.push(`/title-forward/upload-id-card/${0}`)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const goRouter = async () => {
|
||||
@ -91,7 +95,6 @@ const goRouter = async () => {
|
||||
if (res.status === 0) {
|
||||
isSignUp()
|
||||
}
|
||||
// isSignUp()
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
clearInterval(countdownInterval.value);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { showImagePreview } from 'vant';
|
||||
import { ref, computed } from "vue";
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { useUserStore } from '@/stores/userStore.js'
|
||||
import { storeToRefs } from "pinia";
|
||||
import dayjs from "dayjs";
|
||||
@ -16,6 +16,11 @@ const btnStatus = ref(0)
|
||||
const isCountingDown = ref(false);
|
||||
const countdownInterval = ref(null);
|
||||
const code = ref('')
|
||||
watch(() => code.value, (newVal) => {
|
||||
if (newVal.length > 6) {
|
||||
code.value = newVal.slice(0, 6)
|
||||
}
|
||||
})
|
||||
const timeLeft = ref(60);
|
||||
const showBottom = ref(false)
|
||||
const sendCodeApi = async () => {
|
||||
@ -170,21 +175,17 @@ const goRouter = () => {
|
||||
<div class="wrap1">
|
||||
<div class="wrap1_1">身份证人像面</div>
|
||||
<div class="wrap1_2"><img class="wrap1_2_1"
|
||||
:src="submitReturnData.idCardPhoto">
|
||||
<img class="wrap1_2_2"
|
||||
@click="showImagePreview([submitReturnData.idCardPhoto])"
|
||||
src="@/assets/images/zu1179@2x.png"
|
||||
alt="">
|
||||
:src="submitReturnData.idCardPhoto"
|
||||
@click="showImagePreview([submitReturnData.idCardPhoto])">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap1">
|
||||
<div class="wrap1_1">身份证国徽面</div>
|
||||
<div class="wrap1_2"><img class="wrap1_2_1"
|
||||
:src="submitReturnData.idCardBackPhoto">
|
||||
<img class="wrap1_2_2"
|
||||
@click="showImagePreview([submitReturnData.idCardBackPhoto])"
|
||||
src="@/assets/images/zu1179@2x.png"
|
||||
alt="">
|
||||
:src="submitReturnData.idCardBackPhoto"
|
||||
@click="showImagePreview([submitReturnData.idCardBackPhoto])">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -224,16 +225,16 @@ const goRouter = () => {
|
||||
<div class="content4">
|
||||
<div class="wrap1">近照</div>
|
||||
<div class="wrap2">
|
||||
<div class="wrap2_1">
|
||||
<div class="wrap2_1"
|
||||
@click="showImagePreview([submitReturnData.artistPhoto])">
|
||||
<img :src="submitReturnData.artistPhoto"
|
||||
alt="">
|
||||
</div>
|
||||
<div v-show="btnStatus===0"
|
||||
class="wrap2_2">
|
||||
<img src="@/assets/images/zu1181@2x.png"
|
||||
@click="showImagePreview([submitReturnData.artistPhoto])"
|
||||
alt="">
|
||||
</div>
|
||||
<!-- <div v-show="btnStatus===0"
|
||||
class="wrap2_2"
|
||||
>
|
||||
|
||||
</div> -->
|
||||
<div class="wrap2_3"
|
||||
v-show="btnStatus===1">
|
||||
<van-uploader :afterRead="afterRead">
|
||||
@ -305,16 +306,15 @@ const goRouter = () => {
|
||||
<div class="content4">
|
||||
<div class="wrap1">作品</div>
|
||||
<div class="wrap2">
|
||||
<div class="wrap2_1">
|
||||
<div class="wrap2_1"
|
||||
@click="showImagePreview([submitReturnData.artworkFile])">
|
||||
<img :src="submitReturnData.artworkFile"
|
||||
alt="">
|
||||
</div>
|
||||
<div v-show="btnStatus===0"
|
||||
<!-- <div v-show="btnStatus===0"
|
||||
class="wrap2_2">
|
||||
<img src="@/assets/images/zu1181@2x.png"
|
||||
@click="showImagePreview([submitReturnData.artworkFile])"
|
||||
alt="">
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
<div class="wrap2_3"
|
||||
v-show="btnStatus===1">
|
||||
<van-uploader :afterRead="afterReadArtworkFile">
|
||||
|
Loading…
Reference in New Issue
Block a user