特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

360 lines
7.9 KiB

10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
8 months ago
8 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
  1. <template>
  2. <!-- 实名认证 -->
  3. <view class="page">
  4. <navbar title="实名认证"
  5. leftClick
  6. @leftClick="$utils.navigateBack"/>
  7. <view class="info-tips">
  8. 完成实名认证<text
  9. @click="$refs.configPopup.open('permission_authentic_person')">您将获得个人实名认证平台特权</text>
  10. </view>
  11. <view style="color: red;" v-if="sub ==2">
  12. 已驳回原因{{form.remark}}
  13. </view>
  14. <view class="form">
  15. <view class="form-item">
  16. <view class="label">
  17. 姓名
  18. </view>
  19. <input type="text" class="form-input"
  20. placeholder="请输入姓名"
  21. v-model="form.name"/>
  22. </view>
  23. <view class="form-item">
  24. <view class="label">
  25. 身份证号码
  26. </view>
  27. <input type="text" class="form-input"
  28. placeholder="请输入身份证号码"
  29. v-model="form.cerNo"/>
  30. </view>
  31. <view class="form-item">
  32. <view class="label">
  33. 联系方式
  34. </view>
  35. <input type="text" class="form-input"
  36. placeholder="请输入联系方式"
  37. v-model="form.phone"/>
  38. </view>
  39. <view class="form-item">
  40. <view class="title">
  41. 请上传身份证人像面照片选填
  42. </view>
  43. <view class="tips">
  44. 信息仅用身份核实上传后可增加曝光机会
  45. </view>
  46. </view>
  47. <view class="form-item">
  48. <uv-upload
  49. :fileList="fileList"
  50. :maxCount="1"
  51. width="690rpx"
  52. height="280rpx"
  53. multiple
  54. name="fileList"
  55. @afterRead="afterRead"
  56. @delete="deleteImage">
  57. <view class="upload">
  58. <image src="../static/auth/cart.png"
  59. mode="aspectFit"
  60. style="width: 390rpx;height: 280rpx;" />
  61. <view class="btn-add">
  62. 点击上传
  63. </view>
  64. </view>
  65. </uv-upload>
  66. </view>
  67. <view class="form-item">
  68. <view class="tips"
  69. style="text-align: center;padding: 20rpx 0;">
  70. (确保文字清晰可辨避免遮挡不全反光)
  71. </view>
  72. </view>
  73. <view class="form-item">
  74. <view class="title">
  75. 授权书选填
  76. </view>
  77. </view>
  78. <view class="form-item">
  79. <uv-upload
  80. :fileList="authFileList"
  81. :maxCount="1"
  82. width="280rpx"
  83. height="280rpx"
  84. multiple
  85. name="authFileList"
  86. @afterRead="afterRead"
  87. @delete="deleteImage">
  88. </uv-upload>
  89. </view>
  90. <view class="form-item">
  91. <view class="title">
  92. 技能证书选填
  93. </view>
  94. </view>
  95. <view class="form-item">
  96. <uv-upload
  97. :fileList="skillBook"
  98. :maxCount="9"
  99. width="280rpx"
  100. height="280rpx"
  101. multiple
  102. name="skillBook"
  103. @afterRead="afterRead"
  104. @delete="deleteImage">
  105. </uv-upload>
  106. </view>
  107. </view>
  108. <view v-if="sub==0" class="uni-color-btn" @click="sumbit">
  109. 认证
  110. </view>
  111. <view v-if="sub==1 && !isExpiringSoon" class="uni-uncolor-btn">
  112. 已审核通过
  113. </view>
  114. <view v-if="sub==1 && isExpiringSoon" class="uni-color-btn" @click="sumbit">
  115. {{expireText}}
  116. </view>
  117. <view v-if="sub==2" class="uni-redcolor-btn" @click="sumbit">
  118. 已驳回,请重新提交
  119. </view>
  120. <view class="config">
  121. <uv-checkbox-group
  122. v-model="checkboxValue"
  123. shape="circle">
  124. <view class="content">
  125. <view
  126. style="display: flex;">
  127. <uv-checkbox
  128. size="40rpx"
  129. icon-size="30rpx"
  130. activeColor="#3796F8"
  131. :name="1"
  132. ></uv-checkbox>
  133. 阅读并同意我们的<text @click="$refs.configPopup.open('config_service_authentic')">个人实名认证服务协议</text>
  134. </view>
  135. </view>
  136. </uv-checkbox-group>
  137. </view>
  138. <configPopup ref="configPopup"/>
  139. </view>
  140. </template>
  141. <script>
  142. export default {
  143. data() {
  144. return {
  145. checkboxValue : [],
  146. form : {},
  147. fileList: [],
  148. authFileList : [],
  149. skillBook : [],
  150. sub : 0,
  151. isExpiringSoon: false, // 是否即将过期或已过期
  152. expireText: '认证即将过期,重新认证', // 过期状态文案
  153. }
  154. },
  155. onLoad() {
  156. this.getAuthenticationPerson();
  157. },
  158. methods: {
  159. //获取个人实名信息
  160. getAuthenticationPerson(){
  161. this.$api('getAuthenticationPerson',{}, res =>{
  162. if(res.code == 200 && res.result){
  163. this.form = res.result || {};
  164. this.sub = this.form.status || 0;
  165. // 检查validTime是否即将过期或已过期
  166. if(this.form.validTime && this.sub == 1) {
  167. const validTime = new Date(this.form.validTime);
  168. const currentTime = new Date();
  169. const sevenDaysLater = new Date();
  170. sevenDaysLater.setDate(currentTime.getDate() + 7);
  171. // 如果已过期或7天内过期,允许重新认证
  172. if(validTime <= sevenDaysLater) {
  173. this.isExpiringSoon = true;
  174. // 设置过期状态文案
  175. if(validTime <= currentTime) {
  176. this.expireText = '认证已过期,重新认证';
  177. } else {
  178. this.expireText = '认证即将过期,重新认证';
  179. }
  180. }
  181. }
  182. this.fileList = this.form.image ? this.form.image.split(',').map(url => {
  183. return {
  184. url
  185. }
  186. }) : []
  187. this.authFileList = this.form.authorizationBook ? this.form.authorizationBook.split(',').map(url => {
  188. return {
  189. url
  190. }
  191. }) : []
  192. this.skillBook = this.form.skillBook ? this.form.skillBook.split(',').map(url => {
  193. return {
  194. url
  195. }
  196. }) : []
  197. }
  198. })
  199. },
  200. deleteImage(e){
  201. this[e.name].splice(e.index, 1)
  202. },
  203. afterRead(e){
  204. let self = this
  205. e.file.forEach(file => {
  206. self.$Oss.ossUpload(file.url).then(url => {
  207. self[e.name].push({
  208. url
  209. })
  210. })
  211. })
  212. },
  213. //提交实名认证信息 :lzx
  214. sumbit(){
  215. if(!this.checkboxValue.length){
  216. return uni.showToast({
  217. title: '请先同意个人实名认证服务协议',
  218. icon:'none'
  219. })
  220. }
  221. this.form.image = this.fileList.map((item) => item.url).join(",")
  222. this.form.authorizationBook = this.authFileList.map((item) => item.url).join(",")
  223. this.form.skillBook = this.skillBook.map((item) => item.url).join(",")
  224. if(this.$utils.verificationAll(this.form,{
  225. name:'请输入姓名',
  226. cerNo:'请输入身份证号码',
  227. phone:'请输入电话号码',
  228. // image:'身份证照片不能为空',
  229. })) {
  230. return
  231. }
  232. // 清理不需要给后端的字段
  233. delete this.form.createBy
  234. delete this.form.createTime
  235. delete this.form.updateBy
  236. delete this.form.updateTime
  237. delete this.form.userId
  238. delete this.form.validTime
  239. this.$api('addAuthenticationPerson',this.form, res =>{
  240. if(res.code == 200){
  241. uni.showToast({
  242. title:'提交成功!等待审核',
  243. icon: 'none'
  244. })
  245. setTimeout(uni.navigateBack,1000,-1)
  246. }
  247. })
  248. }
  249. }
  250. }
  251. </script>
  252. <style scoped lang="scss">
  253. .page{
  254. background-color: #fff;
  255. min-height: 100vh;
  256. padding-bottom: 100rpx;
  257. .info-tips{
  258. width: 100%;
  259. padding: 30rpx 0;
  260. background-color: #f3f3f3;
  261. text-align: center;
  262. text{
  263. color: $uni-color;
  264. }
  265. }
  266. .form {
  267. padding: 30rpx;
  268. .form-item{
  269. .label{
  270. padding: 20rpx 0;
  271. }
  272. .form-input{
  273. border: 1px solid $uni-color;
  274. background: rgba($uni-color, 0.1);
  275. padding: 10rpx 20rpx;
  276. font-size: 28rpx;
  277. }
  278. .title{
  279. font-weight: 900;
  280. margin-top: 50rpx;
  281. padding: 10rpx 0;
  282. }
  283. .tips{
  284. font-size: 26rpx;
  285. color: #777;
  286. padding-bottom: 20rpx;
  287. }
  288. }
  289. .upload{
  290. display: flex;
  291. justify-content: center;
  292. align-items: center;
  293. width: 690rpx;
  294. background-color: #f3f3f3;
  295. border-radius: 10rpx;
  296. .btn-add{
  297. margin: auto;
  298. padding: 10rpx 20rpx;
  299. background-color: $uni-color;
  300. color: #fff;
  301. border-radius: 10rpx;
  302. }
  303. }
  304. }
  305. .config{
  306. font-size: 26rpx;
  307. line-height: 40rpx;
  308. width: 100%;
  309. display: flex;
  310. justify-content: center;
  311. .content{
  312. width: 100%;
  313. display: flex;
  314. flex-direction: column;
  315. align-items: center;
  316. }
  317. text{
  318. color: $uni-color;
  319. }
  320. }
  321. }
  322. </style>