特易招,招聘小程序
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.

363 lines
8.0 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
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>
  44. <view class="form-item">
  45. <uv-upload
  46. :fileList="skillBook"
  47. :maxCount="9"
  48. width="280rpx"
  49. height="280rpx"
  50. multiple
  51. name="skillBook"
  52. @afterRead="afterRead"
  53. @delete="deleteImage">
  54. </uv-upload>
  55. </view>
  56. <view class="form-item">
  57. <view class="title">
  58. 请上传身份证人像面照片选填
  59. </view>
  60. <view class="tips">
  61. 信息仅用身份核实上传后可增加曝光机会
  62. </view>
  63. </view>
  64. <view class="form-item">
  65. <uv-upload
  66. :fileList="fileList"
  67. :maxCount="1"
  68. width="690rpx"
  69. height="280rpx"
  70. multiple
  71. name="fileList"
  72. @afterRead="afterRead"
  73. @delete="deleteImage">
  74. <view class="upload">
  75. <image src="../static/auth/cart.png"
  76. mode="aspectFit"
  77. style="width: 390rpx;height: 280rpx;" />
  78. <view class="btn-add">
  79. 点击上传
  80. </view>
  81. </view>
  82. </uv-upload>
  83. </view>
  84. <view class="form-item">
  85. <view class="tips"
  86. style="text-align: center;padding: 20rpx 0;">
  87. (确保文字清晰可辨避免遮挡不全反光)
  88. </view>
  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="authFileList"
  98. :maxCount="1"
  99. width="280rpx"
  100. height="280rpx"
  101. multiple
  102. name="authFileList"
  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. console.log(url);
  208. self[e.name].push({
  209. url
  210. })
  211. })
  212. })
  213. },
  214. //提交实名认证信息 :lzx
  215. sumbit(){
  216. if(!this.checkboxValue.length){
  217. return uni.showToast({
  218. title: '请先同意个人实名认证服务协议',
  219. icon:'none'
  220. })
  221. }
  222. this.form.image = this.fileList.map((item) => item.url).join(",")
  223. this.form.authorizationBook = this.authFileList.map((item) => item.url).join(",")
  224. this.form.skillBook = this.skillBook.map((item) => item.url).join(",")
  225. if(this.$utils.verificationAll(this.form,{
  226. name:'请输入姓名',
  227. cerNo:'请输入身份证号码',
  228. phone:'请输入电话号码',
  229. skillBook:'请上传上岗操作证或技能等级证书',
  230. image:'身份证照片不能为空',
  231. })) {
  232. return
  233. }
  234. // 清理不需要给后端的字段
  235. delete this.form.createBy
  236. delete this.form.createTime
  237. delete this.form.updateBy
  238. delete this.form.updateTime
  239. delete this.form.userId
  240. delete this.form.validTime
  241. this.$api('addAuthenticationPerson',this.form, res =>{
  242. if(res.code == 200){
  243. uni.showToast({
  244. title:'提交成功!等待审核',
  245. icon: 'none'
  246. })
  247. setTimeout(uni.navigateBack,1000,-1)
  248. }
  249. })
  250. }
  251. }
  252. }
  253. </script>
  254. <style scoped lang="scss">
  255. .page{
  256. background-color: #fff;
  257. min-height: 100vh;
  258. padding-bottom: 100rpx;
  259. .info-tips{
  260. width: 100%;
  261. padding: 30rpx 0;
  262. background-color: #f3f3f3;
  263. text-align: center;
  264. text{
  265. color: $uni-color;
  266. }
  267. }
  268. .form {
  269. padding: 30rpx;
  270. .form-item{
  271. .label{
  272. padding: 20rpx 0;
  273. }
  274. .form-input{
  275. border: 1px solid $uni-color;
  276. background: rgba($uni-color, 0.1);
  277. padding: 10rpx 20rpx;
  278. font-size: 28rpx;
  279. }
  280. .title{
  281. font-weight: 900;
  282. margin-top: 50rpx;
  283. padding: 10rpx 0;
  284. }
  285. .tips{
  286. font-size: 26rpx;
  287. color: #777;
  288. padding-bottom: 20rpx;
  289. }
  290. }
  291. .upload{
  292. display: flex;
  293. justify-content: center;
  294. align-items: center;
  295. width: 690rpx;
  296. background-color: #f3f3f3;
  297. border-radius: 10rpx;
  298. .btn-add{
  299. margin: auto;
  300. padding: 10rpx 20rpx;
  301. background-color: $uni-color;
  302. color: #fff;
  303. border-radius: 10rpx;
  304. }
  305. }
  306. }
  307. .config{
  308. font-size: 26rpx;
  309. line-height: 40rpx;
  310. width: 100%;
  311. display: flex;
  312. justify-content: center;
  313. .content{
  314. width: 100%;
  315. display: flex;
  316. flex-direction: column;
  317. align-items: center;
  318. }
  319. text{
  320. color: $uni-color;
  321. }
  322. }
  323. }
  324. </style>