移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

205 linhas
5.7 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header">
  4. <div class="return_btn" @click="onClickLeft"></div>
  5. <p>身份核验</p>
  6. </div>
  7. <!-- 未认证-->
  8. <div class="list_main"v-if="responseData.isFacial ==='N'" >
  9. <p class="userName">{{responseData.memberName}}<span class="noCheck">待认证</span></p>
  10. <p class="id_card" >{{responseData.idcard}}</p>
  11. <van-uploader v-model="fileList" :max-count="1" multiple :after-read="afterRead" @delete="deleteFile1" />
  12. <p class="text_block">上传或拍摄人像图进行认证</p>
  13. <p class="btn_block">验证</p>
  14. </div>
  15. <!-- 已认证-->
  16. <div class="list_main" v-if="responseData.isFacial ==='Y'">
  17. <p class="userName" >{{responseData.memberName}}
  18. <span class="yesCheck">已认证<span class="yesTime" >{{responseData.facialAt}}</span></span>
  19. </p>
  20. <p class="id_card" >{{responseData.idcard}}</p>
  21. <img class="img_block" :src="'/api'+responseData.headSculpture" alt="">
  22. <!-- <img class="img_block" src="../../assets/images/sunVillage_info/check_icon_02.png" alt="">-->
  23. <p class="text_block">您已认证,<span>{{ remainingSeconds }}</span>秒后进入页面...</p>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. import Cookies from "js-cookie";
  29. import {attachmentUpload} from "@/api/sunVillage_info/fixedAssets";
  30. export default {
  31. name: "identityCheck",
  32. data() {
  33. return {
  34. fileList:[],
  35. openPic:[],
  36. openPic2:[],
  37. responseData: null,
  38. remainingSeconds: 3, // 剩余秒数,初始值为3秒
  39. };
  40. },
  41. created() {
  42. this.responseData = this.$route.query.responseData;
  43. // 判断是否已认证
  44. if (this.responseData.isFacial === 'Y') {
  45. const countdownInterval = setInterval(() => {
  46. if (this.remainingSeconds === 0) {
  47. clearInterval(countdownInterval); // 清除计时器
  48. this.$router.push({ path: '/sunVillage_info/index_code_rights' });
  49. } else {
  50. this.remainingSeconds--;
  51. }
  52. }, 1000); // 1000 毫秒等于1秒
  53. }
  54. },
  55. methods: {
  56. deleteFile1(detail){
  57. this.openPic2.splice(detail.index,1)
  58. // this.form.openPic.splice(index,1);
  59. },
  60. afterRead(file) {
  61. this.$toast.loading({
  62. message: "上传中...",
  63. forbidClick: true,
  64. duration: 0,
  65. });
  66. console.log(file instanceof Array)
  67. if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false
  68. file.map(res=>{
  69. this.openPic.push(res.file);
  70. let params1 = new FormData();
  71. params1.append("file", res.file);
  72. attachmentUpload(params1).then((r1) => {
  73. this.openPic2.push(r1.fileName);
  74. })
  75. })
  76. }else{
  77. this.openPic.push(file);
  78. let params1 = new FormData();
  79. params1.append("file", file.file);
  80. //提交方法
  81. attachmentUpload(params1).then((r1) => {
  82. this.openPic2.push(r1.fileName);
  83. })
  84. }
  85. },
  86. },
  87. };
  88. </script>
  89. <style scoped lang="scss">
  90. /deep/ .van-uploader{
  91. margin: 6vh 0 2vh 50%;
  92. transform: translateX(-50%);
  93. }
  94. /deep/ .van-uploader__upload{
  95. margin: 0;
  96. border-radius: 50%;
  97. overflow: hidden;
  98. }
  99. /deep/ .van-uploader__preview-image{
  100. margin: 0;
  101. border-radius: 50%;
  102. overflow: hidden;
  103. }
  104. .home_wrapper{
  105. width: 100vw;
  106. min-height: 100vh;
  107. background-image:linear-gradient(#29c379, #f1f2f2, #f1f2f2, #f1f2f2);
  108. .header{
  109. text-align: center;
  110. position: relative;
  111. height: 110px;
  112. line-height: 110px;
  113. color: #ffffff;
  114. font-size: 16PX;
  115. }
  116. .return_btn {
  117. width: 24px;
  118. height: 43.2px;
  119. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  120. background-size: 20px 36px;
  121. position: absolute;
  122. left: 38px;
  123. top: 36px;
  124. }
  125. .list_main{
  126. padding:3vh 2vh 10vh;
  127. background: #ffffff;
  128. width: 94%;
  129. margin: 25px auto 0;
  130. border-radius: 15PX;
  131. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  132. .userName{
  133. font-size: 16PX;
  134. line-height: 1;
  135. .noCheck{
  136. font-size: 14PX;
  137. color: #ffffff;
  138. padding: 2PX 10PX 2PX 20PX;
  139. border-radius: 5PX;
  140. background: #bdbdbd url("../../assets/images/sunVillage_info/check_icon_01.png") no-repeat left center;
  141. background-position-x: 5PX;
  142. background-size: 12PX;
  143. }
  144. .yesCheck{
  145. font-size: 14PX;
  146. color: #ffffff;
  147. padding: 2PX 1PX 2PX 20PX;
  148. border-radius: 5PX;
  149. background: #2fc57a url("../../assets/images/sunVillage_info/check_icon_03.png") no-repeat left center;
  150. background-position-x: 5PX;
  151. background-size: 12PX;
  152. .yesTime{
  153. padding: 1PX 10PX;
  154. background: #ccf8d6;
  155. color: #2fc57a;
  156. margin-left: 10PX;
  157. margin-top: 1PX;
  158. border-radius: 5PX;
  159. }
  160. }
  161. }
  162. .id_card{
  163. font-size: 16PX;
  164. margin-top: 15PX;
  165. }
  166. .img_block{
  167. width: 30vw;
  168. margin: 4vh auto 1vh;
  169. display: block;
  170. }
  171. .text_block{
  172. font-size: 14PX;
  173. color: #a7a6a6;
  174. text-align: center;
  175. span{
  176. font-size: 18PX;
  177. color: #30c67a;
  178. font-weight: bold;
  179. }
  180. }
  181. .btn_block{
  182. display: inline-block;
  183. font-size: 14PX;
  184. color: #ffffff;
  185. border-radius: 5vh;
  186. padding: 1vh 5vh;
  187. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  188. background-image:linear-gradient(to right,#30c67a, #51e872);
  189. margin: 4vh 0 0 50%;
  190. transform: translateX(-50%);
  191. }
  192. }
  193. }
  194. </style>