Commit 52995e22 by sunerhu

认证--上传个人信息接口对接

parent d6a098d5
......@@ -249,8 +249,12 @@ export default {
uploadFile(params){
return request(`${cffpURL}/api/file/upload`, "POST", params)
},
// 上传计划书
// 认证--查询个人信息
querySignUpInfo(params){
return request(`${cffpURL}/user/querySignUpInfo`, "POST", params)
},
// 认证--上传就个人信息
uploadSignUpUserInfo(params){
return request(`${cffpURL}/api/cffp/user/uploadSignUpUserInfo`, "POST", params)
return request(`${cffpURL}/user/uploadSignUpUserInfo`, "POST", params)
},
}
......@@ -88,12 +88,14 @@
return {
certificateInfo:{},
userId:'1',
status:""
status:"",
userSignupId:""
};
},
onLoad(options) {
this.status = options.status
this.queryCertificateInfo(options.certificateId,options.userSignupId)
this.userSignupId = options.userSignupId
this.queryCertificateInfo(options.certificateId,this.userSignupId)
},
methods:{
queryCertificateInfo(certificateId,userSignupId){
......@@ -109,7 +111,6 @@
})
},
getDetail(){
console.log(this.status, 788584)
if(this.status != 1 && this.status != 3 &&this.status !== null){
this.registerNow()
}else {
......@@ -118,7 +119,7 @@
},
uploadinfo(){
uni.navigateTo({
url:`/pages/certifyDetail/uploadinformation`
url:`/pages/certifyDetail/uploadinformation?userSignupId=${this.userSignupId}`
})
},
// 去立即报名页面
......
......@@ -19,12 +19,13 @@
<text>证件类型</text>
<!-- <input v-model="openForm.userIdType" class="user-input" maxlength="10" type="text"
placeholder="请输入证件类型" /> -->
<!-- <picker mode="" :range="" @change="">
<!-- <picker mode="" :range="" @change="">
<view>{{erplizeList[index]}}</view>
</picker> -->
<picker v-if="erplizeList " @change="bindPickerChange" :value="index" :range="erplizeList" range-key="name">
<view style="background-color: white;">{{ erplizeList[index].name }}</view>
</picker>
<picker v-if="erplizeList " @change="bindPickerChange($event,erplizeList)" :value="index"
:range="erplizeList" range-key="name">
<view style="background-color: white;">{{ erplizeList[index].name }}</view>
</picker>
</view>
<view class="contentItem">
<text>证件号</text>
......@@ -33,11 +34,11 @@
<view class="" style="margin-top: 20rpx;">
<text>上传计划书</text>
</view>
<view class="" style="display: flex;margin-top: 20rpx;" v-if="openForm.name">
<view class="" style="display: flex;margin-top: 20rpx;" v-if="openForm.fileName">
<view class="" style="width: 20px;height: 30px;">
<image class="imagegh" src="../../static/myteam/Pdf.png" mode=""></image>
</view>
<text style="margin-left: 10rpx;">{{openForm.name}}</text>
<text style="margin-left: 10rpx;">{{openForm.fileName}}</text>
</view>
<view class="uploadpdf" @click="uploadFile()">
<view class="uploadimg">
......@@ -74,33 +75,63 @@
targetSeq: "0"
},
openForm: {
userTel:'183****9247'
signupId: '',
userTel: '183****9247',
userIdType: '1'
},
index: 0,
loading: false,
fileList: [],
fileForm: {},
erplizeList:null
erplizeList: null,
}
},
onLoad(option) {
this.openForm.signupId = option.userSignupId
this.getquerySignUpInfo()
},
onShow() {
this.geterpInitialize()
},
methods: {
async getquerySignUpInfo() {
let UserSignUpInfoQueryRequestVO = {
userSignUpId:this.openForm.signupId
}
let res = await api.querySignUpInfo(UserSignUpInfoQueryRequestVO)
this.openForm = res.data
this.openForm.signupId = res.data.id
},
// 获取证件类型
async geterpInitialize(){
async geterpInitialize() {
let res = await api.erpInitialize()
this.erplizeList = res.data.idTypes
console.log(this.erplizeList, 444)
},
bindPickerChange(e){
this.index = e.detail.value;
bindPickerChange(e, storage) {
this.openForm.userIdType = storage[e.detail.value].id
this.index = e.detail.value;
},
onsubmit() {
this.loading = true
api.uploadSignUpUserInfo(this.openForm).then(res => {
console.log(res, 555458)
let requestVo = this.openForm
// header:{
// 'content-type': 'application/json',
// },
api.uploadSignUpUserInfo(requestVo).then(res => {
if(res['success']){
//
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
});
setTimeout(()=>{
uni.navigateBack(1)
},500)
this.getquerySignUpInfo()
}
this.loading = false
})
},
......@@ -115,8 +146,8 @@
// name: res.name,
// filePath: res.data.filePath
// }
this.openForm.name = res.name
this.openForm.filePath = res.data.filePath
this.openForm.fileName = res.name
this.openForm.planBookPdfUrl = res.data.filePath
})
},
}
......@@ -127,14 +158,17 @@
.content {
width: 100vw;
}
.signfile{
display: flex;
}
.signfile {
display: flex;
}
.imagegh {
width: 30rpx;
height: 30rpx;
}
.user-input {
text-align: right;
}
......
......@@ -3,74 +3,116 @@
<view class="input-row">
<text>183****9247</text>
</view>
<view class="input-row" >
<view style="width: 65%;"><input maxlength="11" type="text" v-model="code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;" @click="getCode()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;" >{{countdown}}秒后重新获取</text></view>
<view class="input-row">
<input maxlength="11" type="text" v-model="form.password" placeholder="请输入新密码" />
</view>
<view class="input-row">
<view style="width: 65%;"><input maxlength="11" type="text" v-model="form.code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;"
@click="sendMessage()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;">{{countdown}}秒后重新获取</text>
</view>
</view>
<view class="forgetpsd"><button class="primary log-btn" @click="registerck">修改密码</button></view>
<view class="forgetpsd"><button class="primary log-btn" @click="resetPassword()">修改密码</button></view>
</view>
</template>
<script>
import common from '../../../common/common';
import api from "@/api/api";
export default {
data() {
return {
account:'',
password:'',
newpassword:'',
code:'',
form:{
mobile: "18335619247",
code:'',
password:'',
},
code: '',
countdown: '60',
timer: null,
codetimecode: false
}
},
methods:{
getCode() {
const data = {
phone: this.account,
codetype: '1'
};
api.code( data).then(res => {
console.log(res, 'asok')
if(res.code == 0){
this.sendCode()
this.codetimecode = true
methods: {
sendMessage() {
const params = {
mobileNo: this.form.mobile,
type: "1"
}
if (common.mobileNoValid(this.form.mobile)) {
api.verificationCode(params).then((res) => {
console.log(res, 7788888)
if (res['success']) {
this.sendCode()
this.codetimecode = true
uni.showToast({
title:'发送成功',
icon:'none'
})
}
})
} else {
common.errorDialog(2, '手机号校验错误')
}
},
resetPassword(){
const params = {
...this.form
}
console.log(params)
api.resetPassword(params).then((res)=>{
if(res['success']){
uni.showToast({
title:'发送成功',
icon:'none'
title: '密码重置成功,请重新登录',
duration: 5000,
icon: 'none'
})
}else {
uni.removeStorageSync('isLogin')
uni.reLaunch({
url:'/components/login/login'
})
//重置密码后需要密码登录
this.form = {
mobile:null,
code:null,
password:null,
}
}else{
uni.showToast({
title: res.msg,
icon:'none'
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
sendCode(){
this.loading(); //启动定时器
this.timer = setInterval(() =>{
//创建定时器
if(this.countdown === 1){
this.clearTimer(); //关闭定时器
this.skipStep();
}else{
this.loading();
}
},1000);
sendCode() {
this.loading(); //启动定时器
this.timer = setInterval(() => {
//创建定时器
if (this.countdown === 1) {
this.clearTimer(); //关闭定时器
this.skipStep();
} else {
this.loading();
}
}, 1000);
},
loading() {
//启动定时器
this.countdown--; //定时器减1
},
clearTimer() {
//清除定时器
clearInterval(this.timer);
this.timer = null;
this.codetimecode = false
},
loading(){
//启动定时器
this.countdown--; //定时器减1
},
clearTimer(){
//清除定时器
clearInterval(this.timer);
this.timer = null;
this.codetimecode = false
},
}
......@@ -97,7 +139,8 @@
background: #FFFFFF;
border-bottom: 1upx solid #C8C7CC;
}
.input-row-password{
.input-row-password {
height: 100upx;
display: flex;
justify-content: space-around;
......@@ -106,15 +149,16 @@
padding-left: 20upx;
background: #FFFFFF;
}
.forgetpsd{
.forgetpsd {
margin: 40upx 20upx;
}
.log-btn {
border-radius: 10upx;
font-size: 34upx;
color: #FFFFFF;
background: #20269B;
background: #20269B;
box-shadow: 0px 16upx 32upx 0px rgba(2, 168, 244, 0.24);
}
</style>
<template>
<view>
<menu-list :menuList="minorMenuLists"></menu-list>
<view style="display: flex;flex-direction: column;">
<view class="">
<menu-list :menuList="minorMenuLists"></menu-list>
</view>
<view class="footer">
<view class="foter-btn">
<button class="btn" @click="outLing()">退出登录</button>
</view>
</view>
</view>
</template>
<script>
import MenuList from "./menulist.vue"
export default {
components:{
MenuList
},
data() {
return {
minorMenuLists: [{
minorMenuLists: [
{
title: '手机号绑定',
icon: '',
link: '/pages/personalCenter/accountoperation/phonebinding',
link: null,
contentType:"183****9247",
isOpen: true,
isShow: true,
isType: false,
......@@ -38,9 +50,44 @@
}
]
}
},
methods:{
outLing(){
uni.showModal({
title: '退出登录',
content: '确定要退出登录吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('isLogin')
uni.reLaunch({
url:'/components/login/login'
})
uni.showToast({
title: '操作成功',
icon: 'none'
});
} else {
console.log('已取消')
}
}
});
},
}
}
</script>
<style>
<style scoped>
.footer{
width: 100vw;
position: fixed;
bottom: 40rpx;
}
.foter-btn{
padding: 0 20rpx;
}
.btn{
background: #20269B;
border-radius: 40rpx;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment