ufutx_love_mp/src/pages/users/myCertification.wpy
2024-10-29 19:20:47 +08:00

457 lines
15 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="initBox" >
<view class="animation-slide-bottom">
<view class="certification_title font_28 text-center" style="color: #f33b6c">成为认证用户,即享一下特权</view>
<view class="privilege_prompt_box">
<view class="privilege_box text-center" v-for="privilegeList" key="index">
<image class="privilege_icon" src="{{item.icon}}" mode="widthFix"></image>
<view>{{item.name}}</view>
</view>
</view>
<view class="certification_box" @tap="goto('0', '真人认证')">
<image class="certification_icon flo_l" src="https://image.fulllinkai.com/202202/23/93fcf55faef535c3c5a69474a5a111ad.png" mode="widthFix"></image>
<block v-if="!state">
<view class="certification_type flo_l">
<view class="font_32 color-333 bold" style="margin-bottom: 8rpx">实名+真人认证</view>
<view class="font_26 color-999">将与公安系统核验身份真实性</view>
</view>
</block>
<block v-else>
<view class="certification_type flo_l">
<view class="font_32 color-333 bold" style="margin-bottom: 8rpx">实名认证</view>
<view class="font_26 color-999">安全可靠、真实交友</view>
</view>
</block>
<block v-if="!state">
<view class="certification_button flo_r">
<view class="jump_button text-center font_28" v-if="is_real_approved==3">去认证</view>
<block v-if="is_real_approved==0">
<view class="jump_button text-center font_28" style="width: 152rpx">重新认证</view>
<image class="failure_icon" src="https://images.ufutx.com/202101/20/a42a33b3d6c901685adc8c2b8bedf7b4.png" mode="widthFix"></image>
</block>
<view class="audit_state_box">
<block v-if="is_real_approved==1">
<image class="audit_icon" style="height: 36rpx" src="https://images.ufutx.com/202101/20/33c86266373f9c9c9fcbf479a64b37c4.png" mode="widthFix"></image>
<span class="font_28" style="color: #40D863">已认证</span>
</block>
<block v-if="is_real_approved==2">
<image class="audit_icon" src="https://images.ufutx.com/202101/20/3be02213104c9adba8ae30feb779d873.png" mode="widthFix"></image>
<span class="font_28 color-999">审核中</span>
</block>
</view>
</view>
</block>
<block v-else>
<view class="certification_button flo_r">
<view class="jump_button text-center font_28" v-if="stateV2 == 0">去认证</view>
<view class="audit_state_box" v-if="stateV2 != 0">
<image class="audit_icon" src="https://images.ufutx.com/202101/20/3be02213104c9adba8ae30feb779d873.png" mode="widthFix"></image>
<span class="font_28 color-999">审核中</span>
</view>
</view>
</block>
</view>
<view class="certification_box" style="margin-top: -46rpx" @tap.stop="goto('/pages/users/degreeCertificate', '学历认证')">
<image class="certification_icon flo_l" src="https://image.fulllinkai.com/202202/23/48cc85974cc049a13c0d4359d401087f.png" mode="widthFix"></image>
<view class="certification_type flo_l">
<view class="font_32 color-333 bold" style="margin-bottom: 8rpx">学历认证</view>
<view class="font_26 color-999">将通过人工审核查询真伪</view>
</view>
<view class="certification_button flo_r">
<block v-if="is_educate_approved==0">
<view class="jump_button text-center font_28" style="width: 152rpx">重新认证</view>
<image class="failure_icon" src="https://images.ufutx.com/202101/20/a42a33b3d6c901685adc8c2b8bedf7b4.png" mode="widthFix"></image>
</block>
<view class="jump_button text-center font_28" v-if="is_educate_approved==3">去认证</view>
<view class="audit_state_box">
<block v-if="is_educate_approved==1">
<view class="up_certification">
<image class="audit_icon" style="height: 36rpx" src="https://images.ufutx.com/202101/20/33c86266373f9c9c9fcbf479a64b37c4.png" mode="widthFix"></image>
<span class="font_28" style="color: #40D863">已认证</span>
</view>
<view class="up_button text-center font_24" @tap.stop="goToUp('/pages/users/degreeCertificate?up=1', '学历认证')">升级学历</view>
</block>
<block v-if="is_educate_approved==2">
<image class="audit_icon" src="https://images.ufutx.com/202101/20/3be02213104c9adba8ae30feb779d873.png" mode="widthFix"></image>
<span class="font_28 color-999">审核中</span>
</block>
</view>
</view>
</view>
<view class="font_24 color-999" style="margin: 0 30rpx;padding-top: 10rpx">
为了保证平台所有用户的真实性,需要验证身份信息;认证信息仅用于身份审核,不会对外泄露用户身份资料。
</view>
</view>
</view>
<view class="cu-modal {{modalName=='successfulModal'?'show':''}}">
<view class="successful_prompt_box">
<view style="padding: 60rpx 0 20rpx 0">
<image class="successful_pic" src="https://images.ufutx.com/202012/28/2168fa80aa80eb0f76ba71ac0e449c7e.png" mode="widthFix" ></image>
</view>
<view class="font_36 color-333 bold">资料正在审核中</view>
<view class="font_28 color-333 prompt_text">审核结果将在13个工作日内通知请耐心等待如有需要请直接联系客服<span class="color-theme" @tap="callPhone('18922809346')">18194066804</span></view>
<view class="Know font_32" @tap="vanish">我知道了</view>
</view>
</view>
</template>
<script>
import wepy from '@wepy/core'
import https from '../../mixins/https'
import base from '../../mixins/base'
import {service} from '../../config.js'
wepy.page({
mixins: [base, https],
data: {
navHeight: '',
routerNum: [],
mobile: wx.getStorageSync('mobile'),
is_real_approved: 0, // 真人认证状态
is_educate_approved: 3, // 学历认证状态
modalName: '',
state: true,
stateV2: 0,
init: false,
privilegeList: [
{icon: 'https://images.ufutx.com/202101/20/40eeb312d982dac28d4fa863cbb84786.png', name: '安全保障'},
{icon: 'https://images.ufutx.com/202101/20/90acfb9fb48505d82261d4309d8c046a.png', name: '推荐曝光'},
{icon: 'https://images.ufutx.com/202101/20/fcf45afa1c0b666943655bcfafdbaae2.png', name: '优质匹配'}
],
tempId: [], // 模板id
system: wx.getStorageSync('system'),
approve_time: 0
},
onShow() {
this.$showLoading('加载中')
this.GetInit()
if (wx.getStorageSync('certificationState')) {
this.stateV2 = wx.getStorageSync('certificationState')
}
},
onShareAppMessage (res) {
let vm = this
let fromUserID = wx.getStorageSync('user_id')
let url = 'pages/tabBar/welcome?from_openid=' + wx.getStorageSync('openid') + '&from_user_id=' + fromUserID
console.log(url)
return {
title: '推荐福恋,婚恋家庭幸福平台',
path: url,
imageUrl: vm.invite_pic,
success: function (res) {
wx.showToast({
title: '转发成功',
icon: 'success',
duration: 1500
})
},
fail: function (res) {
// 转发失败
}
}
},
onLoad(e) {
let menuButtonObject = wx.getMenuButtonBoundingClientRect()
wx.getSystemInfo({
success: res => {
let statusBarHeight = res.statusBarHeight,
navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2 // 导航高度
this.navHeight = navHeight
}
})
},
onPullDownRefresh() {
if (!this.state) {
this.initPageData()
}
},
methods: {
GetInit() {
let vm = this
this.$get({url: `${service.host}/audit/status`}).then(({code, data}) => {
vm.state = data.status
if (!vm.state) {
this.initPageData()
}
})
},
// 初始化页面数据
initPageData() {
this.$get({url: `${service.host}/user/approve/profile`}).then(({code, data}) => {
wx.hideLoading()
this.is_real_approved = data.is_real_approved
this.mobile = wx.getStorageSync('mobile')
this.init = true
this.is_educate_approved = data.is_educate_approved
this.approve_time = data.approve_time
})
},
handleBack() {
wx.navigateBack({
delta: 1
})
},
gotoRedirect (url) {
wx.redirectTo({url: url})
},
goto(url, text) {
let vm = this
console.log(this.mobile, 'url===')
if ((text == '真人认证' || text == '学历认证') && !this.mobile) {
wx.showModal({
title: '温馨提示',
content: '请先绑定手机号后再真人认证',
success(res) {
if (res.confirm) {
vm.$goto('/pages/users/setTing')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
return
}
if (text == '学历认证' && this.is_real_approved !== 1) {
this.$showToast('请先完成真人认证...')
return
}
if (text == '真人认证' && this.state && this.stateV2) {
this.$showToast('正在审核中...')
return
}
if (text == '真人认证' && this.is_real_approved == -1) {
wx.redirectTo({url: `/pages/users/artificial`})
return
}
if (text == '真人认证' && this.state && !this.stateV2) {
this.$redirectTo('/pages/users/realName')
return
}
if (text == '真人认证' && this.is_real_approved == 2) {
this.$showToast('正在审核中...')
// this.$redirectTo('/pages/users/artificial')
return
}
if (text == '真人认证' && this.is_real_approved != 2) {
this.$redirectTo('/pages/users/realName')
return
}
if (text == '学历认证' && this.is_educate_approved == 1) {
this.$redirectTo('/pages/users/degreeCertificate?typ=1')
return
}
if (this.is_educate_approved == 0) {
wx.navigateTo({url: url + '?anew=0'})
} else if (this.is_educate_approved == 3) {
wx.navigateTo({url: url})
}
if (this.is_educate_approved == 2) {
this.modalName = 'successfulModal'
}
},
// 跳转升级学历
goToUp(url) {
wx.navigateTo({url: url})
},
goToBack () {
this.$gotoBack(1)
},
vanish() {
this.modalName = ''
}
}
})
</script>
<style lang="less">
page {
background: #ffffff;
}
.initBox{
width: 100vw;
height: 100vh;
background: #ffffff;
}
.returnIcon_1{
width: 14rpx;
height: 28rpx;
margin-left: 30rpx;
margin-right: 22rpx;
vertical-align: middle;
margin-top: -6rpx;
}
.returnIcon_2{
width: 28rpx;
height: 32rpx;
margin-left: 30rpx;
margin-right: 8rpx;
vertical-align: middle;
margin-top: -6rpx;
}
.home_icon{
width: 144rpx;
height: 64rpx;
position: absolute;
bottom: 4rpx;
}
.titleContent{
position: absolute;
text-align: center;
width: calc(100% - 340rpx);
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
height: 60rpx;
font-size: 32rpx;
line-height: 60rpx;
cursor: none;
pointer-events: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.certification_title{
padding-top: 50rpx;
position: relative;
}
.certification_title::after, .certification_title::before{
position: absolute;
width: 110rpx;
height: 4rpx;
border-radius: 4rpx;
content: '';
top: 70rpx;
}
.certification_title::after{
background: linear-gradient(to right, #ff5380 0%, #ffffff 100%);
right: 56rpx;
}
.certification_title::before{
background: linear-gradient(to right, #ffffff 0%, #ff5380 100%);
left: 56rpx;
}
.privilege_prompt_box{
padding-top: 50rpx;
padding-bottom: 34rpx;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.privilege_box{
width: 33.3%;
font-size: 28rpx;
color: #666666;
.privilege_icon{
width: 74rpx;
height: 74rpx;
margin: 0 auto 20rpx auto;
display: block;
}
}
}
.privilege_prompt_box:after {
content: "";
flex: auto;
}
.certification_box{
width: 100vw;
height: 260rpx;
background-image: url("https://images.ufutx.com/202101/20/2720e5102b876ede32155ca691b68da6.png");
background-size: cover;
overflow: hidden;
.certification_icon{
width: 100rpx;
height: 100rpx;
margin-left: 60rpx;
margin-top: 76rpx;
}
.certification_type{
margin-top: 80rpx;
margin-left: 20rpx;
}
.certification_button{
margin-top: 106rpx;
margin-right: 60rpx;
position: relative;
.jump_button, .up_button{
width: 132rpx;
height: 52rpx;
line-height: 52rpx;
border-radius: 30rpx;
background: #ff5380;
color: #ffffff;
}
.up_certification{
margin-top: -30rpx;
}
.up_button{
position: relative;
z-index: 2222;
margin-top: 12rpx;
}
.failure_icon{
position: absolute;
width: 162rpx;
height: 74rpx;
right: 0;
top: 48rpx;
}
.audit_state_box{
.audit_icon{
width: 32rpx;
height: 32rpx;
vertical-align: middle;
margin-top: -6rpx;
margin-right: 6rpx;
}
}
}
}
.successful_prompt_box{
position: relative;
display: inline-block;
vertical-align: middle;
margin-left: auto;
margin-right: auto;
width: 600rpx;
max-width: 100%;
background-color: #ffffff;
border-radius: 24rpx;
overflow: hidden;
padding-bottom: 46rpx;
.successful_pic{
width: 180rpx;
height: 180rpx;
display: block;
margin: 0 auto;
}
.prompt_text{
padding: 48rpx 0 36rpx 0;
margin: 0 32rpx;
}
.Know{
width: 280rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 80rpx;
background: #ff5380;
color: #ffffff;
margin: 0 auto;
}
}
</style>
<config>
{
navigationBarTitleText: '我的认证',
enablePullDownRefresh: true,
backgroundColorTop: '#ffffff',
backgroundColorBottom: '#ffffff',
usingComponents: {
cuCustom: '~@/components/cuCustom'
}
}
</config>